summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/homerun.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/homerun.cpp')
-rw-r--r--src/mame/drivers/homerun.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/mame/drivers/homerun.cpp b/src/mame/drivers/homerun.cpp
index de637e51421..a82e5db535b 100644
--- a/src/mame/drivers/homerun.cpp
+++ b/src/mame/drivers/homerun.cpp
@@ -103,25 +103,27 @@ WRITE8_MEMBER(homerun_state::homerun_d7756_sample_w)
m_d7756->port_w(space, 0, data);
}
-ADDRESS_MAP_START(homerun_state::homerun_memmap)
- AM_RANGE(0x0000, 0x3fff) AM_ROM
- AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
- AM_RANGE(0x8000, 0x9fff) AM_RAM_WRITE(homerun_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0xa000, 0xa0ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0xb000, 0xb03f) AM_RAM_WRITE(homerun_color_w) AM_SHARE("colorram")
- AM_RANGE(0xc000, 0xdfff) AM_RAM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(homerun_state::homerun_iomap)
- ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x10, 0x10) AM_WRITE(homerun_d7756_sample_w)
- AM_RANGE(0x20, 0x20) AM_WRITE(homerun_control_w)
- AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
- AM_RANGE(0x40, 0x40) AM_READ_PORT("IN0")
- AM_RANGE(0x50, 0x50) AM_READ_PORT("IN2")
- AM_RANGE(0x60, 0x60) AM_READ_PORT("IN1")
- AM_RANGE(0x70, 0x71) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
-ADDRESS_MAP_END
+void homerun_state::homerun_memmap(address_map &map)
+{
+ map(0x0000, 0x3fff).rom();
+ map(0x4000, 0x7fff).bankr("bank1");
+ map(0x8000, 0x9fff).ram().w(this, FUNC(homerun_state::homerun_videoram_w)).share("videoram");
+ map(0xa000, 0xa0ff).ram().share("spriteram");
+ map(0xb000, 0xb03f).ram().w(this, FUNC(homerun_state::homerun_color_w)).share("colorram");
+ map(0xc000, 0xdfff).ram();
+}
+
+void homerun_state::homerun_iomap(address_map &map)
+{
+ map.global_mask(0xff);
+ map(0x10, 0x10).w(this, FUNC(homerun_state::homerun_d7756_sample_w));
+ map(0x20, 0x20).w(this, FUNC(homerun_state::homerun_control_w));
+ map(0x30, 0x33).rw("ppi8255", FUNC(i8255_device::read), FUNC(i8255_device::write));
+ map(0x40, 0x40).portr("IN0");
+ map(0x50, 0x50).portr("IN2");
+ map(0x60, 0x60).portr("IN1");
+ map(0x70, 0x71).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
+}
CUSTOM_INPUT_MEMBER(homerun_state::homerun_d7756_busy_r)