From 912b93b0303d384579b7fbb4b0e27a914d775f74 Mon Sep 17 00:00:00 2001 From: Devin Acker Date: Mon, 14 Sep 2020 13:13:35 -0400 Subject: zn.cpp: add config port for Tetris: The Grand Master debug buttons (#7232) --- src/mame/drivers/zn.cpp | 62 +++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp index 36c5a225c4e..be74c58e3f8 100644 --- a/src/mame/drivers/zn.cpp +++ b/src/mame/drivers/zn.cpp @@ -2563,9 +2563,28 @@ static INPUT_PORTS_START( nbajamex ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4) INPUT_PORTS_END -static INPUT_PORTS_START( zn4w ) +static INPUT_PORTS_START( zn6b ) PORT_INCLUDE( zn ) + PORT_MODIFY("SYSTEM") + PORT_BIT( 0xcc, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("P3") + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) + + PORT_MODIFY("P4") + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) +INPUT_PORTS_END + +static INPUT_PORTS_START( tgm ) + PORT_INCLUDE( zn6b ) + PORT_MODIFY("P1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) @@ -2578,36 +2597,23 @@ static INPUT_PORTS_START( zn4w ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) - PORT_MODIFY("P3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(3) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(3) - - PORT_MODIFY("P4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(4) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(4) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(4) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(4) -INPUT_PORTS_END - -static INPUT_PORTS_START( zn6b ) - PORT_INCLUDE( zn ) - - PORT_MODIFY("SYSTEM") - PORT_BIT( 0xcc, IP_ACTIVE_LOW, IPT_UNUSED ) + /* Tetris: The Grand Master uses 6-button kick harness for debug inputs */ + PORT_START("DEBUG") + PORT_CONFNAME( 0x01, 0x00, "Enable Debug Inputs" ) + PORT_CONFSETTING( 0x00, DEF_STR( No ) ) + PORT_CONFSETTING( 0x01, DEF_STR( Yes ) ) PORT_MODIFY("P3") - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) + PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x00) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x01) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x01) PORT_MODIFY("P4") - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) + PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x00) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x01) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x01) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) PORT_CONDITION("DEBUG", 0x01, EQUALS, 0x01) INPUT_PORTS_END static INPUT_PORTS_START( jdredd ) @@ -5244,7 +5250,7 @@ GAME( 1998, sfex2j, sfex2, coh3002c, zn6b, zn2_state, empty_init, R GAME( 1998, plsmaswd, coh3002c, coh3002c, zn6b, zn2_state, empty_init, ROT0, "Capcom", "Plasma Sword: Nightmare of Bilstein (USA 980316)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, plsmaswda, plsmaswd, coh3002c, zn6b, zn2_state, empty_init, ROT0, "Capcom", "Plasma Sword: Nightmare of Bilstein (Asia 980316)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, stargld2, plsmaswd, coh3002c, zn6b, zn2_state, empty_init, ROT0, "Capcom", "Star Gladiator 2: Nightmare of Bilstein (Japan 980316)", MACHINE_IMPERFECT_SOUND ) -GAME( 1998, tgmj, coh3002c, coh3002c, zn4w, zn2_state, empty_init, ROT0, "Arika / Capcom", "Tetris: The Grand Master (Japan 980710)", MACHINE_IMPERFECT_SOUND ) +GAME( 1998, tgmj, coh3002c, coh3002c, tgm, zn2_state, empty_init, ROT0, "Arika / Capcom", "Tetris: The Grand Master (Japan 980710)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, techromn, coh3002c, coh3002c, zn6b, zn2_state, empty_init, ROT0, "Capcom", "Tech Romancer (Euro 980914)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, techromnu, techromn, coh3002c, zn6b, zn2_state, empty_init, ROT0, "Capcom", "Tech Romancer (USA 980914)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, kikaioh, techromn, coh3002c, zn6b, zn2_state, empty_init, ROT0, "Capcom", "Choukou Senki Kikaioh (Japan 980914)", MACHINE_IMPERFECT_SOUND ) -- cgit v1.2.3