Hooked up Magical Truck Adventure controls

This commit is contained in:
Bart Trzynadlowski 2016-04-13 03:28:04 +00:00
parent d2563c035f
commit 9a2bb78add
6 changed files with 264 additions and 233 deletions

View file

@ -1059,7 +1059,7 @@ const struct GameInfo g_Model3GameList[] =
true, // 16 MB of banked CROM (Mirror)
0x4000000, // 64 MB of VROM
0x1000000, // 16 MB of sample ROMs
GAME_INPUT_COMMON|GAME_INPUT_VEHICLE,
GAME_INPUT_COMMON|GAME_INPUT_MAGTRUCK,
0, // no MPEG board
false, // no drive board
0x29266e45, // securiry board encryption key

View file

@ -37,27 +37,28 @@
******************************************************************************/
// Input flags
#define GAME_INPUT_COMMON 0x00001 // game has common controls
#define GAME_INPUT_VEHICLE 0x00002 // game has vehicle controls
#define GAME_INPUT_JOYSTICK1 0x00004 // game has joystick 1
#define GAME_INPUT_JOYSTICK2 0x00008 // game has joystick 2
#define GAME_INPUT_FIGHTING 0x00010 // game has fighting game controls
#define GAME_INPUT_VR4 0x00020 // game has four VR view buttons
#define GAME_INPUT_VIEWCHANGE 0x00040 // game has single view change button
#define GAME_INPUT_SHIFT4 0x00080 // game has 4-speed shifter
#define GAME_INPUT_SHIFTUPDOWN 0x00100 // game has up/down shifter
#define GAME_INPUT_HANDBRAKE 0x00200 // game has handbrake
#define GAME_INPUT_HARLEY 0x00400 // game has Harley Davidson controls
#define GAME_INPUT_GUN1 0x00800 // game has light gun 1
#define GAME_INPUT_GUN2 0x01000 // game has light gun 2
#define GAME_INPUT_ANALOG_JOYSTICK 0x02000 // game has analog joystick
#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
#define GAME_INPUT_COMMON 0x000000001 // game has common controls
#define GAME_INPUT_VEHICLE 0x000000002 // game has vehicle controls
#define GAME_INPUT_JOYSTICK1 0x000000004 // game has joystick 1
#define GAME_INPUT_JOYSTICK2 0x000000008 // game has joystick 2
#define GAME_INPUT_FIGHTING 0x000000010 // game has fighting game controls
#define GAME_INPUT_VR4 0x000000020 // game has four VR view buttons
#define GAME_INPUT_VIEWCHANGE 0x000000040 // game has single view change button
#define GAME_INPUT_SHIFT4 0x000000080 // game has 4-speed shifter
#define GAME_INPUT_SHIFTUPDOWN 0x000000100 // game has up/down shifter
#define GAME_INPUT_HANDBRAKE 0x000000200 // game has handbrake
#define GAME_INPUT_HARLEY 0x000000400 // game has Harley Davidson controls
#define GAME_INPUT_GUN1 0x000000800 // game has light gun 1
#define GAME_INPUT_GUN2 0x000001000 // game has light gun 2
#define GAME_INPUT_ANALOG_JOYSTICK 0x000002000 // game has analog joystick
#define GAME_INPUT_TWIN_JOYSTICKS 0x000004000 // game has twin joysticks
#define GAME_INPUT_SOCCER 0x000008000 // game has soccer controls
#define GAME_INPUT_SPIKEOUT 0x000010000 // game has Spikeout buttons
#define GAME_INPUT_ANALOG_GUN1 0x000020000 // game has analog gun 1
#define GAME_INPUT_ANALOG_GUN2 0x000040000 // game has analog gun 2
#define GAME_INPUT_SKI 0x000080000 // game has ski controls
#define GAME_INPUT_MAGTRUCK 0x000100000 // game has magical truck controls
#define GAME_INPUT_ALL 0x0001FFFFF
/******************************************************************************
@ -78,11 +79,11 @@ struct GameInfo
const char *mfgName; // name of manufacturer
unsigned year; // year released (in decimal)
int step; // Model 3 hardware stepping: 0x10 = 1.0, 0x15 = 1.5, 0x20 = 2.0, 0x21 = 2.1
unsigned cromSize; // size of fixed CROM (up to 8 MB)
uint32_t cromSize; // size of fixed CROM (up to 8 MB)
bool mirrorLow64MB; // mirror low 64 MB of banked CROM space to upper 64 MB
unsigned vromSize; // size of video ROMs (32 or 64 MB; if 32 MB, will have to be mirrored)
unsigned sampleSize; // size of sample ROMS (8 or 16 MB; if 8 MB, will have to be mirrored)
unsigned inputFlags; // game input types
uint32_t vromSize; // size of video ROMs (32 or 64 MB; if 32 MB, will have to be mirrored)
uint32_t sampleSize; // size of sample ROMS (8 or 16 MB; if 8 MB, will have to be mirrored)
uint32_t inputFlags; // game input types
int mpegBoard; // MPEG music board type: 0 = none, 1 = DSB1 (Z80), 2 = DSB2 (68K).
bool driveBoard; // drive board (supported if true)
uint32_t encryptionKey; // security board encryption device key (or 0 if not applicable)

View file

@ -104,6 +104,7 @@ const char* CInput::GetInputGroup()
case GAME_INPUT_ANALOG_GUN1: // Fall through to below
case GAME_INPUT_ANALOG_GUN2: return "Analog Guns";
case GAME_INPUT_SKI: return "Ski Controls";
case GAME_INPUT_MAGTRUCK: return "Magical Truck Controls";
default: return "Misc";
}
}

View file

@ -237,6 +237,17 @@ CInputs::CInputs(CInputSystem *system) : m_system(system)
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");
// Magical truck controls
CAnalogInput *magicalLeverUp1 = AddAnalogInput("MagicalLeverUp1", "P1 Magical Lever Up", GAME_INPUT_MAGTRUCK, "NONE");
CAnalogInput *magicalLeverDown1 = AddAnalogInput("MagicalLeverDown1", "P1 Magical Lever Down", GAME_INPUT_MAGTRUCK, "NONE");
CAnalogInput *magicalLeverUp2 = AddAnalogInput("MagicalLeverUp2", "P2 Magical Lever Up", GAME_INPUT_MAGTRUCK, "NONE");
CAnalogInput *magicalLeverDown2 = AddAnalogInput("MagicalLeverDown2", "P2 Magical Lever Down", GAME_INPUT_MAGTRUCK, "NONE");
magicalLever1 = AddAxisInput( "MagicalLever1", "P1 Magical Lever Full Analog", GAME_INPUT_MAGTRUCK, "NONE", magicalLeverUp1, magicalLeverDown1, 0xFF, 0x80, 0);
magicalLever2 = AddAxisInput( "MagicalLever2", "P2 Magical Lever Full Analog", GAME_INPUT_MAGTRUCK, "NONE", magicalLeverUp2, magicalLeverDown2, 0xFF, 0x80, 0);
magicalPedal1 = AddSwitchInput( "MagicalPedal1", "P1 Magical Pedal", GAME_INPUT_MAGTRUCK, "NONE");
magicalPedal2 = AddSwitchInput( "MagicalPedal2", "P2 Magical Pedal", GAME_INPUT_MAGTRUCK, "NONE");
}
CInputs::~CInputs()

View file

@ -49,249 +49,255 @@ struct GameInfo;
class CInputs
{
private:
// Assigned input system
CInputSystem *m_system;
// Assigned input system
CInputSystem *m_system;
// Vector of all created inputs
vector<CInput*> m_inputs;
// Vector of all created inputs
vector<CInput*> m_inputs;
/*
* Adds a switch input (eg button) to this collection.
*/
CSwitchInput *AddSwitchInput(const char *id, const char *label, unsigned gameFlags, const char *defaultMapping,
UINT16 offVal = 0x00, UINT16 onVal = 0x01);
/*
* Adds a switch input (eg button) to this collection.
*/
CSwitchInput *AddSwitchInput(const char *id, const char *label, unsigned gameFlags, const char *defaultMapping,
UINT16 offVal = 0x00, UINT16 onVal = 0x01);
/*
* Adds an analog input (eg pedal) to this collection.
*/
CAnalogInput *AddAnalogInput(const char *id, const char *label, unsigned gameFlags, const char *defaultMapping,
UINT16 minVal = 0x00, UINT16 maxVal = 0xFF);
/*
* Adds an analog input (eg pedal) to this collection.
*/
CAnalogInput *AddAnalogInput(const char *id, const char *label, unsigned gameFlags, const char *defaultMapping,
UINT16 minVal = 0x00, UINT16 maxVal = 0xFF);
/*
* Adds an axis input (eg jostick axis, light gun axis or steering wheel) to this collection.
*/
CAxisInput *AddAxisInput(const char *id, const char *label, unsigned gameFlags, const char *defaultMapping,
CAnalogInput *axisNeg, CAnalogInput *axisPos, UINT16 minVal = 0x00, UINT16 offVal = 0x80, UINT16 maxVal = 0xFF);
/*
* Adds an axis input (eg jostick axis, light gun axis or steering wheel) to this collection.
*/
CAxisInput *AddAxisInput(const char *id, const char *label, unsigned gameFlags, const char *defaultMapping,
CAnalogInput *axisNeg, CAnalogInput *axisPos, UINT16 minVal = 0x00, UINT16 offVal = 0x80, UINT16 maxVal = 0xFF);
/*
* Adds a 4-gear shifter input to this collection.
*/
CGearShift4Input *AddGearShift4Input(const char *id, const char *label, unsigned gameFlags,
CSwitchInput *shift1, CSwitchInput *shift2, CSwitchInput *shift3, CSwitchInput *shift4, CSwitchInput *shiftN, CSwitchInput *shiftUp, CSwitchInput *shiftDown);
/*
* Adds a 4-gear shifter input to this collection.
*/
CGearShift4Input *AddGearShift4Input(const char *id, const char *label, unsigned gameFlags,
CSwitchInput *shift1, CSwitchInput *shift2, CSwitchInput *shift3, CSwitchInput *shift4, CSwitchInput *shiftN, CSwitchInput *shiftUp, CSwitchInput *shiftDown);
/*
* Adds a lightgun trigger input to this collection.
*/
CTriggerInput *AddTriggerInput(const char *id, const char *label, unsigned gameFlags,
CSwitchInput *trigger, CSwitchInput *offscreen, UINT16 offVal = 0x00, UINT16 onVal = 0x01);
/*
* Adds a lightgun trigger input to this collection.
*/
CTriggerInput *AddTriggerInput(const char *id, const char *label, unsigned gameFlags,
CSwitchInput *trigger, CSwitchInput *offscreen, UINT16 offVal = 0x00, UINT16 onVal = 0x01);
void PrintHeader(const char *fmt, ...);
void PrintHeader(const char *fmt, ...);
void PrintConfigureInputsHelp();
void PrintConfigureInputsHelp();
public:
// UI controls
CSwitchInput *uiExit;
CSwitchInput *uiReset;
CSwitchInput *uiPause;
CSwitchInput *uiFullScreen;
CSwitchInput *uiSaveState;
CSwitchInput *uiChangeSlot;
CSwitchInput *uiLoadState;
CSwitchInput *uiMusicVolUp;
CSwitchInput *uiMusicVolDown;
CSwitchInput *uiSoundVolUp;
CSwitchInput *uiSoundVolDown;
CSwitchInput *uiClearNVRAM;
CSwitchInput *uiSelectCrosshairs;
CSwitchInput *uiToggleFrLimit;
CSwitchInput *uiDumpInpState;
CSwitchInput *uiDumpTimings;
// UI controls
CSwitchInput *uiExit;
CSwitchInput *uiReset;
CSwitchInput *uiPause;
CSwitchInput *uiFullScreen;
CSwitchInput *uiSaveState;
CSwitchInput *uiChangeSlot;
CSwitchInput *uiLoadState;
CSwitchInput *uiMusicVolUp;
CSwitchInput *uiMusicVolDown;
CSwitchInput *uiSoundVolUp;
CSwitchInput *uiSoundVolDown;
CSwitchInput *uiClearNVRAM;
CSwitchInput *uiSelectCrosshairs;
CSwitchInput *uiToggleFrLimit;
CSwitchInput *uiDumpInpState;
CSwitchInput *uiDumpTimings;
#ifdef SUPERMODEL_DEBUGGER
CSwitchInput *uiEnterDebugger;
CSwitchInput *uiEnterDebugger;
#endif
// Common controls between all games
CSwitchInput *coin[2];
CSwitchInput *start[2];
CSwitchInput *test[2];
CSwitchInput *service[2];
// Common controls between all games
CSwitchInput *coin[2];
CSwitchInput *start[2];
CSwitchInput *test[2];
CSwitchInput *service[2];
// Joysticks (players 1 and 2)
CSwitchInput *up[2];
CSwitchInput *down[2];
CSwitchInput *left[2];
CSwitchInput *right[2];
// Joysticks (players 1 and 2)
CSwitchInput *up[2];
CSwitchInput *down[2];
CSwitchInput *left[2];
CSwitchInput *right[2];
// Fighting game controls (players 1 and 2)
CSwitchInput *punch[2];
CSwitchInput *kick[2];
CSwitchInput *guard[2];
CSwitchInput *escape[2];
// Spikeout controls
CSwitchInput *shift;
CSwitchInput *beat;
CSwitchInput *charge;
CSwitchInput *jump;
// Fighting game controls (players 1 and 2)
CSwitchInput *punch[2];
CSwitchInput *kick[2];
CSwitchInput *guard[2];
CSwitchInput *escape[2];
// Spikeout controls
CSwitchInput *shift;
CSwitchInput *beat;
CSwitchInput *charge;
CSwitchInput *jump;
// Soccer game controls (players 1 and 2)
CSwitchInput *shortPass[2];
CSwitchInput *longPass[2];
CSwitchInput *shoot[2];
// Soccer game controls (players 1 and 2)
CSwitchInput *shortPass[2];
CSwitchInput *longPass[2];
CSwitchInput *shoot[2];
// Vehicle controls
CAxisInput *steering;
CAnalogInput *accelerator;
CAnalogInput *brake;
// Vehicle controls
CAxisInput *steering;
CAnalogInput *accelerator;
CAnalogInput *brake;
// VR view buttons: VR1 Red, VR2 Blue, VR3 Yellow, VR4 Green
CSwitchInput *vr[4];
// VR view buttons: VR1 Red, VR2 Blue, VR3 Yellow, VR4 Green
CSwitchInput *vr[4];
// Up/down gear shift
CSwitchInput *gearShiftUp;
CSwitchInput *gearShiftDown;
// 4-speed gear shift
CGearShift4Input *gearShift4;
// Up/down gear shift
CSwitchInput *gearShiftUp;
CSwitchInput *gearShiftDown;
// 4-speed gear shift
CGearShift4Input *gearShift4;
// Rally controls
CSwitchInput *viewChange;
CSwitchInput *handBrake;
// Rally controls
CSwitchInput *viewChange;
CSwitchInput *handBrake;
// Harley Davidson controls
CAnalogInput *rearBrake;
CSwitchInput *musicSelect;
// Harley Davidson controls
CAnalogInput *rearBrake;
CSwitchInput *musicSelect;
// Twin joysticks (individually mapped version; 1 = left stick, 2 = right stick)
CSwitchInput *twinJoyLeft1;
CSwitchInput *twinJoyLeft2;
CSwitchInput *twinJoyRight1;
CSwitchInput *twinJoyRight2;
CSwitchInput *twinJoyUp1;
CSwitchInput *twinJoyUp2;
CSwitchInput *twinJoyDown1;
CSwitchInput *twinJoyDown2;
CSwitchInput *twinJoyShot1;
CSwitchInput *twinJoyShot2;
CSwitchInput *twinJoyTurbo1;
CSwitchInput *twinJoyTurbo2;
// Twin joysticks (macro mapping, for users w/out dual joysticks)
CSwitchInput *twinJoyTurnLeft;
CSwitchInput *twinJoyTurnRight;
CSwitchInput *twinJoyStrafeLeft;
CSwitchInput *twinJoyStrafeRight;
CSwitchInput *twinJoyForward;
CSwitchInput *twinJoyReverse;
CSwitchInput *twinJoyJump;
CSwitchInput *twinJoyCrouch;
// Analog joystick
CAxisInput *analogJoyX;
CAxisInput *analogJoyY;
CSwitchInput *analogJoyTrigger1;
CSwitchInput *analogJoyTrigger2;
CSwitchInput *analogJoyEvent1;
CSwitchInput *analogJoyEvent2;
// Twin joysticks (individually mapped version; 1 = left stick, 2 = right stick)
CSwitchInput *twinJoyLeft1;
CSwitchInput *twinJoyLeft2;
CSwitchInput *twinJoyRight1;
CSwitchInput *twinJoyRight2;
CSwitchInput *twinJoyUp1;
CSwitchInput *twinJoyUp2;
CSwitchInput *twinJoyDown1;
CSwitchInput *twinJoyDown2;
CSwitchInput *twinJoyShot1;
CSwitchInput *twinJoyShot2;
CSwitchInput *twinJoyTurbo1;
CSwitchInput *twinJoyTurbo2;
// Twin joysticks (macro mapping, for users w/out dual joysticks)
CSwitchInput *twinJoyTurnLeft;
CSwitchInput *twinJoyTurnRight;
CSwitchInput *twinJoyStrafeLeft;
CSwitchInput *twinJoyStrafeRight;
CSwitchInput *twinJoyForward;
CSwitchInput *twinJoyReverse;
CSwitchInput *twinJoyJump;
CSwitchInput *twinJoyCrouch;
// Analog joystick
CAxisInput *analogJoyX;
CAxisInput *analogJoyY;
CSwitchInput *analogJoyTrigger1;
CSwitchInput *analogJoyTrigger2;
CSwitchInput *analogJoyEvent1;
CSwitchInput *analogJoyEvent2;
// Light gun controls (players 1 and 2)
CAxisInput *gunX[2];
CAxisInput *gunY[2];
CTriggerInput *trigger[2];
// Analog gun controls (players 1 and 2)
CAxisInput *analogGunX[2];
CAxisInput *analogGunY[2];
CSwitchInput *analogTriggerLeft[2];
CSwitchInput *analogTriggerRight[2];
// Light gun controls (players 1 and 2)
CAxisInput *gunX[2];
CAxisInput *gunY[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.
*/
CInputs(CInputSystem *system);
/*
* CInputs destructor.
*/
~CInputs();
// Ski Champ controls
CAxisInput *skiX;
CAxisInput *skiY;
CSwitchInput *skiPollLeft;
CSwitchInput *skiPollRight;
CSwitchInput *skiSelect1;
CSwitchInput *skiSelect2;
CSwitchInput *skiSelect3;
/*
* Returns the number of available inputs.
*/
unsigned Count();
// Magical Truck Adventure controls
CAxisInput *magicalLever1;
CAxisInput *magicalLever2;
CSwitchInput *magicalPedal1;
CSwitchInput *magicalPedal2;
/*
* Creates a set of inputs with the given input system.
*/
CInputs(CInputSystem *system);
/*
* CInputs destructor.
*/
~CInputs();
/*
* Returns the input with the given index.
*/
CInput *operator[](const unsigned index);
/*
* Returns the number of available inputs.
*/
unsigned Count();
/*
* Returns the input with the given id or label.
*/
CInput *operator[](const char *idOrLabel);
/*
* Returns the input with the given index.
*/
CInput *operator[](const unsigned index);
/*
* Returns the assigned input system.
*/
CInputSystem *GetInputSystem();
/*
* Returns the input with the given id or label.
*/
CInput *operator[](const char *idOrLabel);
/*
* Initializes the inputs. Must be called before any other methods are used.
*/
bool Initialize();
/*
* Returns the assigned input system.
*/
CInputSystem *GetInputSystem();
/*
* Reads the input mapping assignments from the given INI file.
*/
void ReadFromINIFile(CINIFile *ini, const char *section);
/*
* Initializes the inputs. Must be called before any other methods are used.
*/
bool Initialize();
/*
* Writes the current input mapping assignments to the given INI file.
*/
void WriteToINIFile(CINIFile *ini, const char *section);
/*
* Reads the input mapping assignments from the given INI file.
*/
void ReadFromINIFile(CINIFile *ini, const char *section);
/*
* Configures the current input mapping assignments for the given game, or all inputs if game is NULL, by asking the user for input.
* Returns true if the inputs were configured okay or false if the user exited without requesting to save changes.
*/
bool ConfigureInputs(const GameInfo *game);
/*
* Configures the current input mapping assignments for the given game, or all inputs if game is NULL, by asking the user for input.
* Takes display geometry if this has not been set previously by a call to Poll().
* Returns true if the inputs were configured okay or false if the user exited without requesting to save changes.
*/
bool ConfigureInputs(const GameInfo *game, unsigned dispX, unsigned dispY, unsigned dispW, unsigned dispH);
/*
* Writes the current input mapping assignments to the given INI file.
*/
void WriteToINIFile(CINIFile *ini, const char *section);
void CalibrateJoysticks();
/*
* Configures the current input mapping assignments for the given game, or all inputs if game is NULL, by asking the user for input.
* Returns true if the inputs were configured okay or false if the user exited without requesting to save changes.
*/
bool ConfigureInputs(const GameInfo *game);
/*
* Configures the current input mapping assignments for the given game, or all inputs if game is NULL, by asking the user for input.
* Takes display geometry if this has not been set previously by a call to Poll().
* Returns true if the inputs were configured okay or false if the user exited without requesting to save changes.
*/
bool ConfigureInputs(const GameInfo *game, unsigned dispX, unsigned dispY, unsigned dispW, unsigned dispH);
void CalibrateJoystick(int joyNum);
void CalibrateJoysticks();
/*
* Prints to stdout the current input mapping assignments for the given game, or all inputs if game is NULL.
*/
void PrintInputs(const GameInfo *game);
void CalibrateJoystick(int joyNum);
/*
* Polls (updates) the inputs for the given game, or all inputs if game is NULL, updating their values from their respective input sources.
* First the input system is polled (CInputSystem.Poll()) and then each input is polled (CInput.Poll()).
*/
bool Poll(const GameInfo *game, unsigned dispX, unsigned dispY, unsigned dispW, unsigned dispH);
/*
* Prints to stdout the current input mapping assignments for the given game, or all inputs if game is NULL.
*/
void PrintInputs(const GameInfo *game);
/*
* Prints the current values of the inputs for the given game, or all inputs if game is NULL, to stdout for debugging purposes.
*/
void DumpState(const GameInfo *game);
/*
* Polls (updates) the inputs for the given game, or all inputs if game is NULL, updating their values from their respective input sources.
* First the input system is polled (CInputSystem.Poll()) and then each input is polled (CInput.Poll()).
*/
bool Poll(const GameInfo *game, unsigned dispX, unsigned dispY, unsigned dispW, unsigned dispH);
/*
* Prints the current values of the inputs for the given game, or all inputs if game is NULL, to stdout for debugging purposes.
*/
void DumpState(const GameInfo *game);
};
#endif // INCLUDED_INPUTS_H
#endif // INCLUDED_INPUTS_H

