summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Scott Stone <tafoid@users.noreply.github.com>2010-10-13 15:55:51 +0000
committer Scott Stone <tafoid@users.noreply.github.com>2010-10-13 15:55:51 +0000
commitff4b1864bef424009b055583c9e3e1fa38966e45 (patch)
tree237a01fd522e27b73f88e4dee703658114690271
parent7d6d6014767a97be55ad0eada046b0bd78d15e0b (diff)
Changes LIVES to use only a single DIP instead of being split up between two input ports by using a CUSTOM_INPUT. [Tafoid, Fabio Priuli]
-rw-r--r--src/mame/drivers/vicdual.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c
index 30e86567558..9cc32216380 100644
--- a/src/mame/drivers/vicdual.c
+++ b/src/mame/drivers/vicdual.c
@@ -1632,6 +1632,12 @@ static INPUT_PORTS_START( carnvckt )
PORT_COIN
INPUT_PORTS_END
+/* brdrline lives DIPs are spread across two input ports */
+static CUSTOM_INPUT( brdrline_lives )
+{
+ int bit_mask = (FPTR)param;
+ return (input_port_read(field->port->machine, "FAKE_LIVES") & bit_mask) ? 0x00 : 0x01;
+}
static INPUT_PORTS_START( brdrline )
PORT_START("IN0")
@@ -1655,9 +1661,7 @@ static INPUT_PORTS_START( brdrline )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x04, "3" )
- PORT_DIPSETTING( 0x00, "4" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(brdrline_lives, (void *)0x01)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_vblank_comp, NULL)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
@@ -1666,9 +1670,7 @@ static INPUT_PORTS_START( brdrline )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x04, "3" )
- PORT_DIPSETTING( 0x00, "5" )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(brdrline_lives, (void *)0x02)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_get_64v, NULL) /* yes, this is different */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
@@ -1680,12 +1682,18 @@ static INPUT_PORTS_START( brdrline )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(vicdual_read_coin_status, NULL)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_COIN
+
+ PORT_START("FAKE_LIVES")
+ PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
+ PORT_DIPSETTING( 0x02, "5" )
+ PORT_DIPSETTING( 0x01, "4" )
+ PORT_DIPSETTING( 0x00, "3" )
INPUT_PORTS_END