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.
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.
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" )
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.