summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/wallc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/wallc.cpp')
-rw-r--r--src/mame/drivers/wallc.cpp70
1 files changed, 36 insertions, 34 deletions
diff --git a/src/mame/drivers/wallc.cpp b/src/mame/drivers/wallc.cpp
index 76417032c61..6a07beff412 100644
--- a/src/mame/drivers/wallc.cpp
+++ b/src/mame/drivers/wallc.cpp
@@ -264,40 +264,42 @@ WRITE8_MEMBER(wallc_state::unkitpkr_out2_w)
{
}
-ADDRESS_MAP_START(wallc_state::wallc_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(videoram_w) AM_MIRROR(0xc00) AM_SHARE("videoram") /* 2114, 2114 */
- AM_RANGE(0xa000, 0xa3ff) AM_RAM /* 2114, 2114 */
-
- AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW1")
- AM_RANGE(0xb200, 0xb200) AM_READ_PORT("SYSTEM")
- AM_RANGE(0xb400, 0xb400) AM_READ_PORT("DIAL")
- AM_RANGE(0xb600, 0xb600) AM_READ_PORT("DSW2")
-
- AM_RANGE(0xb000, 0xb000) AM_WRITENOP
- AM_RANGE(0xb100, 0xb100) AM_WRITE(wallc_coin_counter_w)
- AM_RANGE(0xb200, 0xb200) AM_WRITENOP
- AM_RANGE(0xb500, 0xb500) AM_DEVWRITE("aysnd", ay8912_device, address_w)
- AM_RANGE(0xb600, 0xb600) AM_DEVWRITE("aysnd", ay8912_device, data_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(wallc_state::unkitpkr_map)
- AM_RANGE(0x0000, 0x7fff) AM_ROM
- AM_RANGE(0x8000, 0x83ff) AM_RAM_WRITE(videoram_w) AM_MIRROR(0xc00) AM_SHARE("videoram") /* 2114, 2114 */
- AM_RANGE(0xa000, 0xa3ff) AM_RAM /* 2114, 2114 */
-
- AM_RANGE(0xb000, 0xb000) AM_READ_PORT("IN0")
- AM_RANGE(0xb100, 0xb100) AM_READ_PORT("IN1")
- AM_RANGE(0xb200, 0xb200) AM_READ_PORT("IN2")
- AM_RANGE(0xb300, 0xb300) AM_READ_PORT("IN3")
- AM_RANGE(0xb500, 0xb5ff) AM_READNOP // read by memory test routine. left over from some other game
-
- AM_RANGE(0xb000, 0xb000) AM_WRITE(unkitpkr_out0_w)
- AM_RANGE(0xb100, 0xb100) AM_WRITE(unkitpkr_out1_w)
- AM_RANGE(0xb200, 0xb200) AM_WRITE(unkitpkr_out2_w)
- AM_RANGE(0xb500, 0xb500) AM_DEVWRITE("aysnd", ay8912_device, address_w)
- AM_RANGE(0xb600, 0xb600) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w) // Port A = DSW
-ADDRESS_MAP_END
+void wallc_state::wallc_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x83ff).ram().w(this, FUNC(wallc_state::videoram_w)).mirror(0xc00).share("videoram"); /* 2114, 2114 */
+ map(0xa000, 0xa3ff).ram(); /* 2114, 2114 */
+
+ map(0xb000, 0xb000).portr("DSW1");
+ map(0xb200, 0xb200).portr("SYSTEM");
+ map(0xb400, 0xb400).portr("DIAL");
+ map(0xb600, 0xb600).portr("DSW2");
+
+ map(0xb000, 0xb000).nopw();
+ map(0xb100, 0xb100).w(this, FUNC(wallc_state::wallc_coin_counter_w));
+ map(0xb200, 0xb200).nopw();
+ map(0xb500, 0xb500).w("aysnd", FUNC(ay8912_device::address_w));
+ map(0xb600, 0xb600).w("aysnd", FUNC(ay8912_device::data_w));
+}
+
+void wallc_state::unkitpkr_map(address_map &map)
+{
+ map(0x0000, 0x7fff).rom();
+ map(0x8000, 0x83ff).ram().w(this, FUNC(wallc_state::videoram_w)).mirror(0xc00).share("videoram"); /* 2114, 2114 */
+ map(0xa000, 0xa3ff).ram(); /* 2114, 2114 */
+
+ map(0xb000, 0xb000).portr("IN0");
+ map(0xb100, 0xb100).portr("IN1");
+ map(0xb200, 0xb200).portr("IN2");
+ map(0xb300, 0xb300).portr("IN3");
+ map(0xb500, 0xb5ff).nopr(); // read by memory test routine. left over from some other game
+
+ map(0xb000, 0xb000).w(this, FUNC(wallc_state::unkitpkr_out0_w));
+ map(0xb100, 0xb100).w(this, FUNC(wallc_state::unkitpkr_out1_w));
+ map(0xb200, 0xb200).w(this, FUNC(wallc_state::unkitpkr_out2_w));
+ map(0xb500, 0xb500).w("aysnd", FUNC(ay8912_device::address_w));
+ map(0xb600, 0xb600).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w)); // Port A = DSW
+}
static INPUT_PORTS_START( wallc )