diff options
Diffstat (limited to 'src/mame/drivers/8080bw.cpp')
-rw-r--r-- | src/mame/drivers/8080bw.cpp | 635 |
1 files changed, 336 insertions, 299 deletions
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp index 0ad1abebe63..0dcb1929fb2 100644 --- a/src/mame/drivers/8080bw.cpp +++ b/src/mame/drivers/8080bw.cpp @@ -372,15 +372,16 @@ INPUT_PORTS_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::invadpt2_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::invadpt2_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::invadpt2_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invadpt2_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} static INPUT_PORTS_START( invadpt2 ) @@ -442,15 +443,16 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::spacerng_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(spacerng_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::spacerng_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::invadpt2_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::spacerng_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} MACHINE_CONFIG_START(_8080bw_state::spacerng) invadpt2(config); @@ -468,14 +470,15 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::spcewars_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(spcewars_sh_port_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) -ADDRESS_MAP_END +void _8080bw_state::spcewars_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::spcewars_sh_port_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invadpt2_sh_port_2_w)); +} static INPUT_PORTS_START( spcewars ) @@ -526,16 +529,17 @@ MACHINE_CONFIG_END // has a slightly rearranged io map and has PROMs and watchdog -ADDRESS_MAP_START(_8080bw_state::spcewarla_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") - AM_RANGE(0x04, 0x04) AM_WRITE(spcewars_sh_port_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x08, 0x08) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x0c, 0x0c) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) -ADDRESS_MAP_END +void _8080bw_state::spcewarla_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2"); + map(0x04, 0x04).w(this, FUNC(_8080bw_state::spcewars_sh_port_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invadpt2_sh_port_2_w)); + map(0x06, 0x06).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); + map(0x08, 0x08).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x0c, 0x0c).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); +} MACHINE_CONFIG_START(_8080bw_state::spcewarla) spcewars(config); @@ -557,16 +561,17 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::astropal_io_map) - ADDRESS_MAP_GLOBAL_MASK(0x7) - AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") - AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ_PORT("IN3") - - AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invaders_audio_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::astropal_io_map(address_map &map) +{ + map.global_mask(0x7); + map(0x00, 0x00).mirror(0x04).portr("IN0"); + map(0x01, 0x01).mirror(0x04).portr("IN1"); + map(0x03, 0x03).mirror(0x04).portr("IN3"); + + map(0x03, 0x03).w(this, FUNC(_8080bw_state::invaders_audio_1_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invaders_audio_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} static INPUT_PORTS_START( astropal ) PORT_START("IN0") @@ -621,23 +626,25 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::cosmo_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x4000, 0x57ff) AM_ROM - AM_RANGE(0x5c00, 0x5fff) AM_RAM AM_SHARE("colorram") -ADDRESS_MAP_END +void _8080bw_state::cosmo_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x3fff).ram().share("main_ram"); + map(0x4000, 0x57ff).rom(); + map(0x5c00, 0x5fff).ram().share("colorram"); +} /* at least one of these MWA8_NOPs must be sound related */ -ADDRESS_MAP_START(_8080bw_state::cosmo_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITENOP - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITENOP - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITENOP - AM_RANGE(0x03, 0x03) AM_WRITE(invadpt2_sh_port_1_w) - AM_RANGE(0x05, 0x05) AM_WRITE(cosmo_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x07, 0x07) AM_WRITENOP -ADDRESS_MAP_END +void _8080bw_state::cosmo_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0").nopw(); + map(0x01, 0x01).portr("IN1").nopw(); + map(0x02, 0x02).portr("IN2").nopw(); + map(0x03, 0x03).w(this, FUNC(_8080bw_state::invadpt2_sh_port_1_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::cosmo_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); + map(0x07, 0x07).nopw(); +} static INPUT_PORTS_START( cosmo ) @@ -803,16 +810,18 @@ static INPUT_PORTS_START( spacecom ) INPUT_PORTS_END -ADDRESS_MAP_START(_8080bw_state::spacecom_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") // other RAM not hooked up? -ADDRESS_MAP_END +void _8080bw_state::spacecom_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x3fff).ram().share("main_ram"); // other RAM not hooked up? +} -ADDRESS_MAP_START(_8080bw_state::spacecom_io_map) - AM_RANGE(0x41, 0x41) AM_READ_PORT("IN0") - AM_RANGE(0x42, 0x42) AM_READ_PORT("IN1") AM_WRITE(invaders_audio_1_w) - AM_RANGE(0x44, 0x44) AM_READ_PORT("IN2") AM_WRITE(invaders_audio_2_w) -ADDRESS_MAP_END +void _8080bw_state::spacecom_io_map(address_map &map) +{ + map(0x41, 0x41).portr("IN0"); + map(0x42, 0x42).portr("IN1").w(this, FUNC(_8080bw_state::invaders_audio_1_w)); + map(0x44, 0x44).portr("IN2").w(this, FUNC(_8080bw_state::invaders_audio_2_w)); +} MACHINE_CONFIG_START(_8080bw_state::spacecom) @@ -862,20 +871,22 @@ READ8_MEMBER(_8080bw_state::invrvnge_02_r) return (data & 0x8f) | (ioport("IN1")->read() & 0x70); } -ADDRESS_MAP_START(_8080bw_state::invrvnge_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invrvnge_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invrvnge_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::invrvnge_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).r(this, FUNC(_8080bw_state::invrvnge_02_r)).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::invrvnge_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invrvnge_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} -ADDRESS_MAP_START(_8080bw_state::invrvnge_sound_map) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0xffff) AM_ROM // dummy prg map, TODO: decrypt ROM -ADDRESS_MAP_END +void _8080bw_state::invrvnge_sound_map(address_map &map) +{ + map.unmap_value_high(); + map(0x0000, 0xffff).rom(); // dummy prg map, TODO: decrypt ROM +} static INPUT_PORTS_START( invrvnge ) @@ -1055,15 +1066,16 @@ static INPUT_PORTS_START( galxwars ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) INPUT_PORTS_END -ADDRESS_MAP_START(_8080bw_state::starw1_io_map) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") - AM_RANGE(0x03, 0x03) AM_WRITENOP /* writes 9B at boot */ - AM_RANGE(0x04, 0x04) AM_WRITE(invadpt2_sh_port_1_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x07, 0x07) AM_WRITENOP /* writes 89 at boot */ -ADDRESS_MAP_END +void _8080bw_state::starw1_io_map(address_map &map) +{ + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2"); + map(0x03, 0x03).nopw(); /* writes 9B at boot */ + map(0x04, 0x04).w(this, FUNC(_8080bw_state::invadpt2_sh_port_1_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invadpt2_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); + map(0x07, 0x07).nopw(); /* writes 89 at boot */ +} MACHINE_CONFIG_START(_8080bw_state::starw1) invadpt2(config); @@ -1077,20 +1089,22 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::escmars_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x4000, 0x4fff) AM_ROM -ADDRESS_MAP_END +void _8080bw_state::escmars_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x3fff).ram().share("main_ram"); + map(0x4000, 0x4fff).rom(); +} -ADDRESS_MAP_START(_8080bw_state::lrescue_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(lrescue_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(lrescue_sh_port_2_w) -ADDRESS_MAP_END +void _8080bw_state::lrescue_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::lrescue_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::lrescue_sh_port_2_w)); +} static INPUT_PORTS_START( lrescue ) @@ -1219,19 +1233,20 @@ WRITE8_MEMBER(_8080bw_state::cosmicmo_05_w) m_flip_screen = BIT(data, 5) & BIT(ioport("IN2")->read(), 2); } -ADDRESS_MAP_START(_8080bw_state::cosmicmo_io_map) - ADDRESS_MAP_GLOBAL_MASK(0x7) - AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ(invrvnge_02_r) - AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) - - AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_WRITE(invaders_audio_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(cosmicmo_05_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::cosmicmo_io_map(address_map &map) +{ + map.global_mask(0x7); + map(0x00, 0x00).mirror(0x04).portr("IN0"); + map(0x01, 0x01).mirror(0x04).portr("IN1"); + map(0x02, 0x02).mirror(0x04).r(this, FUNC(_8080bw_state::invrvnge_02_r)); + map(0x03, 0x03).mirror(0x04).r(m_mb14241, FUNC(mb14241_device::shift_result_r)); + + map(0x02, 0x02).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).w(this, FUNC(_8080bw_state::invaders_audio_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::cosmicmo_05_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} MACHINE_CONFIG_START(_8080bw_state::cosmicmo) mw8080bw_root(config); @@ -1340,23 +1355,25 @@ WRITE8_MEMBER(_8080bw_state::rollingc_scattered_colorram2_w) m_scattered_colorram2[(offset & 0x1f) | ((offset & 0x1f00) >> 3)] = data; } -ADDRESS_MAP_START(_8080bw_state::rollingc_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x4000, 0x5fff) AM_ROM - AM_RANGE(0xa000, 0xbfff) AM_READWRITE(rollingc_scattered_colorram_r, rollingc_scattered_colorram_w) - AM_RANGE(0xe000, 0xffff) AM_READWRITE(rollingc_scattered_colorram2_r, rollingc_scattered_colorram2_w) -ADDRESS_MAP_END +void _8080bw_state::rollingc_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x3fff).ram().share("main_ram"); + map(0x4000, 0x5fff).rom(); + map(0xa000, 0xbfff).rw(this, FUNC(_8080bw_state::rollingc_scattered_colorram_r), FUNC(_8080bw_state::rollingc_scattered_colorram_w)); + map(0xe000, 0xffff).rw(this, FUNC(_8080bw_state::rollingc_scattered_colorram2_r), FUNC(_8080bw_state::rollingc_scattered_colorram2_w)); +} -ADDRESS_MAP_START(_8080bw_state::rollingc_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(rollingc_sh_port_w) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) -ADDRESS_MAP_END +void _8080bw_state::rollingc_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0").w(this, FUNC(_8080bw_state::rollingc_sh_port_w)); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::invadpt2_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invadpt2_sh_port_2_w)); +} static INPUT_PORTS_START( rollingc ) @@ -1427,23 +1444,25 @@ WRITE8_MEMBER(_8080bw_state::schaser_scattered_colorram_w) m_scattered_colorram[(offset & 0x1f) | ((offset & 0x1f80) >> 2)] = data; } -ADDRESS_MAP_START(_8080bw_state::schaser_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x4000, 0x5fff) AM_ROM - AM_RANGE(0xc000, 0xdfff) AM_READWRITE(schaser_scattered_colorram_r, schaser_scattered_colorram_w) -ADDRESS_MAP_END +void _8080bw_state::schaser_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x3fff).ram().share("main_ram"); + map(0x4000, 0x5fff).rom(); + map(0xc000, 0xdfff).rw(this, FUNC(_8080bw_state::schaser_scattered_colorram_r), FUNC(_8080bw_state::schaser_scattered_colorram_w)); +} -ADDRESS_MAP_START(_8080bw_state::schaser_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(schaser_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(schaser_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::schaser_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::schaser_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::schaser_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} static INPUT_PORTS_START( schaser ) @@ -1590,14 +1609,15 @@ READ8_MEMBER(_8080bw_state::schasercv_02_r) return (data & 0x89) | (in1 & 0x70) | (BIT(in1, 3) << 1) | (BIT(in1, 7) << 2); } -ADDRESS_MAP_START(_8080bw_state::schasercv_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ(schasercv_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(schasercv_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(schasercv_sh_port_2_w) -ADDRESS_MAP_END +void _8080bw_state::schasercv_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).r(this, FUNC(_8080bw_state::schasercv_02_r)).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::schasercv_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::schasercv_sh_port_2_w)); +} static INPUT_PORTS_START( schasercv ) @@ -1687,21 +1707,22 @@ CUSTOM_INPUT_MEMBER(_8080bw_state::sflush_80_r) return (m_screen->vpos() & 0x80) ? 1 : 0; } -ADDRESS_MAP_START(_8080bw_state::sflush_map) - AM_RANGE(0x0000, 0x1fff) AM_RAM - AM_RANGE(0x4000, 0x5fff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x8008, 0x8008) AM_READ_PORT("PADDLE") - AM_RANGE(0x8009, 0x8009) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) - AM_RANGE(0x800a, 0x800a) AM_READ_PORT("IN2") - AM_RANGE(0x800b, 0x800b) AM_READ_PORT("IN0") - AM_RANGE(0x8018, 0x8018) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x8019, 0x8019) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x801a, 0x801a) AM_WRITENOP - AM_RANGE(0x801c, 0x801c) AM_WRITENOP - AM_RANGE(0x801d, 0x801d) AM_WRITENOP - AM_RANGE(0xa000, 0xbfff) AM_READWRITE(schaser_scattered_colorram_r, schaser_scattered_colorram_w) - AM_RANGE(0xd800, 0xffff) AM_ROM -ADDRESS_MAP_END +void _8080bw_state::sflush_map(address_map &map) +{ + map(0x0000, 0x1fff).ram(); + map(0x4000, 0x5fff).ram().share("main_ram"); + map(0x8008, 0x8008).portr("PADDLE"); + map(0x8009, 0x8009).r(m_mb14241, FUNC(mb14241_device::shift_result_r)); + map(0x800a, 0x800a).portr("IN2"); + map(0x800b, 0x800b).portr("IN0"); + map(0x8018, 0x8018).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x8019, 0x8019).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x801a, 0x801a).nopw(); + map(0x801c, 0x801c).nopw(); + map(0x801d, 0x801d).nopw(); + map(0xa000, 0xbfff).rw(this, FUNC(_8080bw_state::schaser_scattered_colorram_r), FUNC(_8080bw_state::schaser_scattered_colorram_w)); + map(0xd800, 0xffff).rom(); +} static INPUT_PORTS_START( sflush ) @@ -1780,15 +1801,16 @@ MACHINE_CONFIG_END /* */ /*******************************************************************************************/ -ADDRESS_MAP_START(_8080bw_state::lupin3_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(lupin3_00_w) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(lupin3_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(lupin3_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END +void _8080bw_state::lupin3_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0").w(this, FUNC(_8080bw_state::lupin3_00_w)); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::lupin3_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::lupin3_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} static INPUT_PORTS_START( lupin3 ) @@ -1946,15 +1968,16 @@ READ8_MEMBER(_8080bw_state::polaris_port00_r) // you will get a nice sound that accurately follows the plane. // It sounds better then the actual circuit used. // Probably an unfinished feature. -ADDRESS_MAP_START(_8080bw_state::polaris_io_map) - AM_RANGE(0x00, 0x00) AM_READ(polaris_port00_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(polaris_sh_port_1_w) - AM_RANGE(0x03, 0x03) AM_DEVREADWRITE("mb14241", mb14241_device, shift_result_r, shift_data_w) - AM_RANGE(0x04, 0x04) AM_WRITE(polaris_sh_port_2_w) - AM_RANGE(0x05, 0x05) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x06, 0x06) AM_WRITE(polaris_sh_port_3_w) -ADDRESS_MAP_END +void _8080bw_state::polaris_io_map(address_map &map) +{ + map(0x00, 0x00).r(this, FUNC(_8080bw_state::polaris_port00_r)).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).portr("IN2").w(this, FUNC(_8080bw_state::polaris_sh_port_1_w)); + map(0x03, 0x03).rw(m_mb14241, FUNC(mb14241_device::shift_result_r), FUNC(mb14241_device::shift_data_w)); + map(0x04, 0x04).w(this, FUNC(_8080bw_state::polaris_sh_port_2_w)); + map(0x05, 0x05).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); + map(0x06, 0x06).w(this, FUNC(_8080bw_state::polaris_sh_port_3_w)); +} static INPUT_PORTS_START( polaris ) @@ -2123,14 +2146,15 @@ INPUT_PORTS_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::ballbomb_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITE(ballbomb_01_w) - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(ballbomb_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(ballbomb_sh_port_2_w) -ADDRESS_MAP_END +void _8080bw_state::ballbomb_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).portr("IN1").w(this, FUNC(_8080bw_state::ballbomb_01_w)); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::ballbomb_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::ballbomb_sh_port_2_w)); +} static INPUT_PORTS_START( ballbomb ) @@ -2177,19 +2201,21 @@ MACHINE_CONFIG_END /* */ /*******************************************************/ -ADDRESS_MAP_START(_8080bw_state::yosakdon_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x4000, 0x43ff) AM_WRITEONLY /* what's this? */ -ADDRESS_MAP_END +void _8080bw_state::yosakdon_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x3fff).ram().share("main_ram"); + map(0x4000, 0x43ff).writeonly(); /* what's this? */ +} -ADDRESS_MAP_START(_8080bw_state::yosakdon_io_map) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0") - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1") - AM_RANGE(0x03, 0x03) AM_WRITE(yosakdon_sh_port_1_w) - AM_RANGE(0x05, 0x05) AM_WRITE(yosakdon_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_WRITENOP /* character numbers */ -ADDRESS_MAP_END +void _8080bw_state::yosakdon_io_map(address_map &map) +{ + map(0x01, 0x01).portr("IN0"); + map(0x02, 0x02).portr("IN1"); + map(0x03, 0x03).w(this, FUNC(_8080bw_state::yosakdon_sh_port_1_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::yosakdon_sh_port_2_w)); + map(0x06, 0x06).nopw(); /* character numbers */ +} static INPUT_PORTS_START( yosakdon ) @@ -2366,27 +2392,29 @@ READ8_MEMBER(_8080bw_state::indianbtbr_01_r) return (data & 0x8f) | (ioport("IN2")->read() & 0x70); } -ADDRESS_MAP_START(_8080bw_state::indianbt_io_map) - AM_RANGE(0x00, 0x00) AM_READ(indianbt_r) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(indianbt_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(indianbt_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x07, 0x07) AM_WRITE(indianbt_sh_port_3_w) -ADDRESS_MAP_END - -ADDRESS_MAP_START(_8080bw_state::indianbtbr_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x01, 0x01) AM_READ(indianbtbr_01_r) - AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(indianbtbr_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(indianbtbr_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) - AM_RANGE(0x07, 0x07) AM_WRITENOP -ADDRESS_MAP_END +void _8080bw_state::indianbt_io_map(address_map &map) +{ + map(0x00, 0x00).r(this, FUNC(_8080bw_state::indianbt_r)); + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).r(this, FUNC(_8080bw_state::invrvnge_02_r)).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::indianbt_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::indianbt_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); + map(0x07, 0x07).w(this, FUNC(_8080bw_state::indianbt_sh_port_3_w)); +} + +void _8080bw_state::indianbtbr_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x01, 0x01).r(this, FUNC(_8080bw_state::indianbtbr_01_r)); + map(0x02, 0x02).portr("IN2").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::indianbtbr_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::indianbtbr_sh_port_2_w)); + map(0x06, 0x06).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); + map(0x07, 0x07).nopw(); +} MACHINE_CONFIG_START(_8080bw_state::indianbt) @@ -2451,14 +2479,15 @@ WRITE8_MEMBER(_8080bw_state::steelwkr_sh_port_3_w) machine().bookkeeping().coin_lockout_global_w(!(~data & 0x03)); /* possibly */ } -ADDRESS_MAP_START(_8080bw_state::steelwkr_io_map) - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x02, 0x02) AM_READ(invrvnge_02_r) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) AM_WRITE(invadpt2_sh_port_1_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w) - AM_RANGE(0x06, 0x06) AM_WRITE(steelwkr_sh_port_3_w) -ADDRESS_MAP_END +void _8080bw_state::steelwkr_io_map(address_map &map) +{ + map(0x01, 0x01).portr("IN1"); + map(0x02, 0x02).r(this, FUNC(_8080bw_state::invrvnge_02_r)).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)).w(this, FUNC(_8080bw_state::invadpt2_sh_port_1_w)); + map(0x04, 0x04).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x05, 0x05).w(this, FUNC(_8080bw_state::invadpt2_sh_port_2_w)); + map(0x06, 0x06).w(this, FUNC(_8080bw_state::steelwkr_sh_port_3_w)); +} static INPUT_PORTS_START( steelwkr ) /* PORT_START("IN0") - never read */ @@ -2648,20 +2677,22 @@ WRITE8_MEMBER(_8080bw_state::shuttlei_ff_w) m_flip_screen = BIT(data, 2) & BIT(ioport(CABINET_PORT_TAG)->read(), 0); } -ADDRESS_MAP_START(_8080bw_state::shuttlei_map) - AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x37ff) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x3800, 0x3fff) AM_RAM - AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("share1") // shuttlei - AM_RANGE(0x6000, 0x63ff) AM_RAM AM_SHARE("share1") // skylove (is it mirrored, or different PCB hookup?) -ADDRESS_MAP_END +void _8080bw_state::shuttlei_map(address_map &map) +{ + map(0x0000, 0x1fff).rom(); + map(0x2000, 0x37ff).ram().share("main_ram"); + map(0x3800, 0x3fff).ram(); + map(0x4000, 0x43ff).ram().share("share1"); // shuttlei + map(0x6000, 0x63ff).ram().share("share1"); // skylove (is it mirrored, or different PCB hookup?) +} -ADDRESS_MAP_START(_8080bw_state::shuttlei_io_map) - AM_RANGE(0xfc, 0xfc) AM_WRITENOP /* game writes 0xAA every so often (perhaps when base hit?) */ - AM_RANGE(0xfd, 0xfd) AM_WRITE(shuttlei_sh_port_1_w) - AM_RANGE(0xfe, 0xfe) AM_READ_PORT("DSW") AM_WRITE(shuttlei_sh_port_2_w) - AM_RANGE(0xff, 0xff) AM_READWRITE(shuttlei_ff_r,shuttlei_ff_w) -ADDRESS_MAP_END +void _8080bw_state::shuttlei_io_map(address_map &map) +{ + map(0xfc, 0xfc).nopw(); /* game writes 0xAA every so often (perhaps when base hit?) */ + map(0xfd, 0xfd).w(this, FUNC(_8080bw_state::shuttlei_sh_port_1_w)); + map(0xfe, 0xfe).portr("DSW").w(this, FUNC(_8080bw_state::shuttlei_sh_port_2_w)); + map(0xff, 0xff).rw(this, FUNC(_8080bw_state::shuttlei_ff_r), FUNC(_8080bw_state::shuttlei_ff_w)); +} MACHINE_CONFIG_START(_8080bw_state::shuttlei) @@ -2733,20 +2764,22 @@ READ8_MEMBER(_8080bw_state::darthvdr_01_r) return (data & 0xe1) | (ioport("P1")->read() & 0x0e); } -ADDRESS_MAP_START(_8080bw_state::darthvdr_map) - AM_RANGE(0x0000, 0x17ff) AM_ROM - AM_RANGE(0x1800, 0x1fff) AM_RAM - AM_RANGE(0x4000, 0x5fff) AM_RAM AM_SHARE("main_ram") -ADDRESS_MAP_END +void _8080bw_state::darthvdr_map(address_map &map) +{ + map(0x0000, 0x17ff).rom(); + map(0x1800, 0x1fff).ram(); + map(0x4000, 0x5fff).ram().share("main_ram"); +} -ADDRESS_MAP_START(_8080bw_state::darthvdr_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("P1") - AM_RANGE(0x01, 0x01) AM_READ(darthvdr_01_r) +void _8080bw_state::darthvdr_io_map(address_map &map) +{ + map(0x00, 0x00).portr("P1"); + map(0x01, 0x01).r(this, FUNC(_8080bw_state::darthvdr_01_r)); - AM_RANGE(0x00, 0x00) AM_WRITE(darthvdr_00_w) // flipscreen - AM_RANGE(0x04, 0x04) AM_WRITENOP - AM_RANGE(0x08, 0x08) AM_WRITE(darthvdr_08_w) // sound -ADDRESS_MAP_END + map(0x00, 0x00).w(this, FUNC(_8080bw_state::darthvdr_00_w)); // flipscreen + map(0x04, 0x04).nopw(); + map(0x08, 0x08).w(this, FUNC(_8080bw_state::darthvdr_08_w)); // sound +} static INPUT_PORTS_START( darthvdr ) @@ -2822,20 +2855,21 @@ MACHINE_CONFIG_END * *************************************/ -ADDRESS_MAP_START(_8080bw_state::vortex_io_map) +void _8080bw_state::vortex_io_map(address_map &map) +{ // I/O map is same as invaders but with A9 (used as A1 for I/O) inverted - ADDRESS_MAP_GLOBAL_MASK(0xFF) - AM_RANGE(0x02, 0x02) AM_MIRROR(0x04) AM_READ_PORT("IN0") - AM_RANGE(0x03, 0x03) AM_MIRROR(0x04) AM_READ_PORT("IN1") - AM_RANGE(0x00, 0x00) AM_MIRROR(0x04) AM_READ_PORT("IN2") - AM_RANGE(0x01, 0x01) AM_MIRROR(0x04) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) - - AM_RANGE(0x00, 0x00) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x01, 0x01) AM_WRITE(invaders_audio_1_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x07, 0x07) AM_WRITE(invaders_audio_2_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) -ADDRESS_MAP_END + map.global_mask(0xFF); + map(0x02, 0x02).mirror(0x04).portr("IN0"); + map(0x03, 0x03).mirror(0x04).portr("IN1"); + map(0x00, 0x00).mirror(0x04).portr("IN2"); + map(0x01, 0x01).mirror(0x04).r(m_mb14241, FUNC(mb14241_device::shift_result_r)); + + map(0x00, 0x00).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x01, 0x01).w(this, FUNC(_8080bw_state::invaders_audio_1_w)); + map(0x06, 0x06).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x07, 0x07).w(this, FUNC(_8080bw_state::invaders_audio_2_w)); + map(0x04, 0x04).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); +} static INPUT_PORTS_START( vortex ) @@ -3110,15 +3144,16 @@ READ8_MEMBER(_8080bw_state::claybust_gun_hi_r) return m_claybust_gun_pos >> 8; } -ADDRESS_MAP_START(_8080bw_state::claybust_io_map) +void _8080bw_state::claybust_io_map(address_map &map) +{ //AM_RANGE(0x00, 0x00) AM_WRITENOP // ? - AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) - AM_RANGE(0x02, 0x02) AM_READ(claybust_gun_lo_r) AM_DEVWRITE("mb14241", mb14241_device, shift_data_w) - AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_device, shift_result_r) //AM_WRITENOP // port3 write looks sound-related - AM_RANGE(0x04, 0x04) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) + map(0x01, 0x01).portr("IN1").w(m_mb14241, FUNC(mb14241_device::shift_count_w)); + map(0x02, 0x02).r(this, FUNC(_8080bw_state::claybust_gun_lo_r)).w(m_mb14241, FUNC(mb14241_device::shift_data_w)); + map(0x03, 0x03).r(m_mb14241, FUNC(mb14241_device::shift_result_r)); //AM_WRITENOP // port3 write looks sound-related + map(0x04, 0x04).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); //AM_RANGE(0x05, 0x05) AM_WRITENOP // ? - AM_RANGE(0x06, 0x06) AM_READ(claybust_gun_hi_r) -ADDRESS_MAP_END + map(0x06, 0x06).r(this, FUNC(_8080bw_state::claybust_gun_hi_r)); +} static INPUT_PORTS_START( claybust ) @@ -3263,15 +3298,16 @@ INPUT_PORTS_END *****************************************************/ -ADDRESS_MAP_START(_8080bw_state::attackfc_io_map) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") - AM_RANGE(0x02, 0x02) AM_WRITENOP // lamp? - AM_RANGE(0x03, 0x03) AM_DEVREADWRITE("mb14241", mb14241_device, shift_result_r, shift_data_w) - AM_RANGE(0x04, 0x04) AM_WRITENOP // sound enable? - AM_RANGE(0x05, 0x05) AM_WRITENOP // watchdog? - AM_RANGE(0x06, 0x06) AM_WRITENOP // sound? - AM_RANGE(0x07, 0x07) AM_DEVWRITE("mb14241", mb14241_device, shift_count_w) -ADDRESS_MAP_END +void _8080bw_state::attackfc_io_map(address_map &map) +{ + map(0x00, 0x00).portr("IN0"); + map(0x02, 0x02).nopw(); // lamp? + map(0x03, 0x03).rw(m_mb14241, FUNC(mb14241_device::shift_result_r), FUNC(mb14241_device::shift_data_w)); + map(0x04, 0x04).nopw(); // sound enable? + map(0x05, 0x05).nopw(); // watchdog? + map(0x06, 0x06).nopw(); // sound? + map(0x07, 0x07).w(m_mb14241, FUNC(mb14241_device::shift_count_w)); +} static INPUT_PORTS_START( attackfc ) @@ -3393,13 +3429,14 @@ static INPUT_PORTS_START( invmulti ) PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -ADDRESS_MAP_START(_8080bw_state::invmulti_map) - AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x8000) AM_ROMBANK("bank1") - AM_RANGE(0x2000, 0x3fff) AM_MIRROR(0x8000) AM_RAM AM_SHARE("main_ram") - AM_RANGE(0x4000, 0x5fff) AM_MIRROR(0x8000) AM_ROMBANK("bank2") - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READWRITE(invmulti_eeprom_r, invmulti_eeprom_w) - AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fff) AM_WRITE(invmulti_bank_w) -ADDRESS_MAP_END +void _8080bw_state::invmulti_map(address_map &map) +{ + map(0x0000, 0x1fff).mirror(0x8000).bankr("bank1"); + map(0x2000, 0x3fff).mirror(0x8000).ram().share("main_ram"); + map(0x4000, 0x5fff).mirror(0x8000).bankr("bank2"); + map(0x6000, 0x6000).mirror(0x1fff).rw(this, FUNC(_8080bw_state::invmulti_eeprom_r), FUNC(_8080bw_state::invmulti_eeprom_w)); + map(0xe000, 0xe000).mirror(0x1fff).w(this, FUNC(_8080bw_state::invmulti_bank_w)); +} READ8_MEMBER(_8080bw_state::invmulti_eeprom_r) { |