summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/blstroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/blstroid.cpp')
-rw-r--r--src/mame/drivers/blstroid.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp
index ba93ea5ec89..5450bd56cc0 100644
--- a/src/mame/drivers/blstroid.cpp
+++ b/src/mame/drivers/blstroid.cpp
@@ -64,29 +64,30 @@ void blstroid_state::machine_reset()
*************************************/
/* full map verified from schematics */
-ADDRESS_MAP_START(blstroid_state::main_map)
- ADDRESS_MAP_UNMAP_HIGH
- ADDRESS_MAP_GLOBAL_MASK(0x83ffff)
- AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x000000) AM_ROM
- AM_RANGE(0x800000, 0x800001) AM_MIRROR(0x0381fe) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w)
- AM_RANGE(0x800200, 0x800201) AM_MIRROR(0x0381fe) AM_WRITE(scanline_int_ack_w)
- AM_RANGE(0x800400, 0x800401) AM_MIRROR(0x0381fe) AM_WRITE(video_int_ack_w)
- AM_RANGE(0x800600, 0x800601) AM_MIRROR(0x0381fe) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write16)
- AM_RANGE(0x800800, 0x8009ff) AM_MIRROR(0x038000) AM_WRITEONLY AM_SHARE("priorityram")
- AM_RANGE(0x800a00, 0x800a01) AM_MIRROR(0x0381fe) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff)
- AM_RANGE(0x800c00, 0x800c01) AM_MIRROR(0x0381fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w)
- AM_RANGE(0x800e00, 0x800e01) AM_MIRROR(0x0381fe) AM_WRITE(blstroid_halt_until_hblank_0_w)
- AM_RANGE(0x801400, 0x801401) AM_MIRROR(0x0383fe) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff)
- AM_RANGE(0x801800, 0x801801) AM_MIRROR(0x0383f8) AM_READ_PORT("DIAL0")
- AM_RANGE(0x801804, 0x801805) AM_MIRROR(0x0383f8) AM_READ_PORT("DIAL1")
- AM_RANGE(0x801c00, 0x801c01) AM_MIRROR(0x0383fc) AM_READ_PORT("IN0")
- AM_RANGE(0x801c02, 0x801c03) AM_MIRROR(0x0383fc) AM_READ_PORT("IN1")
- AM_RANGE(0x802000, 0x8023ff) AM_MIRROR(0x038c00) AM_RAM_DEVWRITE("palette", palette_device, write16) AM_SHARE("palette")
- AM_RANGE(0x803000, 0x8033ff) AM_MIRROR(0x038c00) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff)
- AM_RANGE(0x804000, 0x804fff) AM_MIRROR(0x038000) AM_RAM_DEVWRITE("playfield", tilemap_device, write16) AM_SHARE("playfield")
- AM_RANGE(0x805000, 0x805fff) AM_MIRROR(0x038000) AM_RAM AM_SHARE("mob")
- AM_RANGE(0x806000, 0x807fff) AM_MIRROR(0x038000) AM_RAM
-ADDRESS_MAP_END
+void blstroid_state::main_map(address_map &map)
+{
+ map.unmap_value_high();
+ map.global_mask(0x83ffff);
+ map(0x000000, 0x03ffff).mirror(0x000000).rom();
+ map(0x800000, 0x800001).mirror(0x0381fe).w("watchdog", FUNC(watchdog_timer_device::reset16_w));
+ map(0x800200, 0x800201).mirror(0x0381fe).w(this, FUNC(blstroid_state::scanline_int_ack_w));
+ map(0x800400, 0x800401).mirror(0x0381fe).w(this, FUNC(blstroid_state::video_int_ack_w));
+ map(0x800600, 0x800601).mirror(0x0381fe).w("eeprom", FUNC(eeprom_parallel_28xx_device::unlock_write16));
+ map(0x800800, 0x8009ff).mirror(0x038000).writeonly().share("priorityram");
+ map(0x800a01, 0x800a01).mirror(0x0381fe).w(m_jsa, FUNC(atari_jsa_i_device::main_command_w));
+ map(0x800c00, 0x800c01).mirror(0x0381fe).w(m_jsa, FUNC(atari_jsa_i_device::sound_reset_w));
+ map(0x800e00, 0x800e01).mirror(0x0381fe).w(this, FUNC(blstroid_state::blstroid_halt_until_hblank_0_w));
+ map(0x801401, 0x801401).mirror(0x0383fe).r(m_jsa, FUNC(atari_jsa_i_device::main_response_r));
+ map(0x801800, 0x801801).mirror(0x0383f8).portr("DIAL0");
+ map(0x801804, 0x801805).mirror(0x0383f8).portr("DIAL1");
+ map(0x801c00, 0x801c01).mirror(0x0383fc).portr("IN0");
+ map(0x801c02, 0x801c03).mirror(0x0383fc).portr("IN1");
+ map(0x802000, 0x8023ff).mirror(0x038c00).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x803000, 0x8033ff).mirror(0x038c00).rw("eeprom", FUNC(eeprom_parallel_28xx_device::read), FUNC(eeprom_parallel_28xx_device::write)).umask16(0x00ff);
+ map(0x804000, 0x804fff).mirror(0x038000).ram().w(m_playfield_tilemap, FUNC(tilemap_device::write16)).share("playfield");
+ map(0x805000, 0x805fff).mirror(0x038000).ram().share("mob");
+ map(0x806000, 0x807fff).mirror(0x038000).ram();
+}