mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 05:45:38 +00:00
- Changed save state error messages slightly.
- Wrapped rows that exceed 80 columns in Supermodel.ini. - Added some member and function comments to a few header files. - Changed version string to 0.2a-RC2 in anticipation of sending another release candidate build to testers. - Added GAME_INPUT_RALLY flag to dirtdvlsa, eca, and ecax. - Configuration dialog no longer refers to Sega Rally 2 and Dirt Devils; instead, "Miscellaneous Driving Game Buttons" - More additions to README.txt.
This commit is contained in:
parent
206ef1aca4
commit
46bc52bb12
|
@ -17,12 +17,12 @@
|
||||||
; individual games, place settings under sections with the same name as the
|
; individual games, place settings under sections with the same name as the
|
||||||
; corresponding MAME ROM set, like so:
|
; corresponding MAME ROM set, like so:
|
||||||
;
|
;
|
||||||
; ; Scud Race
|
; ; Scud Race
|
||||||
; [ scud ]
|
; [ scud ]
|
||||||
;
|
;
|
||||||
; SoundVolume = 50
|
; SoundVolume = 50
|
||||||
; MusicVolume = 200
|
; MusicVolume = 200
|
||||||
; ; ... etc. ...
|
; ; ... etc. ...
|
||||||
;
|
;
|
||||||
; Input mappings are an exceptional case: they are only allowed in the global
|
; Input mappings are an exceptional case: they are only allowed in the global
|
||||||
; section. Per-game input mappings are not supported.
|
; section. Per-game input mappings are not supported.
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
[ Global ] ; Input settings can only be read from the global section!
|
[ Global ] ; Input settings can only be read from the global section!
|
||||||
|
|
||||||
; Common
|
; Common
|
||||||
InputStart1 = "KEY_1,JOY1_BUTTON9"
|
InputStart1 = "KEY_1,JOY1_BUTTON9"
|
||||||
|
@ -79,9 +79,9 @@ InputLongPass2 = "JOY2_BUTTON2"
|
||||||
InputShoot2 = "JOY2_BUTTON3"
|
InputShoot2 = "JOY2_BUTTON3"
|
||||||
|
|
||||||
; Steering wheel
|
; Steering wheel
|
||||||
InputSteeringLeft = "KEY_LEFT" ; digital, turn wheel left
|
InputSteeringLeft = "KEY_LEFT" ; digital, turn wheel left
|
||||||
InputSteeringRight = "KEY_RIGHT" ; digital, turn wheel right
|
InputSteeringRight = "KEY_RIGHT" ; digital, turn wheel right
|
||||||
InputSteering = "JOY1_XAXIS" ; analog, full steering range
|
InputSteering = "JOY1_XAXIS" ; analog, full steering range
|
||||||
|
|
||||||
; Pedals
|
; Pedals
|
||||||
InputAccelerator = "KEY_UP,JOY1_UP"
|
InputAccelerator = "KEY_UP,JOY1_UP"
|
||||||
|
@ -93,8 +93,8 @@ 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
|
InputGearShiftUp = "NONE" ; sequential shift up
|
||||||
InputGearShiftDown = "NONE" ; sequential shift down
|
InputGearShiftDown = "NONE" ; sequential shift down
|
||||||
|
|
||||||
; View buttons
|
; View buttons
|
||||||
InputVR1 = "KEY_A,JOY1_BUTTON1"
|
InputVR1 = "KEY_A,JOY1_BUTTON1"
|
||||||
|
@ -102,9 +102,10 @@ 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"
|
||||||
|
|
||||||
; Sega Rally 2 and Dirt Devils
|
; Miscellaneous driving game buttons: Sega Rally 2, Dirt Devils, Emergency Car
|
||||||
|
; Ambulance
|
||||||
InputViewChange = "KEY_A,JOY1_BUTTON1"
|
InputViewChange = "KEY_A,JOY1_BUTTON1"
|
||||||
InputHandBrake = "KEY_S,JOY1_BUTTON2" ; Sega Rally 2 only
|
InputHandBrake = "KEY_S,JOY1_BUTTON2" ; Sega Rally 2 only
|
||||||
|
|
||||||
; Virtual On macros
|
; Virtual On macros
|
||||||
InputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"
|
InputTwinJoyTurnLeft = "KEY_Q,JOY1_RXAXIS_NEG"
|
||||||
|
@ -133,25 +134,25 @@ InputTwinJoyTurbo1 = "KEY_Z,JOY1_BUTTON7"
|
||||||
InputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"
|
InputTwinJoyTurbo2 = "KEY_X,JOY1_BUTTON8"
|
||||||
|
|
||||||
; Analog joystick (e.g. Star Wars Trilogy)
|
; Analog joystick (e.g. 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
|
||||||
InputAnalogJoyDown = "KEY_DOWN" ; digital, move down
|
InputAnalogJoyDown = "KEY_DOWN" ; digital, move down
|
||||||
InputAnalogJoyX = "JOY_XAXIS,MOUSE_XAXIS" ; analog, full X axis
|
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"
|
||||||
|
|
||||||
; Light guns
|
; Light guns
|
||||||
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
|
||||||
InputGunDown = "KEY_DOWN" ; digital, move gun down
|
InputGunDown = "KEY_DOWN" ; digital, move gun down
|
||||||
InputGunX = "MOUSE_XAXIS,JOY1_XAXIS" ; analog, full X axis
|
InputGunX = "MOUSE_XAXIS,JOY1_XAXIS" ; analog, full X axis
|
||||||
InputGunY = "MOUSE_YAXIS,JOY1_YAXIS" ; analog, full Y axis
|
InputGunY = "MOUSE_YAXIS,JOY1_YAXIS" ; analog, full Y axis
|
||||||
InputTrigger = "KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON"
|
InputTrigger = "KEY_A,JOY1_BUTTON1,MOUSE_LEFT_BUTTON"
|
||||||
InputOffscreen = "KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON" ; point gun off screen
|
InputOffscreen = "KEY_S,JOY1_BUTTON2,MOUSE_RIGHT_BUTTON" ; point off-screen
|
||||||
InputAutoTrigger = 0
|
InputAutoTrigger = 0 ; automatic reload when off-screen
|
||||||
InputGunLeft2 = "NONE"
|
InputGunLeft2 = "NONE"
|
||||||
InputGunRight2 = "NONE"
|
InputGunRight2 = "NONE"
|
||||||
InputGunUp2 = "NONE"
|
InputGunUp2 = "NONE"
|
||||||
|
|
1111
Docs/README.txt
1111
Docs/README.txt
File diff suppressed because it is too large
Load diff
|
@ -20,7 +20,7 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
#
|
#
|
||||||
# Makefile.SDL.UNIX-MODERN.GCC
|
# Makefile.SDL.UNIX.GCC
|
||||||
#
|
#
|
||||||
# GNU Makefile for SDL port using GCC on modern Linux (e.g. Fedora 14).
|
# GNU Makefile for SDL port using GCC on modern Linux (e.g. Fedora 14).
|
||||||
# Copy this Makefile to the base directory of the source distribution (one up
|
# Copy this Makefile to the base directory of the source distribution (one up
|
||||||
|
|
|
@ -169,7 +169,7 @@ void M68KLoadState(CBlockFile *StateFile, const char *name)
|
||||||
{
|
{
|
||||||
if (OKAY != StateFile->FindBlock(name))
|
if (OKAY != StateFile->FindBlock(name))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load 68K state. Save state file is corrupted.");
|
ErrorLog("Unable to load 68K state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* M68KGetARegister(int n):
|
* M68KGetARegister(n):
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* n Register number (0-7).
|
* n Register number (0-7).
|
||||||
|
@ -114,7 +114,7 @@ public:
|
||||||
extern UINT32 M68KGetARegister(int n);
|
extern UINT32 M68KGetARegister(int n);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* M68KSetARegister(int n, UINT32 v):
|
* M68KSetARegister(n, v):
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* n Register number (0-7).
|
* n Register number (0-7).
|
||||||
|
@ -123,7 +123,7 @@ extern UINT32 M68KGetARegister(int n);
|
||||||
extern void M68KSetARegister(int n, UINT32 v);
|
extern void M68KSetARegister(int n, UINT32 v);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* M68KGetDRegister(int n):
|
* M68KGetDRegister(n):
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* n Register number (0-7).
|
* n Register number (0-7).
|
||||||
|
@ -134,7 +134,7 @@ extern void M68KSetARegister(int n, UINT32 v);
|
||||||
extern UINT32 M68KGetDRegister(int n);
|
extern UINT32 M68KGetDRegister(int n);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* M68KGetDRegister(int n, UINT32 v):
|
* M68KGetDRegister(n, v):
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* n Register number (0-7).
|
* n Register number (0-7).
|
||||||
|
@ -282,8 +282,29 @@ extern void M68KSetContext(M68KCtx *Src);
|
||||||
|
|
||||||
static int lastCycles = 0;
|
static int lastCycles = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* M68KGetRegister(ctx, reg):
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* ctx Musashi 68K context.
|
||||||
|
* reg Register (use DBG68K_REG_* macros).
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Register value.
|
||||||
|
*/
|
||||||
UINT32 M68KGetRegister(SM68KCtx *ctx, unsigned reg);
|
UINT32 M68KGetRegister(SM68KCtx *ctx, unsigned reg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* M68KSetRegister(ctx, reg, value):
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* ctx Musashi 68K context.
|
||||||
|
* reg Register (use DBG68K_REG_* macros).
|
||||||
|
* value Vale to write.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* True if successful, false if register does not exist.
|
||||||
|
*/
|
||||||
UINT32 M68KSetRegister(SM68KCtx *ctx, unsigned reg, UINT32 val);
|
UINT32 M68KSetRegister(SM68KCtx *ctx, unsigned reg, UINT32 val);
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
|
|
||||||
|
|
|
@ -950,7 +950,7 @@ void ppc_load_state(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("PowerPC"))
|
if (OKAY != SaveState->FindBlock("PowerPC"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load PowerPC state. Save state file is corrupted.");
|
ErrorLog("Unable to load PowerPC state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3943,7 +3943,7 @@ void CZ80::LoadState(CBlockFile *StateFile, const char *name)
|
||||||
{
|
{
|
||||||
if (OKAY != StateFile->FindBlock(name))
|
if (OKAY != StateFile->FindBlock(name))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load Z80 state. Save state file is corrupted.");
|
ErrorLog("Unable to load Z80 state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ public:
|
||||||
* GetPC(void):
|
* GetPC(void):
|
||||||
*
|
*
|
||||||
* Returns the current PC value.
|
* Returns the current PC value.
|
||||||
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* Current value of PC register.
|
* Current value of PC register.
|
||||||
*/
|
*/
|
||||||
|
@ -159,23 +159,42 @@ public:
|
||||||
|
|
||||||
#ifdef SUPERMODEL_DEBUGGER
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
/*
|
/*
|
||||||
* GetReg8(state):
|
* GetReg8(reg8):
|
||||||
*
|
*
|
||||||
* Returns value of given 8-bit register.
|
* Reads an 8-bit register.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* reg8 Register number (use Z80_REG8_* macros).
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Value of given 8-bit register.
|
||||||
*/
|
*/
|
||||||
UINT8 GetReg8(unsigned reg8);
|
UINT8 GetReg8(unsigned reg8);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SetReg8(state):
|
* SetReg8(reg8, value):
|
||||||
*
|
*
|
||||||
* Sets value of given 8-bit register.
|
* Sets value of given 8-bit register.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* reg8 Register number.
|
||||||
|
* value Value to write.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* True if succeeded, false if invalid register.
|
||||||
*/
|
*/
|
||||||
bool SetReg8(unsigned reg8, UINT8 value);
|
bool SetReg8(unsigned reg8, UINT8 value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GetReg16(state):
|
* GetReg16(reg16, value):
|
||||||
*
|
*
|
||||||
* Returns value of given 16-bit register.
|
* Reads a 16-bit register.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* reg16 Register number (use Z80_REG16_* macros).
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Value of given 16-bit register.
|
||||||
*/
|
*/
|
||||||
UINT16 GetReg16(unsigned reg16);
|
UINT16 GetReg16(unsigned reg16);
|
||||||
|
|
||||||
|
@ -183,6 +202,13 @@ public:
|
||||||
* SetReg16(state):
|
* SetReg16(state):
|
||||||
*
|
*
|
||||||
* Sets value of given 16-bit register.
|
* Sets value of given 16-bit register.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* reg16 Register.
|
||||||
|
* value Value to write.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* True if succeeded, false if invalid register.
|
||||||
*/
|
*/
|
||||||
bool SetReg16(unsigned reg16, UINT16 value);
|
bool SetReg16(unsigned reg16, UINT16 value);
|
||||||
#endif // SUPERMODEL_DEBUGGER
|
#endif // SUPERMODEL_DEBUGGER
|
||||||
|
|
|
@ -341,7 +341,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_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -403,7 +403,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_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
@ -472,7 +472,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_COMMON|GAME_INPUT_VEHICLE|GAME_INPUT_SHIFT4|GAME_INPUT_RALLY,
|
||||||
0, // no MPEG board
|
0, // no MPEG board
|
||||||
false, // no drive board
|
false, // no drive board
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ const char* CInput::GetInputGroup()
|
||||||
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 Shift";
|
||||||
case GAME_INPUT_VR: return "Racing Game VR View Buttons";
|
case GAME_INPUT_VR: return "Racing Game VR View Buttons";
|
||||||
case GAME_INPUT_RALLY: return "Sega Rally/Dirt Devils Buttons";
|
case GAME_INPUT_RALLY: return "Miscellaneous Driving Game Buttons";
|
||||||
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
|
||||||
|
|
|
@ -75,7 +75,7 @@ void C53C810::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("53C810"))
|
if (OKAY != SaveState->FindBlock("53C810"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load 53C810 state. Save state file is corrupted.");
|
ErrorLog("Unable to load 53C810 state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ void C93C46::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("93C46"))
|
if (OKAY != SaveState->FindBlock("93C46"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load EEPROM state. File is corrupted.");
|
ErrorLog("Unable to load EEPROM state. File is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ void CDSB1::LoadState(CBlockFile *StateFile)
|
||||||
|
|
||||||
if (OKAY != StateFile->FindBlock("DSB1"))
|
if (OKAY != StateFile->FindBlock("DSB1"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load Digital Sound Board state. Save state file is corrupted.");
|
ErrorLog("Unable to load Digital Sound Board state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ void CDSB2::LoadState(CBlockFile *StateFile)
|
||||||
|
|
||||||
if (OKAY != StateFile->FindBlock("DSB2"))
|
if (OKAY != StateFile->FindBlock("DSB2"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load Digital Sound Board state. Save state file is corrupted.");
|
ErrorLog("Unable to load Digital Sound Board state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
*
|
*
|
||||||
* Implementation of the CDriveBoard class: drive board (force feedback)
|
* Implementation of the CDriveBoard class: drive board (force feedback)
|
||||||
* emulation.
|
* emulation.
|
||||||
|
*
|
||||||
|
* NOTE: Simulation does not yet work. Drive board ROMs are required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
@ -126,7 +128,7 @@ void CDriveBoard::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (SaveState->FindBlock("DriveBoard") != OKAY)
|
if (SaveState->FindBlock("DriveBoard") != OKAY)
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load DriveBoard state. Save state file is corrupted.");
|
ErrorLog("Unable to load DriveBoard state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,49 +55,207 @@ public:
|
||||||
class CDriveBoard : public CBus
|
class CDriveBoard : public CBus
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/*
|
||||||
|
* IsAttached(void):
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* True if the drive board is "attached" and should be emulated,
|
||||||
|
* otherwise false.
|
||||||
|
*/
|
||||||
bool IsAttached(void);
|
bool IsAttached(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IsSimulated(void):
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* True if the drive board is being simulated rather than actually
|
||||||
|
* emulated, otherwise false.
|
||||||
|
*/
|
||||||
bool IsSimulated(void);
|
bool IsSimulated(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GetDIPSwitches(dip1, dip2):
|
||||||
|
*
|
||||||
|
* Reads the two sets of DIP switches on the drive board.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* dip1 Reference of variable to store DIP switch 1 to.
|
||||||
|
* dip2 DIP switch 2.
|
||||||
|
*/
|
||||||
void GetDIPSwitches(UINT8 &dip1, UINT8 &dip2);
|
void GetDIPSwitches(UINT8 &dip1, UINT8 &dip2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SetDIPSwitches(dip1, dip2):
|
||||||
|
*
|
||||||
|
* Sets the DIP switches.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* dip1 DIP switch 1 value.
|
||||||
|
* dip2 DIP switch 2 value.
|
||||||
|
*/
|
||||||
void SetDIPSwitches(UINT8 dip1, UINT8 dip2);
|
void SetDIPSwitches(UINT8 dip1, UINT8 dip2);
|
||||||
|
|
||||||
unsigned GetSteeringStrength();
|
/*
|
||||||
|
* GetSteeringStrength(void):
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Strength of the steering based on drive board DIP switches (1-8).
|
||||||
|
*/
|
||||||
|
unsigned GetSteeringStrength(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SetSteeringStrength(steeringStrength):
|
||||||
|
*
|
||||||
|
* Sets the steering strength (modifies the DIP switch setting).
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* steeringStrength A value ranging from 1 to 8.
|
||||||
|
*/
|
||||||
void SetSteeringStrength(unsigned steeringStrength);
|
void SetSteeringStrength(unsigned steeringStrength);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get7SegDisplays(seg1Digit1, seg1Digit2, seg2Digit1, seg2Digit2):
|
||||||
|
*
|
||||||
|
* Reads the 7-segment displays.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* seg1Digit1 Reference of variable to store digit 1 of the first 7-
|
||||||
|
* segment display to.
|
||||||
|
* seg1Digit2 First display, second digit.
|
||||||
|
* seg2Digit1 Second display, first digit.
|
||||||
|
* seg2Digit2 Second display, second digit.
|
||||||
|
*/
|
||||||
void Get7SegDisplays(UINT8 &seg1Digit, UINT8 &seg1Digit2, UINT8 &seg2Digit1, UINT8 &seg2Digit2);
|
void Get7SegDisplays(UINT8 &seg1Digit, UINT8 &seg1Digit2, UINT8 &seg2Digit1, UINT8 &seg2Digit2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GetZ80(void):
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* The Z80 object.
|
||||||
|
*/
|
||||||
CZ80 *GetZ80(void);
|
CZ80 *GetZ80(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SaveState(SaveState):
|
||||||
|
*
|
||||||
|
* Saves the drive board state.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* SaveState Block file to save state information to.
|
||||||
|
*/
|
||||||
void SaveState(CBlockFile *SaveState);
|
void SaveState(CBlockFile *SaveState);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* LoadState(SaveState):
|
||||||
|
*
|
||||||
|
* Restores the drive board state.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* SaveState Block file to load save state information from.
|
||||||
|
*/
|
||||||
void LoadState(CBlockFile *SaveState);
|
void LoadState(CBlockFile *SaveState);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Init(romPtr):
|
||||||
|
*
|
||||||
|
* Initializes (and "attaches") the drive board. This should be called
|
||||||
|
* before other members.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* romPtr Pointer to the drive board ROM (Z80 program). If this
|
||||||
|
* is NULL, then the drive board will not be emulated.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* FAIL if the drive board could not be initialized (prints own error
|
||||||
|
* message), otherwise OKAY. If the drive board is not attached
|
||||||
|
* because no ROM was passed to it, no error is generated and the
|
||||||
|
* drive board is silently disabled (detached).
|
||||||
|
*/
|
||||||
bool Init(const UINT8 *romPtr);
|
bool Init(const UINT8 *romPtr);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AttachInputs(InputsPtr, gameInputFlags):
|
||||||
|
*
|
||||||
|
* Attaches inputs to the drive board (for access to the steering wheel
|
||||||
|
* position).
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* InputsPtr Pointer to the input object.
|
||||||
|
* gameInputFlags The current game's input flags.
|
||||||
|
*/
|
||||||
void AttachInputs(CInputs *InputsPtr, unsigned gameInputFlags);
|
void AttachInputs(CInputs *InputsPtr, unsigned gameInputFlags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Reset(void):
|
||||||
|
*
|
||||||
|
* Resets the drive board.
|
||||||
|
*/
|
||||||
void Reset(void);
|
void Reset(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read():
|
||||||
|
*
|
||||||
|
* Reads data from the drive board.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Data read.
|
||||||
|
*/
|
||||||
UINT8 Read(void);
|
UINT8 Read(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write(data):
|
||||||
|
*
|
||||||
|
* Writes data to the drive board.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* data Data to send.
|
||||||
|
*/
|
||||||
void Write(UINT8 data);
|
void Write(UINT8 data);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* RunFrame(void):
|
||||||
|
*
|
||||||
|
* Emulates a single frame's worth of time on the drive board.
|
||||||
|
*/
|
||||||
void RunFrame(void);
|
void RunFrame(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CDriveBoard():
|
||||||
|
* ~CDriveBoard():
|
||||||
|
*
|
||||||
|
* Constructor and destructor. Memory is freed by destructor.
|
||||||
|
*/
|
||||||
CDriveBoard();
|
CDriveBoard();
|
||||||
|
|
||||||
~CDriveBoard(void);
|
~CDriveBoard(void);
|
||||||
|
|
||||||
// CBus methods
|
/*
|
||||||
|
* Read8(addr):
|
||||||
|
* IORead8(portNum):
|
||||||
|
*
|
||||||
|
* Methods for reading from Z80's memory and IO space. Required by CBus.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* addr Address in memory (0-0xFFFF).
|
||||||
|
* portNum Port address (0-255).
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* A byte of data from the address or port.
|
||||||
|
*/
|
||||||
UINT8 Read8(UINT32 addr);
|
UINT8 Read8(UINT32 addr);
|
||||||
|
|
||||||
void Write8(UINT32 addr, UINT8 data);
|
|
||||||
|
|
||||||
UINT8 IORead8(UINT32 portNum);
|
UINT8 IORead8(UINT32 portNum);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write8(addr, data):
|
||||||
|
* IORead8(portNum, data):
|
||||||
|
*
|
||||||
|
* Methods for writing to Z80's memory and IO space. Required by CBus.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* addr Address in memory (0-0xFFFF).
|
||||||
|
* portNum Port address (0-255).
|
||||||
|
* data Byte to write.
|
||||||
|
*/
|
||||||
|
void Write8(UINT32 addr, UINT8 data);
|
||||||
void IOWrite8(UINT32 portNum, UINT8 data);
|
void IOWrite8(UINT32 portNum, UINT8 data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -49,7 +49,7 @@ void CIRQ::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("IRQ"))
|
if (OKAY != SaveState->FindBlock("IRQ"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load IRQ controller state. Save state file is corrupted.");
|
ErrorLog("Unable to load IRQ controller state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ void CMPC10x::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("MPC10x"))
|
if (OKAY != SaveState->FindBlock("MPC10x"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load MPC%X state. Save state file is corrupted.", model);
|
ErrorLog("Unable to load MPC%X state. Save state file is corrupt.", model);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1849,7 +1849,7 @@ void CModel3::LoadState(CBlockFile *SaveState)
|
||||||
// Load Model 3 state
|
// Load Model 3 state
|
||||||
if (OKAY != SaveState->FindBlock("Model 3"))
|
if (OKAY != SaveState->FindBlock("Model 3"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load Model 3 core state. Save state file is corrupted.");
|
ErrorLog("Unable to load Model 3 core state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1896,7 +1896,7 @@ void CModel3::LoadNVRAM(CBlockFile *NVRAM)
|
||||||
// Load backup RAM
|
// Load backup RAM
|
||||||
if (OKAY != NVRAM->FindBlock("Backup RAM"))
|
if (OKAY != NVRAM->FindBlock("Backup RAM"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load Model 3 backup RAM. NVRAM file is corrupted.");
|
ErrorLog("Unable to load Model 3 backup RAM. NVRAM file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NVRAM->Read(backupRAM, 0x20000);
|
NVRAM->Read(backupRAM, 0x20000);
|
||||||
|
@ -2640,8 +2640,6 @@ void CModel3::Patch(void)
|
||||||
}
|
}
|
||||||
else if (!strcmp(Game->id, "spikeofe"))
|
else if (!strcmp(Game->id, "spikeofe"))
|
||||||
{
|
{
|
||||||
//*(UINT32 *) &crom[0x600000+0x1240C] = 0x60000000; // illegal ROM
|
|
||||||
|
|
||||||
*(UINT32 *) &crom[0x600000+0x36F2C] = 0x60000000; // decrementer loop (see Spikeout)
|
*(UINT32 *) &crom[0x600000+0x36F2C] = 0x60000000; // decrementer loop (see Spikeout)
|
||||||
}
|
}
|
||||||
else if (!strcmp(Game->id, "skichamp"))
|
else if (!strcmp(Game->id, "skichamp"))
|
||||||
|
|
|
@ -86,7 +86,7 @@ void CReal3D::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("Real3D"))
|
if (OKAY != SaveState->FindBlock("Real3D"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load Real3D GPU state. Save state file is corrupted.");
|
ErrorLog("Unable to load Real3D GPU state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -432,7 +432,7 @@ void CSoundBoard::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("Sound Board"))
|
if (OKAY != SaveState->FindBlock("Sound Board"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load sound board state. Save state file is corrupted.");
|
ErrorLog("Unable to load sound board state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ void CTileGen::LoadState(CBlockFile *SaveState)
|
||||||
{
|
{
|
||||||
if (OKAY != SaveState->FindBlock("Tile Generator"))
|
if (OKAY != SaveState->FindBlock("Tile Generator"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load tile generator state. Save state file is corrupted.");
|
ErrorLog("Unable to load tile generator state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1213,7 +1213,7 @@ static void Help(void)
|
||||||
puts("Video Options:");
|
puts("Video Options:");
|
||||||
puts(" -res=<x>,<y> Resolution");
|
puts(" -res=<x>,<y> Resolution");
|
||||||
puts(" -fullscreen Full screen mode");
|
puts(" -fullscreen Full screen mode");
|
||||||
puts(" -no-throttle Disable 60 Hz frame rate limit");
|
puts(" -no-throttle Disable 60 Hz frame rate lock");
|
||||||
puts(" -show-fps Display frame rate in window title bar");
|
puts(" -show-fps Display frame rate in window title bar");
|
||||||
puts(" -vert-shader=<file> Load 3D vertex shader from external file");
|
puts(" -vert-shader=<file> Load 3D vertex shader from external file");
|
||||||
puts(" -frag-shader=<file> Load 3D fragment shader from external file");
|
puts(" -frag-shader=<file> Load 3D fragment shader from external file");
|
||||||
|
@ -1227,8 +1227,8 @@ static void Help(void)
|
||||||
puts(" -no-dsb Disable Digital Sound Board (MPEG music)");
|
puts(" -no-dsb Disable Digital Sound Board (MPEG music)");
|
||||||
puts("");
|
puts("");
|
||||||
puts("Input Options:");
|
puts("Input Options:");
|
||||||
puts(" -force-feedback Enable force feedback (DirectInput, XInput) [EXPERIMENTAL]");
|
puts(" -force-feedback Enable force feedback (DirectInput, XInput)");
|
||||||
puts(" -config-inputs Configure inputs for keyboards, mice, and joysticks");
|
puts(" -config-inputs Configure keyboards, mice, and game controllers");
|
||||||
#ifdef SUPERMODEL_WIN32
|
#ifdef SUPERMODEL_WIN32
|
||||||
printf(" -input-system=<s> Input system [Default: %s]\n", g_Config.GetInputSystem());
|
printf(" -input-system=<s> Input system [Default: %s]\n", g_Config.GetInputSystem());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2219,7 +2219,7 @@ void SCSP_LoadState(CBlockFile *StateFile)
|
||||||
{
|
{
|
||||||
if (OKAY != StateFile->FindBlock("SCSP x 2"))
|
if (OKAY != StateFile->FindBlock("SCSP x 2"))
|
||||||
{
|
{
|
||||||
ErrorLog("Unable to load SCSP state. Save state file is corrupted.");
|
ErrorLog("Unable to load SCSP state. Save state file is corrupt.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
Program-Wide Definitions
|
Program-Wide Definitions
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#define SUPERMODEL_VERSION "0.2a-WIP" // version string
|
#define SUPERMODEL_VERSION "0.2a-RC2" // version string
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
Loading…
Reference in a new issue