mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 13:55:38 +00:00
Some updates to Supermodel made at beginning of the year but only now got around to checking in (better late than never...):
- hooked up the remaining controls in Supermodel (except for Magical Truck Adventure which does not work at all yet). The new controls are: * InputAnalogJoyTrigger2 and InputAnalogJoyEvent2 for the additional second trigger and event buttons that were missing from Star Wars Trilogy, * InputRearBrake and InputMusicSelect for the rear brake and music selection buttons that were missing from Harley Davidson, * InputAnalogGunXXX, InputAnalogTriggerXXX, InputAnalogGunXXX2 and InputAnalogTriggerXXX2 for the analogue guns of Ocean Hunter and LA Machineguns (NOTE: these controls must be calibrated in the games' service menus otherwise they will not work properly. Also, the alignment of the gun cursor does not line up very well with the mouse position at the moment, but at least the games are a bit more playable now, although still with numerous graphical glitches...) * InputSkiXXX for the controls of Ski Champ, making the game playable now. - hooked up existing InputViewChange control to Harley Davidson's view change button - improved the handling of InputGearShiftUp/Down inputs so that they work better with the driving games. With Dirt Devils, ECA, Harley and LeMans this means they map directly to the game's own shift up/down controls, while with the 4-speed games such as Daytona 2, Scud Racer and Sega Rally 2, they simulate the user shifting up and down through the gears - added defaults for the new controls to Supermodel.ini - other small code tweaks: * fix small bug with handling of pos/neg inputs mapping to a control with inverted range (0XFF to 0x00) - this was needed to get Ski Champ's X-axis to work properly * removed Wait method from InputSystem and added to CThread as CThread::Sleep instead * added FrameTimings struct to hold all frame timings in a single place No networking code yet as just haven't had a chance to work on it since initial progress at the beginning of the year - am *hoping* might have some time to pick it up again over Christmas...
This commit is contained in:
parent
b017b24b1f
commit
8835d6fe36
|
@ -87,25 +87,32 @@ InputSteering = "JOY1_XAXIS" ; analog, full steering range
|
||||||
InputAccelerator = "KEY_UP,JOY1_UP"
|
InputAccelerator = "KEY_UP,JOY1_UP"
|
||||||
InputBrake = "KEY_DOWN,JOY1_DOWN"
|
InputBrake = "KEY_DOWN,JOY1_DOWN"
|
||||||
|
|
||||||
; Manual transmission
|
; Up/down shifter manual transmission (all racers)
|
||||||
|
InputGearShiftUp = "KEY_Y" ; sequential shift up
|
||||||
|
InputGearShiftDown = "KEY_H" ; sequential shift down
|
||||||
|
|
||||||
|
; 4-Speed manual transmission (Daytona 2, Sega Rally 2, Scud Race)
|
||||||
InputGearShift1 = "KEY_Q,JOY1_BUTTON5"
|
InputGearShift1 = "KEY_Q,JOY1_BUTTON5"
|
||||||
InputGearShift2 = "KEY_W,JOY1_BUTTON6"
|
InputGearShift2 = "KEY_W,JOY1_BUTTON6"
|
||||||
InputGearShift3 = "KEY_E,JOY1_BUTTON7"
|
InputGearShift3 = "KEY_E,JOY1_BUTTON7"
|
||||||
InputGearShift4 = "KEY_R,JOY1_BUTTON8"
|
InputGearShift4 = "KEY_R,JOY1_BUTTON8"
|
||||||
InputGearShiftN = "KEY_T"
|
InputGearShiftN = "KEY_T"
|
||||||
InputGearShiftUp = "NONE" ; sequential shift up
|
|
||||||
InputGearShiftDown = "NONE" ; sequential shift down
|
|
||||||
|
|
||||||
; View buttons
|
; VR4 view change buttons (Daytona 2, Le Mans 24, Scud Race)
|
||||||
InputVR1 = "KEY_A,JOY1_BUTTON1"
|
InputVR1 = "KEY_A,JOY1_BUTTON1"
|
||||||
InputVR2 = "KEY_S,JOY1_BUTTON2"
|
InputVR2 = "KEY_S,JOY1_BUTTON2"
|
||||||
InputVR3 = "KEY_D,JOY1_BUTTON3"
|
InputVR3 = "KEY_D,JOY1_BUTTON3"
|
||||||
InputVR4 = "KEY_F,JOY1_BUTTON4"
|
InputVR4 = "KEY_F,JOY1_BUTTON4"
|
||||||
|
|
||||||
; Miscellaneous driving game buttons: Sega Rally 2, Dirt Devils, Emergency Car
|
; Single view change button (Dirt Devils, ECA, Harley-Davidson, Sega Rally 2)
|
||||||
; Ambulance
|
|
||||||
InputViewChange = "KEY_A,JOY1_BUTTON1"
|
InputViewChange = "KEY_A,JOY1_BUTTON1"
|
||||||
InputHandBrake = "KEY_S,JOY1_BUTTON2" ; Sega Rally 2 only
|
|
||||||
|
; Handbrake (Dirt Devils, Sega Rally 2)
|
||||||
|
InputHandBrake = "KEY_S,JOY1_BUTTON2"
|
||||||
|
|
||||||
|
; Harley-Davidson controls
|
||||||
|
InputRearBrake = "KEY_S,JOY1_BUTTON2"
|
||||||
|
InputMusicSelect = "KEY_D,JOY1_BUTTON3"
|
||||||
|
|
||||||
; Virtual On macros
|
; Virtual On macros
|
||||||
InputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"
|
InputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"
|
||||||
|
@ -133,7 +140,7 @@ InputTwinJoyShot2 = "KEY_S,JOY1_BUTTON6"
|
||||||
InputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"
|
InputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"
|
||||||
InputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"
|
InputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"
|
||||||
|
|
||||||
; Analog joystick (e.g. Star Wars Trilogy)
|
; Analog joystick (Star Wars Trilogy)
|
||||||
InputAnalogJoyLeft = "KEY_LEFT" ; digital, move left
|
InputAnalogJoyLeft = "KEY_LEFT" ; digital, move left
|
||||||
InputAnalogJoyRight = "KEY_RIGHT" ; digital, move right
|
InputAnalogJoyRight = "KEY_RIGHT" ; digital, move right
|
||||||
InputAnalogJoyUp = "KEY_UP" ; digital, move up
|
InputAnalogJoyUp = "KEY_UP" ; digital, move up
|
||||||
|
@ -142,8 +149,10 @@ InputAnalogJoyX = "JOY_XAXIS,MOUSE_XAXIS" ; analog, full X axis
|
||||||
InputAnalogJoyY = "JOY_YAXIS,MOUSE_YAXIS" ; analog, full Y axis
|
InputAnalogJoyY = "JOY_YAXIS,MOUSE_YAXIS" ; analog, full Y axis
|
||||||
InputAnalogJoyTrigger = "KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON"
|
InputAnalogJoyTrigger = "KEY_A,JOY_BUTTON1,MOUSE_LEFT_BUTTON"
|
||||||
InputAnalogJoyEvent = "KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON"
|
InputAnalogJoyEvent = "KEY_S,JOY_BUTTON2,MOUSE_RIGHT_BUTTON"
|
||||||
|
InputAnalogJoyTrigger2 = "KEY_D,JOY_BUTTON2"
|
||||||
|
InputAnalogJoyEvent2 = "NONE"
|
||||||
|
|
||||||
; Light guns
|
; Light guns (Lost World)
|
||||||
InputGunLeft = "KEY_LEFT" ; digital, move gun left
|
InputGunLeft = "KEY_LEFT" ; digital, move gun left
|
||||||
InputGunRight = "KEY_RIGHT" ; digital, move gun right
|
InputGunRight = "KEY_RIGHT" ; digital, move gun right
|
||||||
InputGunUp = "KEY_UP" ; digital, move gun up
|
InputGunUp = "KEY_UP" ; digital, move gun up
|
||||||
|
@ -163,3 +172,33 @@ InputTrigger2 = "JOY2_BUTTON1"
|
||||||
InputOffscreen2 = "JOY2_BUTTON2"
|
InputOffscreen2 = "JOY2_BUTTON2"
|
||||||
InputAutoTrigger2 = 0
|
InputAutoTrigger2 = 0
|
||||||
|
|
||||||
|
; Analog guns (Ocean Hunter, LA Machineguns)
|
||||||
|
InputAnalogGunLeft = "KEY_LEFT" ; digital, move gun left
|
||||||
|
InputAnalogGunRight = "KEY_RIGHT" ; digital, move gun right
|
||||||
|
InputAnalogGunUp = "KEY_UP" ; digital, move gun up
|
||||||
|
InputAnalogGunDown = "KEY_DOWN" ; digital, move gun down
|
||||||
|
InputAnalogGunX = "MOUSE_XAXIS,JOY1_XAXIS" ; analog, full X axis
|
||||||
|
InputAnalogGunY = "MOUSE_YAXIS,JOY1_YAXIS" ; analog, full Y axis
|
||||||
|
InputAnalogTriggerLeft = "KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON"
|
||||||
|
InputAnalogTriggerRight = "KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON"
|
||||||
|
InputAnalogGunLeft2 = "NONE"
|
||||||
|
InputAnalogGunRight2 = "NONE"
|
||||||
|
InputAnalogGunUp2 = "NONE"
|
||||||
|
InputAnalogGunDown2 = "NONE"
|
||||||
|
InputAnalogGunX2 = "NONE"
|
||||||
|
InputAnalogGunY2 = "NONE"
|
||||||
|
InputAnalogTriggerLeft2 = "NONE"
|
||||||
|
InputAnalogTriggerRight2 = "NONE"
|
||||||
|
|
||||||
|
; Ski Champ controls
|
||||||
|
InputSkiLeft = "KEY_LEFT"
|
||||||
|
InputSkiRight = "KEY_RIGHT"
|
||||||
|
InputSkiUp = "KEY_UP"
|
||||||
|
InputSkiDown = "KEY_DOWN"
|
||||||
|
InputSkiX = "JOY1_XAXIS"
|
||||||
|
InputSkiY = "JOY1_YAXIS"
|
||||||
|
InputSkiPollLeft = "KEY_A,JOY1_BUTTON1"
|
||||||
|
InputSkiPollRight = "KEY_S,JOY1_BUTTON2"
|
||||||
|
InputSkiSelect1 = "KEY_Q,JOY1_BUTTON3"
|
||||||
|
InputSkiSelect2 = "KEY_W,JOY1_BUTTON4"
|
||||||
|
InputSkiSelect3 = "KEY_E,JOY1_BUTTON5"
|
|
@ -115,7 +115,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
false, // 96 MB of banked CROM (do not mirror)
|
false, // 96 MB of banked CROM (do not mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
2, // DSB2 MPEG board
|
2, // DSB2 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
false, // 64 MB of banked CROM (do not mirror)
|
false, // 64 MB of banked CROM (do not mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
2, // DSB2 MPEG board
|
2, // DSB2 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 32 MB of banked CROM (Mirror)
|
true, // 32 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0xC00000, // 12 MB of sample ROMs
|
0xC00000, // 12 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFTUPDOWN|GAME_INPUT_HANDBRAKE|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 32 MB of banked CROM (Mirror)
|
true, // 32 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0xC00000, // 12 MB of sample ROMs
|
0xC00000, // 12 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFTUPDOWN|GAME_INPUT_HANDBRAKE|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFTUPDOWN|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFTUPDOWN|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 40 MB of banked CROM (Mirror)
|
true, // 40 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFTUPDOWN|GAME_INPUT_HARLEY|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -763,7 +763,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 40 MB of banked CROM (Mirror)
|
true, // 40 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFTUPDOWN|GAME_INPUT_HARLEY|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -833,7 +833,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_ANALOG_JOYSTICK,
|
GAME_INPUT_COMMON|GAME_INPUT_ANALOG_GUN1|GAME_INPUT_ANALOG_GUN2,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -903,7 +903,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x2000000, // 32 MB of VROM
|
0x2000000, // 32 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4, // for now, Shift Up/Down mapped to Shift 3/4
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR4|GAME_INPUT_SHIFTUPDOWN,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -1103,7 +1103,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
false, // 96 MB of banked CROM (do not mirror)
|
false, // 96 MB of banked CROM (do not mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x1000000, // 16 MB of sample ROMs
|
0x1000000, // 16 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_ANALOG_JOYSTICK,
|
GAME_INPUT_COMMON|GAME_INPUT_ANALOG_GUN1|GAME_INPUT_ANALOG_GUN2,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x2000000, // 32 MB of VROM
|
0x2000000, // 32 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
1, // DSB1 MPEG board
|
1, // DSB1 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -1249,7 +1249,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x2000000, // 32 MB of VROM
|
0x2000000, // 32 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
1, // DSB1 MPEG board
|
1, // DSB1 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -1325,7 +1325,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x2000000, // 32 MB of VROM
|
0x2000000, // 32 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
1, // DSB1 MPEG board
|
1, // DSB1 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -1401,7 +1401,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 64 MB of banked CROM (Mirror)
|
true, // 64 MB of banked CROM (Mirror)
|
||||||
0x2000000, // 32 MB of VROM
|
0x2000000, // 32 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
1, // DSB1 MPEG board
|
1, // DSB1 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -1483,7 +1483,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 64 MB of banked CROM (Mirror)
|
true, // 64 MB of banked CROM (Mirror)
|
||||||
0x2000000, // 32 MB of VROM
|
0x2000000, // 32 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_VR|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_VR4,
|
||||||
1, // DSB1 MPEG board
|
1, // DSB1 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -1565,7 +1565,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 64 MB of banked CROM (Mirror)
|
true, // 64 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE,
|
GAME_INPUT_COMMON|GAME_INPUT_SKI,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -1801,7 +1801,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_RALLY|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_HANDBRAKE|GAME_INPUT_VIEWCHANGE,
|
||||||
2, // DSB2 MPEG board
|
2, // DSB2 MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
@ -1877,7 +1877,7 @@ const struct GameInfo g_Model3GameList[] =
|
||||||
true, // 48 MB of banked CROM (Mirror)
|
true, // 48 MB of banked CROM (Mirror)
|
||||||
0x4000000, // 64 MB of VROM
|
0x4000000, // 64 MB of VROM
|
||||||
0x800000, // 8 MB of sample ROMs
|
0x800000, // 8 MB of sample ROMs
|
||||||
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_RALLY|GAME_INPUT_SHIFT4,
|
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_HANDBRAKE|GAME_INPUT_VIEWCHANGE,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
true, // drive board
|
true, // drive board
|
||||||
|
|
||||||
|
|
36
Src/Games.h
36
Src/Games.h
|
@ -37,21 +37,27 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
// Input flags
|
// Input flags
|
||||||
#define GAME_INPUT_COMMON 0x0001 // game has common controls
|
#define GAME_INPUT_COMMON 0x00001 // game has common controls
|
||||||
#define GAME_INPUT_VEHICLE 0x0002 // game has vehicle controls
|
#define GAME_INPUT_VEHICLE 0x00002 // game has vehicle controls
|
||||||
#define GAME_INPUT_JOYSTICK1 0x0004 // game has joystick 1
|
#define GAME_INPUT_JOYSTICK1 0x00004 // game has joystick 1
|
||||||
#define GAME_INPUT_JOYSTICK2 0x0008 // game has joystick 2
|
#define GAME_INPUT_JOYSTICK2 0x00008 // game has joystick 2
|
||||||
#define GAME_INPUT_FIGHTING 0x0010 // game has fighting game controls
|
#define GAME_INPUT_FIGHTING 0x00010 // game has fighting game controls
|
||||||
#define GAME_INPUT_VR 0x0020 // game has VR view buttons
|
#define GAME_INPUT_VR4 0x00020 // game has four VR view buttons
|
||||||
#define GAME_INPUT_RALLY 0x0040 // game has rally car controls
|
#define GAME_INPUT_VIEWCHANGE 0x00040 // game has single view change button
|
||||||
#define GAME_INPUT_GUN1 0x0080 // game has gun 1
|
#define GAME_INPUT_SHIFT4 0x00080 // game has 4-speed shifter
|
||||||
#define GAME_INPUT_GUN2 0x0100 // game has gun 2
|
#define GAME_INPUT_SHIFTUPDOWN 0x00100 // game has up/down shifter
|
||||||
#define GAME_INPUT_SHIFT4 0x0200 // game has 4-speed shifter
|
#define GAME_INPUT_HANDBRAKE 0x00200 // game has handbrake
|
||||||
#define GAME_INPUT_ANALOG_JOYSTICK 0x0400 // game has analog joystick
|
#define GAME_INPUT_HARLEY 0x00400 // game has Harley Davidson controls
|
||||||
#define GAME_INPUT_TWIN_JOYSTICKS 0x0800 // game has twin joysticks
|
#define GAME_INPUT_GUN1 0x00800 // game has light gun 1
|
||||||
#define GAME_INPUT_SOCCER 0x1000 // game has soccer controls
|
#define GAME_INPUT_GUN2 0x01000 // game has light gun 2
|
||||||
#define GAME_INPUT_SPIKEOUT 0x2000 // game has Spikeout buttons
|
#define GAME_INPUT_ANALOG_JOYSTICK 0x02000 // game has analog joystick
|
||||||
#define GAME_INPUT_ALL 0x3FFF
|
#define GAME_INPUT_TWIN_JOYSTICKS 0x04000 // game has twin joysticks
|
||||||
|
#define GAME_INPUT_SOCCER 0x08000 // game has soccer controls
|
||||||
|
#define GAME_INPUT_SPIKEOUT 0x10000 // game has Spikeout buttons
|
||||||
|
#define GAME_INPUT_ANALOG_GUN1 0x20000 // game has analog gun 1
|
||||||
|
#define GAME_INPUT_ANALOG_GUN2 0x40000 // game has analog gun 2
|
||||||
|
#define GAME_INPUT_SKI 0x80000 // game has ski controls
|
||||||
|
#define GAME_INPUT_ALL 0xFFFFF
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -91,13 +91,19 @@ const char* CInput::GetInputGroup()
|
||||||
case GAME_INPUT_SPIKEOUT: return "Spikeout Buttons";
|
case GAME_INPUT_SPIKEOUT: return "Spikeout Buttons";
|
||||||
case GAME_INPUT_SOCCER: return "Virtua Striker Buttons";
|
case GAME_INPUT_SOCCER: return "Virtua Striker Buttons";
|
||||||
case GAME_INPUT_VEHICLE: return "Racing Game Steering Controls";
|
case GAME_INPUT_VEHICLE: return "Racing Game Steering Controls";
|
||||||
case GAME_INPUT_SHIFT4: return "Racing Game Gear Shift";
|
case GAME_INPUT_SHIFT4: return "Racing Game Gear 4-Way Shift";
|
||||||
case GAME_INPUT_VR: return "Racing Game VR View Buttons";
|
case GAME_INPUT_SHIFTUPDOWN: return "Racing Game Gear Up/Down Shift";
|
||||||
case GAME_INPUT_RALLY: return "Miscellaneous Driving Game Buttons";
|
case GAME_INPUT_VR4: return "Racing Game 4 VR View Buttons";
|
||||||
|
case GAME_INPUT_VIEWCHANGE: return "Racing Game View Change";
|
||||||
|
case GAME_INPUT_HANDBRAKE: return "Racing Game Handbrake";
|
||||||
|
case GAME_INPUT_HARLEY: return "Harley Davidson Controls";
|
||||||
case GAME_INPUT_TWIN_JOYSTICKS: return "Virtual On Controls";
|
case GAME_INPUT_TWIN_JOYSTICKS: return "Virtual On Controls";
|
||||||
case GAME_INPUT_ANALOG_JOYSTICK: return "Analog Joystick";
|
case GAME_INPUT_ANALOG_JOYSTICK: return "Analog Joystick";
|
||||||
case GAME_INPUT_GUN1: // Fall through to below
|
case GAME_INPUT_GUN1: // Fall through to below
|
||||||
case GAME_INPUT_GUN2: return "Lightguns";
|
case GAME_INPUT_GUN2: return "Light Guns";
|
||||||
|
case GAME_INPUT_ANALOG_GUN1: // Fall through to below
|
||||||
|
case GAME_INPUT_ANALOG_GUN2: return "Analog Guns";
|
||||||
|
case GAME_INPUT_SKI: return "Ski Controls";
|
||||||
default: return "Misc";
|
default: return "Misc";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1709,7 +1709,7 @@ bool CInputSystem::ReadMapping(char *buffer, unsigned bufSize, bool fullAxisOnly
|
||||||
{
|
{
|
||||||
if (!Poll())
|
if (!Poll())
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
}
|
}
|
||||||
|
@ -1744,7 +1744,7 @@ bool CInputSystem::ReadMapping(char *buffer, unsigned bufSize, bool fullAxisOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't poll continuously
|
// Don't poll continuously
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy mapping to buffer and return
|
// Copy mapping to buffer and return
|
||||||
|
@ -1833,7 +1833,7 @@ bool CInputSystem::DetectJoystickAxis(unsigned joyNum, unsigned &axisNum, const
|
||||||
{
|
{
|
||||||
if (!Poll())
|
if (!Poll())
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
}
|
}
|
||||||
|
@ -1846,7 +1846,7 @@ bool CInputSystem::DetectJoystickAxis(unsigned joyNum, unsigned &axisNum, const
|
||||||
{
|
{
|
||||||
if (!Poll())
|
if (!Poll())
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1878,7 +1878,7 @@ bool CInputSystem::DetectJoystickAxis(unsigned joyNum, unsigned &axisNum, const
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't poll continuously
|
// Don't poll continuously
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
|
|
||||||
maxRange = 0;
|
maxRange = 0;
|
||||||
|
@ -2026,7 +2026,7 @@ Repeat:
|
||||||
{
|
{
|
||||||
if (!Poll())
|
if (!Poll())
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
goto Cancelled;
|
goto Cancelled;
|
||||||
}
|
}
|
||||||
|
@ -2045,7 +2045,7 @@ Repeat:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't poll continuously
|
// Don't poll continuously
|
||||||
Wait(1000/60);
|
CThread::Sleep(1000/60);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Done\n\n");
|
printf("Done\n\n");
|
||||||
|
|
|
@ -690,11 +690,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual bool ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeedbackCmd ffCmd) = 0;
|
virtual bool ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeedbackCmd ffCmd) = 0;
|
||||||
|
|
||||||
/*
|
|
||||||
* Waits for the given time in milliseconds
|
|
||||||
*/
|
|
||||||
virtual void Wait(int ms) = 0;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Virtual methods subclass can override if required
|
// Virtual methods subclass can override if required
|
||||||
//
|
//
|
||||||
|
|
|
@ -122,8 +122,8 @@ void CAxisInput::Poll()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = m_offVal;
|
value = m_offVal;
|
||||||
if (m_posInput != NULL) value += (int)(m_posInput->ValueAsFraction() * (double)(m_offVal - m_maxVal));
|
if (m_posInput != NULL) value -= (int)(m_posInput->ValueAsFraction() * (double)(m_offVal - m_maxVal));
|
||||||
if (m_negInput != NULL) value -= (int)(m_negInput->ValueAsFraction() * (double)(m_minVal - m_offVal));
|
if (m_negInput != NULL) value += (int)(m_negInput->ValueAsFraction() * (double)(m_minVal - m_offVal));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (m_source != NULL && m_source->GetValueAsAnalog(intValue, m_minVal, m_offVal, m_maxVal))
|
else if (m_source != NULL && m_source->GetValueAsAnalog(intValue, m_minVal, m_offVal, m_maxVal))
|
||||||
|
|
|
@ -108,30 +108,36 @@ CInputs::CInputs(CInputSystem *system) : m_system(system)
|
||||||
CAnalogInput *steeringLeft = AddAnalogInput("SteeringLeft", "Steer Left", GAME_INPUT_VEHICLE, "NONE");
|
CAnalogInput *steeringLeft = AddAnalogInput("SteeringLeft", "Steer Left", GAME_INPUT_VEHICLE, "NONE");
|
||||||
CAnalogInput *steeringRight = AddAnalogInput("SteeringRight", "Steer Right", GAME_INPUT_VEHICLE, "NONE");
|
CAnalogInput *steeringRight = AddAnalogInput("SteeringRight", "Steer Right", GAME_INPUT_VEHICLE, "NONE");
|
||||||
|
|
||||||
steering = AddAxisInput ("Steering", "Full Steering", GAME_INPUT_VEHICLE, "NONE", steeringLeft, steeringRight);
|
steering = AddAxisInput ("Steering", "Full Steering", GAME_INPUT_VEHICLE, "NONE", steeringLeft, steeringRight);
|
||||||
accelerator = AddAnalogInput("Accelerator", "Accelerator Pedal", GAME_INPUT_VEHICLE, "NONE");
|
accelerator = AddAnalogInput("Accelerator", "Accelerator Pedal", GAME_INPUT_VEHICLE, "NONE");
|
||||||
brake = AddAnalogInput("Brake", "Brake Pedal", GAME_INPUT_VEHICLE, "NONE");
|
brake = AddAnalogInput("Brake", "Brake Pedal/Front Brake", GAME_INPUT_VEHICLE, "NONE");
|
||||||
|
gearShiftUp = AddSwitchInput("GearShiftUp", "Shift Up", GAME_INPUT_VEHICLE, "NONE");
|
||||||
|
gearShiftDown = AddSwitchInput("GearShiftDown", "Shift Down", GAME_INPUT_VEHICLE, "NONE");
|
||||||
|
|
||||||
// Racing Game Gear Shift
|
// Racing Game Gear Shift
|
||||||
CSwitchInput *shift1 = AddSwitchInput("GearShift1", "Shift 1/Up", GAME_INPUT_SHIFT4, "NONE");
|
CSwitchInput *shift1 = AddSwitchInput("GearShift1", "Shift 1", GAME_INPUT_SHIFT4, "NONE");
|
||||||
CSwitchInput *shift2 = AddSwitchInput("GearShift2", "Shift 2/Down", GAME_INPUT_SHIFT4, "NONE");
|
CSwitchInput *shift2 = AddSwitchInput("GearShift2", "Shift 2", GAME_INPUT_SHIFT4, "NONE");
|
||||||
CSwitchInput *shift3 = AddSwitchInput("GearShift3", "Shift 3", GAME_INPUT_SHIFT4, "NONE");
|
CSwitchInput *shift3 = AddSwitchInput("GearShift3", "Shift 3", GAME_INPUT_SHIFT4, "NONE");
|
||||||
CSwitchInput *shift4 = AddSwitchInput("GearShift4", "Shift 4", GAME_INPUT_SHIFT4, "NONE");
|
CSwitchInput *shift4 = AddSwitchInput("GearShift4", "Shift 4", GAME_INPUT_SHIFT4, "NONE");
|
||||||
CSwitchInput *shiftN = AddSwitchInput("GearShiftN", "Shift Neutral",GAME_INPUT_SHIFT4, "NONE");
|
CSwitchInput *shiftN = AddSwitchInput("GearShiftN", "Shift Neutral", GAME_INPUT_SHIFT4, "NONE");
|
||||||
CSwitchInput *shiftUp = AddSwitchInput("GearShiftUp", "Shift Up", GAME_INPUT_SHIFT4, "NONE");
|
|
||||||
CSwitchInput *shiftDown = AddSwitchInput("GearShiftDown", "Shift Down", GAME_INPUT_SHIFT4, "NONE");
|
|
||||||
|
|
||||||
gearShift4 = AddGearShift4Input("GearShift", "Gear Shift", GAME_INPUT_SHIFT4, shift1, shift2, shift3, shift4, shiftN, shiftUp, shiftDown);
|
gearShift4 = AddGearShift4Input("GearShift", "Gear Shift", GAME_INPUT_SHIFT4, shift1, shift2, shift3, shift4, shiftN, gearShiftUp, gearShiftDown);
|
||||||
|
|
||||||
// Racing Game VR View Buttons
|
// Racing Game 4 VR View Buttons
|
||||||
vr[0] = AddSwitchInput("VR1", "VR1", GAME_INPUT_VR, "NONE");
|
vr[0] = AddSwitchInput("VR1", "VR1", GAME_INPUT_VR4, "NONE");
|
||||||
vr[1] = AddSwitchInput("VR2", "VR2", GAME_INPUT_VR, "NONE");
|
vr[1] = AddSwitchInput("VR2", "VR2", GAME_INPUT_VR4, "NONE");
|
||||||
vr[2] = AddSwitchInput("VR3", "VR3", GAME_INPUT_VR, "NONE");
|
vr[2] = AddSwitchInput("VR3", "VR3", GAME_INPUT_VR4, "NONE");
|
||||||
vr[3] = AddSwitchInput("VR4", "VR4", GAME_INPUT_VR, "NONE");
|
vr[3] = AddSwitchInput("VR4", "VR4", GAME_INPUT_VR4, "NONE");
|
||||||
|
|
||||||
// Sega Rally Buttons
|
// Racing Game Single View Change Button
|
||||||
viewChange = AddSwitchInput("ViewChange", "View Change", GAME_INPUT_RALLY, "NONE");
|
viewChange = AddSwitchInput("ViewChange", "View Change", GAME_INPUT_VIEWCHANGE, "NONE");
|
||||||
handBrake = AddSwitchInput("HandBrake", "Hand Brake", GAME_INPUT_RALLY, "NONE");
|
|
||||||
|
// Racing Game Handbrake
|
||||||
|
handBrake = AddSwitchInput("HandBrake", "Hand Brake", GAME_INPUT_HANDBRAKE, "NONE");
|
||||||
|
|
||||||
|
// Harley Davidson Controls
|
||||||
|
rearBrake = AddAnalogInput("RearBrake", "Rear Brake", GAME_INPUT_HARLEY, "NONE");
|
||||||
|
musicSelect = AddSwitchInput("MusicSelect", "Music Selection", GAME_INPUT_HARLEY, "NONE");
|
||||||
|
|
||||||
// Virtual On Controls
|
// Virtual On Controls
|
||||||
twinJoyTurnLeft = AddSwitchInput("TwinJoyTurnLeft", "Macro Turn Left", GAME_INPUT_TWIN_JOYSTICKS, "NONE");
|
twinJoyTurnLeft = AddSwitchInput("TwinJoyTurnLeft", "Macro Turn Left", GAME_INPUT_TWIN_JOYSTICKS, "NONE");
|
||||||
|
@ -161,12 +167,14 @@ CInputs::CInputs(CInputSystem *system) : m_system(system)
|
||||||
CAnalogInput *analogJoyUp = AddAnalogInput("AnalogJoyUp", "Analog Up", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
CAnalogInput *analogJoyUp = AddAnalogInput("AnalogJoyUp", "Analog Up", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
||||||
CAnalogInput *analogJoyDown = AddAnalogInput("AnalogJoyDown", "Analog Down", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
CAnalogInput *analogJoyDown = AddAnalogInput("AnalogJoyDown", "Analog Down", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
||||||
|
|
||||||
analogJoyX = AddAxisInput ("AnalogJoyX", "Analog X-Axis", GAME_INPUT_ANALOG_JOYSTICK, "NONE", analogJoyLeft, analogJoyRight);
|
analogJoyX = AddAxisInput ("AnalogJoyX", "Analog X-Axis", GAME_INPUT_ANALOG_JOYSTICK, "NONE", analogJoyLeft, analogJoyRight);
|
||||||
analogJoyY = AddAxisInput ("AnalogJoyY", "Analog Y-Axis", GAME_INPUT_ANALOG_JOYSTICK, "NONE", analogJoyUp, analogJoyDown);
|
analogJoyY = AddAxisInput ("AnalogJoyY", "Analog Y-Axis", GAME_INPUT_ANALOG_JOYSTICK, "NONE", analogJoyUp, analogJoyDown);
|
||||||
analogJoyTrigger = AddSwitchInput("AnalogJoyTrigger", "Trigger Button", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
analogJoyTrigger1 = AddSwitchInput("AnalogJoyTrigger", "Trigger Button 1", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
||||||
analogJoyEvent = AddSwitchInput("AnalogJoyEvent", "Event Button", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
analogJoyTrigger2 = AddSwitchInput("AnalogJoyTrigger2", "Trigger Button 2", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
||||||
|
analogJoyEvent1 = AddSwitchInput("AnalogJoyEvent", "Event Button 1", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
||||||
|
analogJoyEvent2 = AddSwitchInput("AnalogJoyEvent2", "Event Button 2", GAME_INPUT_ANALOG_JOYSTICK, "NONE");
|
||||||
|
|
||||||
// Lightguns
|
// Light guns
|
||||||
CAnalogInput *gun1Left = AddAnalogInput("GunLeft", "P1 Gun Left", GAME_INPUT_GUN1, "NONE");
|
CAnalogInput *gun1Left = AddAnalogInput("GunLeft", "P1 Gun Left", GAME_INPUT_GUN1, "NONE");
|
||||||
CAnalogInput *gun1Right = AddAnalogInput("GunRight", "P1 Gun Right", GAME_INPUT_GUN1, "NONE");
|
CAnalogInput *gun1Right = AddAnalogInput("GunRight", "P1 Gun Right", GAME_INPUT_GUN1, "NONE");
|
||||||
CAnalogInput *gun1Up = AddAnalogInput("GunUp", "P1 Gun Up", GAME_INPUT_GUN1, "NONE");
|
CAnalogInput *gun1Up = AddAnalogInput("GunUp", "P1 Gun Up", GAME_INPUT_GUN1, "NONE");
|
||||||
|
@ -192,6 +200,43 @@ CInputs::CInputs(CInputSystem *system) : m_system(system)
|
||||||
CSwitchInput *gun2Offscreen = AddSwitchInput("Offscreen2", "P2 Point Off-screen", GAME_INPUT_GUN2, "NONE");
|
CSwitchInput *gun2Offscreen = AddSwitchInput("Offscreen2", "P2 Point Off-screen", GAME_INPUT_GUN2, "NONE");
|
||||||
|
|
||||||
trigger[1] = AddTriggerInput("AutoTrigger2", "P2 Auto Trigger", GAME_INPUT_GUN2, gun2Trigger, gun2Offscreen);
|
trigger[1] = AddTriggerInput("AutoTrigger2", "P2 Auto Trigger", GAME_INPUT_GUN2, gun2Trigger, gun2Offscreen);
|
||||||
|
|
||||||
|
// Analog guns
|
||||||
|
CAnalogInput *analogGun1Left = AddAnalogInput("AnalogGunLeft", "P1 Analog Gun Left", GAME_INPUT_ANALOG_GUN1, "NONE");
|
||||||
|
CAnalogInput *analogGun1Right = AddAnalogInput("AnalogGunRight", "P1 Analog Gun Right", GAME_INPUT_ANALOG_GUN1, "NONE");
|
||||||
|
CAnalogInput *analogGun1Up = AddAnalogInput("AnalogGunUp", "P1 Analog Gun Up", GAME_INPUT_ANALOG_GUN1, "NONE");
|
||||||
|
CAnalogInput *analogGun1Down = AddAnalogInput("AnalogGunDown", "P1 Analog Gun Down", GAME_INPUT_ANALOG_GUN1, "NONE");
|
||||||
|
|
||||||
|
analogGunX[0] = AddAxisInput("AnalogGunX", "P1 Analog Gun X-Axis", GAME_INPUT_ANALOG_GUN1, "NONE", analogGun1Left, analogGun1Right, 0, 0x80, 0xFF);
|
||||||
|
analogGunY[0] = AddAxisInput("AnalogGunY", "P1 Analog Gun Y-Axis", GAME_INPUT_ANALOG_GUN1, "NONE", analogGun1Up, analogGun1Down, 0xFF, 0x80, 0);
|
||||||
|
|
||||||
|
analogTriggerLeft[0] = AddSwitchInput("AnalogTriggerLeft", "P1 Analog Gun Left Trigger", GAME_INPUT_ANALOG_GUN1, "NONE");
|
||||||
|
analogTriggerRight[0] = AddSwitchInput("AnalogTriggerRight", "P1 Analog Gun Right Trigger", GAME_INPUT_ANALOG_GUN1, "NONE");
|
||||||
|
|
||||||
|
CAnalogInput *analogGun2Left = AddAnalogInput("AnalogGunLeft2", "P2 Analog Gun Left", GAME_INPUT_ANALOG_GUN2, "NONE");
|
||||||
|
CAnalogInput *analogGun2Right = AddAnalogInput("AnalogGunRight2", "P2 Analog Gun Right", GAME_INPUT_ANALOG_GUN2, "NONE");
|
||||||
|
CAnalogInput *analogGun2Up = AddAnalogInput("AnalogGunUp2", "P2 Analog Gun Up", GAME_INPUT_ANALOG_GUN2, "NONE");
|
||||||
|
CAnalogInput *analogGun2Down = AddAnalogInput("AnalogGunDown2", "P2 Analog Gun Down", GAME_INPUT_ANALOG_GUN2, "NONE");
|
||||||
|
|
||||||
|
analogGunX[1] = AddAxisInput("AnalogGunX2", "P2 Analog Gun X-Axis", GAME_INPUT_ANALOG_GUN2, "NONE", analogGun2Left, analogGun2Right, 0, 0x80, 0xFF);
|
||||||
|
analogGunY[1] = AddAxisInput("AnalogGunY2", "P2 Analog Gun Y-Axis", GAME_INPUT_ANALOG_GUN2, "NONE", analogGun2Up, analogGun2Down, 0xFF, 0x80, 0);
|
||||||
|
|
||||||
|
analogTriggerLeft[1] = AddSwitchInput("AnalogTriggerLeft2", "P2 Analog Gun Left Trigger", GAME_INPUT_ANALOG_GUN2, "NONE");
|
||||||
|
analogTriggerRight[1] = AddSwitchInput("AnalogTriggerRight2", "P2 Analog Gun Right Trigger", GAME_INPUT_ANALOG_GUN2, "NONE");
|
||||||
|
|
||||||
|
// Ski controls
|
||||||
|
CAnalogInput *skiLeft = AddAnalogInput("SkiLeft", "Ski Champ Left", GAME_INPUT_SKI, "NONE");
|
||||||
|
CAnalogInput *skiRight = AddAnalogInput("SkiRight", "Ski Champ Right", GAME_INPUT_SKI, "NONE");
|
||||||
|
CAnalogInput *skiUp = AddAnalogInput("SkiUp", "Ski Champ Up", GAME_INPUT_SKI, "NONE");
|
||||||
|
CAnalogInput *skiDown = AddAnalogInput("SkiDown", "Ski Champ Down", GAME_INPUT_SKI, "NONE");
|
||||||
|
|
||||||
|
skiX = AddAxisInput ("SkiX", "Ski Champ X-Axis", GAME_INPUT_SKI, "NONE", skiLeft, skiRight, 0xFF, 0x80, 0);
|
||||||
|
skiY = AddAxisInput ("SkiY", "Ski Champ Y-Axis", GAME_INPUT_SKI, "NONE", skiUp, skiDown);
|
||||||
|
skiPollLeft = AddSwitchInput("SkiPollLeft", "Ski Champ Poll Left", GAME_INPUT_SKI, "NONE");
|
||||||
|
skiPollRight = AddSwitchInput("SkiPollRight", "Ski Champ Poll Right", GAME_INPUT_SKI, "NONE");
|
||||||
|
skiSelect1 = AddSwitchInput("SkiSelect1", "Ski Champ Select 1", GAME_INPUT_SKI, "NONE");
|
||||||
|
skiSelect2 = AddSwitchInput("SkiSelect2", "Ski Champ Select 2", GAME_INPUT_SKI, "NONE");
|
||||||
|
skiSelect3 = AddSwitchInput("SkiSelect3", "Ski Champ Select 3", GAME_INPUT_SKI, "NONE");
|
||||||
}
|
}
|
||||||
|
|
||||||
CInputs::~CInputs()
|
CInputs::~CInputs()
|
||||||
|
|
|
@ -148,6 +148,10 @@ public:
|
||||||
// VR view buttons: VR1 Red, VR2 Blue, VR3 Yellow, VR4 Green
|
// VR view buttons: VR1 Red, VR2 Blue, VR3 Yellow, VR4 Green
|
||||||
CSwitchInput *vr[4];
|
CSwitchInput *vr[4];
|
||||||
|
|
||||||
|
// Up/down gear shift
|
||||||
|
CSwitchInput *gearShiftUp;
|
||||||
|
CSwitchInput *gearShiftDown;
|
||||||
|
|
||||||
// 4-speed gear shift
|
// 4-speed gear shift
|
||||||
CGearShift4Input *gearShift4;
|
CGearShift4Input *gearShift4;
|
||||||
|
|
||||||
|
@ -155,6 +159,10 @@ public:
|
||||||
CSwitchInput *viewChange;
|
CSwitchInput *viewChange;
|
||||||
CSwitchInput *handBrake;
|
CSwitchInput *handBrake;
|
||||||
|
|
||||||
|
// Harley Davidson controls
|
||||||
|
CAnalogInput *rearBrake;
|
||||||
|
CSwitchInput *musicSelect;
|
||||||
|
|
||||||
// Twin joysticks (individually mapped version; 1 = left stick, 2 = right stick)
|
// Twin joysticks (individually mapped version; 1 = left stick, 2 = right stick)
|
||||||
CSwitchInput *twinJoyLeft1;
|
CSwitchInput *twinJoyLeft1;
|
||||||
CSwitchInput *twinJoyLeft2;
|
CSwitchInput *twinJoyLeft2;
|
||||||
|
@ -182,14 +190,31 @@ public:
|
||||||
// Analog joystick
|
// Analog joystick
|
||||||
CAxisInput *analogJoyX;
|
CAxisInput *analogJoyX;
|
||||||
CAxisInput *analogJoyY;
|
CAxisInput *analogJoyY;
|
||||||
CSwitchInput *analogJoyTrigger;
|
CSwitchInput *analogJoyTrigger1;
|
||||||
CSwitchInput *analogJoyEvent;
|
CSwitchInput *analogJoyTrigger2;
|
||||||
|
CSwitchInput *analogJoyEvent1;
|
||||||
|
CSwitchInput *analogJoyEvent2;
|
||||||
|
|
||||||
// Gun controls (players 1 and 2)
|
// Light gun controls (players 1 and 2)
|
||||||
CAxisInput *gunX[2];
|
CAxisInput *gunX[2];
|
||||||
CAxisInput *gunY[2];
|
CAxisInput *gunY[2];
|
||||||
CTriggerInput *trigger[2];
|
CTriggerInput *trigger[2];
|
||||||
|
|
||||||
|
// Analog gun controls (players 1 and 2)
|
||||||
|
CAxisInput *analogGunX[2];
|
||||||
|
CAxisInput *analogGunY[2];
|
||||||
|
CSwitchInput *analogTriggerLeft[2];
|
||||||
|
CSwitchInput *analogTriggerRight[2];
|
||||||
|
|
||||||
|
// Ski Champ controls
|
||||||
|
CAxisInput *skiX;
|
||||||
|
CAxisInput *skiY;
|
||||||
|
CSwitchInput *skiPollLeft;
|
||||||
|
CSwitchInput *skiPollRight;
|
||||||
|
CSwitchInput *skiSelect1;
|
||||||
|
CSwitchInput *skiSelect2;
|
||||||
|
CSwitchInput *skiSelect3;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates a set of inputs with the given input system.
|
* Creates a set of inputs with the given input system.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -228,12 +228,29 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
data &= ~(Inputs->test[1]->value<<7); // Test B
|
data &= ~(Inputs->test[1]->value<<7); // Test B
|
||||||
data = (data&0xDF)|(EEPROM.Read()<<5); // bank 1 contains EEPROM data bit
|
data = (data&0xDF)|(EEPROM.Read()<<5); // bank 1 contains EEPROM data bit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_SKI))
|
||||||
|
{
|
||||||
|
if ((inputBank&1) == 0)
|
||||||
|
{
|
||||||
|
data &= ~(Inputs->skiPollLeft->value<<5);
|
||||||
|
data &= ~(Inputs->skiSelect1->value<<6);
|
||||||
|
data &= ~(Inputs->skiSelect2->value<<7);
|
||||||
|
data &= ~(Inputs->skiSelect3->value<<4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
case 0x08: // game-specific inputs
|
case 0x08: // game-specific inputs
|
||||||
|
|
||||||
data = 0xFF;
|
data = 0xFF;
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_SKI))
|
||||||
|
{
|
||||||
|
data &= ~(Inputs->skiPollRight->value<<0);
|
||||||
|
}
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_JOYSTICK1))
|
if ((Game->inputFlags&GAME_INPUT_JOYSTICK1))
|
||||||
{
|
{
|
||||||
data &= ~(Inputs->up[0]->value<<5); // P1 Up
|
data &= ~(Inputs->up[0]->value<<5); // P1 Up
|
||||||
|
@ -265,7 +282,7 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
data &= ~(Inputs->shoot[0]->value<<1); // P1 Shoot
|
data &= ~(Inputs->shoot[0]->value<<1); // P1 Shoot
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_VR))
|
if ((Game->inputFlags&GAME_INPUT_VR4))
|
||||||
{
|
{
|
||||||
data &= ~(Inputs->vr[0]->value<<0); // VR1 Red
|
data &= ~(Inputs->vr[0]->value<<0); // VR1 Red
|
||||||
data &= ~(Inputs->vr[1]->value<<1); // VR2 Blue
|
data &= ~(Inputs->vr[1]->value<<1); // VR2 Blue
|
||||||
|
@ -273,6 +290,15 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
data &= ~(Inputs->vr[3]->value<<3); // VR4 Green
|
data &= ~(Inputs->vr[3]->value<<3); // VR4 Green
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_VIEWCHANGE))
|
||||||
|
{
|
||||||
|
// Harley is wired slightly differently
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_HARLEY))
|
||||||
|
data &= ~(Inputs->viewChange->value<<1); // View change
|
||||||
|
else
|
||||||
|
data &= ~(Inputs->viewChange->value<<0); // View change
|
||||||
|
}
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_SHIFT4))
|
if ((Game->inputFlags&GAME_INPUT_SHIFT4))
|
||||||
{
|
{
|
||||||
if (Inputs->gearShift4->value == 2) // Shift 2
|
if (Inputs->gearShift4->value == 2) // Shift 2
|
||||||
|
@ -285,19 +311,40 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
data &= ~0x10;
|
data &= ~0x10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_RALLY))
|
if ((Game->inputFlags&GAME_INPUT_SHIFTUPDOWN))
|
||||||
{
|
{
|
||||||
data &= ~(Inputs->viewChange->value<<0); // View change
|
// Harley is wired slightly differently
|
||||||
data &= ~(Inputs->handBrake->value<<1); // Hand brake
|
if ((Game->inputFlags&GAME_INPUT_HARLEY))
|
||||||
|
{
|
||||||
|
if (Inputs->gearShiftUp->value) // Shift up
|
||||||
|
data &= ~0x60;
|
||||||
|
else if (Inputs->gearShiftDown->value) // Shift down
|
||||||
|
data &= ~0x50;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Inputs->gearShiftUp->value) // Shift up
|
||||||
|
data &= ~0x50;
|
||||||
|
else if (Inputs->gearShiftDown->value) // Shift down
|
||||||
|
data &= ~0x60;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_HANDBRAKE))
|
||||||
|
data &= ~(Inputs->handBrake->value<<1); // Hand brake
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_HARLEY))
|
||||||
|
data &= ~(Inputs->musicSelect->value<<0); // Music select
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_GUN1))
|
if ((Game->inputFlags&GAME_INPUT_GUN1))
|
||||||
data &= ~(Inputs->trigger[0]->value<<0); // P1 Trigger
|
data &= ~(Inputs->trigger[0]->value<<0); // P1 Trigger
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_ANALOG_JOYSTICK))
|
if ((Game->inputFlags&GAME_INPUT_ANALOG_JOYSTICK))
|
||||||
{
|
{
|
||||||
data &= ~(Inputs->analogJoyTrigger->value<<5); // Trigger
|
data &= ~(Inputs->analogJoyTrigger1->value<<5); // Trigger 1
|
||||||
data &= ~(Inputs->analogJoyEvent->value<<0); // Event Button
|
data &= ~(Inputs->analogJoyTrigger2->value<<4); // Trigger 2
|
||||||
|
data &= ~(Inputs->analogJoyEvent1->value<<0); // Event Button 1
|
||||||
|
data &= ~(Inputs->analogJoyEvent2->value<<1); // Event Button 2
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_TWIN_JOYSTICKS)) // First twin joystick
|
if ((Game->inputFlags&GAME_INPUT_TWIN_JOYSTICKS)) // First twin joystick
|
||||||
|
@ -356,6 +403,12 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
data &= ~0x40;
|
data &= ~0x40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_ANALOG_GUN1))
|
||||||
|
{
|
||||||
|
data &= ~(Inputs->analogTriggerLeft[0]->value<<0);
|
||||||
|
data &= ~(Inputs->analogTriggerRight[0]->value<<1);
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
case 0x0C: // game-specific inputs
|
case 0x0C: // game-specific inputs
|
||||||
|
@ -421,6 +474,12 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
if ((Game->inputFlags&GAME_INPUT_GUN2))
|
if ((Game->inputFlags&GAME_INPUT_GUN2))
|
||||||
data &= ~(Inputs->trigger[1]->value<<0); // P2 Trigger
|
data &= ~(Inputs->trigger[1]->value<<0); // P2 Trigger
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_ANALOG_GUN2))
|
||||||
|
{
|
||||||
|
data &= ~(Inputs->analogTriggerLeft[1]->value<<0);
|
||||||
|
data &= ~(Inputs->analogTriggerRight[1]->value<<1);
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
case 0x2C: // Serial FIFO 1
|
case 0x2C: // Serial FIFO 1
|
||||||
|
@ -441,13 +500,30 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
adc[0] = (UINT8)Inputs->steering->value;
|
adc[0] = (UINT8)Inputs->steering->value;
|
||||||
adc[1] = (UINT8)Inputs->accelerator->value;
|
adc[1] = (UINT8)Inputs->accelerator->value;
|
||||||
adc[2] = (UINT8)Inputs->brake->value;
|
adc[2] = (UINT8)Inputs->brake->value;
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_HARLEY))
|
||||||
|
adc[3] = (UINT8)Inputs->rearBrake->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Game->inputFlags&GAME_INPUT_ANALOG_JOYSTICK))
|
if ((Game->inputFlags&GAME_INPUT_ANALOG_JOYSTICK))
|
||||||
{
|
{
|
||||||
adc[0] = (UINT8)Inputs->analogJoyY->value;
|
adc[0] = (UINT8)Inputs->analogJoyY->value;
|
||||||
adc[1] = (UINT8)Inputs->analogJoyX->value;
|
adc[1] = (UINT8)Inputs->analogJoyX->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_ANALOG_GUN1)||(Game->inputFlags&GAME_INPUT_ANALOG_GUN2))
|
||||||
|
{
|
||||||
|
adc[0] = (UINT8)Inputs->analogGunX[0]->value;
|
||||||
|
adc[2] = (UINT8)Inputs->analogGunY[0]->value;
|
||||||
|
adc[1] = (UINT8)Inputs->analogGunX[1]->value;
|
||||||
|
adc[3] = (UINT8)Inputs->analogGunY[1]->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((Game->inputFlags&GAME_INPUT_SKI))
|
||||||
|
{
|
||||||
|
adc[0] = (UINT8)Inputs->skiY->value;
|
||||||
|
adc[1] = (UINT8)Inputs->skiX->value;
|
||||||
|
}
|
||||||
|
|
||||||
// Read out appropriate channel
|
// Read out appropriate channel
|
||||||
data = adc[adcChannel&7];
|
data = adc[adcChannel&7];
|
||||||
++adcChannel;
|
++adcChannel;
|
||||||
|
@ -1984,7 +2060,7 @@ void CModel3::RunFrame(void)
|
||||||
RunDriveBoardFrame();
|
RunDriveBoardFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
frameTicks = CThread::GetTicks() - start;
|
timings.frameTicks = CThread::GetTicks() - start;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2023,7 +2099,7 @@ void CModel3::RunMainBoardFrame(void)
|
||||||
statusCycles = (unsigned)((float)frameCycles * 9.12f/100.0f);
|
statusCycles = (unsigned)((float)frameCycles * 9.12f/100.0f);
|
||||||
}
|
}
|
||||||
else if (Game->step == 0x15)
|
else if (Game->step == 0x15)
|
||||||
statusCycles = (unsigned)((float)frameCycles * 4.8f/100.0f);
|
statusCycles = (unsigned)((float)frameCycles * 5.5f/100.0f);
|
||||||
else
|
else
|
||||||
statusCycles = (unsigned)((float)frameCycles * 48.0f/100.0f);
|
statusCycles = (unsigned)((float)frameCycles * 48.0f/100.0f);
|
||||||
|
|
||||||
|
@ -2082,17 +2158,17 @@ void CModel3::RunMainBoardFrame(void)
|
||||||
ppc_execute(dispCycles);
|
ppc_execute(dispCycles);
|
||||||
//printf("PC=%08X LR=%08X\n", ppc_get_pc(), ppc_get_lr());
|
//printf("PC=%08X LR=%08X\n", ppc_get_pc(), ppc_get_lr());
|
||||||
|
|
||||||
ppcTicks = CThread::GetTicks() - start;
|
timings.ppcTicks = CThread::GetTicks() - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModel3::SyncGPUs(void)
|
void CModel3::SyncGPUs(void)
|
||||||
{
|
{
|
||||||
UINT32 start = CThread::GetTicks();
|
UINT32 start = CThread::GetTicks();
|
||||||
|
|
||||||
syncSize = GPU.SyncSnapshots() + TileGen.SyncSnapshots();
|
timings.syncSize = GPU.SyncSnapshots() + TileGen.SyncSnapshots();
|
||||||
gpusReady = true;
|
gpusReady = true;
|
||||||
|
|
||||||
syncTicks = CThread::GetTicks() - start;
|
timings.syncTicks = CThread::GetTicks() - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModel3::RenderFrame(void)
|
void CModel3::RenderFrame(void)
|
||||||
|
@ -2112,7 +2188,7 @@ void CModel3::RenderFrame(void)
|
||||||
|
|
||||||
EndFrameVideo();
|
EndFrameVideo();
|
||||||
|
|
||||||
renderTicks = CThread::GetTicks() - start;
|
timings.renderTicks = CThread::GetTicks() - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CModel3::RunSoundBoardFrame(void)
|
bool CModel3::RunSoundBoardFrame(void)
|
||||||
|
@ -2121,7 +2197,7 @@ bool CModel3::RunSoundBoardFrame(void)
|
||||||
|
|
||||||
bool bufferFull = SoundBoard.RunFrame();
|
bool bufferFull = SoundBoard.RunFrame();
|
||||||
|
|
||||||
sndTicks = CThread::GetTicks() - start;
|
timings.sndTicks = CThread::GetTicks() - start;
|
||||||
|
|
||||||
return bufferFull;
|
return bufferFull;
|
||||||
}
|
}
|
||||||
|
@ -2132,7 +2208,7 @@ void CModel3::RunDriveBoardFrame(void)
|
||||||
|
|
||||||
DriveBoard.RunFrame();
|
DriveBoard.RunFrame();
|
||||||
|
|
||||||
drvTicks = CThread::GetTicks() - start;
|
timings.drvTicks = CThread::GetTicks() - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CModel3::StartThreads(void)
|
bool CModel3::StartThreads(void)
|
||||||
|
@ -2386,12 +2462,18 @@ void CModel3::DeleteThreadObjects(void)
|
||||||
void CModel3::DumpTimings(void)
|
void CModel3::DumpTimings(void)
|
||||||
{
|
{
|
||||||
printf("PPC:%3ums%c render:%3ums%c sync:%4uK%c%3ums%c snd:%3ums%c drv:%3ums%c frame:%3ums%c\n",
|
printf("PPC:%3ums%c render:%3ums%c sync:%4uK%c%3ums%c snd:%3ums%c drv:%3ums%c frame:%3ums%c\n",
|
||||||
ppcTicks, (ppcTicks > renderTicks ? '!' : ','),
|
timings.ppcTicks, (timings.ppcTicks > timings.renderTicks ? '!' : ','),
|
||||||
renderTicks, (renderTicks > ppcTicks ? '!' : ','),
|
timings.renderTicks, (timings.renderTicks > timings.ppcTicks ? '!' : ','),
|
||||||
syncSize / 1024, (syncSize / 1024 > 128 ? '!' : ','), syncTicks, (syncTicks > 1 ? '!' : ','),
|
timings.syncSize / 1024, (timings.syncSize / 1024 > 128 ? '!' : ','),
|
||||||
sndTicks, (sndTicks > 10 ? '!' : ','),
|
timings.syncTicks, (timings.syncTicks > 1 ? '!' : ','),
|
||||||
drvTicks, (drvTicks > 10 ? '!' : ','),
|
timings.sndTicks, (timings.sndTicks > 10 ? '!' : ','),
|
||||||
frameTicks, (frameTicks > 16 ? '!' : ' '));
|
timings.drvTicks, (timings.drvTicks > 10 ? '!' : ','),
|
||||||
|
timings.frameTicks, (timings.frameTicks > 16 ? '!' : ' '));
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameTimings CModel3::GetTimings(void)
|
||||||
|
{
|
||||||
|
return timings;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CModel3::StartMainBoardThread(void *data)
|
int CModel3::StartMainBoardThread(void *data)
|
||||||
|
@ -2755,13 +2837,14 @@ void CModel3::Reset(void)
|
||||||
DriveBoard.Reset();
|
DriveBoard.Reset();
|
||||||
|
|
||||||
gpusReady = false;
|
gpusReady = false;
|
||||||
ppcTicks = 0;
|
|
||||||
syncSize = 0;
|
timings.ppcTicks = 0;
|
||||||
syncTicks = 0;
|
timings.syncSize = 0;
|
||||||
renderTicks = 0;
|
timings.syncTicks = 0;
|
||||||
sndTicks = 0;
|
timings.renderTicks = 0;
|
||||||
drvTicks = 0;
|
timings.sndTicks = 0;
|
||||||
frameTicks = 0;
|
timings.drvTicks = 0;
|
||||||
|
timings.frameTicks = 0;
|
||||||
|
|
||||||
DebugLog("Model 3 reset\n");
|
DebugLog("Model 3 reset\n");
|
||||||
}
|
}
|
||||||
|
@ -2782,7 +2865,6 @@ void CModel3::Patch(void)
|
||||||
*(UINT32 *) &crom[0x73EB5C] = 0x60000000;
|
*(UINT32 *) &crom[0x73EB5C] = 0x60000000;
|
||||||
*(UINT32 *) &crom[0x73EDD0] = 0x60000000;
|
*(UINT32 *) &crom[0x73EDD0] = 0x60000000;
|
||||||
*(UINT32 *) &crom[0x73EDC4] = 0x60000000;
|
*(UINT32 *) &crom[0x73EDC4] = 0x60000000;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (!strcmp(Game->id, "lostwsga"))
|
else if (!strcmp(Game->id, "lostwsga"))
|
||||||
{
|
{
|
||||||
|
@ -2852,7 +2934,6 @@ void CModel3::Patch(void)
|
||||||
}
|
}
|
||||||
else if (!strcmp(Game->id, "eca") || !strcmp(Game->id, "ecax"))
|
else if (!strcmp(Game->id, "eca") || !strcmp(Game->id, "ecax"))
|
||||||
{
|
{
|
||||||
|
|
||||||
*(UINT32 *) &crom[0x535580] = 0x60000000;
|
*(UINT32 *) &crom[0x535580] = 0x60000000;
|
||||||
*(UINT32 *) &crom[0x5023B4] = 0x60000000;
|
*(UINT32 *) &crom[0x5023B4] = 0x60000000;
|
||||||
*(UINT32 *) &crom[0x5023D4] = 0x60000000;
|
*(UINT32 *) &crom[0x5023D4] = 0x60000000;
|
||||||
|
|
|
@ -22,13 +22,29 @@
|
||||||
/*
|
/*
|
||||||
* Model3.h
|
* Model3.h
|
||||||
*
|
*
|
||||||
* Header file defining the CModel3, CModel3Config, and CModel3Inputs classes.
|
* Header file defining the CModel3 and CModel3Config classes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef INCLUDED_MODEL3_H
|
#ifndef INCLUDED_MODEL3_H
|
||||||
#define INCLUDED_MODEL3_H
|
#define INCLUDED_MODEL3_H
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* FrameTimings
|
||||||
|
*
|
||||||
|
* Timings within a frame, for debugging purposes
|
||||||
|
*/
|
||||||
|
struct FrameTimings
|
||||||
|
{
|
||||||
|
UINT32 ppcTicks;
|
||||||
|
UINT32 syncSize;
|
||||||
|
UINT32 syncTicks;
|
||||||
|
UINT32 renderTicks;
|
||||||
|
UINT32 sndTicks;
|
||||||
|
UINT32 drvTicks;
|
||||||
|
UINT32 frameTicks;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CModel3Config:
|
* CModel3Config:
|
||||||
*
|
*
|
||||||
|
@ -327,6 +343,13 @@ public:
|
||||||
*/
|
*/
|
||||||
void DumpTimings(void);
|
void DumpTimings(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GetTimings(void):
|
||||||
|
*
|
||||||
|
* Returns timings for the most recent frame, for debugging purposes.
|
||||||
|
*/
|
||||||
|
FrameTimings GetTimings(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CModel3(void):
|
* CModel3(void):
|
||||||
* ~CModel3(void):
|
* ~CModel3(void):
|
||||||
|
@ -444,6 +467,9 @@ private:
|
||||||
CMutex *notifyLock;
|
CMutex *notifyLock;
|
||||||
CCondVar *notifySync;
|
CCondVar *notifySync;
|
||||||
|
|
||||||
|
// Frame timings
|
||||||
|
FrameTimings timings;
|
||||||
|
|
||||||
// Other devices
|
// Other devices
|
||||||
CIRQ IRQ; // Model 3 IRQ controller
|
CIRQ IRQ; // Model 3 IRQ controller
|
||||||
CMPC10x PCIBridge; // MPC10x PCI/bridge/memory controller
|
CMPC10x PCIBridge; // MPC10x PCI/bridge/memory controller
|
||||||
|
@ -456,15 +482,6 @@ private:
|
||||||
CSoundBoard SoundBoard; // Sound board
|
CSoundBoard SoundBoard; // Sound board
|
||||||
CDSB *DSB; // Digital Sound Board (type determined dynamically at load time)
|
CDSB *DSB; // Digital Sound Board (type determined dynamically at load time)
|
||||||
CDriveBoard DriveBoard; // Drive board
|
CDriveBoard DriveBoard; // Drive board
|
||||||
|
|
||||||
// Frame timings
|
|
||||||
UINT32 ppcTicks;
|
|
||||||
UINT32 syncSize;
|
|
||||||
UINT32 syncTicks;
|
|
||||||
UINT32 renderTicks;
|
|
||||||
UINT32 sndTicks;
|
|
||||||
UINT32 drvTicks;
|
|
||||||
UINT32 frameTicks;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -348,11 +348,6 @@ bool CSDLInputSystem::ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeed
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSDLInputSystem::Wait(int ms)
|
|
||||||
{
|
|
||||||
SDL_Delay(ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
int CSDLInputSystem::GetNumKeyboards()
|
int CSDLInputSystem::GetNumKeyboards()
|
||||||
{
|
{
|
||||||
// Return ANY_KEYBOARD as SDL 1.2 cannot handle multiple keyboards
|
// Return ANY_KEYBOARD as SDL 1.2 cannot handle multiple keyboards
|
||||||
|
|
|
@ -110,8 +110,6 @@ protected:
|
||||||
|
|
||||||
bool ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeedbackCmd ffCmd);
|
bool ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeedbackCmd ffCmd);
|
||||||
|
|
||||||
void Wait(int ms);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*
|
/*
|
||||||
* Constructs an SDL input system.
|
* Constructs an SDL input system.
|
||||||
|
|
|
@ -1961,11 +1961,6 @@ bool CDirectInputSystem::ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDirectInputSystem::Wait(int ms)
|
|
||||||
{
|
|
||||||
Sleep(ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CDirectInputSystem::ConfigMouseCentered()
|
bool CDirectInputSystem::ConfigMouseCentered()
|
||||||
{
|
{
|
||||||
// When checking if mouse centered, use system cursor rather than raw values (otherwise user's mouse movements won't match up
|
// When checking if mouse centered, use system cursor rather than raw values (otherwise user's mouse movements won't match up
|
||||||
|
|
|
@ -213,8 +213,6 @@ protected:
|
||||||
|
|
||||||
bool ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeedbackCmd ffCmd);
|
bool ProcessForceFeedbackCmd(int joyNum, int axisNum, ForceFeedbackCmd ffCmd);
|
||||||
|
|
||||||
void Wait(int ms);
|
|
||||||
|
|
||||||
bool ConfigMouseCentered();
|
bool ConfigMouseCentered();
|
||||||
|
|
||||||
CInputSource *CreateAnyMouseSource(EMousePart msePart);
|
CInputSource *CreateAnyMouseSource(EMousePart msePart);
|
||||||
|
|
Loading…
Reference in a new issue