summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/bottom9.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/bottom9.cpp')
-rw-r--r--src/mame/drivers/bottom9.cpp60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/mame/drivers/bottom9.cpp b/src/mame/drivers/bottom9.cpp
index 4f283a06cd9..df28ae99552 100644
--- a/src/mame/drivers/bottom9.cpp
+++ b/src/mame/drivers/bottom9.cpp
@@ -159,35 +159,37 @@ WRITE8_MEMBER(bottom9_state::sound_bank_w)
}
-ADDRESS_MAP_START(bottom9_state::main_map)
- AM_RANGE(0x0000, 0x3fff) AM_READWRITE(k052109_051960_r, k052109_051960_w)
- AM_RANGE(0x0000, 0x07ff) AM_READWRITE(bottom9_bankedram1_r, bottom9_bankedram1_w)
- AM_RANGE(0x1f80, 0x1f80) AM_WRITE(bankswitch_w)
- AM_RANGE(0x1f90, 0x1f90) AM_WRITE(bottom9_1f90_w)
- AM_RANGE(0x1fa0, 0x1fa0) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x1fb0, 0x1fb0) AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
- AM_RANGE(0x1fc0, 0x1fc0) AM_WRITE(bottom9_sh_irqtrigger_w)
- AM_RANGE(0x1fd0, 0x1fd0) AM_READ_PORT("SYSTEM")
- AM_RANGE(0x1fd1, 0x1fd1) AM_READ_PORT("P1")
- AM_RANGE(0x1fd2, 0x1fd2) AM_READ_PORT("P2")
- AM_RANGE(0x1fd3, 0x1fd3) AM_READ_PORT("DSW1")
- AM_RANGE(0x1fe0, 0x1fe0) AM_READ_PORT("DSW2")
- AM_RANGE(0x1ff0, 0x1fff) AM_DEVWRITE("k051316", k051316_device, ctrl_w)
- AM_RANGE(0x2000, 0x27ff) AM_READWRITE(bottom9_bankedram2_r, bottom9_bankedram2_w) AM_SHARE("palette")
- AM_RANGE(0x4000, 0x5fff) AM_RAM
- AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank1")
- AM_RANGE(0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(bottom9_state::audio_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x87ff) AM_RAM
- AM_RANGE(0x9000, 0x9000) AM_WRITE(sound_bank_w)
- AM_RANGE(0xa000, 0xa00d) AM_DEVREADWRITE("k007232_1", k007232_device, read, write)
- AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE("k007232_2", k007232_device, read, write)
- AM_RANGE(0xd000, 0xd000) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(0xf000, 0xf000) AM_WRITE(nmi_enable_w)
-ADDRESS_MAP_END
+void bottom9_state::main_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rw(this, FUNC(bottom9_state::k052109_051960_r), FUNC(bottom9_state::k052109_051960_w));
+ map(0x0000, 0x07ff).rw(this, FUNC(bottom9_state::bottom9_bankedram1_r), FUNC(bottom9_state::bottom9_bankedram1_w));
+ map(0x1f80, 0x1f80).w(this, FUNC(bottom9_state::bankswitch_w));
+ map(0x1f90, 0x1f90).w(this, FUNC(bottom9_state::bottom9_1f90_w));
+ map(0x1fa0, 0x1fa0).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x1fb0, 0x1fb0).w("soundlatch", FUNC(generic_latch_8_device::write));
+ map(0x1fc0, 0x1fc0).w(this, FUNC(bottom9_state::bottom9_sh_irqtrigger_w));
+ map(0x1fd0, 0x1fd0).portr("SYSTEM");
+ map(0x1fd1, 0x1fd1).portr("P1");
+ map(0x1fd2, 0x1fd2).portr("P2");
+ map(0x1fd3, 0x1fd3).portr("DSW1");
+ map(0x1fe0, 0x1fe0).portr("DSW2");
+ map(0x1ff0, 0x1fff).w(m_k051316, FUNC(k051316_device::ctrl_w));
+ map(0x2000, 0x27ff).rw(this, FUNC(bottom9_state::bottom9_bankedram2_r), FUNC(bottom9_state::bottom9_bankedram2_w)).share("palette");
+ map(0x4000, 0x5fff).ram();
+ map(0x6000, 0x7fff).bankr("bank1");
+ map(0x8000, 0xffff).rom();
+}
+
+void bottom9_state::audio_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x87ff).ram();
+ map(0x9000, 0x9000).w(this, FUNC(bottom9_state::sound_bank_w));
+ map(0xa000, 0xa00d).rw(m_k007232_1, FUNC(k007232_device::read), FUNC(k007232_device::write));
+ map(0xb000, 0xb00d).rw(m_k007232_2, FUNC(k007232_device::read), FUNC(k007232_device::write));
+ map(0xd000, 0xd000).r("soundlatch", FUNC(generic_latch_8_device::read));
+ map(0xf000, 0xf000).w(this, FUNC(bottom9_state::nmi_enable_w));
+}
static INPUT_PORTS_START( bottom9 )