summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/exprraid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/exprraid.cpp')
-rw-r--r--src/mame/drivers/exprraid.cpp69
1 files changed, 36 insertions, 33 deletions
diff --git a/src/mame/drivers/exprraid.cpp b/src/mame/drivers/exprraid.cpp
index b89138e8d12..77d501c9fdd 100644
--- a/src/mame/drivers/exprraid.cpp
+++ b/src/mame/drivers/exprraid.cpp
@@ -274,39 +274,42 @@ READ8_MEMBER(exprraid_state::vblank_r)
}
-ADDRESS_MAP_START(exprraid_state::master_map)
- AM_RANGE(0x0000, 0x05ff) AM_RAM AM_SHARE("main_ram")
- AM_RANGE(0x0600, 0x07ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(exprraid_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x0c00, 0x0fff) AM_RAM_WRITE(exprraid_colorram_w) AM_SHARE("colorram")
- AM_RANGE(0x1800, 0x1800) AM_READ_PORT("DSW0") /* DSW 0 */
- AM_RANGE(0x1801, 0x1801) AM_READ_PORT("IN1") /* Controls */
- AM_RANGE(0x1802, 0x1802) AM_READ_PORT("IN2") /* Coins */
- AM_RANGE(0x1803, 0x1803) AM_READ_PORT("DSW1") /* DSW 1 */
- AM_RANGE(0x2000, 0x2000) AM_WRITE(exprraid_int_clear_w)
- AM_RANGE(0x2001, 0x2001) AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
- AM_RANGE(0x2002, 0x2002) AM_WRITE(exprraid_flipscreen_w)
- AM_RANGE(0x2003, 0x2003) AM_WRITENOP // DMA SWAP - Allow writes to video and sprite RAM
- AM_RANGE(0x2800, 0x2800) AM_READ(exprraid_prot_data_r)
- AM_RANGE(0x2801, 0x2801) AM_READ(exprraid_prot_status_r)
- AM_RANGE(0x2800, 0x2803) AM_WRITE(exprraid_bgselect_w)
- AM_RANGE(0x2804, 0x2804) AM_WRITE(exprraid_scrolly_w)
- AM_RANGE(0x2805, 0x2806) AM_WRITE(exprraid_scrollx_w)
- AM_RANGE(0x2807, 0x2807) AM_WRITE(exprraid_prot_data_w)
- AM_RANGE(0x4000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(exprraid_state::master_io_map)
- AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(exprraid_state::slave_map)
- AM_RANGE(0x0000, 0x1fff) AM_RAM
- AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
- AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE("ym2", ym3526_device, read, write)
- AM_RANGE(0x6000, 0x6000) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
+void exprraid_state::master_map(address_map &map)
+{
+ map(0x0000, 0x05ff).ram().share("main_ram");
+ map(0x0600, 0x07ff).ram().share("spriteram");
+ map(0x0800, 0x0bff).ram().w(this, FUNC(exprraid_state::exprraid_videoram_w)).share("videoram");
+ map(0x0c00, 0x0fff).ram().w(this, FUNC(exprraid_state::exprraid_colorram_w)).share("colorram");
+ map(0x1800, 0x1800).portr("DSW0"); /* DSW 0 */
+ map(0x1801, 0x1801).portr("IN1"); /* Controls */
+ map(0x1802, 0x1802).portr("IN2"); /* Coins */
+ map(0x1803, 0x1803).portr("DSW1"); /* DSW 1 */
+ map(0x2000, 0x2000).w(this, FUNC(exprraid_state::exprraid_int_clear_w));
+ map(0x2001, 0x2001).w(m_soundlatch, FUNC(generic_latch_8_device::write));
+ map(0x2002, 0x2002).w(this, FUNC(exprraid_state::exprraid_flipscreen_w));
+ map(0x2003, 0x2003).nopw(); // DMA SWAP - Allow writes to video and sprite RAM
+ map(0x2800, 0x2800).r(this, FUNC(exprraid_state::exprraid_prot_data_r));
+ map(0x2801, 0x2801).r(this, FUNC(exprraid_state::exprraid_prot_status_r));
+ map(0x2800, 0x2803).w(this, FUNC(exprraid_state::exprraid_bgselect_w));
+ map(0x2804, 0x2804).w(this, FUNC(exprraid_state::exprraid_scrolly_w));
+ map(0x2805, 0x2806).w(this, FUNC(exprraid_state::exprraid_scrollx_w));
+ map(0x2807, 0x2807).w(this, FUNC(exprraid_state::exprraid_prot_data_w));
+ map(0x4000, 0xffff).rom();
+}
+
+void exprraid_state::master_io_map(address_map &map)
+{
+ map(0x01, 0x01).portr("IN0");
+}
+
+void exprraid_state::slave_map(address_map &map)
+{
+ map(0x0000, 0x1fff).ram();
+ map(0x2000, 0x2001).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
+ map(0x4000, 0x4001).rw("ym2", FUNC(ym3526_device::read), FUNC(ym3526_device::write));
+ map(0x6000, 0x6000).r(m_soundlatch, FUNC(generic_latch_8_device::read));
+ map(0x8000, 0xffff).rom();
+}
INPUT_CHANGED_MEMBER(exprraid_state::coin_inserted_deco16)