diff options
Diffstat (limited to 'src/mame/drivers/shaolins.cpp')
-rw-r--r-- | src/mame/drivers/shaolins.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/mame/drivers/shaolins.cpp b/src/mame/drivers/shaolins.cpp index 04b39935a8d..aa924427305 100644 --- a/src/mame/drivers/shaolins.cpp +++ b/src/mame/drivers/shaolins.cpp @@ -32,31 +32,32 @@ TIMER_DEVICE_CALLBACK_MEMBER(shaolins_state::interrupt) -ADDRESS_MAP_START(shaolins_state::shaolins_map) - AM_RANGE(0x0000, 0x0000) AM_WRITE(nmi_w) /* bit 0 = flip screen, bit 1 = nmi enable, bit 2 = ? */ +void shaolins_state::shaolins_map(address_map &map) +{ + map(0x0000, 0x0000).w(this, FUNC(shaolins_state::nmi_w)); /* bit 0 = flip screen, bit 1 = nmi enable, bit 2 = ? */ /* bit 3, bit 4 = coin counters */ - AM_RANGE(0x0100, 0x0100) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x0300, 0x0300) AM_DEVWRITE("sn1", sn76489a_device, write) /* trigger chip to read from latch. The program always */ - AM_RANGE(0x0400, 0x0400) AM_DEVWRITE("sn2", sn76489a_device, write) /* writes the same number as the latch, so we don't */ + map(0x0100, 0x0100).w("watchdog", FUNC(watchdog_timer_device::reset_w)); + map(0x0300, 0x0300).w("sn1", FUNC(sn76489a_device::write)); /* trigger chip to read from latch. The program always */ + map(0x0400, 0x0400).w("sn2", FUNC(sn76489a_device::write)); /* writes the same number as the latch, so we don't */ /* bother emulating them. */ - AM_RANGE(0x0500, 0x0500) AM_READ_PORT("DSW1") - AM_RANGE(0x0600, 0x0600) AM_READ_PORT("DSW2") - AM_RANGE(0x0700, 0x0700) AM_READ_PORT("SYSTEM") - AM_RANGE(0x0701, 0x0701) AM_READ_PORT("P1") - AM_RANGE(0x0702, 0x0702) AM_READ_PORT("P2") - AM_RANGE(0x0703, 0x0703) AM_READ_PORT("DSW3") - AM_RANGE(0x0800, 0x0800) AM_WRITENOP /* latch for 76496 #0 */ - AM_RANGE(0x1000, 0x1000) AM_WRITENOP /* latch for 76496 #1 */ - AM_RANGE(0x1800, 0x1800) AM_WRITE(palettebank_w) - AM_RANGE(0x2000, 0x2000) AM_WRITE(scroll_w) - AM_RANGE(0x2800, 0x2bff) AM_RAM /* RAM BANK 2 */ - AM_RANGE(0x3000, 0x30ff) AM_RAM /* RAM BANK 1 */ - AM_RANGE(0x3100, 0x33ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x3800, 0x3bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") - AM_RANGE(0x3c00, 0x3fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") - AM_RANGE(0x4000, 0x5fff) AM_ROM /* Machine checks for extra rom */ - AM_RANGE(0x6000, 0xffff) AM_ROM -ADDRESS_MAP_END + map(0x0500, 0x0500).portr("DSW1"); + map(0x0600, 0x0600).portr("DSW2"); + map(0x0700, 0x0700).portr("SYSTEM"); + map(0x0701, 0x0701).portr("P1"); + map(0x0702, 0x0702).portr("P2"); + map(0x0703, 0x0703).portr("DSW3"); + map(0x0800, 0x0800).nopw(); /* latch for 76496 #0 */ + map(0x1000, 0x1000).nopw(); /* latch for 76496 #1 */ + map(0x1800, 0x1800).w(this, FUNC(shaolins_state::palettebank_w)); + map(0x2000, 0x2000).w(this, FUNC(shaolins_state::scroll_w)); + map(0x2800, 0x2bff).ram(); /* RAM BANK 2 */ + map(0x3000, 0x30ff).ram(); /* RAM BANK 1 */ + map(0x3100, 0x33ff).ram().share("spriteram"); + map(0x3800, 0x3bff).ram().w(this, FUNC(shaolins_state::colorram_w)).share("colorram"); + map(0x3c00, 0x3fff).ram().w(this, FUNC(shaolins_state::videoram_w)).share("videoram"); + map(0x4000, 0x5fff).rom(); /* Machine checks for extra rom */ + map(0x6000, 0xffff).rom(); +} static INPUT_PORTS_START( shaolins ) |