From 0b69bc269b23ca3ffb34d8ba1b29adc489a359b2 Mon Sep 17 00:00:00 2001 From: Damian Rogers Date: Wed, 14 Aug 2019 02:18:32 +0900 Subject: =?UTF-8?q?Added=20compile=20time=20define=20to=20use=20joystick/b?= =?UTF-8?q?uttons=20inputs=20in=20Athena=20no=E2=80=A6=20(#5464)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added compile time define to use joystick/buttons inputs in Athena no Hatena * Changed solution to use PORT_CONDITION instead of compiler definition per suggestion from MAME dev --- src/mame/drivers/seta.cpp | 59 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp index 983d64cada1..ae802ca5d1d 100644 --- a/src/mame/drivers/seta.cpp +++ b/src/mame/drivers/seta.cpp @@ -3822,26 +3822,57 @@ INPUT_PORTS_END /*************************************************************************** Athena no Hatena? ***************************************************************************/ +/* + Athena no Hatena is a quiz game that uses only four buttons for inputs. + However, the hidden "Test Program" menu makes use of the standard + stick/3-button input layout. With the default input mapping, the menus + are unusable as the three SHOT buttons are unmapped. So we have two + input configurations to allow the debug menu to be usable. + + More information about the Test Program menu: + http://sudden-desu.net/entry/athena-no-hatena-debug-menu-and-functions +*/ static INPUT_PORTS_START( atehate ) + PORT_START("INPUT_TYPE") + PORT_CONFNAME(0x01,0x00,"Input Type") + PORT_CONFSETTING(0x00, "Default Control Panel") + PORT_CONFSETTING(0x01, "Joystick/3 Button Control Panel (for Debug)") + PORT_START("P1") // Player 1 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) PORT_START("P2") // Player 2 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x01) + + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("INPUT_TYPE", 0x01, EQUALS, 0x00) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_START("COINS") // Coins -- cgit v1.2.3