summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/othunder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/othunder.cpp')
-rw-r--r--src/mame/drivers/othunder.cpp54
1 files changed, 28 insertions, 26 deletions
diff --git a/src/mame/drivers/othunder.cpp b/src/mame/drivers/othunder.cpp
index 120d8e4685a..cc4abc6b0a9 100644
--- a/src/mame/drivers/othunder.cpp
+++ b/src/mame/drivers/othunder.cpp
@@ -470,37 +470,39 @@ WRITE8_MEMBER(othunder_state::tc0310fam_w)
MEMORY STRUCTURES
***********************************************************/
-ADDRESS_MAP_START(othunder_state::othunder_map)
- AM_RANGE(0x000000, 0x07ffff) AM_ROM
- AM_RANGE(0x080000, 0x08ffff) AM_RAM
- AM_RANGE(0x090000, 0x09000f) AM_DEVREADWRITE8("tc0220ioc", tc0220ioc_device, read, write, 0x00ff)
+void othunder_state::othunder_map(address_map &map)
+{
+ map(0x000000, 0x07ffff).rom();
+ map(0x080000, 0x08ffff).ram();
+ map(0x090000, 0x09000f).rw(m_tc0220ioc, FUNC(tc0220ioc_device::read), FUNC(tc0220ioc_device::write)).umask16(0x00ff);
// AM_RANGE(0x09000c, 0x09000d) AM_WRITENOP /* ?? (keeps writing 0x77) */
- AM_RANGE(0x100000, 0x100007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_device, word_r, step1_rbswap_word_w) /* palette */
- AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w) /* tilemaps */
- AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
- AM_RANGE(0x300000, 0x300003) AM_READWRITE(sound_r, sound_w)
- AM_RANGE(0x400000, 0x4005ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x500000, 0x500007) AM_READWRITE(lightgun_r, lightgun_w)
- AM_RANGE(0x600000, 0x600003) AM_WRITE(irq_ack_w)
-ADDRESS_MAP_END
+ map(0x100000, 0x100007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* palette */
+ map(0x200000, 0x20ffff).rw(m_tc0100scn, FUNC(tc0100scn_device::word_r), FUNC(tc0100scn_device::word_w)); /* tilemaps */
+ map(0x220000, 0x22000f).rw(m_tc0100scn, FUNC(tc0100scn_device::ctrl_word_r), FUNC(tc0100scn_device::ctrl_word_w));
+ map(0x300000, 0x300003).rw(this, FUNC(othunder_state::sound_r), FUNC(othunder_state::sound_w));
+ map(0x400000, 0x4005ff).ram().share("spriteram");
+ map(0x500000, 0x500007).rw(this, FUNC(othunder_state::lightgun_r), FUNC(othunder_state::lightgun_w));
+ map(0x600000, 0x600003).w(this, FUNC(othunder_state::irq_ack_w));
+}
/***************************************************************************/
-ADDRESS_MAP_START(othunder_state::z80_sound_map)
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("z80bank")
- AM_RANGE(0xc000, 0xdfff) AM_RAM
- AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write)
- AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, slave_port_w)
- AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, slave_comm_r, slave_comm_w)
- AM_RANGE(0xe400, 0xe403) AM_WRITE(tc0310fam_w) /* pan */
- AM_RANGE(0xe600, 0xe600) AM_WRITENOP /* ? */
- AM_RANGE(0xea00, 0xea00) AM_READ_PORT(ROTARY_PORT_TAG) /* rotary input */
- AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
- AM_RANGE(0xf000, 0xf000) AM_WRITENOP /* ? */
- AM_RANGE(0xf200, 0xf200) AM_WRITE(sound_bankswitch_w)
-ADDRESS_MAP_END
+void othunder_state::z80_sound_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x4000, 0x7fff).bankr("z80bank");
+ map(0xc000, 0xdfff).ram();
+ map(0xe000, 0xe003).rw("ymsnd", FUNC(ym2610_device::read), FUNC(ym2610_device::write));
+ map(0xe200, 0xe200).nopr().w(m_tc0140syt, FUNC(tc0140syt_device::slave_port_w));
+ map(0xe201, 0xe201).rw(m_tc0140syt, FUNC(tc0140syt_device::slave_comm_r), FUNC(tc0140syt_device::slave_comm_w));
+ map(0xe400, 0xe403).w(this, FUNC(othunder_state::tc0310fam_w)); /* pan */
+ map(0xe600, 0xe600).nopw(); /* ? */
+ map(0xea00, 0xea00).portr(ROTARY_PORT_TAG); /* rotary input */
+ map(0xee00, 0xee00).nopw(); /* ? */
+ map(0xf000, 0xf000).nopw(); /* ? */
+ map(0xf200, 0xf200).w(this, FUNC(othunder_state::sound_bankswitch_w));
+}