src/mess/machine/c2040.c
| r7218 | r7219 | |
| 1421 | 1421 | c2040->unit[1].image = device->subdevice(FLOPPY_1); |
| 1422 | 1422 | |
| 1423 | 1423 | /* find GCR ROM */ |
| 1424 | const region_info *region = device->subregion(C4040_REGION); |
| 1425 | |
| 1424 | 1426 | if ((device->type == C2040) || (device->type == C3040)) |
| 1425 | 1427 | { |
| 1426 | | astring region_name(device->tag, ":", C2040_REGION); |
| 1427 | | c2040->gcr = memory_region(device->machine, region_name.cstr()) + |
| 1428 | | memory_region_length(device->machine, region_name.cstr()) - 0x800; |
| 1428 | region = device->subregion(C2040_REGION); |
| 1429 | 1429 | } |
| 1430 | 1430 | else if (device->type == C4040) |
| 1431 | 1431 | { |
| 1432 | | astring region_name(device->tag, ":", C4040_REGION); |
| 1433 | | c2040->gcr = memory_region(device->machine, region_name.cstr()) + |
| 1434 | | memory_region_length(device->machine, region_name.cstr()) - 0x800; |
| 1432 | region = device->subregion(C4040_REGION); |
| 1435 | 1433 | } |
| 1436 | 1434 | else if ((device->type == C8050) || (device->type == C8250)) |
| 1437 | 1435 | { |
| 1438 | | astring region_name(device->tag, ":", C8050_REGION); |
| 1439 | | c2040->gcr = memory_region(device->machine, region_name.cstr()) + |
| 1440 | | memory_region_length(device->machine, region_name.cstr()) - 0x800; |
| 1436 | region = device->subregion(C8050_REGION); |
| 1441 | 1437 | } |
| 1442 | 1438 | else if (device->type == SFD1001) |
| 1443 | 1439 | { |
| 1444 | | astring region_name(device->tag, ":", SFD1001_REGION); |
| 1445 | | c2040->gcr = memory_region(device->machine, region_name.cstr()) + |
| 1446 | | memory_region_length(device->machine, region_name.cstr()) - 0x800; |
| 1440 | region = device->subregion(SFD1001_REGION); |
| 1447 | 1441 | } |
| 1448 | 1442 | |
| 1443 | c2040->gcr = region->base.u8 + region->length - 0x800; |
| 1444 | |
| 1449 | 1445 | /* allocate data timer */ |
| 1450 | 1446 | c2040->bit_timer = timer_alloc(device->machine, bit_tick, (void *)device); |
| 1451 | 1447 | |