summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2017-07-19 18:38:57 +0200
committer angelosa <salese_corp_ltd@email.it>2017-07-19 18:40:42 +0200
commit32c45faf71259600f2ba4a614f2530d1d85fa2c6 (patch)
treedf76a173b51016d60c0a2716ae0bf7ea33445d5d
parentf5132311b75102764b89b4fdb4dee62a292ad862 (diff)
Standardize button layout for PCE bootlegs [Angelo Salese]
-rw-r--r--src/mame/drivers/paranoia.cpp10
-rw-r--r--src/mame/drivers/tourvis.cpp16
-rw-r--r--src/mame/drivers/uapce.cpp10
-rw-r--r--src/mame/machine/pcecommn.h15
4 files changed, 22 insertions, 29 deletions
diff --git a/src/mame/drivers/paranoia.cpp b/src/mame/drivers/paranoia.cpp
index 625bf5aab00..53b265ed0cf 100644
--- a/src/mame/drivers/paranoia.cpp
+++ b/src/mame/drivers/paranoia.cpp
@@ -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 )
diff --git a/src/mame/drivers/tourvis.cpp b/src/mame/drivers/tourvis.cpp
index b137d2ab92d..0fb202a73d0 100644
--- a/src/mame/drivers/tourvis.cpp
+++ b/src/mame/drivers/tourvis.cpp
@@ -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" )
diff --git a/src/mame/drivers/uapce.cpp b/src/mame/drivers/uapce.cpp
index 483a8391d9f..8004f735db4 100644
--- a/src/mame/drivers/uapce.cpp
+++ b/src/mame/drivers/uapce.cpp
@@ -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 ) )
diff --git a/src/mame/machine/pcecommn.h b/src/mame/machine/pcecommn.h
index 891f8ac7271..928eafc10cb 100644
--- a/src/mame/machine/pcecommn.h
+++ b/src/mame/machine/pcecommn.h
@@ -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