From d3c7e67622de8fd5b0b4d4ba4030cfa1977f77aa Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 6 Aug 2008 14:35:45 +0000 Subject: [PATCH] This also includes a fix for the bug reported at the bottom. From: Fabio Priuli [mailto:doge.fabio@gmail.com] Subject: to simplify cischeat inputs Hi, the enclosed diff has a twofold effect on cischeat.c: on one side: it adds diplocations to bigrun, scudhamm, cischeat & f1gpstar on the other side: it removes the current hacky handling of f1gpstar coinage dips (check video/cischeat.c to see what I mean with hacky!) to use conditional ports instead. BUT in order to do this, I had to add more possible values for the PORTCOND in iptport.c. The problem is that f1gpstar has a set of coinage settings when you set the region to JPN or USA and another one when you set the region to EUR or FRA. To implement this I added the following self-explanatory new PORTCOND: ISLARGER (>), ISNOTLARGER (<=), ISSMALLER (<), ISNOTSMALLER (<=). Only two were really needed to implement f1gpstar dips, but the other two seemed costless to me while offering even more flexibility to the PORT_CONDITION macro. Also notice that the handling of conditional ports in 'TAB>Dip Switches' menu doesn't work well (in the current source, not affected by my patch) with contracted expressions like PORT_DIPUNKNOWN_DIPLOC: the wrong items remain listed in the UI menu even when you change the condition! If you leave the DEF_STR( Unknown ) with ON/OFF cases, everything is displayed correctly in the menu. However, I was not able to track down what part of code is responsible for this bug. Regards, Fabio Priuli --- src/emu/inptport.c | 15 + src/emu/inptport.h | 6 +- src/mame/drivers/cischeat.c | 544 ++++++++++++++++++------------------ src/mame/video/cischeat.c | 18 +- 4 files changed, 304 insertions(+), 279 deletions(-) diff --git a/src/emu/inptport.c b/src/emu/inptport.c index e83e0db2ed3..858d0e97f1c 100644 --- a/src/emu/inptport.c +++ b/src/emu/inptport.c @@ -1459,6 +1459,18 @@ int input_condition_true(running_machine *machine, const input_condition *condit case PORTCOND_NOTEQUALS: return ((condvalue & condition->mask) != condition->value); + + case PORTCOND_GREATERTHAN: + return ((condvalue & condition->mask) > condition->value); + + case PORTCOND_NOTGREATERTHAN: + return ((condvalue & condition->mask) <= condition->value); + + case PORTCOND_LESSTHAN: + return ((condvalue & condition->mask) < condition->value); + + case PORTCOND_NOTLESSTHAN: + return ((condvalue & condition->mask) >= condition->value); } return TRUE; } @@ -2857,6 +2869,9 @@ static input_port_config *port_config_detokenize(input_port_config *listhead, co temptoken.i = INPUT_STRING_On; cursetting = setting_config_alloc(curfield, ~defval & mask, input_port_string_from_token(temptoken)); + + /* reset cursetting to NULL to allow subsequent conditions to apply to the field */ + cursetting = NULL; break; /* configuration definition */ diff --git a/src/emu/inptport.h b/src/emu/inptport.h index 10084bcb0da..81820faf916 100644 --- a/src/emu/inptport.h +++ b/src/emu/inptport.h @@ -66,7 +66,11 @@ enum { PORTCOND_ALWAYS = 0, PORTCOND_EQUALS, - PORTCOND_NOTEQUALS + PORTCOND_NOTEQUALS, + PORTCOND_GREATERTHAN, + PORTCOND_NOTGREATERTHAN, + PORTCOND_LESSTHAN, + PORTCOND_NOTLESSTHAN }; diff --git a/src/mame/drivers/cischeat.c b/src/mame/drivers/cischeat.c index bee1eac2e6e..6139c6692f6 100644 --- a/src/mame/drivers/cischeat.c +++ b/src/mame/drivers/cischeat.c @@ -159,6 +159,12 @@ To Do: A line based zooming is additionally needed for f1gpstar. - Force feedback :) + +2008-08 +Dip locations verified for Big Run with the manual. Also added missing dips +and locations from Service mode to: Scud Hammer, F1 GP Star 1 & 2 and +Cisco Heat. + ***************************************************************************/ #include "driver.h" @@ -994,87 +1000,87 @@ ADDRESS_MAP_END // [4] DSW 1 & 2 [5] DSW 3 [6] Driving Wheel static INPUT_PORTS_START( bigrun ) - PORT_START("FAKE") // IN0 - Fake input port - Buttons status - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Accelerator")\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Low Gear")\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 High Gear")\ + PORT_START("FAKE") // IN0 - Fake input port - Buttons status + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Accelerator") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Low Gear") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 High Gear") PORT_START("IN1") // Coins - $80000.w - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW) // called "Test" - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") //Controls - $80002.w - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Brake") // Brake -// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Shift - We handle it using buttons 3&4 - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Horn") // Horn + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Brake") // Brake +// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Shift - We handle it using buttons 3&4 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Horn") // Horn PORT_START("IN3") // Motor Control? - $80004.w PORT_DIPNAME( 0x01, 0x01, "Up Limit SW" ) // Limit the Cockpit movements? PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x02, 0x02, "Down Limit SW" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PORT_DIPNAME( 0x10, 0x10, "Right Limit SW" ) // PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) -// PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +// PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // PORT_DIPNAME( 0x20, 0x20, "Left Limit SW" ) // PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) -// PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - +// PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("IN4") // DSW 2 & 3 - $80006.w // DSW 3 - PORT_DIPNAME( 0x0003, 0x0003, "Extra Setting For Coin B" ) + PORT_DIPNAME( 0x0003, 0x0003, "Extra Setting For Coin B" ) PORT_DIPLOCATION("SW302:8,7") /* 'Not used' (and must be OFF) according to the manual */ PORT_DIPSETTING( 0x0003, DEF_STR( Unused ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) ) PORT_CONDITION("IN4",0x1c00,PORTCOND_NOTEQUALS,0x0000) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) PORT_CONDITION("IN4",0x1c00,PORTCOND_NOTEQUALS,0x0000) - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_7C ) ) PORT_CONDITION("IN4",0x1c00,PORTCOND_NOTEQUALS,0x0000) - PORT_DIPSETTING( 0x0001, DEF_STR( Unused ) ) PORT_CONDITION("IN4",0x1c00,PORTCOND_EQUALS,0x0000) - PORT_DIPSETTING( 0x0002, DEF_STR( Unused ) ) PORT_CONDITION("IN4",0x1c00,PORTCOND_EQUALS,0x0000) - PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) PORT_CONDITION("IN4",0x1c00,PORTCOND_EQUALS,0x0000) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Allow_Continue ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_NOTEQUALS, 0x0000) + PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_NOTEQUALS, 0x0000) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_7C ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_NOTEQUALS, 0x0000) + PORT_DIPSETTING( 0x0001, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_EQUALS, 0x0000) + PORT_DIPSETTING( 0x0002, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_EQUALS, 0x0000) + PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) PORT_CONDITION("IN4", 0x1c00, PORTCOND_EQUALS, 0x0000) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW302:6") PORT_DIPSETTING( 0x0004, DEF_STR( No ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Region ) ) // If you try to change Unit ID the game show the error message in different language + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Region ) ) PORT_DIPLOCATION("SW302:5") // If you try to change Unit ID the game show the error message in different language PORT_DIPSETTING( 0x0008, DEF_STR( Japanese ) ) PORT_DIPSETTING( 0x0000, DEF_STR( English) ) - PORT_DIPNAME( 0x0010, 0x0010, "Move Cabinet" ) + PORT_DIPNAME( 0x0010, 0x0010, "Move Cabinet" ) PORT_DIPLOCATION("SW302:4") PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) PORT_DIPSETTING( 0x0010, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x0060, 0x0060, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW302:3,2") PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0060, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0020, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0040, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x0080, 0x0080, "Automatic Game Start" ) + PORT_DIPNAME( 0x0080, 0x0080, "Automatic Game Start" ) PORT_DIPLOCATION("SW302:1") PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) PORT_DIPSETTING( 0x0080, "After 15 Seconds" ) // DSW 2 - PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x0100, 0x0100, "Invulnerability" ) PORT_DIPLOCATION("SW301:8") PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW301:7") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0200, DEF_STR( On ) ) - PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coin_B ) ) PORT_CONDITION("IN4",0x0003,PORTCOND_EQUALS,0x0003) + PORT_DIPSETTING( 0x0200, DEF_STR( On ) ) + PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW301:6,5,4") PORT_CONDITION("IN4", 0x0003, PORTCOND_EQUALS, 0x0003) PORT_DIPSETTING( 0x1000, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x0800, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x1800, DEF_STR( 2C_1C ) ) @@ -1083,10 +1089,10 @@ static INPUT_PORTS_START( bigrun ) PORT_DIPSETTING( 0x1400, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coin_B ) ) PORT_CONDITION("IN4",0x0003,PORTCOND_NOTEQUALS,0x0003) + PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW301:6,5,4") PORT_CONDITION("IN4", 0x0003, PORTCOND_NOTEQUALS, 0x0003) PORT_DIPSETTING( 0x1c00, DEF_STR( Unused ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0xe000, 0xe000, DEF_STR( Coin_A ) ) + PORT_DIPNAME( 0xe000, 0xe000, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW301:3,2,1") PORT_DIPSETTING( 0x8000, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x4000, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0xc000, DEF_STR( 2C_1C ) ) @@ -1097,17 +1103,21 @@ static INPUT_PORTS_START( bigrun ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_START("IN5") // DSW 3 (4 bits, Cabinet Linking) - $82200.w - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_DIPNAME( 0x06, 0x00, "Unit ID" ) - PORT_DIPSETTING( 0x00, "1 (Blue-White Car)" ) + /* According to Manual: "When Machines are linked for simultaneous racing throught the + Com-Link System, SW1 should be set as shown", i.e. ON for Master Machine, OFF for others */ + PORT_DIPNAME( 0x01, 0x00, "Link ID" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x00, "Master Unit" ) + PORT_DIPSETTING( 0x01, "Other Units" ) + PORT_DIPNAME( 0x06, 0x00, "Unit ID" ) PORT_DIPLOCATION("SW1:2,3") + PORT_DIPSETTING( 0x00, "1 (Blue-White Car)" ) PORT_DIPSETTING( 0x02, "2 (Green-White Car)" ) - PORT_DIPSETTING( 0x04, "3 (Red-White Car)" ) - PORT_DIPSETTING( 0x06, "4 (Yellow Car)" ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPSETTING( 0x04, "3 (Red-White Car)" ) + PORT_DIPSETTING( 0x06, "4 (Yellow Car)" ) + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:4") /* Always ON according to manual */ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN6") // Driving Wheel - $80010.w(0) PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) @@ -1124,91 +1134,104 @@ INPUT_PORTS_END static INPUT_PORTS_START( cischeat ) PORT_START("FAKE") // Fake input port - Buttons status - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Low Gear")\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 High Gear")\ + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Low Gear") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 High Gear") PORT_START("IN1") // Coins - $80000.w - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW) // called "Test" - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN2") // Controls - $80002.w - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Brake") // Brake -// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Shift - We handle it using buttons 3&4 - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Accelerator") // Accel - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Horn") // Horn + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Brake") // Brake +// PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Shift - We handle it using buttons 3&4 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Accelerator") // Accel + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Horn") // Horn PORT_START("IN3") // Motor Control? - $80004.w PORT_DIPNAME( 0x01, 0x01, "Up Limit SW" ) // Limit the Cockpit movements? PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x02, 0x02, "Down Limit SW" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x10, 0x10, "Right Limit SW" ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x20, 0x20, "Left Limit SW" ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN4") // DSW 1 & 2 - $80006.w -> !f000a.w(hi byte) !f0008.w(low byte) - COINAGE_6BITS_2 - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) // unused? - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) // unused? - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW301:1,2,3") + PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW301:4,5,6") + PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) ) + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW301:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW301:8" ) // DSW 2 - PORT_DIPNAME( 0x0300, 0x0300, "Unit ID" ) // -> !f0020 (ID of this unit, when linked) - PORT_DIPSETTING( 0x0300, "0 (Red Car)" ) - PORT_DIPSETTING( 0x0200, "1 (Blue Car)" ) + PORT_DIPNAME( 0x0300, 0x0300, "Unit ID" ) PORT_DIPLOCATION("SW302:1,2") // -> !f0020 (ID of this unit, when linked) + PORT_DIPSETTING( 0x0300, "0 (Red Car)" ) + PORT_DIPSETTING( 0x0200, "1 (Blue Car)" ) PORT_DIPSETTING( 0x0100, "2 (Yellow Car)" ) - PORT_DIPSETTING( 0x0000, "3 (Green Car)" ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) // -> !f0026 - PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0800, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, "3 (Green Car)" ) + PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW302:3,4") // -> !f0026 + PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0800, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0400, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x1000, 0x1000, "Infinite Time (Cheat)")// -> !f0028 + PORT_DIPNAME( 0x1000, 0x1000, "Infinite Time (Cheat)" ) PORT_DIPLOCATION("SW302:5") // -> !f0028 PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW302:6") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, "Country" ) + PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) + PORT_DIPNAME( 0x4000, 0x4000, "Country" ) PORT_DIPLOCATION("SW302:7") PORT_DIPSETTING( 0x4000, DEF_STR( Japan ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( USA ) ) - PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Allow_Continue ) ) // -> !f00c0 + PORT_DIPSETTING( 0x0000, DEF_STR( USA ) ) + PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW302:8") // -> !f00c0 PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_START("IN5") // DSW 3 (4 bits, Cabinet Linking) - $82200.w - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_DIPNAME( 0x06, 0x06, "Unit ID (2)" ) // -> f0020 (like DSW2 !!) - PORT_DIPSETTING( 0x06, "Use other" ) - PORT_DIPSETTING( 0x00, "0 (Red Car)" ) - PORT_DIPSETTING( 0x02, "1 (Blue Car)" ) + PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW1:1" ) + PORT_DIPNAME( 0x06, 0x06, "Unit ID (2)" ) PORT_DIPLOCATION("SW1:2,3") // -> f0020 (like DSW2 !!) + PORT_DIPSETTING( 0x06, "Use other" ) + PORT_DIPSETTING( 0x00, "0 (Red Car)" ) + PORT_DIPSETTING( 0x02, "1 (Blue Car)" ) PORT_DIPSETTING( 0x04, "2 (Yellow Car)" ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN6") // IN6 - Driving Wheel - $80010.w(0) PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) @@ -1222,13 +1245,12 @@ INPUT_PORTS_END // Input Ports: [0] Fake: Buttons Status // [1] DSW 1 & 2 [2] Controls [3] Unknown // [4] DSW 3 [5] Driving Wheel -// [6] Coinage JP&USA [7] Coinage UK&FR static INPUT_PORTS_START( f1gpstar ) PORT_START("FAKE") // Fake input port - Buttons status - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Accelerator")\ - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Low Gear")\ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 High Gear")\ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Accelerator") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Low Gear") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 High Gear") /* [Country] Japan "race together" in Test Mode, Always Choose Race @@ -1238,92 +1260,9 @@ static INPUT_PORTS_START( f1gpstar ) France French, Km/h, "steering shock", "(c)1992" */ PORT_START("IN1") // DSW 1 & 2 - $80000.w -> !f9012 - // DSW 1 ( Coinage - it changes with Country: we use IN6 & IN7 ) - PORT_DIPNAME( 0x0040, 0x0040, "Free Play (EU & FR)" ) - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) // unused? - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - // DSW 2 - PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Region ) ) // -> !f901e - PORT_DIPSETTING( 0x0300, DEF_STR( Japan ) ) - PORT_DIPSETTING( 0x0200, DEF_STR( USA ) ) - PORT_DIPSETTING( 0x0100, DEF_STR( Europe ) ) - PORT_DIPSETTING( 0x0000, "France" ) - PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) // -> !f9026 - PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) // 58 <- Initial Time (seconds, Germany) - PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) // 51 - PORT_DIPSETTING( 0x0800, DEF_STR( Hard ) ) // 48 - PORT_DIPSETTING( 0x0400, DEF_STR( Very_Hard ) ) // 46 - PORT_DIPNAME( 0x1000, 0x1000, "Infinite Time (Cheat)") - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, "Choose Race (US EU FR)" ) // -> f0020 - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x8000, "Vibrations" ) - PORT_DIPSETTING( 0x8000, "Torque" ) - PORT_DIPSETTING( 0x0000, "Shake" ) - - PORT_START("IN2") // Controls - $80004.w -> !f9016 - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW) // -> f0100 (called "Test") - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) -// PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Shift -> !f900e - We handle it with 2 buttons - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Brake")// Brake -> !f9010 - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) // "Race Together" - - PORT_START("IN3") // ? Read at boot only - $80006.w - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - 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( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - -/* DSW3-2&1 (Country: JP) Effect - OFF-OFF Red-White Car - OFF- ON Red Car - ON-OFF Blue-White Car - ON- ON Blue Car, "equipped with communication link" */ - - PORT_START("IN4") // DSW 3 (4 bits, Cabinet Linking) - $8000c.w -> !f9014 - PORT_DIPNAME( 0x01, 0x01, "This Unit Is" ) - PORT_DIPSETTING( 0x01, "Slave" ) - PORT_DIPSETTING( 0x00, "Master" ) - PORT_DIPNAME( 0x06, 0x06, "Unit ID" ) // -> !f901c - PORT_DIPSETTING( 0x06, "0 (Red-White Car)" ) - PORT_DIPSETTING( 0x04, "1 (Red Car)" ) - PORT_DIPSETTING( 0x02, "2 (Blue-White Car)" ) - PORT_DIPSETTING( 0x00, "3 (Blue Car)" ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Redundant: Invert Unit ID - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - // Accelerator - $80010.b -> !f9004.w - PORT_START("IN5") // Driving Wheel - $80011.b -> !f9008.w - PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) - - PORT_START("IN6") // Coinage Japan & USA (it changes with Country) - PORT_DIPNAME( 0x0007, 0x0007, "Coin A (JP US)" ) + // DSW 1 + // Coinage Japan & USA (it changes with Country) + PORT_DIPNAME( 0x0007, 0x0007, "Coin A (JP US)" ) PORT_DIPLOCATION("SW01:1,2,3") PORT_CONDITION("IN1", 0x0300, PORTCOND_GREATERTHAN, 0x0100) PORT_DIPSETTING( 0x0001, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x0002, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x0003, DEF_STR( 2C_1C ) ) @@ -1332,7 +1271,7 @@ static INPUT_PORTS_START( f1gpstar ) PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x0038, 0x0038, "Coin B (JP US)" ) + PORT_DIPNAME( 0x0038, 0x0038, "Coin B (JP US)" ) PORT_DIPLOCATION("SW01:4,5,6") PORT_CONDITION("IN1", 0x0300, PORTCOND_GREATERTHAN, 0x0100) PORT_DIPSETTING( 0x0008, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x0018, DEF_STR( 2C_1C ) ) @@ -1340,9 +1279,11 @@ static INPUT_PORTS_START( f1gpstar ) PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) - - PORT_START("IN7") // Coinage Europe & France (it changes with Country) - PORT_DIPNAME( 0x0007, 0x0007, "Coin A (EU FR)" ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW01:7") PORT_CONDITION("IN1", 0x0300, PORTCOND_GREATERTHAN, 0x0100) // unused? + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + // Coinage Europe & France (it changes with Country) + PORT_DIPNAME( 0x0007, 0x0007, "Coin A (EU FR)" ) PORT_DIPLOCATION("SW01:1,2,3") PORT_CONDITION("IN1", 0x0300, PORTCOND_NOTGREATERTHAN, 0x0100) PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( 2C_3C ) ) PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) ) @@ -1351,7 +1292,7 @@ static INPUT_PORTS_START( f1gpstar ) PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) PORT_DIPSETTING( 0x0002, DEF_STR( 1C_6C ) ) PORT_DIPSETTING( 0x0001, DEF_STR( 1C_7C ) ) - PORT_DIPNAME( 0x0038, 0x0038, "Coin B (EU FR)" ) + PORT_DIPNAME( 0x0038, 0x0038, "Coin B (EU FR)" ) PORT_DIPLOCATION("SW01:4,5,6") PORT_CONDITION("IN1", 0x0300, PORTCOND_NOTGREATERTHAN, 0x0100) PORT_DIPSETTING( 0x0000, DEF_STR( 5C_1C ) ) PORT_DIPSETTING( 0x0008, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) @@ -1360,6 +1301,91 @@ static INPUT_PORTS_START( f1gpstar ) PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) ) + PORT_DIPNAME( 0x0040, 0x0040, "Free Play (EU & FR)" ) PORT_DIPLOCATION("SW01:7") PORT_CONDITION("IN1", 0x0300, PORTCOND_NOTGREATERTHAN, 0x0100) + PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + + PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW01:8" ) // unused? + + // DSW 2 + PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Region ) ) PORT_DIPLOCATION("SW02:1,2") // -> !f901e + PORT_DIPSETTING( 0x0300, DEF_STR( Japan ) ) + PORT_DIPSETTING( 0x0200, DEF_STR( USA ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Europe ) ) + PORT_DIPSETTING( 0x0000, "France" ) + PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW02:3,4") // -> !f9026 + PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) // 58 <- Initial Time (seconds, Germany) + PORT_DIPSETTING( 0x0c00, DEF_STR( Normal ) ) // 51 + PORT_DIPSETTING( 0x0800, DEF_STR( Hard ) ) // 48 + PORT_DIPSETTING( 0x0400, DEF_STR( Very_Hard ) ) // 46 + PORT_DIPNAME( 0x1000, 0x1000, "Infinite Time (Cheat)" ) PORT_DIPLOCATION("SW02:5") + PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW02:6") + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( On ) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW02:7") PORT_CONDITION("IN1", 0x0300, PORTCOND_EQUALS, 0x0300) // unused? + PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x4000, 0x4000, "Choose Race (US EU FR)" ) PORT_DIPLOCATION("SW02:7") PORT_CONDITION("IN1", 0x0300, PORTCOND_NOTEQUALS, 0x0300) // -> f0020 + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x4000, DEF_STR( On ) ) + PORT_DIPNAME( 0x8000, 0x8000, "Vibrations" ) PORT_DIPLOCATION("SW02:8") + PORT_DIPSETTING( 0x8000, "Torque" ) + PORT_DIPSETTING( 0x0000, "Shake" ) + + PORT_START("IN2") // Controls - $80004.w -> !f9016 + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW) // -> f0100 (called "Test") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) +// PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Shift -> !f900e - We handle it with 2 buttons + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Brake")// Brake -> !f9010 + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) // "Race Together" + + PORT_START("IN3") // ? Read at boot only - $80006.w + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + 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( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +/* DSW3-2&1 (Country: JP) Effect + OFF-OFF Red-White Car + OFF- ON Red Car + ON-OFF Blue-White Car + ON- ON Blue Car, "equipped with communication link" */ + + PORT_START("IN4") // DSW 3 (4 bits, Cabinet Linking) - $8000c.w -> !f9014 + PORT_DIPNAME( 0x01, 0x01, "This Unit Is" ) PORT_DIPLOCATION("SW03:1") + PORT_DIPSETTING( 0x01, "Slave" ) + PORT_DIPSETTING( 0x00, "Master" ) + PORT_DIPNAME( 0x06, 0x06, "Unit ID" ) PORT_DIPLOCATION("SW03:2,3") // -> !f901c + PORT_DIPSETTING( 0x06, "0 (Red-White Car)" ) + PORT_DIPSETTING( 0x04, "1 (Red Car)" ) + PORT_DIPSETTING( 0x02, "2 (Blue-White Car)" ) + PORT_DIPSETTING( 0x00, "3 (Blue Car)" ) + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW03:4" ) // Redundant: Invert Unit ID + PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW03:5" ) + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW03:6" ) + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW03:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW03:8" ) + + // Accelerator - $80010.b -> !f9004.w + PORT_START("IN5") // Driving Wheel - $80011.b -> !f9008.w + PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) INPUT_PORTS_END @@ -1418,21 +1444,21 @@ static INPUT_PORTS_START( wildplt ) PORT_DIPSETTING( 0x0000, "France?" ) PORT_START("IN1") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) //service 1 too + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) //service 1 too PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW ) //start 2 too - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Up Limit SW. - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Dow Limit SW. - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Center SW. - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Senser SW. #1 - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Senser SW. #2 + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Up Limit SW. + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Dow Limit SW. + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Center SW. + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Senser SW. #1 + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Senser SW. #2 PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Emergency Button") //E Stop for motors? ( Senser SW. #3 ) PORT_START("IN2") @@ -1450,51 +1476,47 @@ INPUT_PORTS_END static INPUT_PORTS_START( scudhamm ) PORT_START("IN0") // Buttons PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // GAME OVER if pressed on the selection screen - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) // GAME OVER if pressed on the selection screen + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW) // called "Test" - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Select - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) // Select + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Gu - PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // Choki - PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON3 ) // Pa - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_TILT ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // Gu + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // Choki + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON3 ) // Pa + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_TILT ) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN1") // A/D PORT_BIT( 0x00ff, 0x0000, IPT_PADDLE ) PORT_MINMAX(0x0000,0x00ff) PORT_SENSITIVITY(1) PORT_KEYDELTA(0) PORT_START("IN2") // DSW - PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) + PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:1,2") PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x0002, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x0001, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x000c, 0x000c, "Time To Hit" ) + PORT_DIPNAME( 0x000c, 0x000c, "Time To Hit" ) PORT_DIPLOCATION("SW3:3,4") PORT_DIPSETTING( 0x000c, "2 s" ) PORT_DIPSETTING( 0x0008, "3 s" ) PORT_DIPSETTING( 0x0004, "4 s" ) PORT_DIPSETTING( 0x0000, "5 s" ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW3:5") PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0010, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Lives ) ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:6") PORT_DIPSETTING( 0x0020, "3" ) PORT_DIPSETTING( 0x0000, "5" ) - PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" ) - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, "Unknown 1-7" ) - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW3:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW3:8" ) - PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW4:1,2,3") PORT_DIPSETTING( 0x0100, DEF_STR( 4C_1C ) ) PORT_DIPSETTING( 0x0200, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x0300, DEF_STR( 2C_1C ) ) @@ -1503,21 +1525,11 @@ static INPUT_PORTS_START( scudhamm ) PORT_DIPSETTING( 0x0500, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0400, DEF_STR( 1C_4C ) ) PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPNAME( 0x0800, 0x0800, "Unknown 2-3" ) - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x1000, "Unknown 2-4" ) - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, "Unknown 2-5" ) - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, "Unknown 2-6" ) - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x8000, "Unknown 2-7" ) - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPUNKNOWN_DIPLOC( 0x0800, 0x0800, "SW4:4" ) + PORT_DIPUNKNOWN_DIPLOC( 0x1000, 0x1000, "SW4:5" ) + PORT_DIPUNKNOWN_DIPLOC( 0x2000, 0x2000, "SW4:6" ) + PORT_DIPUNKNOWN_DIPLOC( 0x4000, 0x4000, "SW4:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW4:8" ) INPUT_PORTS_END diff --git a/src/mame/video/cischeat.c b/src/mame/video/cischeat.c index 4b0f7f3f397..e84c30c0a7c 100644 --- a/src/mame/video/cischeat.c +++ b/src/mame/video/cischeat.c @@ -219,8 +219,7 @@ READ16_HANDLER( bigrun_vregs_r ) switch (offset) { case 0x0000/2 : return input_port_read(machine, "IN1"); // Coins - case 0x0002/2 : return input_port_read(machine, "IN2") + - (read_shift(machine)<<1); // Buttons + case 0x0002/2 : return input_port_read(machine, "IN2") + (read_shift(machine)<<1); // Buttons case 0x0004/2 : return input_port_read(machine, "IN3"); // Motor Limit Switches case 0x0006/2 : return input_port_read(machine, "IN4"); // DSW 1 & 2 @@ -316,8 +315,7 @@ READ16_HANDLER( cischeat_vregs_r ) switch (offset) { case 0x0000/2 : return input_port_read(machine, "IN1"); // Coins - case 0x0002/2 : return input_port_read(machine, "IN2") + - (read_shift(machine)<<1); // Buttons + case 0x0002/2 : return input_port_read(machine, "IN2") + (read_shift(machine)<<1); // Buttons case 0x0004/2 : return input_port_read(machine, "IN3"); // Motor Limit Switches case 0x0006/2 : return input_port_read(machine, "IN4"); // DSW 1 & 2 @@ -409,18 +407,14 @@ READ16_HANDLER( f1gpstar_vregs_r ) { switch (offset) { - case 0x0000/2 : // DSW 1&2: coinage changes with Country - { - int val = input_port_read(machine, "IN1"); - if (val & 0x0200) return input_port_read(machine, "IN6") | val; // JP, US - else return input_port_read(machine, "IN7") | val; // UK, FR - } + case 0x0000/2 : return input_port_read(machine, "IN1"); // DSW 1 & 2 // case 0x0002/2 : return 0xFFFF; - case 0x0004/2 : return input_port_read(machine, "IN2") + - (read_shift(machine)<<5); // Buttons + + case 0x0004/2 : return input_port_read(machine, "IN2") + (read_shift(machine)<<5); // Buttons case 0x0006/2 : return input_port_read(machine, "IN3"); // ? Read at boot only + case 0x0008/2 : return soundlatch2_r(machine,0); // From sound cpu case 0x000c/2 : return input_port_read(machine, "IN4"); // DSW 3