summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/thedeep.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/thedeep.cpp')
-rw-r--r--src/mame/drivers/thedeep.cpp54
1 files changed, 28 insertions, 26 deletions
diff --git a/src/mame/drivers/thedeep.cpp b/src/mame/drivers/thedeep.cpp
index bfcb13d7832..92694707734 100644
--- a/src/mame/drivers/thedeep.cpp
+++ b/src/mame/drivers/thedeep.cpp
@@ -148,26 +148,27 @@ WRITE8_MEMBER(thedeep_state::e100_w)
logerror("pc %04x: e100 = %02x\n", m_maincpu->pc(),data);
}
-ADDRESS_MAP_START(thedeep_state::main_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") // ROM (banked)
- AM_RANGE(0xc000, 0xcfff) AM_RAM
- AM_RANGE(0xd000, 0xdfff) AM_RAM // RAM (MCU data copied here)
- AM_RANGE(0xe000, 0xe000) AM_READWRITE(protection_r, protection_w) // To MCU
- AM_RANGE(0xe004, 0xe004) AM_READWRITE(e004_r, nmi_w) //
- AM_RANGE(0xe008, 0xe008) AM_READ_PORT("e008") // P1 (Inputs)
- AM_RANGE(0xe009, 0xe009) AM_READ_PORT("e009") // P2
- AM_RANGE(0xe00a, 0xe00a) AM_READ_PORT("e00a") // DSW1
- AM_RANGE(0xe00b, 0xe00b) AM_READ_PORT("e00b") // DSW2
- AM_RANGE(0xe00c, 0xe00c) AM_DEVWRITE("soundlatch", generic_latch_8_device, write) // To Sound CPU
- AM_RANGE(0xe100, 0xe100) AM_WRITE(e100_w) // ?
- AM_RANGE(0xe210, 0xe213) AM_WRITEONLY AM_SHARE("scroll") // Scroll
- AM_RANGE(0xe400, 0xe7ff) AM_RAM AM_SHARE("spriteram") // Sprites
- AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(vram_1_w) AM_SHARE("vram_1") // Text Layer
- AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(vram_0_w) AM_SHARE("vram_0") // Background Layer
- AM_RANGE(0xf800, 0xf83f) AM_RAM AM_SHARE("scroll2") // Column Scroll
- AM_RANGE(0xf840, 0xffff) AM_RAM
-ADDRESS_MAP_END
+void thedeep_state::main_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0xbfff).bankr("bank1"); // ROM (banked)
+ map(0xc000, 0xcfff).ram();
+ map(0xd000, 0xdfff).ram(); // RAM (MCU data copied here)
+ map(0xe000, 0xe000).rw(this, FUNC(thedeep_state::protection_r), FUNC(thedeep_state::protection_w)); // To MCU
+ map(0xe004, 0xe004).rw(this, FUNC(thedeep_state::e004_r), FUNC(thedeep_state::nmi_w)); //
+ map(0xe008, 0xe008).portr("e008"); // P1 (Inputs)
+ map(0xe009, 0xe009).portr("e009"); // P2
+ map(0xe00a, 0xe00a).portr("e00a"); // DSW1
+ map(0xe00b, 0xe00b).portr("e00b"); // DSW2
+ map(0xe00c, 0xe00c).w(m_soundlatch, FUNC(generic_latch_8_device::write)); // To Sound CPU
+ map(0xe100, 0xe100).w(this, FUNC(thedeep_state::e100_w)); // ?
+ map(0xe210, 0xe213).writeonly().share("scroll"); // Scroll
+ map(0xe400, 0xe7ff).ram().share("spriteram"); // Sprites
+ map(0xe800, 0xefff).ram().w(this, FUNC(thedeep_state::vram_1_w)).share("vram_1"); // Text Layer
+ map(0xf000, 0xf7ff).ram().w(this, FUNC(thedeep_state::vram_0_w)).share("vram_0"); // Background Layer
+ map(0xf800, 0xf83f).ram().share("scroll2"); // Column Scroll
+ map(0xf840, 0xffff).ram();
+}
/***************************************************************************
@@ -176,12 +177,13 @@ ADDRESS_MAP_END
***************************************************************************/
-ADDRESS_MAP_START(thedeep_state::audio_map)
- AM_RANGE(0x0000, 0x07ff) AM_RAM
- AM_RANGE(0x0800, 0x0801) AM_DEVWRITE("ymsnd", ym2203_device, write) //
- AM_RANGE(0x3000, 0x3000) AM_DEVREAD("soundlatch", generic_latch_8_device, read) // From Main CPU
- AM_RANGE(0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
+void thedeep_state::audio_map(address_map &map)
+{
+ map(0x0000, 0x07ff).ram();
+ map(0x0800, 0x0801).w("ymsnd", FUNC(ym2203_device::write)); //
+ map(0x3000, 0x3000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); // From Main CPU
+ map(0x8000, 0xffff).rom();
+}
/***************************************************************************