diff options
Diffstat (limited to 'src/mame/machine/decopincpu.cpp')
-rw-r--r-- | src/mame/machine/decopincpu.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/src/mame/machine/decopincpu.cpp b/src/mame/machine/decopincpu.cpp index 8a90f3b62cf..1f4c47d1bb6 100644 --- a/src/mame/machine/decopincpu.cpp +++ b/src/mame/machine/decopincpu.cpp @@ -21,29 +21,31 @@ DEFINE_DEVICE_TYPE(DECOCPU2, decocpu_type2_device, "decocpu2", "Data East Pin DEFINE_DEVICE_TYPE(DECOCPU3, decocpu_type3_device, "decocpu3", "Data East Pinball CPU Board Type 3") DEFINE_DEVICE_TYPE(DECOCPU3B, decocpu_type3b_device, "decocpu3b", "Data East Pinball CPU Board Type 3B") -ADDRESS_MAP_START(decocpu_type1_device::decocpu1_map) - AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x2100, 0x2103) AM_DEVREADWRITE("pia21", pia6821_device, read, write) // sound+solenoids - AM_RANGE(0x2200, 0x2200) AM_WRITE(solenoid2_w) // solenoids - AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia24", pia6821_device, read, write) // lamps - AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia28", pia6821_device, read, write) // display - AM_RANGE(0x2c00, 0x2c03) AM_DEVREADWRITE("pia2c", pia6821_device, read, write) // alphanumeric display - AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs - AM_RANGE(0x3400, 0x3403) AM_DEVREADWRITE("pia34", pia6821_device, read, write) // widget +void decocpu_type1_device::decocpu1_map(address_map &map) +{ + map(0x0000, 0x07ff).ram().share("nvram"); + map(0x2100, 0x2103).rw("pia21", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // sound+solenoids + map(0x2200, 0x2200).w(this, FUNC(decocpu_type1_device::solenoid2_w)); // solenoids + map(0x2400, 0x2403).rw("pia24", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // lamps + map(0x2800, 0x2803).rw("pia28", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // display + map(0x2c00, 0x2c03).rw("pia2c", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // alphanumeric display + map(0x3000, 0x3003).rw("pia30", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // inputs + map(0x3400, 0x3403).rw("pia34", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // widget //AM_RANGE(0x4000, 0xffff) AM_ROM -ADDRESS_MAP_END - -ADDRESS_MAP_START(decocpu_type2_device::decocpu2_map) - AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("nvram") - AM_RANGE(0x2100, 0x2103) AM_DEVREADWRITE("pia21", pia6821_device, read, write) // sound+solenoids - AM_RANGE(0x2200, 0x2200) AM_WRITE(solenoid2_w) // solenoids - AM_RANGE(0x2400, 0x2403) AM_DEVREADWRITE("pia24", pia6821_device, read, write) // lamps - AM_RANGE(0x2800, 0x2803) AM_DEVREADWRITE("pia28", pia6821_device, read, write) // display - AM_RANGE(0x2c00, 0x2c03) AM_DEVREADWRITE("pia2c", pia6821_device, read, write) // alphanumeric display - AM_RANGE(0x3000, 0x3003) AM_DEVREADWRITE("pia30", pia6821_device, read, write) // inputs - AM_RANGE(0x3400, 0x3403) AM_DEVREADWRITE("pia34", pia6821_device, read, write) // widget +} + +void decocpu_type2_device::decocpu2_map(address_map &map) +{ + map(0x0000, 0x1fff).ram().share("nvram"); + map(0x2100, 0x2103).rw("pia21", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // sound+solenoids + map(0x2200, 0x2200).w(this, FUNC(decocpu_type2_device::solenoid2_w)); // solenoids + map(0x2400, 0x2403).rw("pia24", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // lamps + map(0x2800, 0x2803).rw("pia28", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // display + map(0x2c00, 0x2c03).rw("pia2c", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // alphanumeric display + map(0x3000, 0x3003).rw("pia30", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // inputs + map(0x3400, 0x3403).rw("pia34", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); // widget //AM_RANGE(0x4000, 0xffff) AM_ROM -ADDRESS_MAP_END +} static INPUT_PORTS_START( decocpu1 ) PORT_START("DIAGS") |