summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/sprint2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/sprint2.cpp')
-rw-r--r--src/mame/drivers/sprint2.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/mame/drivers/sprint2.cpp b/src/mame/drivers/sprint2.cpp
index 8975ab3704e..ff365b8639c 100644
--- a/src/mame/drivers/sprint2.cpp
+++ b/src/mame/drivers/sprint2.cpp
@@ -242,29 +242,30 @@ WRITE_LINE_MEMBER(sprint2_state::lamp4_w)
output().set_led_value(3, state);
}
-ADDRESS_MAP_START(sprint2_state::sprint2_map)
- ADDRESS_MAP_GLOBAL_MASK(0x3fff)
- AM_RANGE(0x0000, 0x03ff) AM_READWRITE(sprint2_wram_r,sprint2_wram_w)
- AM_RANGE(0x0400, 0x07ff) AM_RAM_WRITE(sprint2_video_ram_w) AM_SHARE("video_ram")
- AM_RANGE(0x0818, 0x081f) AM_READ(sprint2_input_A_r)
- AM_RANGE(0x0828, 0x082f) AM_READ(sprint2_input_B_r)
- AM_RANGE(0x0830, 0x0837) AM_READ(sprint2_dip_r)
- AM_RANGE(0x0840, 0x087f) AM_READ_PORT("COIN")
- AM_RANGE(0x0880, 0x08bf) AM_READ(sprint2_steering1_r)
- AM_RANGE(0x08c0, 0x08ff) AM_READ(sprint2_steering2_r)
- AM_RANGE(0x0c00, 0x0fff) AM_READ(sprint2_sync_r)
- AM_RANGE(0x0c00, 0x0c7f) AM_WRITE(output_latch_w)
- AM_RANGE(0x0c80, 0x0cff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x0d00, 0x0d7f) AM_WRITE(sprint2_collision_reset1_w)
- AM_RANGE(0x0d80, 0x0dff) AM_WRITE(sprint2_collision_reset2_w)
- AM_RANGE(0x0e00, 0x0e7f) AM_WRITE(sprint2_steering_reset1_w)
- AM_RANGE(0x0e80, 0x0eff) AM_WRITE(sprint2_steering_reset2_w)
- AM_RANGE(0x0f00, 0x0f7f) AM_WRITE(sprint2_noise_reset_w)
- AM_RANGE(0x1000, 0x13ff) AM_READ(sprint2_collision1_r)
- AM_RANGE(0x1400, 0x17ff) AM_READ(sprint2_collision2_r)
- AM_RANGE(0x1800, 0x1800) AM_READNOP /* debugger ROM location? */
- AM_RANGE(0x2000, 0x3fff) AM_ROM
-ADDRESS_MAP_END
+void sprint2_state::sprint2_map(address_map &map)
+{
+ map.global_mask(0x3fff);
+ map(0x0000, 0x03ff).rw(this, FUNC(sprint2_state::sprint2_wram_r), FUNC(sprint2_state::sprint2_wram_w));
+ map(0x0400, 0x07ff).ram().w(this, FUNC(sprint2_state::sprint2_video_ram_w)).share("video_ram");
+ map(0x0818, 0x081f).r(this, FUNC(sprint2_state::sprint2_input_A_r));
+ map(0x0828, 0x082f).r(this, FUNC(sprint2_state::sprint2_input_B_r));
+ map(0x0830, 0x0837).r(this, FUNC(sprint2_state::sprint2_dip_r));
+ map(0x0840, 0x087f).portr("COIN");
+ map(0x0880, 0x08bf).r(this, FUNC(sprint2_state::sprint2_steering1_r));
+ map(0x08c0, 0x08ff).r(this, FUNC(sprint2_state::sprint2_steering2_r));
+ map(0x0c00, 0x0fff).r(this, FUNC(sprint2_state::sprint2_sync_r));
+ map(0x0c00, 0x0c7f).w(this, FUNC(sprint2_state::output_latch_w));
+ map(0x0c80, 0x0cff).w(m_watchdog, FUNC(watchdog_timer_device::reset_w));
+ map(0x0d00, 0x0d7f).w(this, FUNC(sprint2_state::sprint2_collision_reset1_w));
+ map(0x0d80, 0x0dff).w(this, FUNC(sprint2_state::sprint2_collision_reset2_w));
+ map(0x0e00, 0x0e7f).w(this, FUNC(sprint2_state::sprint2_steering_reset1_w));
+ map(0x0e80, 0x0eff).w(this, FUNC(sprint2_state::sprint2_steering_reset2_w));
+ map(0x0f00, 0x0f7f).w(this, FUNC(sprint2_state::sprint2_noise_reset_w));
+ map(0x1000, 0x13ff).r(this, FUNC(sprint2_state::sprint2_collision1_r));
+ map(0x1400, 0x17ff).r(this, FUNC(sprint2_state::sprint2_collision2_r));
+ map(0x1800, 0x1800).nopr(); /* debugger ROM location? */
+ map(0x2000, 0x3fff).rom();
+}
static INPUT_PORTS_START( sprint2 )