src/mess/machine/c2040.c
| r7184 | r7185 | |
| 11 | 11 | |
| 12 | 12 | TODO: |
| 13 | 13 | |
| 14 | | - find GCR rom region |
| 15 | 14 | - read from disk |
| 16 | 15 | - write to disk |
| 17 | 16 | |
| r7184 | r7185 | |
| 201 | 200 | c2040->i = (c2040->rw << 10) | ((c2040->pi & 0xf0) << 1) | (c2040->mode << 4) | (c2040->pi & 0x0f); |
| 202 | 201 | } |
| 203 | 202 | |
| 204 | | //c2040->e = c2040->gcr[c2040->i]; |
| 203 | c2040->e = c2040->gcr[c2040->i]; |
| 205 | 204 | |
| 206 | 205 | if (LOG) |
| 207 | 206 | { |
| r7184 | r7185 | |
| 1396 | 1395 | c2040->unit[1].image = device_find_child_by_tag(device, FLOPPY_1); |
| 1397 | 1396 | |
| 1398 | 1397 | /* find GCR ROM */ |
| 1399 | | //c2040->gcr = memory_region(device->machine, "c4040:c4040") + 0x3400; |
| 1398 | astring region_name; |
| 1400 | 1399 | |
| 1400 | if ((device->type == C2040) || (device->type == C3040)) |
| 1401 | { |
| 1402 | device_build_tag(region_name, device, "c2040"); |
| 1403 | } |
| 1404 | else if (device->type == C4040) |
| 1405 | { |
| 1406 | device_build_tag(region_name, device, "c4040"); |
| 1407 | } |
| 1408 | else if ((device->type == C8050) || (device->type == C8250)) |
| 1409 | { |
| 1410 | device_build_tag(region_name, device, "c8050"); |
| 1411 | } |
| 1412 | else if (device->type == SFD1001) |
| 1413 | { |
| 1414 | device_build_tag(region_name, device, "sfd1001"); |
| 1415 | } |
| 1416 | |
| 1417 | c2040->gcr = memory_region(device->machine, region_name.cstr()) + (memory_region_length(device->machine, region_name.cstr()) - 0x800); |
| 1418 | |
| 1401 | 1419 | /* allocate data timer */ |
| 1402 | 1420 | c2040->bit_timer = timer_alloc(device->machine, bit_tick, (void *)device); |
| 1403 | 1421 | |