summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/exedexes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/exedexes.cpp')
-rw-r--r--src/mame/drivers/exedexes.cpp62
1 files changed, 32 insertions, 30 deletions
diff --git a/src/mame/drivers/exedexes.cpp b/src/mame/drivers/exedexes.cpp
index 0794d2ae45e..3dc285a8032 100644
--- a/src/mame/drivers/exedexes.cpp
+++ b/src/mame/drivers/exedexes.cpp
@@ -34,36 +34,38 @@ TIMER_DEVICE_CALLBACK_MEMBER(exedexes_state::exedexes_scanline)
}
-ADDRESS_MAP_START(exedexes_state::exedexes_map)
- AM_RANGE(0x0000, 0xbfff) AM_ROM
- AM_RANGE(0xc000, 0xc000) AM_READ_PORT("SYSTEM")
- AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P1")
- AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2")
- AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW0")
- AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW1")
- AM_RANGE(0xc800, 0xc800) AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
- AM_RANGE(0xc804, 0xc804) AM_WRITE(exedexes_c804_w) /* coin counters + text layer enable */
- AM_RANGE(0xc806, 0xc806) AM_WRITENOP /* Watchdog ?? */
- AM_RANGE(0xd000, 0xd3ff) AM_RAM_WRITE(exedexes_videoram_w) AM_SHARE("videoram") /* Video RAM */
- AM_RANGE(0xd400, 0xd7ff) AM_RAM_WRITE(exedexes_colorram_w) AM_SHARE("colorram") /* Color RAM */
- AM_RANGE(0xd800, 0xd801) AM_WRITEONLY AM_SHARE("nbg_yscroll")
- AM_RANGE(0xd802, 0xd803) AM_WRITEONLY AM_SHARE("nbg_xscroll")
- AM_RANGE(0xd804, 0xd805) AM_WRITEONLY AM_SHARE("bg_scroll")
- AM_RANGE(0xd807, 0xd807) AM_WRITE(exedexes_gfxctrl_w) /* layer enables */
- AM_RANGE(0xe000, 0xefff) AM_RAM /* Work RAM */
- AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("spriteram") /* Sprite RAM */
-ADDRESS_MAP_END
-
-
-
-ADDRESS_MAP_START(exedexes_state::sound_map)
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x47ff) AM_RAM
- AM_RANGE(0x6000, 0x6000) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
- AM_RANGE(0x8000, 0x8001) AM_DEVWRITE("aysnd", ay8910_device, address_data_w)
- AM_RANGE(0x8002, 0x8002) AM_DEVWRITE("sn1", sn76489_device, write)
- AM_RANGE(0x8003, 0x8003) AM_DEVWRITE("sn2", sn76489_device, write)
-ADDRESS_MAP_END
+void exedexes_state::exedexes_map(address_map &map)
+{
+ map(0x0000, 0xbfff).rom();
+ map(0xc000, 0xc000).portr("SYSTEM");
+ map(0xc001, 0xc001).portr("P1");
+ map(0xc002, 0xc002).portr("P2");
+ map(0xc003, 0xc003).portr("DSW0");
+ map(0xc004, 0xc004).portr("DSW1");
+ map(0xc800, 0xc800).w("soundlatch", FUNC(generic_latch_8_device::write));
+ map(0xc804, 0xc804).w(this, FUNC(exedexes_state::exedexes_c804_w)); /* coin counters + text layer enable */
+ map(0xc806, 0xc806).nopw(); /* Watchdog ?? */
+ map(0xd000, 0xd3ff).ram().w(this, FUNC(exedexes_state::exedexes_videoram_w)).share("videoram"); /* Video RAM */
+ map(0xd400, 0xd7ff).ram().w(this, FUNC(exedexes_state::exedexes_colorram_w)).share("colorram"); /* Color RAM */
+ map(0xd800, 0xd801).writeonly().share("nbg_yscroll");
+ map(0xd802, 0xd803).writeonly().share("nbg_xscroll");
+ map(0xd804, 0xd805).writeonly().share("bg_scroll");
+ map(0xd807, 0xd807).w(this, FUNC(exedexes_state::exedexes_gfxctrl_w)); /* layer enables */
+ map(0xe000, 0xefff).ram(); /* Work RAM */
+ map(0xf000, 0xffff).ram().share("spriteram"); /* Sprite RAM */
+}
+
+
+
+void exedexes_state::sound_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x4000, 0x47ff).ram();
+ map(0x6000, 0x6000).r("soundlatch", FUNC(generic_latch_8_device::read));
+ map(0x8000, 0x8001).w("aysnd", FUNC(ay8910_device::address_data_w));
+ map(0x8002, 0x8002).w("sn1", FUNC(sn76489_device::write));
+ map(0x8003, 0x8003).w("sn2", FUNC(sn76489_device::write));
+}