Standardize button layout for PCE bootlegs [Angelo Salese]

This commit is contained in:
angelosa 2017-07-19 18:38:57 +02:00
parent f5132311b7
commit 32c45faf71
4 changed files with 22 additions and 29 deletions

View File

@ -68,15 +68,7 @@ public:
static INPUT_PORTS_START( paranoia )
PORT_START( "JOY" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* button I */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* button II */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* select */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) /* run */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PCE_STANDARD_INPUT_PORT_P1
INPUT_PORTS_END
static ADDRESS_MAP_START( pce_mem , AS_PROGRAM, 8, paranoia_state )

View File

@ -375,15 +375,7 @@ DEVICE_IMAGE_LOAD_MEMBER( tourvision_state, tourvision_cart )
/* note from system11 - this system actually supports 2 players */
static INPUT_PORTS_START( tourvision )
PORT_START( "JOY" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* button I */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* button II */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* select */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) /* run */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PCE_STANDARD_INPUT_PORT_P1
PORT_START( "DSW1" )
PORT_DIPNAME( 0x07, 0x07, "Coins needed 1" )
@ -412,8 +404,10 @@ static INPUT_PORTS_START( tourvision )
PORT_DIPSETTING( 0x10, "120" )
PORT_DIPSETTING( 0x08, "90" )
PORT_DIPSETTING( 0x00, "60" )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ))
PORT_DIPSETTING( 0x00, DEF_STR( On ))
PORT_START( "DSW2" )
PORT_DIPNAME( 0x03, 0x03, "Coins needed 2" )
PORT_DIPSETTING( 0x03, "1" )

View File

@ -250,15 +250,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( uapce )
PORT_START( "JOY" )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) /* button I */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* button II */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) /* select */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) /* run */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PCE_STANDARD_INPUT_PORT_P1
PORT_START( "DSW" )
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) )

View File

@ -39,4 +39,19 @@ private:
int m_joystick_port_select; /* internal index of joystick ports */
int m_joystick_data_select; /* which nibble of joystick data we want */
};
// used by the Arcade bootlegs.
// Button II is actually on the left of a standard PCE joypad so we need to invert our button layout here.
#define PCE_STANDARD_INPUT_PORT_P1 \
PORT_START( "JOY" ) \
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) \
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) \
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Select") PORT_PLAYER(1) \
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Run") PORT_PLAYER(1) \
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) \
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) \
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) \
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) \
#endif