summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/batman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/batman.cpp')
-rw-r--r--src/mame/drivers/batman.cpp51
1 files changed, 26 insertions, 25 deletions
diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp
index c402ec51f38..53d55062e5d 100644
--- a/src/mame/drivers/batman.cpp
+++ b/src/mame/drivers/batman.cpp
@@ -89,31 +89,32 @@ WRITE16_MEMBER(batman_state::latch_w)
/* full map verified from schematics and GALs */
/* addresses in the 1xxxxx region map to /WAIT */
/* addresses in the 2xxxxx region map to /WAIT2 */
-ADDRESS_MAP_START(batman_state::main_map)
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0x3fffff)
- AM_RANGE(0x000000, 0x0bffff) AM_ROM
- AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM
- AM_RANGE(0x120000, 0x120fff) AM_MIRROR(0x01f000) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff)
- AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x11ff8c) AM_READ_PORT("260000")
- AM_RANGE(0x260002, 0x260003) AM_MIRROR(0x11ff8c) AM_READ_PORT("260002")
- AM_RANGE(0x260010, 0x260011) AM_MIRROR(0x11ff8e) AM_READ_PORT("260010")
- AM_RANGE(0x260030, 0x260031) AM_MIRROR(0x11ff8e) AM_DEVREAD8("jsa", atari_jsa_iii_device, main_response_r, 0x00ff)
- AM_RANGE(0x260040, 0x260041) AM_MIRROR(0x11ff8e) AM_DEVWRITE8("jsa", atari_jsa_iii_device, main_command_w, 0x00ff)
- AM_RANGE(0x260050, 0x260051) AM_MIRROR(0x11ff8e) AM_WRITE(latch_w)
- AM_RANGE(0x260060, 0x260061) AM_MIRROR(0x11ff8e) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write16)
- AM_RANGE(0x2a0000, 0x2a0001) AM_MIRROR(0x11fffe) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w)
- AM_RANGE(0x2e0000, 0x2e0fff) AM_MIRROR(0x100000) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette")
- AM_RANGE(0x2effc0, 0x2effff) AM_MIRROR(0x100000) AM_DEVREADWRITE("vad", atari_vad_device, control_read, control_write)
- AM_RANGE(0x2f0000, 0x2fffff) AM_MIRROR(0x100000) AM_RAM
- AM_RANGE(0x2f0000, 0x2f1fff) AM_MIRROR(0x100000) AM_DEVWRITE("vad", atari_vad_device, playfield2_latched_msb_w) AM_SHARE("vad:playfield2")
- AM_RANGE(0x2f2000, 0x2f3fff) AM_MIRROR(0x100000) AM_DEVWRITE("vad", atari_vad_device, playfield_latched_lsb_w) AM_SHARE("vad:playfield")
- AM_RANGE(0x2f4000, 0x2f5fff) AM_MIRROR(0x100000) AM_DEVWRITE("vad", atari_vad_device, playfield_upper_w) AM_SHARE("vad:playfield_ext")
- AM_RANGE(0x2f6000, 0x2f7fff) AM_MIRROR(0x100000) AM_RAM AM_SHARE("vad:mob")
- AM_RANGE(0x2f8000, 0x2f8eff) AM_MIRROR(0x100000) AM_DEVWRITE("vad", atari_vad_device, alpha_w) AM_SHARE("vad:alpha")
- AM_RANGE(0x2f8f00, 0x2f8f7f) AM_MIRROR(0x100000) AM_SHARE("vad:eof")
- AM_RANGE(0x2f8f80, 0x2f8fff) AM_MIRROR(0x100000) AM_RAM AM_SHARE("vad:mob:slip")
-ADDRESS_MAP_END
+void batman_state::main_map(address_map &map)
+{
+ map.unmap_value_high();
+ map.global_mask(0x3fffff);
+ map(0x000000, 0x0bffff).rom();
+ map(0x100000, 0x10ffff).mirror(0x010000).ram();
+ map(0x120000, 0x120fff).mirror(0x01f000).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff);
+ map(0x260000, 0x260001).mirror(0x11ff8c).portr("260000");
+ map(0x260002, 0x260003).mirror(0x11ff8c).portr("260002");
+ map(0x260010, 0x260011).mirror(0x11ff8e).portr("260010");
+ map(0x260031, 0x260031).mirror(0x11ff8e).r(m_jsa, FUNC(atari_jsa_iii_device::main_response_r));
+ map(0x260041, 0x260041).mirror(0x11ff8e).w(m_jsa, FUNC(atari_jsa_iii_device::main_command_w));
+ map(0x260050, 0x260051).mirror(0x11ff8e).w(this, FUNC(batman_state::latch_w));
+ map(0x260060, 0x260061).mirror(0x11ff8e).w("eeprom", FUNC(eeprom_parallel_28xx_device::unlock_write16));
+ map(0x2a0000, 0x2a0001).mirror(0x11fffe).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
+ map(0x2e0000, 0x2e0fff).mirror(0x100000).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x2effc0, 0x2effff).mirror(0x100000).rw(m_vad, FUNC(atari_vad_device::control_read), FUNC(atari_vad_device::control_write));
+ map(0x2f0000, 0x2fffff).mirror(0x100000).ram();
+ map(0x2f0000, 0x2f1fff).mirror(0x100000).w(m_vad, FUNC(atari_vad_device::playfield2_latched_msb_w)).share("vad:playfield2");
+ map(0x2f2000, 0x2f3fff).mirror(0x100000).w(m_vad, FUNC(atari_vad_device::playfield_latched_lsb_w)).share("vad:playfield");
+ map(0x2f4000, 0x2f5fff).mirror(0x100000).w(m_vad, FUNC(atari_vad_device::playfield_upper_w)).share("vad:playfield_ext");
+ map(0x2f6000, 0x2f7fff).mirror(0x100000).ram().share("vad:mob");
+ map(0x2f8000, 0x2f8eff).mirror(0x100000).w(m_vad, FUNC(atari_vad_device::alpha_w)).share("vad:alpha");
+ map(0x2f8f00, 0x2f8f7f).mirror(0x100000).share("vad:eof");
+ map(0x2f8f80, 0x2f8fff).mirror(0x100000).ram().share("vad:mob:slip");
+}