View file

@ -424,6 +424,9 @@ UINT8 CModel3::ReadInputs(unsigned reg)
data &= ~(Inputs->analogTriggerRight[0]->value<<1);
}
if ((Game->inputFlags & GAME_INPUT_MAGTRUCK))
data &= ~(Inputs->magicalPedal1->value << 0);
return data;
case 0x0C: // game-specific inputs
@ -494,6 +497,9 @@ UINT8 CModel3::ReadInputs(unsigned reg)
data &= ~(Inputs->analogTriggerLeft[1]->value<<0);
data &= ~(Inputs->analogTriggerRight[1]->value<<1);
}
if ((Game->inputFlags & GAME_INPUT_MAGTRUCK))
data &= ~(Inputs->magicalPedal2->value << 0);
return data;
@ -538,6 +544,12 @@ UINT8 CModel3::ReadInputs(unsigned reg)
adc[0] = (UINT8)Inputs->skiY->value;
adc[1] = (UINT8)Inputs->skiX->value;
}
if ((Game->inputFlags & GAME_INPUT_MAGTRUCK))
{
adc[0] = uint8_t(Inputs->magicalLever1->value);
adc[1] = uint8_t(Inputs->magicalLever2->value);
}
// Read out appropriate channel
data = adc[adcChannel&7];