summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/spcforce.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/spcforce.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/spcforce.cpp')
-rw-r--r--src/mame/drivers/spcforce.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/mame/drivers/spcforce.cpp b/src/mame/drivers/spcforce.cpp
index 2bce652320d..36c28564b0c 100644
--- a/src/mame/drivers/spcforce.cpp
+++ b/src/mame/drivers/spcforce.cpp
@@ -124,21 +124,23 @@ WRITE_LINE_MEMBER(spcforce_state::unknown_w)
// written very frequently
}
-ADDRESS_MAP_START(spcforce_state::spcforce_map)
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x43ff) AM_RAM
- AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW") AM_DEVWRITE("soundlatch", generic_latch_8_device, write)
- AM_RANGE(0x7001, 0x7001) AM_READ_PORT("P1") AM_WRITE(soundtrigger_w)
- AM_RANGE(0x7002, 0x7002) AM_READ_PORT("P2") AM_WRITE(misc_outputs_w)
- AM_RANGE(0x7008, 0x700f) AM_DEVWRITE("mainlatch", ls259_device, write_d0)
- AM_RANGE(0x8000, 0x83ff) AM_RAM AM_SHARE("videoram")
- AM_RANGE(0x9000, 0x93ff) AM_RAM AM_SHARE("colorram")
- AM_RANGE(0xa000, 0xa3ff) AM_RAM AM_SHARE("scrollram")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(spcforce_state::spcforce_sound_map)
- AM_RANGE(0x0000, 0x07ff) AM_ROM
-ADDRESS_MAP_END
+void spcforce_state::spcforce_map(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x4000, 0x43ff).ram();
+ map(0x7000, 0x7000).portr("DSW").w("soundlatch", FUNC(generic_latch_8_device::write));
+ map(0x7001, 0x7001).portr("P1").w(this, FUNC(spcforce_state::soundtrigger_w));
+ map(0x7002, 0x7002).portr("P2").w(this, FUNC(spcforce_state::misc_outputs_w));
+ map(0x7008, 0x700f).w("mainlatch", FUNC(ls259_device::write_d0));
+ map(0x8000, 0x83ff).ram().share("videoram");
+ map(0x9000, 0x93ff).ram().share("colorram");
+ map(0xa000, 0xa3ff).ram().share("scrollram");
+}
+
+void spcforce_state::spcforce_sound_map(address_map &map)
+{
+ map(0x0000, 0x07ff).rom();
+}
static INPUT_PORTS_START( spcforce )