Hi geecab i got the code you posted working but the mouse thing was annoying me so i added a dip switch that lets you select a "Calibration Wheel" so that you can 100% accurately set it up using the Keyboard then you switch it back to the "Game Wheel 1" or "Game Wheel 2" setting and the game works fine. I added "Game Wheel 2" because it's a custom PORT_MINMAX that makes the steering less twitchy on a Logitech G932 wheel but still gives you the full range of motion in the car.
To get it 100% accurate all you do is set "Calibration Wheel" in the dip switch menu then in the input assignment menu you just map "Calibration Wheel Analogue Inc" to the Kbd Right (right key on keyboard) and hold it down untill it reaches 4 turns (it takes about 10 seconds), let go of the button and turn the Key and you get CNTSPTRN 1024, PATCEN 0.
Virtual DIP Switches for Wheel selection.
Message in the Input Assignment menu to remind users how to calibrate wheel.
The different Wheel setups selectable in DIP Switch menu.
Game wheel 1 is the original mame PORT_MINMAX of 0x010, 0xff0 and Game Wheel 2 is the one i tweaked for my Logitech G932 with a PORT_MINMAX of 0x0440, 0x0bc0. Calibration Wheel has a PORT_MINMAX of 0x0000, 0x2800 and thats why it calibrates the machine perfectly but it's way too high to actually use it as a wheel because of how sensitive it is. It's only useful for calibrating the game.
To get it 100% accurate all you do is set "Calibration Wheel" in the dip switch menu then in the input assignment menu you just map "Calibration Wheel Analogue Inc" to the Kbd Right (right key on keyboard) and hold it down untill it reaches 4 turns (it takes about 10 seconds), let go of the button and turn the Key and you get CNTSPTRN 1024, PATCEN 0.
Virtual DIP Switches for Wheel selection.
Code: [Select]
PORT_START("mainpcb:SW1") /* 60c002 */
// Virtual DIP switches here
PORT_DIPNAME( 0x700, 0x100, "Toggle Calibration Wheel or Game Wheel 1-2" )
PORT_DIPSETTING( 0x100, "Game Wheel 1" )
PORT_DIPSETTING( 0x300, "Game Wheel 2" )
PORT_DIPSETTING( 0x400, "Calibration Wheel" )
//Hardware DIP switches continue here
PORT_DIPNAME( 0x01, 0x01, "SW1:8" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "SW1:7" )
Message in the Input Assignment menu to remind users how to calibrate wheel.
Code: [Select]
PORT_START("mainpcb:a80000")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Abort")
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Key")
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 ) /* aux coin */
PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("1st Gear")
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("2nd Gear")
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("3rd Gear")
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("4th Gear")
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) /* center edge on steering wheel */
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("1: Use DIP Switch & choose calibration wheel to calibrate wheel in test menu!")
PORT_BIT(0x10000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("2: Map Calibration Wheel Analogue Inc to Kbd Right!")
PORT_BIT(0x20000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("3: Hold down Kbd Right until you reach 4 turns!")
PORT_BIT(0x40000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("4: Let go of Kbd Right and turn key!")
PORT_BIT(0x80000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_NAME("5: Switch back to Game Wheel 1 or 2 after Test Menu calibration complete!")
The different Wheel setups selectable in DIP Switch menu.
Code: [Select]
PORT_START("mainpcb:12BADC.0") /* b80000 - 12 bit ADC 0 - steering wheel */
/* Game Steering Wheel 1 */
PORT_BIT(0xfff, 0x800, IPT_PADDLE) PORT_CONDITION("mainpcb:SW1", 0x700, EQUALS, 0x100) PORT_MINMAX(0x010, 0xff0) PORT_SENSITIVITY(1) PORT_KEYDELTA(0) PORT_NAME("Game Wheel 1")
/* Game Steering Wheel 2 */
PORT_BIT(0xffff, 0x0800, IPT_PADDLE) PORT_CONDITION("mainpcb:SW1", 0x700, EQUALS, 0x300) PORT_MINMAX(0x0440, 0x0bc0) PORT_SENSITIVITY(1) PORT_KEYDELTA(0) PORT_NAME("Game Wheel 2")
/* Calibration Wheel */
PORT_BIT(0xffff, 0x0000, IPT_PADDLE) PORT_CONDITION("mainpcb:SW1", 0x700, EQUALS, 0x400) PORT_MINMAX(0x0000, 0x2800) PORT_SENSITIVITY(1) PORT_KEYDELTA(0) PORT_NAME("Calibration Wheel")
Game wheel 1 is the original mame PORT_MINMAX of 0x010, 0xff0 and Game Wheel 2 is the one i tweaked for my Logitech G932 with a PORT_MINMAX of 0x0440, 0x0bc0. Calibration Wheel has a PORT_MINMAX of 0x0000, 0x2800 and thats why it calibrates the machine perfectly but it's way too high to actually use it as a wheel because of how sensitive it is. It's only useful for calibrating the game.