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 |
* |
* |
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); |
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 |
} |
} |
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", |
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, |
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, |