From 3364c13bff33b88c6d8d151e18ff042887817723 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Fri, 12 Jul 2019 19:39:09 +0200 Subject: [PATCH] gstriker.cpp: diplocs, fix CPU order (nw) --- src/mame/drivers/gstriker.cpp | 90 ++++++++++++++++------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/src/mame/drivers/gstriker.cpp b/src/mame/drivers/gstriker.cpp index 78f25ddc8a9..eef747a9df6 100644 --- a/src/mame/drivers/gstriker.cpp +++ b/src/mame/drivers/gstriker.cpp @@ -297,10 +297,10 @@ static INPUT_PORTS_START( gstriker_generic ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test" + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // "Test" PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) // vbl? + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // vbl? PORT_START("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) @@ -327,50 +327,50 @@ static INPUT_PORTS_START( gstriker ) PORT_INCLUDE( gstriker_generic ) PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2") PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:3,4") PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x10, 0x00, "2 Players VS CPU Game" ) // "Cooperation Coin" + PORT_DIPNAME( 0x10, 0x00, "2 Players VS CPU Game" ) PORT_DIPLOCATION("SW1:5") // "Cooperation Coin" PORT_DIPSETTING( 0x10, "1 Credit" ) PORT_DIPSETTING( 0x00, "2 Credits" ) - PORT_DIPNAME( 0x20, 0x00, "Player VS Player Game" ) // "Competitive Coin" + PORT_DIPNAME( 0x20, 0x00, "Player VS Player Game" ) PORT_DIPLOCATION("SW1:6") // "Competitive Coin" PORT_DIPSETTING( 0x20, "1 Credit" ) PORT_DIPSETTING( 0x00, "2 Credits" ) - PORT_DIPNAME( 0x40, 0x40, "New Challenger" ) /* unknown purpose */ + PORT_DIPNAME( 0x40, 0x40, "New Challenger" ) PORT_DIPLOCATION("SW1:7") // unknown purpose, prolly buy-in on linked cab PORT_DIPSETTING( 0x40, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x80, 0x80, "Maximum Players" ) // "Cabinet Type" - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x80, "2" ) + PORT_DIPNAME( 0x80, 0x80, "Cabinet Type" ) PORT_DIPLOCATION("SW1:8") // "Cabinet Type" + PORT_DIPSETTING( 0x00, "1 Player" ) + PORT_DIPSETTING( 0x80, "2 Players" ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) - PORT_DIPNAME( 0x06, 0x06, "Player(s) VS CPU Time" ) // "Tournament Time" + PORT_DIPNAME( 0x06, 0x06, "Player(s) VS CPU Time" ) PORT_DIPLOCATION("SW2:2,3") // "Tournament Time" PORT_DIPSETTING( 0x06, "1:30" ) PORT_DIPSETTING( 0x04, "2:00" ) PORT_DIPSETTING( 0x02, "3:00" ) PORT_DIPSETTING( 0x00, "4:00" ) - PORT_DIPNAME( 0x18, 0x18, "Player VS Player Time" ) // "Competitive Time" + PORT_DIPNAME( 0x18, 0x18, "Player VS Player Time" ) PORT_DIPLOCATION("SW2:4,5") // "Competitive Time" PORT_DIPSETTING( 0x18, "2:00" ) PORT_DIPSETTING( 0x10, "3:00" ) PORT_DIPSETTING( 0x08, "4:00" ) PORT_DIPSETTING( 0x00, "5:00" ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) // "Demo Sound" + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:6") // "Demo Sound" PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Communication Mode" ) // "Master/Slave" + PORT_DIPNAME( 0x40, 0x40, "Communication Mode" ) PORT_DIPLOCATION("SW2:7") // "Master/Slave" PORT_DIPSETTING( 0x40, "Master" ) PORT_DIPSETTING( 0x00, "Slave" ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) // "Self Test Mode" + PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) // "Self Test Mode" INPUT_PORTS_END static INPUT_PORTS_START( twcup94 ) @@ -387,7 +387,7 @@ static INPUT_PORTS_START( twcup94 ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) @@ -396,8 +396,7 @@ static INPUT_PORTS_START( twcup94 ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) ) - - PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) + PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5,6") PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) @@ -407,42 +406,39 @@ static INPUT_PORTS_START( twcup94 ) PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) ) - PORT_DIPNAME( 0xc0, 0xc0, "Play Time" ) + PORT_DIPNAME( 0xc0, 0xc0, "Play Time" ) PORT_DIPLOCATION("SW1:7,8") PORT_DIPSETTING( 0x00, "P v CPU 1:00, P v P 1:30" ) PORT_DIPSETTING( 0xc0, "P v CPU 1:30, P v P 2:00" ) PORT_DIPSETTING( 0x40, "P v CPU 2:00, P v P 2:30" ) PORT_DIPSETTING( 0x80, "P v CPU 2:30, P v P 3:00" ) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) - - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Very_Hard ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Show Configuration" ) + PORT_DIPNAME( 0x08, 0x08, "Show Dip Configuration" ) PORT_DIPLOCATION("SW2:4") PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Countdown" ) + PORT_DIPNAME( 0x10, 0x10, "Countdown" ) PORT_DIPLOCATION("SW2:5") PORT_DIPSETTING( 0x10, "54 sec" ) PORT_DIPSETTING( 0x00, "60 sec" ) - PORT_DIPNAME( 0x20, 0x20, "Start credit" ) + PORT_DIPNAME( 0x20, 0x20, "Start credit" ) PORT_DIPLOCATION("SW2:6") PORT_DIPSETTING( 0x20, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7") + PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) INPUT_PORTS_END static INPUT_PORTS_START( vgoalsoc ) PORT_INCLUDE( gstriker_generic ) PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3") + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) @@ -451,8 +447,7 @@ static INPUT_PORTS_START( vgoalsoc ) PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x03, DEF_STR( 1C_6C ) ) - - PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWA:4,5,6") + PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:4,5,6") PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) @@ -461,32 +456,31 @@ static INPUT_PORTS_START( vgoalsoc ) PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x18, DEF_STR( 1C_6C ) ) - - PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWA:7,8") + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:7,8") PORT_DIPSETTING( 0x80, "A" ) PORT_DIPSETTING( 0xc0, "B" ) PORT_DIPSETTING( 0x40, "C" ) PORT_DIPSETTING( 0x00, "D" ) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Player VS CPU Time" ) PORT_DIPLOCATION("SWB:1,2") // no cooperative + PORT_DIPNAME( 0x03, 0x03, "Player VS CPU Time" ) PORT_DIPLOCATION("SW2:1,2") // no cooperative PORT_DIPSETTING( 0x02, "1:00" ) PORT_DIPSETTING( 0x03, "1:30" ) PORT_DIPSETTING( 0x01, "2:00" ) PORT_DIPSETTING( 0x00, "2:30" ) - PORT_DIPNAME( 0x0c, 0x0c, "Player VS Player Time" ) PORT_DIPLOCATION("SWB:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Player VS Player Time" ) PORT_DIPLOCATION("SW2:3,4") PORT_DIPSETTING( 0x08, "1:30" ) PORT_DIPSETTING( 0x0c, "2:00" ) PORT_DIPSETTING( 0x04, "2:30" ) PORT_DIPSETTING( 0x00, "3:00" ) - PORT_DIPNAME( 0x10, 0x10, "Countdown" ) PORT_DIPLOCATION("SWB:5") + PORT_DIPNAME( 0x10, 0x10, "Countdown" ) PORT_DIPLOCATION("SW2:5") PORT_DIPSETTING( 0x10, "54 sec" ) PORT_DIPSETTING( 0x00, "60 sec" ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:6") + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:6") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "SWB:7" ) - PORT_DIPNAME( 0x80, 0x80, "Start credit" ) PORT_DIPLOCATION("SWB:8") + PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW2:7" ) + PORT_DIPNAME( 0x80, 0x80, "Start credit" ) PORT_DIPLOCATION("SW2:8") PORT_DIPSETTING( 0x80, "1" ) PORT_DIPSETTING( 0x00, "2" ) INPUT_PORTS_END @@ -554,12 +548,12 @@ void gstriker_state::base(machine_config &config) void gstriker_state::gstriker(machine_config &config) { - base(config); - M68000(config, m_maincpu, 10000000); m_maincpu->set_addrmap(AS_PROGRAM, &gstriker_state::gstriker_map); m_maincpu->set_vblank_int("screen", FUNC(gstriker_state::irq1_line_hold)); + base(config); + ACIA6850(config, m_acia, 0); m_acia->irq_handler().set_inputline(m_maincpu, M68K_IRQ_2); //m_acia->txd_handler().set("link", FUNC(rs232_port_device::write_txd)); @@ -568,12 +562,12 @@ void gstriker_state::gstriker(machine_config &config) void gstriker_state::twc94(machine_config &config) { - base(config); - M68000(config, m_maincpu, 16000000); m_maincpu->set_addrmap(AS_PROGRAM, &gstriker_state::twcup94_map); m_maincpu->set_vblank_int("screen", FUNC(gstriker_state::irq1_line_hold)); + base(config); + subdevice("io")->porth_output_cb().append(FUNC(gstriker_state::twcup94_prot_reg_w)); } @@ -581,7 +575,7 @@ void gstriker_state::twc94(machine_config &config) void gstriker_state::vgoal(machine_config &config) { twc94(config); - m_spr->set_transpen(0xf); // different vs. the other games, find register + m_spr->set_transpen(0xf); // different vs. the other games, TODO: find register }