summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/gottlieb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/gottlieb.cpp')
-rw-r--r--src/mame/drivers/gottlieb.cpp82
1 files changed, 42 insertions, 40 deletions
diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp
index 17da3a6cf63..841198a49ed 100644
--- a/src/mame/drivers/gottlieb.cpp
+++ b/src/mame/drivers/gottlieb.cpp
@@ -749,48 +749,50 @@ WRITE8_MEMBER(gottlieb_state::gottlieb_sh_w)
m_r2_sound->write(space, offset, data);
}
-ADDRESS_MAP_START(gottlieb_state::reactor_map)
- ADDRESS_MAP_GLOBAL_MASK(0xffff)
- AM_RANGE(0x0000, 0x1fff) AM_RAM
- AM_RANGE(0x2000, 0x20ff) AM_MIRROR(0x0f00) AM_WRITEONLY AM_SHARE("spriteram") /* FRSEL */
- AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM_WRITE(gottlieb_videoram_w) AM_SHARE("videoram") /* BRSEL */
- AM_RANGE(0x4000, 0x4fff) AM_RAM_WRITE(gottlieb_charram_w) AM_SHARE("charram") /* BOJRSEL1 */
+void gottlieb_state::reactor_map(address_map &map)
+{
+ map.global_mask(0xffff);
+ map(0x0000, 0x1fff).ram();
+ map(0x2000, 0x20ff).mirror(0x0f00).writeonly().share("spriteram"); /* FRSEL */
+ map(0x3000, 0x33ff).mirror(0x0c00).ram().w(this, FUNC(gottlieb_state::gottlieb_videoram_w)).share("videoram"); /* BRSEL */
+ map(0x4000, 0x4fff).ram().w(this, FUNC(gottlieb_state::gottlieb_charram_w)).share("charram"); /* BOJRSEL1 */
/* AM_RANGE(0x5000, 0x5fff) AM_WRITE() */ /* BOJRSEL2 */
- AM_RANGE(0x6000, 0x601f) AM_MIRROR(0x0fe0) AM_WRITE(gottlieb_paletteram_w) AM_SHARE("paletteram") /* COLSEL */
- AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0ff8) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x7001, 0x7001) AM_MIRROR(0x0ff8) AM_WRITE(gottlieb_analog_reset_w) /* A1J2 interface */
- AM_RANGE(0x7002, 0x7002) AM_MIRROR(0x0ff8) AM_WRITE(gottlieb_sh_w) /* trackball H */
- AM_RANGE(0x7003, 0x7003) AM_MIRROR(0x0ff8) AM_WRITE(reactor_output_w) /* trackball V */
- AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0ff8) AM_READ_PORT("DSW")
- AM_RANGE(0x7001, 0x7001) AM_MIRROR(0x0ff8) AM_READ_PORT("IN1") /* buttons */
- AM_RANGE(0x7002, 0x7002) AM_MIRROR(0x0ff8) AM_READ_PORT("IN2") /* trackball H */
- AM_RANGE(0x7003, 0x7003) AM_MIRROR(0x0ff8) AM_READ_PORT("IN3") /* trackball V */
- AM_RANGE(0x7004, 0x7004) AM_MIRROR(0x0ff8) AM_READ_PORT("IN4")
- AM_RANGE(0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(gottlieb_state::gottlieb_map)
- ADDRESS_MAP_GLOBAL_MASK(0xffff)
- AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("nvram")
- AM_RANGE(0x1000, 0x1fff) AM_RAM AM_REGION("maincpu", 0x1000) /* or ROM */
- AM_RANGE(0x2000, 0x2fff) AM_RAM AM_REGION("maincpu", 0x2000) /* or ROM */
- AM_RANGE(0x3000, 0x30ff) AM_MIRROR(0x0700) AM_WRITEONLY AM_SHARE("spriteram") /* FRSEL */
- AM_RANGE(0x3800, 0x3bff) AM_MIRROR(0x0400) AM_RAM_WRITE(gottlieb_videoram_w) AM_SHARE("videoram") /* BRSEL */
- AM_RANGE(0x4000, 0x4fff) AM_RAM_WRITE(gottlieb_charram_w) AM_SHARE("charram") /* BOJRSEL1 */
- AM_RANGE(0x5000, 0x501f) AM_MIRROR(0x07e0) AM_WRITE(gottlieb_paletteram_w) AM_SHARE("paletteram") /* COLSEL */
- AM_RANGE(0x5800, 0x5800) AM_MIRROR(0x07f8) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x5801, 0x5801) AM_MIRROR(0x07f8) AM_WRITE(gottlieb_analog_reset_w) /* A1J2 interface */
- AM_RANGE(0x5802, 0x5802) AM_MIRROR(0x07f8) AM_WRITE(gottlieb_sh_w) /* OP20-27 */
- AM_RANGE(0x5803, 0x5803) AM_MIRROR(0x07f8) AM_WRITE(general_output_w) /* OP30-37 */
+ map(0x6000, 0x601f).mirror(0x0fe0).w(this, FUNC(gottlieb_state::gottlieb_paletteram_w)).share("paletteram"); /* COLSEL */
+ map(0x7000, 0x7000).mirror(0x0ff8).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x7001, 0x7001).mirror(0x0ff8).w(this, FUNC(gottlieb_state::gottlieb_analog_reset_w)); /* A1J2 interface */
+ map(0x7002, 0x7002).mirror(0x0ff8).w(this, FUNC(gottlieb_state::gottlieb_sh_w)); /* trackball H */
+ map(0x7003, 0x7003).mirror(0x0ff8).w(this, FUNC(gottlieb_state::reactor_output_w)); /* trackball V */
+ map(0x7000, 0x7000).mirror(0x0ff8).portr("DSW");
+ map(0x7001, 0x7001).mirror(0x0ff8).portr("IN1"); /* buttons */
+ map(0x7002, 0x7002).mirror(0x0ff8).portr("IN2"); /* trackball H */
+ map(0x7003, 0x7003).mirror(0x0ff8).portr("IN3"); /* trackball V */
+ map(0x7004, 0x7004).mirror(0x0ff8).portr("IN4");
+ map(0x8000, 0xffff).rom();
+}
+
+
+void gottlieb_state::gottlieb_map(address_map &map)
+{
+ map.global_mask(0xffff);
+ map(0x0000, 0x0fff).ram().share("nvram");
+ map(0x1000, 0x1fff).ram().region("maincpu", 0x1000); /* or ROM */
+ map(0x2000, 0x2fff).ram().region("maincpu", 0x2000); /* or ROM */
+ map(0x3000, 0x30ff).mirror(0x0700).writeonly().share("spriteram"); /* FRSEL */
+ map(0x3800, 0x3bff).mirror(0x0400).ram().w(this, FUNC(gottlieb_state::gottlieb_videoram_w)).share("videoram"); /* BRSEL */
+ map(0x4000, 0x4fff).ram().w(this, FUNC(gottlieb_state::gottlieb_charram_w)).share("charram"); /* BOJRSEL1 */
+ map(0x5000, 0x501f).mirror(0x07e0).w(this, FUNC(gottlieb_state::gottlieb_paletteram_w)).share("paletteram"); /* COLSEL */
+ map(0x5800, 0x5800).mirror(0x07f8).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x5801, 0x5801).mirror(0x07f8).w(this, FUNC(gottlieb_state::gottlieb_analog_reset_w)); /* A1J2 interface */
+ map(0x5802, 0x5802).mirror(0x07f8).w(this, FUNC(gottlieb_state::gottlieb_sh_w)); /* OP20-27 */
+ map(0x5803, 0x5803).mirror(0x07f8).w(this, FUNC(gottlieb_state::general_output_w)); /* OP30-37 */
/* AM_RANGE(0x5804, 0x5804) AM_MIRROR(0x07f8) AM_WRITE()*/ /* OP40-47 */
- AM_RANGE(0x5800, 0x5800) AM_MIRROR(0x07f8) AM_READ_PORT("DSW")
- AM_RANGE(0x5801, 0x5801) AM_MIRROR(0x07f8) AM_READ_PORT("IN1") /* IP10-17 */
- AM_RANGE(0x5802, 0x5802) AM_MIRROR(0x07f8) AM_READ_PORT("IN2") /* trackball H */
- AM_RANGE(0x5803, 0x5803) AM_MIRROR(0x07f8) AM_READ_PORT("IN3") /* trackball V */
- AM_RANGE(0x5804, 0x5804) AM_MIRROR(0x07f8) AM_READ_PORT("IN4") /* IP40-47 */
- AM_RANGE(0x6000, 0xffff) AM_ROM
-ADDRESS_MAP_END
+ map(0x5800, 0x5800).mirror(0x07f8).portr("DSW");
+ map(0x5801, 0x5801).mirror(0x07f8).portr("IN1"); /* IP10-17 */
+ map(0x5802, 0x5802).mirror(0x07f8).portr("IN2"); /* trackball H */
+ map(0x5803, 0x5803).mirror(0x07f8).portr("IN3"); /* trackball V */
+ map(0x5804, 0x5804).mirror(0x07f8).portr("IN4"); /* IP40-47 */
+ map(0x6000, 0xffff).rom();
+}