summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/photon2.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/photon2.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/photon2.cpp')
-rw-r--r--src/mame/drivers/photon2.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/mame/drivers/photon2.cpp b/src/mame/drivers/photon2.cpp
index c6c93c71f26..d68c3a713aa 100644
--- a/src/mame/drivers/photon2.cpp
+++ b/src/mame/drivers/photon2.cpp
@@ -258,21 +258,23 @@ WRITE8_MEMBER(photon2_state::misc_w)
*
*************************************/
-ADDRESS_MAP_START(photon2_state::spectrum_mem)
- AM_RANGE(0x0000, 0x3fff) AM_ROMBANK("mainbank")
- AM_RANGE(0x4000, 0x5aff) AM_RAM AM_SHARE("spectrum_vram")
- AM_RANGE(0x5b00, 0xffff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(photon2_state::spectrum_io)
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x1f, 0x1f) AM_READ_PORT("JOY")
- AM_RANGE(0x5b, 0x5b) AM_READ_PORT("COIN") AM_WRITE(misc_w)
- AM_RANGE(0x7a, 0x7a) AM_WRITE(membank_w)
- AM_RANGE(0x7b, 0x7b) AM_WRITENOP // unknown write
- AM_RANGE(0x7e, 0x7e) AM_WRITE(membank_w)
- AM_RANGE(0xfe, 0xfe) AM_READWRITE(fe_r, fe_w)
-ADDRESS_MAP_END
+void photon2_state::spectrum_mem(address_map &map)
+{
+ map(0x0000, 0x3fff).bankr("mainbank");
+ map(0x4000, 0x5aff).ram().share("spectrum_vram");
+ map(0x5b00, 0xffff).ram();
+}
+
+void photon2_state::spectrum_io(address_map &map)
+{
+ map.global_mask(0xff);
+ map(0x1f, 0x1f).portr("JOY");
+ map(0x5b, 0x5b).portr("COIN").w(this, FUNC(photon2_state::misc_w));
+ map(0x7a, 0x7a).w(this, FUNC(photon2_state::membank_w));
+ map(0x7b, 0x7b).nopw(); // unknown write
+ map(0x7e, 0x7e).w(this, FUNC(photon2_state::membank_w));
+ map(0xfe, 0xfe).rw(this, FUNC(photon2_state::fe_r), FUNC(photon2_state::fe_w));
+}
/*************************************
*