summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/liberatr.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2018-03-13 07:36:43 +0100
committer Olivier Galibert <galibert@pobox.com>2018-03-14 14:07:14 +0100
commit115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch)
treef0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/liberatr.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/liberatr.cpp')
-rw-r--r--src/mame/drivers/liberatr.cpp86
1 files changed, 44 insertions, 42 deletions
diff --git a/src/mame/drivers/liberatr.cpp b/src/mame/drivers/liberatr.cpp
index 690ad7267b6..7d0752658f2 100644
--- a/src/mame/drivers/liberatr.cpp
+++ b/src/mame/drivers/liberatr.cpp
@@ -283,27 +283,28 @@ WRITE8_MEMBER( liberatr_state::earom_control_w )
*
*************************************/
-ADDRESS_MAP_START(liberatr_state::liberatr_map)
- AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(bitmap_w) AM_SHARE("bitmapram") /* overlapping for my convenience */
- AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("xcoord")
- AM_RANGE(0x0001, 0x0001) AM_RAM AM_SHARE("ycoord")
- AM_RANGE(0x0002, 0x0002) AM_READWRITE(bitmap_xy_r, bitmap_xy_w)
- AM_RANGE(0x4000, 0x403f) AM_READ(earom_r)
- AM_RANGE(0x5000, 0x5000) AM_READ(port0_r)
- AM_RANGE(0x5001, 0x5001) AM_READ_PORT("IN1")
- AM_RANGE(0x6000, 0x600f) AM_WRITEONLY AM_SHARE("base_ram")
- AM_RANGE(0x6200, 0x621f) AM_WRITEONLY AM_SHARE("colorram")
- AM_RANGE(0x6400, 0x6400) AM_WRITENOP
- AM_RANGE(0x6600, 0x6600) AM_WRITE(earom_control_w)
- AM_RANGE(0x6800, 0x6800) AM_WRITEONLY AM_SHARE("planet_frame")
- AM_RANGE(0x6a00, 0x6a00) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x6c00, 0x6c07) AM_WRITE(output_latch_w)
- AM_RANGE(0x6e00, 0x6e3f) AM_WRITE(earom_w)
- AM_RANGE(0x7000, 0x701f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
- AM_RANGE(0x7800, 0x781f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
- AM_RANGE(0x8000, 0xefff) AM_ROM
- AM_RANGE(0xfffa, 0xffff) AM_ROM
-ADDRESS_MAP_END
+void liberatr_state::liberatr_map(address_map &map)
+{
+ map(0x0000, 0x3fff).ram().w(this, FUNC(liberatr_state::bitmap_w)).share("bitmapram"); /* overlapping for my convenience */
+ map(0x0000, 0x0000).ram().share("xcoord");
+ map(0x0001, 0x0001).ram().share("ycoord");
+ map(0x0002, 0x0002).rw(this, FUNC(liberatr_state::bitmap_xy_r), FUNC(liberatr_state::bitmap_xy_w));
+ map(0x4000, 0x403f).r(this, FUNC(liberatr_state::earom_r));
+ map(0x5000, 0x5000).r(this, FUNC(liberatr_state::port0_r));
+ map(0x5001, 0x5001).portr("IN1");
+ map(0x6000, 0x600f).writeonly().share("base_ram");
+ map(0x6200, 0x621f).writeonly().share("colorram");
+ map(0x6400, 0x6400).nopw();
+ map(0x6600, 0x6600).w(this, FUNC(liberatr_state::earom_control_w));
+ map(0x6800, 0x6800).writeonly().share("planet_frame");
+ map(0x6a00, 0x6a00).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x6c00, 0x6c07).w(this, FUNC(liberatr_state::output_latch_w));
+ map(0x6e00, 0x6e3f).w(this, FUNC(liberatr_state::earom_w));
+ map(0x7000, 0x701f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x7800, 0x781f).rw("pokey1", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x8000, 0xefff).rom();
+ map(0xfffa, 0xffff).rom();
+}
@@ -313,28 +314,29 @@ ADDRESS_MAP_END
*
*************************************/
-ADDRESS_MAP_START(liberatr_state::liberat2_map)
- AM_RANGE(0x0000, 0x3fff) AM_RAM_WRITE(bitmap_w) AM_SHARE("bitmapram") /* overlapping for my convenience */
- AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("xcoord")
- AM_RANGE(0x0001, 0x0001) AM_RAM AM_SHARE("ycoord")
- AM_RANGE(0x0002, 0x0002) AM_READWRITE(bitmap_xy_r, bitmap_xy_w)
- AM_RANGE(0x4000, 0x4000) AM_READ(port0_r)
- AM_RANGE(0x4001, 0x4001) AM_READ_PORT("IN1")
- AM_RANGE(0x4000, 0x400f) AM_WRITEONLY AM_SHARE("base_ram")
- AM_RANGE(0x4200, 0x421f) AM_WRITEONLY AM_SHARE("colorram")
- AM_RANGE(0x4400, 0x4400) AM_WRITENOP
- AM_RANGE(0x4600, 0x4600) AM_WRITE(earom_control_w)
- AM_RANGE(0x4800, 0x483f) AM_READ(earom_r)
- AM_RANGE(0x4800, 0x4800) AM_WRITEONLY AM_SHARE("planet_frame")
- AM_RANGE(0x4a00, 0x4a00) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x4c00, 0x4c07) AM_WRITE(output_latch_w)
- AM_RANGE(0x4e00, 0x4e3f) AM_WRITE(earom_w)
- AM_RANGE(0x5000, 0x501f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
- AM_RANGE(0x5800, 0x581f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
+void liberatr_state::liberat2_map(address_map &map)
+{
+ map(0x0000, 0x3fff).ram().w(this, FUNC(liberatr_state::bitmap_w)).share("bitmapram"); /* overlapping for my convenience */
+ map(0x0000, 0x0000).ram().share("xcoord");
+ map(0x0001, 0x0001).ram().share("ycoord");
+ map(0x0002, 0x0002).rw(this, FUNC(liberatr_state::bitmap_xy_r), FUNC(liberatr_state::bitmap_xy_w));
+ map(0x4000, 0x4000).r(this, FUNC(liberatr_state::port0_r));
+ map(0x4001, 0x4001).portr("IN1");
+ map(0x4000, 0x400f).writeonly().share("base_ram");
+ map(0x4200, 0x421f).writeonly().share("colorram");
+ map(0x4400, 0x4400).nopw();
+ map(0x4600, 0x4600).w(this, FUNC(liberatr_state::earom_control_w));
+ map(0x4800, 0x483f).r(this, FUNC(liberatr_state::earom_r));
+ map(0x4800, 0x4800).writeonly().share("planet_frame");
+ map(0x4a00, 0x4a00).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x4c00, 0x4c07).w(this, FUNC(liberatr_state::output_latch_w));
+ map(0x4e00, 0x4e3f).w(this, FUNC(liberatr_state::earom_w));
+ map(0x5000, 0x501f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x5800, 0x581f).rw("pokey1", FUNC(pokey_device::read), FUNC(pokey_device::write));
//AM_RANGE(0x6000, 0x601f) AM_WRITE(pokey1_w) /* bug ??? */
- AM_RANGE(0x6000, 0xbfff) AM_ROM
- AM_RANGE(0xfffa, 0xffff) AM_ROM
-ADDRESS_MAP_END
+ map(0x6000, 0xbfff).rom();
+ map(0xfffa, 0xffff).rom();
+}