From 4a0bbac3b5972755e66bfe322fc750e1087075ce Mon Sep 17 00:00:00 2001 From: angelosa Date: Tue, 15 May 2018 15:18:00 +0200 Subject: f1gp.cpp: added some undocumented dip switches, added possibility to use 4-way joysticks [Angelo Salese] --- src/mame/drivers/by35.cpp | 2 +- src/mame/drivers/f1gp.cpp | 52 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp index fcca98a26f1..b5bd9c84363 100644 --- a/src/mame/drivers/by35.cpp +++ b/src/mame/drivers/by35.cpp @@ -2490,7 +2490,7 @@ GAME( 1986, darkshad, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "N GAME( 1986, skflight, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "Skill Flight", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1987, cobrap, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "Cobra", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1987, futrquen, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "Future Queen", MACHINE_IS_SKELETON_MECHANICAL) -GAME( 1987, f1gpp, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "F1 Grand Prix", MACHINE_IS_SKELETON_MECHANICAL) +GAME( 1987, f1gpp, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "F1 Grand Prix (Nuova Bell Games)", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1988, toppin, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "Top Pin", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1988, uboat65, 0, nuovo, by35, by35_state, init_by35_7, ROT0, "Nuova Bell Games", "U-boat 65", MACHINE_IS_SKELETON_MECHANICAL) GAME( 1986, bullseye, 0, by35, by35, by35_state, init_by35_7, ROT0, "Grand Products", "301/Bullseye (301 Darts Scoring)", MACHINE_IS_SKELETON_MECHANICAL) diff --git a/src/mame/drivers/f1gp.cpp b/src/mame/drivers/f1gp.cpp index 4ba6b37b042..9b35edb9c1e 100644 --- a/src/mame/drivers/f1gp.cpp +++ b/src/mame/drivers/f1gp.cpp @@ -73,7 +73,7 @@ void f1gp_state::f1gp_cpu1_map(address_map &map) map(0xffe000, 0xffefff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // PALETTE map(0xfff000, 0xfff001).portr("INPUTS"); map(0xfff000, 0xfff001).w(this, FUNC(f1gp_state::f1gp_gfxctrl_w)); -// AM_RANGE(0xfff002, 0xfff003) analog wheel? + map(0xfff002, 0xfff003).portr("WHEEL"); map(0xfff004, 0xfff005).portr("DSW1"); map(0xfff002, 0xfff005).w(this, FUNC(f1gp_state::f1gp_fgscroll_w)); map(0xfff006, 0xfff007).portr("DSW2"); @@ -95,7 +95,7 @@ void f1gp_state::f1gp2_cpu1_map(address_map &map) map(0xffd000, 0xffdfff).ram().w(this, FUNC(f1gp_state::f1gp_fgvideoram_w)).share("fgvideoram"); // CHARACTER map(0xffe000, 0xffefff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // PALETTE map(0xfff000, 0xfff001).portr("INPUTS").w(this, FUNC(f1gp_state::f1gp2_gfxctrl_w)); -// AM_RANGE(0xfff002, 0xfff003) analog wheel? + map(0xfff002, 0xfff003).portr("WHEEL"); map(0xfff004, 0xfff005).portr("DSW1"); map(0xfff006, 0xfff007).portr("DSW2"); map(0xfff009, 0xfff009).r(this, FUNC(f1gp_state::command_pending_r)).w(m_soundlatch, FUNC(generic_latch_8_device::write)).umask16(0x00ff); @@ -173,6 +173,7 @@ void f1gp_state::f1gpb_cpu1_map(address_map &map) map(0xffd000, 0xffdfff).ram().w(this, FUNC(f1gp_state::f1gp_fgvideoram_w)).share("fgvideoram"); map(0xffe000, 0xffefff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xfff000, 0xfff001).portr("INPUTS"); + map(0xfff002, 0xfff003).portr("WHEEL"); map(0xfff004, 0xfff005).portr("DSW1"); map(0xfff006, 0xfff007).portr("DSW2"); map(0xfff008, 0xfff009).nopr(); //? @@ -195,13 +196,17 @@ void f1gp_state::f1gpb_cpu2_map(address_map &map) } static INPUT_PORTS_START( f1gp ) - PORT_START("INPUTS") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_START("INPUTS") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("JOY_TYPE", 0x01, NOTEQUALS, 0x01) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("JOY_TYPE", 0x01, NOTEQUALS, 0x01) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("JOY_TYPE", 0x01, NOTEQUALS, 0x01) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("JOY_TYPE", 0x01, NOTEQUALS, 0x01) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("JOY_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("JOY_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_CONDITION("JOY_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_CONDITION("JOY_TYPE", 0x01, EQUALS, 0x01) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Brake Button") + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Accelerator Button") PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) @@ -213,8 +218,14 @@ static INPUT_PORTS_START( f1gp ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("WHEEL") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(10) PORT_KEYDELTA(5) + PORT_START("DSW1") - PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0100, "SW1:1" ) /* Listed as "Unused" */ + // listed as "unused" in manual, actually enables free play + PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x0100, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) PORT_DIPNAME( 0x0e00, 0x0e00, DEF_STR( Coin_A ) ) PORT_CONDITION("DSW1",0x8000,EQUALS,0x8000) PORT_DIPLOCATION("SW1:2,3,4") PORT_DIPSETTING( 0x0a00, DEF_STR( 3C_1C ) ) PORT_DIPSETTING( 0x0c00, DEF_STR( 2C_1C ) ) @@ -251,9 +262,9 @@ static INPUT_PORTS_START( f1gp ) PORT_DIPSETTING( 0x0000, "Multi Player Game Only" ) PORT_CONDITION("DSW1",0x0004,EQUALS,0x0000) PORT_DIPSETTING( 0x0008, "Multi Player Off" ) PORT_CONDITION("DSW1",0x0004,NOTEQUALS,0x0000) PORT_DIPSETTING( 0x0000, "Multi Player Off" ) PORT_CONDITION("DSW1",0x0004,NOTEQUALS,0x0000) - PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW2:5" ) /* Listed as "Unused" */ - PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW2:6" ) /* Listed as "Unused" */ - PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW2:7" ) /* Listed as "Unused" */ + PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW2:5" ) /* Listed as "Unused", reverses joystick left/right directions? */ + PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW2:6" ) /* Listed as "Unused", two buttons to accelerate? */ + PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW2:7" ) /* Listed as "Unused", reverses button activeness? */ PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW2:8" ) /* Listed as "Unused" */ PORT_START("DSW2") @@ -268,7 +279,12 @@ static INPUT_PORTS_START( f1gp ) PORT_DIPUNUSED_DIPLOC( 0x1000, 0x1000, "SW3:5" ) /* Listed as "Unused" */ PORT_DIPUNUSED_DIPLOC( 0x2000, 0x2000, "SW3:6" ) /* Listed as "Unused" */ PORT_DIPUNUSED_DIPLOC( 0x4000, 0x4000, "SW3:7" ) /* Listed as "Unused" */ - PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW3:8" ) /* Listed as "Unused" */ + // listed as "Unused" in manual, it selects between joystick or steering wheel + PORT_DIPNAME( 0x8000, 0x8000, "Input Method" ) PORT_DIPLOCATION("SW3:8") + PORT_DIPSETTING( 0x8000, "Joystick" ) + // TODO: doesn't work in-game, reads from $fff002 ingame too but doesn't have an effect, + // maybe outputs threshold to $fff000 or it's not supposed to be enabled like the manual claims. + PORT_DIPSETTING( 0x0000, "Steering Wheel" ) PORT_START("DSW3") PORT_DIPNAME( 0x001f, 0x0010, DEF_STR( Region ) ) /* Jumpers?? */ @@ -279,6 +295,12 @@ static INPUT_PORTS_START( f1gp ) PORT_DIPSETTING( 0x0004, DEF_STR( Hong_Kong ) ) PORT_DIPSETTING( 0x0008, DEF_STR( Taiwan ) ) /* all other values are invalid */ + + PORT_START("JOY_TYPE") + PORT_CONFNAME( 0x01, 0x01, "Joystick Type" ) + PORT_CONFSETTING( 0x01, "2-Way" ) + // in "free run" course select lets you go up/down + PORT_CONFSETTING( 0x00, "4-Way" ) INPUT_PORTS_END @@ -287,7 +309,7 @@ static INPUT_PORTS_START( f1gp2 ) PORT_INCLUDE( f1gp ) PORT_MODIFY("INPUTS") - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Turbo Button") PORT_MODIFY("DSW3") PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Region ) ) -- cgit v1.2.3