From 6cabce405dcccf31eae524c207c81890054ecbd7 Mon Sep 17 00:00:00 2001 From: angelosa Date: Fri, 8 Jun 2018 01:05:08 +0200 Subject: taitosj.cpp: added input buttons mode to kikstart [Angelo Salese] --- src/mame/drivers/taitosj.cpp | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 16c48a2dfe6..74d6fb3a153 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -1615,12 +1615,24 @@ static INPUT_PORTS_START( kikstart ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY + PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN ) + // in revolve mode button1 acts as accelerate button/pedal + // in buttons mode button1 is left button + // nothing pressed: 1st gear + // left button pressed: 2nd gear + // right button pressed: 3rd gear + // TODO: can't find a pedal for buttons mode, maybe neither input schemes are supposed to have one? PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00) + PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL + PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00) + PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1633,7 +1645,8 @@ static INPUT_PORTS_START( kikstart ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) PORT_START("IN3") /* Service */ - PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)0) + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)0) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) + PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 ) @@ -1642,7 +1655,8 @@ static INPUT_PORTS_START( kikstart ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN4") - PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)1) + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)1) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) + PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */ PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1674,8 +1688,8 @@ static INPUT_PORTS_START( kikstart ) PORT_START("DSW3") PORT_DIPNAME( 0x08, 0x08, "Control Type" ) - PORT_DIPSETTING( 0x08, "Revolve" ) - PORT_DIPSETTING( 0x00, "Buttons" ) + PORT_DIPSETTING( 0x08, "Revolve" ) // 3-way positional knob for gears + PORT_DIPSETTING( 0x00, "Buttons" ) // 2 buttons for gears PORT_DIPNAME( 0x10, 0x10, "Coinage Display" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) @@ -1691,14 +1705,14 @@ static INPUT_PORTS_START( kikstart ) /* fake for handling the gears */ PORT_START("GEARP1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 1st Gear") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 2nd Gear") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 3rd Gear") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 1st Gear") PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 2nd Gear") PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 3rd Gear") PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) PORT_START("GEARP2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 1st Gear") PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 2nd Gear") PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 3rd Gear") PORT_COCKTAIL + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P2 1st Gear") PORT_COCKTAIL PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P2 2nd Gear") PORT_COCKTAIL PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P2 3rd Gear") PORT_COCKTAIL PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08) INPUT_PORTS_END -- cgit v1.2.3