summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/audio/mario.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/audio/mario.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/audio/mario.cpp')
-rw-r--r--src/mame/audio/mario.cpp33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp
index aee7cdd45d5..fd886d46cd7 100644
--- a/src/mame/audio/mario.cpp
+++ b/src/mame/audio/mario.cpp
@@ -611,21 +611,24 @@ WRITE8_MEMBER(mario_state::mario_sh3_w)
*
*************************************/
-ADDRESS_MAP_START(mario_state::mario_sound_map)
- AM_RANGE(0x0000, 0x07ff) AM_ROMBANK("bank1") AM_REGION("audiocpu", 0)
- AM_RANGE(0x0800, 0x0fff) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(mario_state::mario_sound_io_map)
- AM_RANGE(0x00, 0xff) AM_READ(mario_sh_tune_r) AM_WRITE(mario_sh_sound_w)
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(mario_state::masao_sound_map)
- AM_RANGE(0x0000, 0x0fff) AM_ROM
- AM_RANGE(0x2000, 0x23ff) AM_RAM
- AM_RANGE(0x4000, 0x4000) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w)
- AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("aysnd", ay8910_device, address_w)
-ADDRESS_MAP_END
+void mario_state::mario_sound_map(address_map &map)
+{
+ map(0x0000, 0x07ff).bankr("bank1").region("audiocpu", 0);
+ map(0x0800, 0x0fff).rom();
+}
+
+void mario_state::mario_sound_io_map(address_map &map)
+{
+ map(0x00, 0xff).r(this, FUNC(mario_state::mario_sh_tune_r)).w(this, FUNC(mario_state::mario_sh_sound_w));
+}
+
+void mario_state::masao_sound_map(address_map &map)
+{
+ map(0x0000, 0x0fff).rom();
+ map(0x2000, 0x23ff).ram();
+ map(0x4000, 0x4000).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
+ map(0x6000, 0x6000).w("aysnd", FUNC(ay8910_device::address_w));
+}
/*************************************