summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/centiped.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/centiped.cpp')
-rw-r--r--src/mame/drivers/centiped.cpp358
1 files changed, 185 insertions, 173 deletions
diff --git a/src/mame/drivers/centiped.cpp b/src/mame/drivers/centiped.cpp
index a91335aaa1b..f5d9d1b1114 100644
--- a/src/mame/drivers/centiped.cpp
+++ b/src/mame/drivers/centiped.cpp
@@ -676,73 +676,78 @@ WRITE_LINE_MEMBER(centiped_state::bullsdrt_coin_count_w)
*
*************************************/
-ADDRESS_MAP_START(centiped_state::centiped_base_map)
- ADDRESS_MAP_GLOBAL_MASK(0x3fff)
- AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("rambase")
- AM_RANGE(0x0400, 0x07bf) AM_RAM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x07c0, 0x07ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x0800, 0x0800) AM_READ_PORT("DSW1")
- AM_RANGE(0x0801, 0x0801) AM_READ_PORT("DSW2")
- AM_RANGE(0x0c00, 0x0c00) AM_READ(centiped_IN0_r)
- AM_RANGE(0x0c01, 0x0c01) AM_READ_PORT("IN1")
- AM_RANGE(0x0c02, 0x0c02) AM_READ(centiped_IN2_r)
- AM_RANGE(0x0c03, 0x0c03) AM_READ_PORT("IN3")
- AM_RANGE(0x1400, 0x140f) AM_WRITE(centiped_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x1600, 0x163f) AM_DEVWRITE("earom",atari_vg_earom_device, write)
- AM_RANGE(0x1680, 0x1680) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
- AM_RANGE(0x1700, 0x173f) AM_DEVREAD("earom", atari_vg_earom_device, read)
- AM_RANGE(0x1800, 0x1800) AM_WRITE(irq_ack_w)
- AM_RANGE(0x1c00, 0x1c07) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x2000, 0x3fff) AM_ROM
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(centiped_state::centiped_map)
- AM_IMPORT_FROM(centiped_base_map)
- AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
-ADDRESS_MAP_END
+void centiped_state::centiped_base_map(address_map &map)
+{
+ map.global_mask(0x3fff);
+ map(0x0000, 0x03ff).ram().share("rambase");
+ map(0x0400, 0x07bf).ram().w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x07c0, 0x07ff).ram().share("spriteram");
+ map(0x0800, 0x0800).portr("DSW1");
+ map(0x0801, 0x0801).portr("DSW2");
+ map(0x0c00, 0x0c00).r(this, FUNC(centiped_state::centiped_IN0_r));
+ map(0x0c01, 0x0c01).portr("IN1");
+ map(0x0c02, 0x0c02).r(this, FUNC(centiped_state::centiped_IN2_r));
+ map(0x0c03, 0x0c03).portr("IN3");
+ map(0x1400, 0x140f).w(this, FUNC(centiped_state::centiped_paletteram_w)).share("paletteram");
+ map(0x1600, 0x163f).w("earom", FUNC(atari_vg_earom_device::write));
+ map(0x1680, 0x1680).w("earom", FUNC(atari_vg_earom_device::ctrl_w));
+ map(0x1700, 0x173f).r("earom", FUNC(atari_vg_earom_device::read));
+ map(0x1800, 0x1800).w(this, FUNC(centiped_state::irq_ack_w));
+ map(0x1c00, 0x1c07).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x2000, 0x2000).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x2000, 0x3fff).rom();
+}
+
+
+void centiped_state::centiped_map(address_map &map)
+{
+ centiped_base_map(map);
+ map(0x1000, 0x100f).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write));
+}
//// Centipede bootlegs ////
-ADDRESS_MAP_START(centiped_state::centipdb_map)
- ADDRESS_MAP_GLOBAL_MASK(0x7fff)
- AM_RANGE(0x0000, 0x03ff) AM_MIRROR(0x4000) AM_RAM
- AM_RANGE(0x0400, 0x07bf) AM_MIRROR(0x4000) AM_RAM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x07c0, 0x07ff) AM_MIRROR(0x4000) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x0800, 0x0800) AM_MIRROR(0x4000) AM_READ_PORT("DSW1")
- AM_RANGE(0x0801, 0x0801) AM_MIRROR(0x4000) AM_READ_PORT("DSW2")
- AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x4000) AM_READ(centiped_IN0_r)
- AM_RANGE(0x0c01, 0x0c01) AM_MIRROR(0x4000) AM_READ_PORT("IN1")
- AM_RANGE(0x0c02, 0x0c02) AM_MIRROR(0x4000) AM_READ(centiped_IN2_r)
- AM_RANGE(0x0c03, 0x0c03) AM_MIRROR(0x4000) AM_READ_PORT("IN3")
- AM_RANGE(0x1000, 0x1001) AM_MIRROR(0x4000) AM_DEVWRITE("aysnd", ay8910_device, data_address_w)
- AM_RANGE(0x1001, 0x1001) AM_MIRROR(0x4000) AM_DEVREAD("aysnd", ay8910_device, data_r)
- AM_RANGE(0x1400, 0x140f) AM_MIRROR(0x4000) AM_WRITE(centiped_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x1600, 0x163f) AM_MIRROR(0x4000) AM_DEVWRITE("earom", atari_vg_earom_device, write)
- AM_RANGE(0x1680, 0x1680) AM_MIRROR(0x4000) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
- AM_RANGE(0x1700, 0x173f) AM_MIRROR(0x4000) AM_DEVREAD("earom", atari_vg_earom_device, read)
- AM_RANGE(0x1800, 0x1800) AM_MIRROR(0x4000) AM_WRITE(irq_ack_w)
- AM_RANGE(0x1c00, 0x1c07) AM_MIRROR(0x4000) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x2000, 0x27ff) AM_ROM
- AM_RANGE(0x2800, 0x3fff) AM_MIRROR(0x4000) AM_ROM
- AM_RANGE(0x6000, 0x67ff) AM_ROM
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(centiped_state::magworm_map)
- AM_IMPORT_FROM(centiped_base_map)
- AM_RANGE(0x1001, 0x1001) AM_DEVWRITE("aysnd", ay8910_device, address_w)
- AM_RANGE(0x1003, 0x1003) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_w)
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(centiped_state::caterplr_map)
- AM_IMPORT_FROM(centiped_base_map)
- AM_RANGE(0x1780, 0x1780) AM_READ(caterplr_unknown_r)
- AM_RANGE(0x1000, 0x100f) AM_READWRITE(caterplr_AY8910_r, caterplr_AY8910_w)
-ADDRESS_MAP_END
+void centiped_state::centipdb_map(address_map &map)
+{
+ map.global_mask(0x7fff);
+ map(0x0000, 0x03ff).mirror(0x4000).ram();
+ map(0x0400, 0x07bf).mirror(0x4000).ram().w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x07c0, 0x07ff).mirror(0x4000).ram().share("spriteram");
+ map(0x0800, 0x0800).mirror(0x4000).portr("DSW1");
+ map(0x0801, 0x0801).mirror(0x4000).portr("DSW2");
+ map(0x0c00, 0x0c00).mirror(0x4000).r(this, FUNC(centiped_state::centiped_IN0_r));
+ map(0x0c01, 0x0c01).mirror(0x4000).portr("IN1");
+ map(0x0c02, 0x0c02).mirror(0x4000).r(this, FUNC(centiped_state::centiped_IN2_r));
+ map(0x0c03, 0x0c03).mirror(0x4000).portr("IN3");
+ map(0x1000, 0x1001).mirror(0x4000).w(m_aysnd, FUNC(ay8910_device::data_address_w));
+ map(0x1001, 0x1001).mirror(0x4000).r(m_aysnd, FUNC(ay8910_device::data_r));
+ map(0x1400, 0x140f).mirror(0x4000).w(this, FUNC(centiped_state::centiped_paletteram_w)).share("paletteram");
+ map(0x1600, 0x163f).mirror(0x4000).w("earom", FUNC(atari_vg_earom_device::write));
+ map(0x1680, 0x1680).mirror(0x4000).w("earom", FUNC(atari_vg_earom_device::ctrl_w));
+ map(0x1700, 0x173f).mirror(0x4000).r("earom", FUNC(atari_vg_earom_device::read));
+ map(0x1800, 0x1800).mirror(0x4000).w(this, FUNC(centiped_state::irq_ack_w));
+ map(0x1c00, 0x1c07).mirror(0x4000).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x2000, 0x27ff).rom();
+ map(0x2800, 0x3fff).mirror(0x4000).rom();
+ map(0x6000, 0x67ff).rom();
+}
+
+
+void centiped_state::magworm_map(address_map &map)
+{
+ centiped_base_map(map);
+ map(0x1001, 0x1001).w(m_aysnd, FUNC(ay8910_device::address_w));
+ map(0x1003, 0x1003).rw(m_aysnd, FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
+}
+
+
+void centiped_state::caterplr_map(address_map &map)
+{
+ centiped_base_map(map);
+ map(0x1780, 0x1780).r(this, FUNC(centiped_state::caterplr_unknown_r));
+ map(0x1000, 0x100f).rw(this, FUNC(centiped_state::caterplr_AY8910_r), FUNC(centiped_state::caterplr_AY8910_w));
+}
WRITE8_MEMBER(centiped_state::caterplr_AY8910_w)
{
@@ -764,26 +769,27 @@ READ8_MEMBER(centiped_state::caterplr_AY8910_r)
*
*************************************/
-ADDRESS_MAP_START(centiped_state::milliped_map)
- ADDRESS_MAP_GLOBAL_MASK(0x7fff)
- AM_RANGE(0x0000, 0x03ff) AM_RAM
- AM_RANGE(0x0400, 0x040f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
- AM_RANGE(0x0800, 0x080f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
- AM_RANGE(0x1000, 0x13bf) AM_RAM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x2000, 0x2000) AM_READ(centiped_IN0_r)
- AM_RANGE(0x2001, 0x2001) AM_READ(milliped_IN1_r)
- AM_RANGE(0x2010, 0x2010) AM_READ(milliped_IN2_r)
- AM_RANGE(0x2011, 0x2011) AM_READ_PORT("IN3")
- AM_RANGE(0x2030, 0x2030) AM_DEVREAD("earom", atari_vg_earom_device, read)
- AM_RANGE(0x2480, 0x249f) AM_WRITE(milliped_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x2500, 0x2507) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x2600, 0x2600) AM_WRITE(irq_ack_w)
- AM_RANGE(0x2680, 0x2680) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x2700, 0x2700) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
- AM_RANGE(0x2780, 0x27bf) AM_DEVWRITE("earom", atari_vg_earom_device, write)
- AM_RANGE(0x4000, 0x7fff) AM_ROM
-ADDRESS_MAP_END
+void centiped_state::milliped_map(address_map &map)
+{
+ map.global_mask(0x7fff);
+ map(0x0000, 0x03ff).ram();
+ map(0x0400, 0x040f).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x0800, 0x080f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x1000, 0x13bf).ram().w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x13c0, 0x13ff).ram().share("spriteram");
+ map(0x2000, 0x2000).r(this, FUNC(centiped_state::centiped_IN0_r));
+ map(0x2001, 0x2001).r(this, FUNC(centiped_state::milliped_IN1_r));
+ map(0x2010, 0x2010).r(this, FUNC(centiped_state::milliped_IN2_r));
+ map(0x2011, 0x2011).portr("IN3");
+ map(0x2030, 0x2030).r("earom", FUNC(atari_vg_earom_device::read));
+ map(0x2480, 0x249f).w(this, FUNC(centiped_state::milliped_paletteram_w)).share("paletteram");
+ map(0x2500, 0x2507).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x2600, 0x2600).w(this, FUNC(centiped_state::irq_ack_w));
+ map(0x2680, 0x2680).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x2700, 0x2700).w("earom", FUNC(atari_vg_earom_device::ctrl_w));
+ map(0x2780, 0x27bf).w("earom", FUNC(atari_vg_earom_device::write));
+ map(0x4000, 0x7fff).rom();
+}
@@ -809,30 +815,31 @@ ADDRESS_MAP_END
TODO: centiped does not work yet, the game reconfigures the memorymap
*/
-ADDRESS_MAP_START(centiped_state::multiped_map)
- AM_RANGE(0x0000, 0x03ff) AM_RAM
- AM_RANGE(0x0400, 0x040f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
- AM_RANGE(0x0800, 0x080f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
- AM_RANGE(0x1000, 0x13bf) AM_RAM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x2000, 0x2000) AM_READ(centiped_IN0_r)
- AM_RANGE(0x2001, 0x2001) AM_READ(milliped_IN1_r)
- AM_RANGE(0x2010, 0x2010) AM_READ(milliped_IN2_r)
- AM_RANGE(0x2011, 0x2011) AM_READ_PORT("IN3")
- AM_RANGE(0x2030, 0x2030) AM_READNOP
- AM_RANGE(0x2480, 0x249f) AM_WRITE(milliped_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x2500, 0x2507) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x2600, 0x2600) AM_WRITE(irq_ack_w)
- AM_RANGE(0x2680, 0x2680) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x2700, 0x2700) AM_WRITENOP
- AM_RANGE(0x2780, 0x27bf) AM_WRITENOP
- AM_RANGE(0x4000, 0x5fff) AM_ROM
- AM_RANGE(0x6000, 0x7fff) AM_MIRROR(0x8000) AM_ROM
- AM_RANGE(0x8000, 0xbfff) AM_ROM
- AM_RANGE(0xd000, 0xd7ff) AM_WRITE(multiped_eeprom_w)
- AM_RANGE(0xd800, 0xd800) AM_MIRROR(0x03ff) AM_READWRITE(multiped_eeprom_r, multiped_prgbank_w)
- AM_RANGE(0xdc00, 0xdc00) AM_MIRROR(0x03ff) AM_WRITE(multiped_gfxbank_w)
-ADDRESS_MAP_END
+void centiped_state::multiped_map(address_map &map)
+{
+ map(0x0000, 0x03ff).ram();
+ map(0x0400, 0x040f).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x0800, 0x080f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x1000, 0x13bf).ram().w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x13c0, 0x13ff).ram().share("spriteram");
+ map(0x2000, 0x2000).r(this, FUNC(centiped_state::centiped_IN0_r));
+ map(0x2001, 0x2001).r(this, FUNC(centiped_state::milliped_IN1_r));
+ map(0x2010, 0x2010).r(this, FUNC(centiped_state::milliped_IN2_r));
+ map(0x2011, 0x2011).portr("IN3");
+ map(0x2030, 0x2030).nopr();
+ map(0x2480, 0x249f).w(this, FUNC(centiped_state::milliped_paletteram_w)).share("paletteram");
+ map(0x2500, 0x2507).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x2600, 0x2600).w(this, FUNC(centiped_state::irq_ack_w));
+ map(0x2680, 0x2680).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x2700, 0x2700).nopw();
+ map(0x2780, 0x27bf).nopw();
+ map(0x4000, 0x5fff).rom();
+ map(0x6000, 0x7fff).mirror(0x8000).rom();
+ map(0x8000, 0xbfff).rom();
+ map(0xd000, 0xd7ff).w(this, FUNC(centiped_state::multiped_eeprom_w));
+ map(0xd800, 0xd800).mirror(0x03ff).rw(this, FUNC(centiped_state::multiped_eeprom_r), FUNC(centiped_state::multiped_prgbank_w));
+ map(0xdc00, 0xdc00).mirror(0x03ff).w(this, FUNC(centiped_state::multiped_gfxbank_w));
+}
READ8_MEMBER(centiped_state::multiped_eeprom_r)
{
@@ -881,21 +888,22 @@ WRITE8_MEMBER(centiped_state::multiped_prgbank_w)
*
*************************************/
-ADDRESS_MAP_START(centiped_state::warlords_map)
- ADDRESS_MAP_GLOBAL_MASK(0x7fff)
- AM_RANGE(0x0000, 0x03ff) AM_RAM
- AM_RANGE(0x0400, 0x07bf) AM_RAM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x07c0, 0x07ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x0800, 0x0800) AM_READ_PORT("DSW1")
- AM_RANGE(0x0801, 0x0801) AM_READ_PORT("DSW2")
- AM_RANGE(0x0c00, 0x0c00) AM_READ_PORT("IN0")
- AM_RANGE(0x0c01, 0x0c01) AM_READ_PORT("IN1")
- AM_RANGE(0x1000, 0x100f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
- AM_RANGE(0x1800, 0x1800) AM_WRITE(irq_ack_w)
- AM_RANGE(0x1c00, 0x1c07) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x5000, 0x7fff) AM_ROM
-ADDRESS_MAP_END
+void centiped_state::warlords_map(address_map &map)
+{
+ map.global_mask(0x7fff);
+ map(0x0000, 0x03ff).ram();
+ map(0x0400, 0x07bf).ram().w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x07c0, 0x07ff).ram().share("spriteram");
+ map(0x0800, 0x0800).portr("DSW1");
+ map(0x0801, 0x0801).portr("DSW2");
+ map(0x0c00, 0x0c00).portr("IN0");
+ map(0x0c01, 0x0c01).portr("IN1");
+ map(0x1000, 0x100f).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x1800, 0x1800).w(this, FUNC(centiped_state::irq_ack_w));
+ map(0x1c00, 0x1c07).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x4000, 0x4000).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x5000, 0x7fff).rom();
+}
@@ -905,28 +913,29 @@ ADDRESS_MAP_END
*
*************************************/
-ADDRESS_MAP_START(centiped_state::mazeinv_map)
- ADDRESS_MAP_GLOBAL_MASK(0x7fff)
- AM_RANGE(0x0000, 0x03ff) AM_RAM
- AM_RANGE(0x0400, 0x040f) AM_DEVREADWRITE("pokey", pokey_device, read, write)
- AM_RANGE(0x0800, 0x080f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
- AM_RANGE(0x1000, 0x13bf) AM_RAM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x13c0, 0x13ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x2000, 0x2000) AM_READ_PORT("IN0")
- AM_RANGE(0x2001, 0x2001) AM_READ_PORT("IN1")
- AM_RANGE(0x2010, 0x2010) AM_READ_PORT("IN2")
- AM_RANGE(0x2011, 0x2011) AM_READ_PORT("IN3")
- AM_RANGE(0x2020, 0x2020) AM_READ(mazeinv_input_r)
- AM_RANGE(0x2030, 0x2030) AM_DEVREAD("earom", atari_vg_earom_device, read)
- AM_RANGE(0x2480, 0x249f) AM_WRITE(mazeinv_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x2500, 0x2507) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x2580, 0x2583) AM_WRITE(mazeinv_input_select_w)
- AM_RANGE(0x2600, 0x2600) AM_WRITE(irq_ack_w)
- AM_RANGE(0x2680, 0x2680) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x2700, 0x2700) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
- AM_RANGE(0x2780, 0x27bf) AM_DEVWRITE("earom", atari_vg_earom_device, write)
- AM_RANGE(0x3000, 0x7fff) AM_ROM
-ADDRESS_MAP_END
+void centiped_state::mazeinv_map(address_map &map)
+{
+ map.global_mask(0x7fff);
+ map(0x0000, 0x03ff).ram();
+ map(0x0400, 0x040f).rw("pokey", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x0800, 0x080f).rw("pokey2", FUNC(pokey_device::read), FUNC(pokey_device::write));
+ map(0x1000, 0x13bf).ram().w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x13c0, 0x13ff).ram().share("spriteram");
+ map(0x2000, 0x2000).portr("IN0");
+ map(0x2001, 0x2001).portr("IN1");
+ map(0x2010, 0x2010).portr("IN2");
+ map(0x2011, 0x2011).portr("IN3");
+ map(0x2020, 0x2020).r(this, FUNC(centiped_state::mazeinv_input_r));
+ map(0x2030, 0x2030).r("earom", FUNC(atari_vg_earom_device::read));
+ map(0x2480, 0x249f).w(this, FUNC(centiped_state::mazeinv_paletteram_w)).share("paletteram");
+ map(0x2500, 0x2507).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x2580, 0x2583).w(this, FUNC(centiped_state::mazeinv_input_select_w));
+ map(0x2600, 0x2600).w(this, FUNC(centiped_state::irq_ack_w));
+ map(0x2680, 0x2680).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x2700, 0x2700).w("earom", FUNC(atari_vg_earom_device::ctrl_w));
+ map(0x2780, 0x27bf).w("earom", FUNC(atari_vg_earom_device::write));
+ map(0x3000, 0x7fff).rom();
+}
@@ -936,35 +945,38 @@ ADDRESS_MAP_END
*
****************************************/
-ADDRESS_MAP_START(centiped_state::bullsdrt_map)
- AM_RANGE(0x0000, 0x0fff) AM_ROM
- AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x6000) AM_READ_PORT("DSW1")
- AM_RANGE(0x1080, 0x1080) AM_MIRROR(0x6000) AM_READ(centiped_IN0_r)
- AM_RANGE(0x1081, 0x1081) AM_MIRROR(0x6000) AM_READ_PORT("IN1")
- AM_RANGE(0x1082, 0x1082) AM_MIRROR(0x6000) AM_READ(centiped_IN2_r)
- AM_RANGE(0x1200, 0x123f) AM_MIRROR(0x6000) AM_DEVREADWRITE("earom",atari_vg_earom_device, read, write)
- AM_RANGE(0x1280, 0x1280) AM_MIRROR(0x6000) AM_DEVWRITE("earom", atari_vg_earom_device, ctrl_w)
- AM_RANGE(0x1300, 0x1300) AM_MIRROR(0x6000) AM_READ_PORT("DSW2")
- AM_RANGE(0x1400, 0x140f) AM_MIRROR(0x6000) AM_WRITE(centiped_paletteram_w) AM_SHARE("paletteram")
- AM_RANGE(0x1480, 0x1487) AM_MIRROR(0x6000) AM_DEVWRITE("outlatch", ls259_device, write_d7)
- AM_RANGE(0x1500, 0x1500) AM_MIRROR(0x6000) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w)
- AM_RANGE(0x1580, 0x1580) AM_MIRROR(0x6000) AM_NOP
- AM_RANGE(0x1800, 0x1bbf) AM_MIRROR(0x6000) AM_WRITE(centiped_videoram_w) AM_SHARE("videoram")
- AM_RANGE(0x1bc0, 0x1bff) AM_MIRROR(0x6000) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x1c00, 0x1fff) AM_MIRROR(0x6000) AM_RAM
- AM_RANGE(0x2000, 0x2fff) AM_ROM
- AM_RANGE(0x4000, 0x4fff) AM_ROM
- AM_RANGE(0x6000, 0x6fff) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(centiped_state::bullsdrt_port_map)
- AM_RANGE(0x00, 0x00) AM_WRITE(bullsdrt_sprites_bank_w)
- AM_RANGE(0x20, 0x3f) AM_WRITE(bullsdrt_tilesbank_w) AM_SHARE("bullsdrt_bank")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(centiped_state::bullsdrt_data_map)
- AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(bullsdrt_data_port_r) AM_DEVWRITE("snsnd", sn76496_device, write)
-ADDRESS_MAP_END
+void centiped_state::bullsdrt_map(address_map &map)
+{
+ map(0x0000, 0x0fff).rom();
+ map(0x1000, 0x1000).mirror(0x6000).portr("DSW1");
+ map(0x1080, 0x1080).mirror(0x6000).r(this, FUNC(centiped_state::centiped_IN0_r));
+ map(0x1081, 0x1081).mirror(0x6000).portr("IN1");
+ map(0x1082, 0x1082).mirror(0x6000).r(this, FUNC(centiped_state::centiped_IN2_r));
+ map(0x1200, 0x123f).mirror(0x6000).rw("earom", FUNC(atari_vg_earom_device::read), FUNC(atari_vg_earom_device::write));
+ map(0x1280, 0x1280).mirror(0x6000).w("earom", FUNC(atari_vg_earom_device::ctrl_w));
+ map(0x1300, 0x1300).mirror(0x6000).portr("DSW2");
+ map(0x1400, 0x140f).mirror(0x6000).w(this, FUNC(centiped_state::centiped_paletteram_w)).share("paletteram");
+ map(0x1480, 0x1487).mirror(0x6000).w("outlatch", FUNC(ls259_device::write_d7));
+ map(0x1500, 0x1500).mirror(0x6000).w("watchdog", FUNC(watchdog_timer_device::reset_w));
+ map(0x1580, 0x1580).mirror(0x6000).noprw();
+ map(0x1800, 0x1bbf).mirror(0x6000).w(this, FUNC(centiped_state::centiped_videoram_w)).share("videoram");
+ map(0x1bc0, 0x1bff).mirror(0x6000).ram().share("spriteram");
+ map(0x1c00, 0x1fff).mirror(0x6000).ram();
+ map(0x2000, 0x2fff).rom();
+ map(0x4000, 0x4fff).rom();
+ map(0x6000, 0x6fff).rom();
+}
+
+void centiped_state::bullsdrt_port_map(address_map &map)
+{
+ map(0x00, 0x00).w(this, FUNC(centiped_state::bullsdrt_sprites_bank_w));
+ map(0x20, 0x3f).w(this, FUNC(centiped_state::bullsdrt_tilesbank_w)).share("bullsdrt_bank");
+}
+
+void centiped_state::bullsdrt_data_map(address_map &map)
+{
+ map(S2650_DATA_PORT, S2650_DATA_PORT).r(this, FUNC(centiped_state::bullsdrt_data_port_r)).w("snsnd", FUNC(sn76496_device::write));
+}