Previous 15994 Revisions Next

r7185 Wednesday 27th January, 2010 at 06:43:59 UTC by Curt Coder
[C2040] Added GCR rom region lookup.
[src/mess/machine]c2040.c

src/mess/machine/c2040.c
r7184r7185
1111
1212   TODO:
1313
14   - find GCR rom region
1514   - read from disk
1615   - write to disk
1716
r7184r7185
201200      c2040->i = (c2040->rw << 10) | ((c2040->pi & 0xf0) << 1) | (c2040->mode << 4) | (c2040->pi & 0x0f);
202201   }
203202
204   //c2040->e = c2040->gcr[c2040->i];
203   c2040->e = c2040->gcr[c2040->i];
205204
206205   if (LOG)
207206   {
r7184r7185
13961395   c2040->unit[1].image = device_find_child_by_tag(device, FLOPPY_1);
13971396
13981397   /* find GCR ROM */
1399   //c2040->gcr = memory_region(device->machine, "c4040:c4040") + 0x3400;
1398   astring region_name;
14001399
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
14011419   /* allocate data timer */
14021420   c2040->bit_timer = timer_alloc(device->machine, bit_tick, (void *)device);
14031421

Previous 15994 Revisions Next


© 1998-2018 The MESS Team