/[gxemul]/trunk/src/devices/dev_ps2_spd.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_ps2_spd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_ps2_spd.c,v 1.16 2007/01/28 00:41:17 debug Exp $   *  $Id: dev_ps2_spd.c,v 1.17 2007/06/15 19:57:33 debug Exp $
29   *     *  
30   *  Playstation 2 "SPD" harddisk controller.   *  COMMENT: PlayStation 2 SPD harddisk controller
31   *   *
32   *  TODO   *  TODO
33   */   */
# Line 99  DEVINIT(ps2_spd) Line 99  DEVINIT(ps2_spd)
99          struct ps2_spd_data *d;          struct ps2_spd_data *d;
100          char tmpstr[200];          char tmpstr[200];
101    
102          d = malloc(sizeof(struct ps2_spd_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct ps2_spd_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
103          memset(d, 0, sizeof(struct ps2_spd_data));          memset(d, 0, sizeof(struct ps2_spd_data));
104    
105          d->wdcaddr = devinit->addr + DEV_PS2_SPD_LENGTH;          d->wdcaddr = devinit->addr + DEV_PS2_SPD_LENGTH;
106    
107          memory_device_register(devinit->machine->memory, "ps2_spd",          memory_device_register(devinit->machine->memory, "ps2_spd",

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26