/[gxemul]/trunk/src/devices/dev_dec5800.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_dec5800.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_dec5800.c,v 1.21 2007/01/28 00:41:16 debug Exp $   *  $Id: dev_dec5800.c,v 1.23 2007/06/15 18:44:19 debug Exp $
29   *     *
30     *  COMMENT: DECsystem 58x0 devices
31     *
32   *  Emulation of devices found in a DECsystem 58x0, where x is the number   *  Emulation of devices found in a DECsystem 58x0, where x is the number
33   *  of CPUs in the system. (The CPU board is called KN5800 by Ultrix.)   *  of CPUs in the system. (The CPU board is called KN5800 by Ultrix.)
34   *   *
# Line 178  DEVINIT(dec5800) Line 180  DEVINIT(dec5800)
180          char tmpstr[200];          char tmpstr[200];
181          int i;          int i;
182    
183          d = malloc(sizeof(struct dec5800_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct dec5800_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
184          memset(d, 0, sizeof(struct dec5800_data));          memset(d, 0, sizeof(struct dec5800_data));
185    
186          snprintf(tmpstr, sizeof(tmpstr), "%s.2", devinit->interrupt_path);          snprintf(tmpstr, sizeof(tmpstr), "%s.2", devinit->interrupt_path);
# Line 213  DEVINIT(dec5800) Line 211  DEVINIT(dec5800)
211              devinit->addr + 0x30000000, 0x100, dev_dec5800_vectors_access,              devinit->addr + 0x30000000, 0x100, dev_dec5800_vectors_access,
212              d, DM_DEFAULT, NULL);              d, DM_DEFAULT, NULL);
213          machine_add_tickfunction(devinit->machine, dev_dec5800_tick,          machine_add_tickfunction(devinit->machine, dev_dec5800_tick,
214              d, 14, 0.0);              d, 14);
215    
216          return 1;          return 1;
217  }  }
# Line 318  DEVINIT(decbi) Line 316  DEVINIT(decbi)
316  {  {
317          struct decbi_data *d;          struct decbi_data *d;
318    
319          d = malloc(sizeof(struct decbi_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct decbi_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
320          memset(d, 0, sizeof(struct decbi_data));          memset(d, 0, sizeof(struct decbi_data));
321    
322          memory_device_register(devinit->machine->memory, "decbi",          memory_device_register(devinit->machine->memory, "decbi",
# Line 398  void dev_deccca_init(struct memory *mem, Line 392  void dev_deccca_init(struct memory *mem,
392  {  {
393          struct deccca_data *d;          struct deccca_data *d;
394    
395          d = malloc(sizeof(struct deccca_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct deccca_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
396          memset(d, 0, sizeof(struct deccca_data));          memset(d, 0, sizeof(struct deccca_data));
397    
398          memory_device_register(mem, "deccca", baseaddr, DEV_DECCCA_LENGTH,          memory_device_register(mem, "deccca", baseaddr, DEV_DECCCA_LENGTH,
# Line 514  void dev_decxmi_init(struct memory *mem, Line 504  void dev_decxmi_init(struct memory *mem,
504  {  {
505          struct decxmi_data *d;          struct decxmi_data *d;
506    
507          d = malloc(sizeof(struct decxmi_data));          CHECK_ALLOCATION(d = malloc(sizeof(struct decxmi_data)));
         if (d == NULL) {  
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
508          memset(d, 0, sizeof(struct decxmi_data));          memset(d, 0, sizeof(struct decxmi_data));
509    
510          memory_device_register(mem, "decxmi", baseaddr, DEV_DECXMI_LENGTH,          memory_device_register(mem, "decxmi", baseaddr, DEV_DECXMI_LENGTH,

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

  ViewVC Help
Powered by ViewVC 1.1.26