diff options
Diffstat (limited to 'src/mame/drivers/taito_x.cpp')
-rw-r--r-- | src/mame/drivers/taito_x.cpp | 99 |
1 files changed, 53 insertions, 46 deletions
diff --git a/src/mame/drivers/taito_x.cpp b/src/mame/drivers/taito_x.cpp index 1f2a5b985a3..2627ebdcc9b 100644 --- a/src/mame/drivers/taito_x.cpp +++ b/src/mame/drivers/taito_x.cpp @@ -9,7 +9,7 @@ Taito X-system driver by Richard Bush, Howie Cohen and Yochizo 25th Nov 2003 -video merged with video/seta.c +video merged with video/seta.cpp Supported games: @@ -341,13 +341,13 @@ READ16_MEMBER(taitox_state::superman_dsw_input_r) switch (offset) { case 0x00: - return ioport("DSWA")->read() & 0x0f; + return m_dswa_io->read() & 0x0f; case 0x01: - return (ioport("DSWA")->read() & 0xf0) >> 4; + return (m_dswa_io->read() & 0xf0) >> 4; case 0x02: - return ioport("DSWB")->read() & 0x0f; + return m_dswb_io->read() & 0x0f; case 0x03: - return (ioport("DSWB")->read() & 0xf0) >> 4; + return (m_dswb_io->read() & 0xf0) >> 4; default: logerror("taitox unknown dsw read offset: %04x\n", offset); return 0x00; @@ -359,11 +359,11 @@ READ16_MEMBER(taitox_state::daisenpu_input_r) switch (offset) { case 0x00: - return ioport("IN0")->read(); /* Player 1 controls + START1 */ + return m_in_io[0]->read(); /* Player 1 controls + START1 */ case 0x01: - return ioport("IN1")->read(); /* Player 2 controls + START2 */ + return m_in_io[1]->read(); /* Player 2 controls + START2 */ case 0x02: - return ioport("IN2")->read(); /* COINn + SERVICE1 + TILT */ + return m_in_io[2]->read(); /* COINn + SERVICE1 + TILT */ default: logerror("taitox unknown input read offset: %04x\n", offset); @@ -411,14 +411,24 @@ WRITE16_MEMBER(taitox_state::kyustrkr_input_w) WRITE8_MEMBER(taitox_state::sound_bankswitch_w) { - membank("z80bank")->set_entry(data & 3); + m_z80bank->set_entry(data & 3); } /**************************************************************************/ +void taitox_state::taito_x_base_map(address_map &map) +{ + map(0xb00000, 0xb00fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); + map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y + map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16)); + map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr + map(0xf00000, 0xf03fff).ram(); /* Main RAM */ +} + void taitox_state::superman_map(address_map &map) { + taito_x_base_map(map); map(0x000000, 0x07ffff).rom(); map(0x300000, 0x300001).nopw(); /* written each frame at $3a9c, mostly 0x10 */ map(0x400000, 0x400001).nopw(); /* written each frame at $3aa2, mostly 0x10 */ @@ -429,15 +439,11 @@ void taitox_state::superman_map(address_map &map) map(0x800003, 0x800003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x900000, 0x9007ff).rw(m_cchip, FUNC(taito_cchip_device::mem68_r), FUNC(taito_cchip_device::mem68_w)).umask16(0x00ff); map(0x900800, 0x900fff).rw(m_cchip, FUNC(taito_cchip_device::asic_r), FUNC(taito_cchip_device::asic68_w)).umask16(0x00ff); - map(0xb00000, 0xb00fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y - map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16)); - map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr - map(0xf00000, 0xf03fff).ram(); /* Main RAM */ } void taitox_state::daisenpu_map(address_map &map) { + taito_x_base_map(map); map(0x000000, 0x03ffff).rom(); // map(0x400000, 0x400001).nopw(); /* written each frame at $2ac, values change */ map(0x500000, 0x50000f).r(FUNC(taitox_state::superman_dsw_input_r)); @@ -446,15 +452,11 @@ void taitox_state::daisenpu_map(address_map &map) map(0x800001, 0x800001).w("ciu", FUNC(pc060ha_device::master_port_w)); map(0x800003, 0x800003).rw("ciu", FUNC(pc060ha_device::master_comm_r), FUNC(pc060ha_device::master_comm_w)); map(0x900000, 0x90000f).rw(FUNC(taitox_state::daisenpu_input_r), FUNC(taitox_state::daisenpu_input_w)); - map(0xb00000, 0xb00fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y - map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16)); - map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr - map(0xf00000, 0xf03fff).ram(); /* Main RAM */ } void taitox_state::gigandes_map(address_map &map) { + taito_x_base_map(map); map(0x000000, 0x07ffff).rom(); map(0x400000, 0x400001).nopw(); /* 0x1 written each frame at $d42, watchdog? */ map(0x500000, 0x500007).r(FUNC(taitox_state::superman_dsw_input_r)); @@ -463,15 +465,11 @@ void taitox_state::gigandes_map(address_map &map) map(0x800001, 0x800001).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x800003, 0x800003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x900000, 0x90000f).rw(FUNC(taitox_state::daisenpu_input_r), FUNC(taitox_state::daisenpu_input_w)); - map(0xb00000, 0xb00fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y - map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16)); - map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr - map(0xf00000, 0xf03fff).ram(); /* Main RAM */ } void taitox_state::ballbros_map(address_map &map) { + taito_x_base_map(map); map(0x000000, 0x03ffff).rom(); map(0x400000, 0x400001).nopw(); /* 0x1 written each frame at $c56, watchdog? */ map(0x500000, 0x50000f).r(FUNC(taitox_state::superman_dsw_input_r)); @@ -480,11 +478,19 @@ void taitox_state::ballbros_map(address_map &map) map(0x800001, 0x800001).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); map(0x800003, 0x800003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); map(0x900000, 0x90000f).rw(FUNC(taitox_state::daisenpu_input_r), FUNC(taitox_state::daisenpu_input_w)); - map(0xb00000, 0xb00fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0xd00000, 0xd005ff).ram().rw(m_seta001, FUNC(seta001_device::spriteylow_r16), FUNC(seta001_device::spriteylow_w16)); // Sprites Y - map(0xd00600, 0xd00607).ram().rw(m_seta001, FUNC(seta001_device::spritectrl_r16), FUNC(seta001_device::spritectrl_w16)); - map(0xe00000, 0xe03fff).ram().rw(m_seta001, FUNC(seta001_device::spritecode_r16), FUNC(seta001_device::spritecode_w16)); // Sprites Code + X + Attr - map(0xf00000, 0xf03fff).ram(); /* Main RAM */ +} + +void taitox_state::kyustrkr_map(address_map &map) +{ + taito_x_base_map(map); + map(0x000000, 0x03ffff).rom(); + map(0x400000, 0x400001).nopw(); /* 0x1 written each frame at $c56, watchdog? */ + map(0x500000, 0x50000f).r(FUNC(taitox_state::superman_dsw_input_r)); + map(0x600000, 0x600001).nopw(); /* 0x1 written each frame at $c4e, watchdog? */ + map(0x800000, 0x800001).nopr(); + map(0x800001, 0x800001).w("tc0140syt", FUNC(tc0140syt_device::master_port_w)); + map(0x800003, 0x800003).rw("tc0140syt", FUNC(tc0140syt_device::master_comm_r), FUNC(tc0140syt_device::master_comm_w)); + map(0x900000, 0x90000f).rw(FUNC(taitox_state::daisenpu_input_r), FUNC(taitox_state::kyustrkr_input_w)); } @@ -803,7 +809,7 @@ GFXDECODE_END MACHINE_START_MEMBER(taitox_state,taitox) { int banks = memregion("audiocpu")->bytes() / 0x4000; - membank("z80bank")->configure_entries(0, banks, memregion("audiocpu")->base(), 0x4000); + m_z80bank->configure_entries(0, banks, memregion("audiocpu")->base(), 0x4000); } INTERRUPT_GEN_MEMBER(taitox_state::interrupt) @@ -1019,6 +1025,13 @@ MACHINE_CONFIG_START(taitox_state::ballbros) MCFG_TC0140SYT_SLAVE_CPU("audiocpu") MACHINE_CONFIG_END +MACHINE_CONFIG_START(taitox_state::kyustrkr) + ballbros(config); + /* basic machine hardware */ + MCFG_DEVICE_MODIFY("maincpu") + MCFG_DEVICE_PROGRAM_MAP(kyustrkr_map) +MACHINE_CONFIG_END + /*************************************************************************** @@ -1285,19 +1298,13 @@ ROM_START( ballbros ) ROM_END -void taitox_state::init_kyustrkr() -{ - m_maincpu->space(AS_PROGRAM).install_write_handler(0x900000, 0x90000f, write16_delegate(FUNC(taitox_state::kyustrkr_input_w),this)); -} - - -GAME( 1988, superman, 0, superman, superman, taitox_state, empty_init, ROT0, "Taito Corporation", "Superman (World)", 0 ) -GAME( 1988, supermanu, superman, superman, supermanu, taitox_state, empty_init, ROT0, "Taito Corporation", "Superman (US)", 0 ) -GAME( 1988, supermanj, superman, superman, supermanj, taitox_state, empty_init, ROT0, "Taito Corporation", "Superman (Japan)", 0 ) -GAME( 1989, twinhawk, 0, daisenpu, twinhawk, taitox_state, empty_init, ROT270, "Taito Corporation Japan", "Twin Hawk (World)", 0 ) -GAME( 1989, twinhawku, twinhawk, daisenpu, twinhawku, taitox_state, empty_init, ROT270, "Taito America Corporation", "Twin Hawk (US)", 0 ) -GAME( 1989, daisenpu, twinhawk, daisenpu, daisenpu, taitox_state, empty_init, ROT270, "Taito Corporation", "Daisenpu (Japan)", 0 ) -GAME( 1989, gigandes, 0, gigandes, gigandes, taitox_state, empty_init, ROT0, "East Technology", "Gigandes", 0 ) -GAME( 1989, gigandesa, gigandes, gigandes, gigandes, taitox_state, empty_init, ROT0, "East Technology", "Gigandes (earlier)", 0 ) -GAME( 1989, kyustrkr, 0, ballbros, kyustrkr, taitox_state, init_kyustrkr, ROT180, "East Technology", "Last Striker / Kyuukyoku no Striker", 0 ) -GAME( 1992, ballbros, 0, ballbros, ballbros, taitox_state, empty_init, ROT0, "East Technology", "Balloon Brothers", 0 ) +GAME( 1988, superman, 0, superman, superman, taitox_state, empty_init, ROT0, "Taito Corporation", "Superman (World)", 0 ) +GAME( 1988, supermanu, superman, superman, supermanu, taitox_state, empty_init, ROT0, "Taito Corporation", "Superman (US)", 0 ) +GAME( 1988, supermanj, superman, superman, supermanj, taitox_state, empty_init, ROT0, "Taito Corporation", "Superman (Japan)", 0 ) +GAME( 1989, twinhawk, 0, daisenpu, twinhawk, taitox_state, empty_init, ROT270, "Taito Corporation Japan", "Twin Hawk (World)", 0 ) +GAME( 1989, twinhawku, twinhawk, daisenpu, twinhawku, taitox_state, empty_init, ROT270, "Taito America Corporation", "Twin Hawk (US)", 0 ) +GAME( 1989, daisenpu, twinhawk, daisenpu, daisenpu, taitox_state, empty_init, ROT270, "Taito Corporation", "Daisenpu (Japan)", 0 ) +GAME( 1989, gigandes, 0, gigandes, gigandes, taitox_state, empty_init, ROT0, "East Technology", "Gigandes", 0 ) +GAME( 1989, gigandesa, gigandes, gigandes, gigandes, taitox_state, empty_init, ROT0, "East Technology", "Gigandes (earlier)", 0 ) +GAME( 1989, kyustrkr, 0, kyustrkr, kyustrkr, taitox_state, empty_init, ROT180, "East Technology", "Last Striker / Kyuukyoku no Striker", 0 ) +GAME( 1992, ballbros, 0, ballbros, ballbros, taitox_state, empty_init, ROT0, "East Technology", "Balloon Brothers", 0 ) |