diff options
author | 2018-03-13 07:36:43 +0100 | |
---|---|---|
committer | 2018-03-14 14:07:14 +0100 | |
commit | 115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch) | |
tree | f0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/avalnche.cpp | |
parent | f155992daab88ad024cec995428a67108218b51d (diff) |
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/avalnche.cpp')
-rw-r--r-- | src/mame/drivers/avalnche.cpp | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/src/mame/drivers/avalnche.cpp b/src/mame/drivers/avalnche.cpp index 71a8a21bb64..ad9983dab7c 100644 --- a/src/mame/drivers/avalnche.cpp +++ b/src/mame/drivers/avalnche.cpp @@ -112,31 +112,33 @@ WRITE_LINE_MEMBER(avalnche_state::start_lamp_w) output().set_led_value(2, state); } -ADDRESS_MAP_START(avalnche_state::main_map) - ADDRESS_MAP_GLOBAL_MASK(0x7fff) - AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("videoram") - AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0ffc) AM_READ_PORT("IN0") - AM_RANGE(0x2001, 0x2001) AM_MIRROR(0x0ffc) AM_READ_PORT("IN1") - AM_RANGE(0x2002, 0x2002) AM_MIRROR(0x0ffc) AM_READ_PORT("PADDLE") - AM_RANGE(0x2003, 0x2003) AM_MIRROR(0x0ffc) AM_READNOP - AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0fff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x4000, 0x4007) AM_MIRROR(0x0ff8) AM_DEVWRITE("latch", f9334_device, write_d0) - AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x0fff) AM_WRITE(avalnche_noise_amplitude_w) - AM_RANGE(0x6000, 0x7fff) AM_ROM -ADDRESS_MAP_END - -ADDRESS_MAP_START(avalnche_state::catch_map) - ADDRESS_MAP_GLOBAL_MASK(0x7fff) - AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("videoram") - AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0ffc) AM_READ_PORT("IN0") - AM_RANGE(0x2001, 0x2001) AM_MIRROR(0x0ffc) AM_READ_PORT("IN1") - AM_RANGE(0x2002, 0x2002) AM_MIRROR(0x0ffc) AM_READ_PORT("PADDLE") - AM_RANGE(0x2003, 0x2003) AM_MIRROR(0x0ffc) AM_READNOP - AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0fff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x4000, 0x4007) AM_MIRROR(0x0ff8) AM_DEVWRITE("latch", f9334_device, write_d0) - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_WRITE(catch_coin_counter_w) - AM_RANGE(0x7000, 0x7fff) AM_ROM -ADDRESS_MAP_END +void avalnche_state::main_map(address_map &map) +{ + map.global_mask(0x7fff); + map(0x0000, 0x1fff).ram().share("videoram"); + map(0x2000, 0x2000).mirror(0x0ffc).portr("IN0"); + map(0x2001, 0x2001).mirror(0x0ffc).portr("IN1"); + map(0x2002, 0x2002).mirror(0x0ffc).portr("PADDLE"); + map(0x2003, 0x2003).mirror(0x0ffc).nopr(); + map(0x3000, 0x3000).mirror(0x0fff).w("watchdog", FUNC(watchdog_timer_device::reset_w)); + map(0x4000, 0x4007).mirror(0x0ff8).w("latch", FUNC(f9334_device::write_d0)); + map(0x5000, 0x5000).mirror(0x0fff).w(this, FUNC(avalnche_state::avalnche_noise_amplitude_w)); + map(0x6000, 0x7fff).rom(); +} + +void avalnche_state::catch_map(address_map &map) +{ + map.global_mask(0x7fff); + map(0x0000, 0x1fff).ram().share("videoram"); + map(0x2000, 0x2000).mirror(0x0ffc).portr("IN0"); + map(0x2001, 0x2001).mirror(0x0ffc).portr("IN1"); + map(0x2002, 0x2002).mirror(0x0ffc).portr("PADDLE"); + map(0x2003, 0x2003).mirror(0x0ffc).nopr(); + map(0x3000, 0x3000).mirror(0x0fff).w("watchdog", FUNC(watchdog_timer_device::reset_w)); + map(0x4000, 0x4007).mirror(0x0ff8).w("latch", FUNC(f9334_device::write_d0)); + map(0x6000, 0x6000).mirror(0x0fff).w(this, FUNC(avalnche_state::catch_coin_counter_w)); + map(0x7000, 0x7fff).rom(); +} /************************************* |