mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-16 17:35:39 +00:00
Getbass related
Game now boots in game Add missing analog input and buttons
This commit is contained in:
parent
97d61a970c
commit
9e8e993026
|
@ -235,3 +235,4 @@ InputFishingStickY = "JOY1_RYAXIS"
|
||||||
InputFishingReel = "KEY_SPACE,JOY1_ZAXIS_POS"
|
InputFishingReel = "KEY_SPACE,JOY1_ZAXIS_POS"
|
||||||
InputFishingCast = "KEY_Z,JOY1_BUTTON1"
|
InputFishingCast = "KEY_Z,JOY1_BUTTON1"
|
||||||
InputFishingSelect = "KEY_X,JOY1_BUTTON2"
|
InputFishingSelect = "KEY_X,JOY1_BUTTON2"
|
||||||
|
InputFishingTension = "KEY_T,JOY1_ZAXIS_NEG"
|
||||||
|
|
|
@ -268,6 +268,7 @@ CInputs::CInputs(CInputSystem *system)
|
||||||
fishingStickY = AddAxisInput( "FishingStickY", "Stick Y-Axis", Game::INPUT_FISHING, "NONE", fishingStickUp, fishingStickDown, 0, 0x80, 0xFF);
|
fishingStickY = AddAxisInput( "FishingStickY", "Stick Y-Axis", Game::INPUT_FISHING, "NONE", fishingStickUp, fishingStickDown, 0, 0x80, 0xFF);
|
||||||
fishingCast = AddSwitchInput( "FishingCast", "Cast", Game::INPUT_FISHING, "NONE");
|
fishingCast = AddSwitchInput( "FishingCast", "Cast", Game::INPUT_FISHING, "NONE");
|
||||||
fishingSelect = AddSwitchInput( "FishingSelect", "Select", Game::INPUT_FISHING, "NONE");
|
fishingSelect = AddSwitchInput( "FishingSelect", "Select", Game::INPUT_FISHING, "NONE");
|
||||||
|
fishingTension = AddAnalogInput("FishingTension", "Tension", Game::INPUT_FISHING, "NONE"); // getbass only
|
||||||
}
|
}
|
||||||
|
|
||||||
CInputs::~CInputs()
|
CInputs::~CInputs()
|
||||||
|
|
|
@ -227,6 +227,7 @@ public:
|
||||||
CAxisInput *fishingStickY;
|
CAxisInput *fishingStickY;
|
||||||
CSwitchInput *fishingCast;
|
CSwitchInput *fishingCast;
|
||||||
CSwitchInput *fishingSelect;
|
CSwitchInput *fishingSelect;
|
||||||
|
CAnalogInput *fishingTension;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates a set of inputs with the given input system.
|
* Creates a set of inputs with the given input system.
|
||||||
|
|
|
@ -435,8 +435,18 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
|
|
||||||
if ((m_game.inputs & Game::INPUT_FISHING))
|
if ((m_game.inputs & Game::INPUT_FISHING))
|
||||||
{
|
{
|
||||||
data &= ~(Inputs->fishingCast->value << 0);
|
if (m_game.name == "getbass")
|
||||||
data &= ~(Inputs->fishingSelect->value << 1);
|
{
|
||||||
|
// get bass fishing
|
||||||
|
data &= ~(!Inputs->fishingCast->value << 4);
|
||||||
|
data &= ~(!Inputs->fishingSelect->value << 5);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// bass fishing
|
||||||
|
data &= ~(Inputs->fishingCast->value << 0);
|
||||||
|
data &= ~(Inputs->fishingSelect->value << 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
|
@ -514,6 +524,10 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
|
case 0x18: // swtrilgy and getbass. Remove IO board error on getbass. Not sure, but may be related to device feedback ?
|
||||||
|
data = 0x01;
|
||||||
|
return data;
|
||||||
|
|
||||||
case 0x2C: // Serial FIFO 1
|
case 0x2C: // Serial FIFO 1
|
||||||
return serialFIFO1;
|
return serialFIFO1;
|
||||||
|
|
||||||
|
@ -584,6 +598,7 @@ UINT8 CModel3::ReadInputs(unsigned reg)
|
||||||
{
|
{
|
||||||
adc[0] = uint8_t(Inputs->fishingRodY->value);
|
adc[0] = uint8_t(Inputs->fishingRodY->value);
|
||||||
adc[1] = uint8_t(Inputs->fishingRodX->value);
|
adc[1] = uint8_t(Inputs->fishingRodX->value);
|
||||||
|
adc[2] = uint8_t(Inputs->fishingTension->value); // get bass fishing only : Tension Sensor ?
|
||||||
adc[3] = uint8_t(Inputs->fishingReel->value);
|
adc[3] = uint8_t(Inputs->fishingReel->value);
|
||||||
adc[5] = uint8_t(Inputs->fishingStickX->value);
|
adc[5] = uint8_t(Inputs->fishingStickX->value);
|
||||||
adc[4] = uint8_t(Inputs->fishingStickY->value);
|
adc[4] = uint8_t(Inputs->fishingStickY->value);
|
||||||
|
|
Loading…
Reference in a new issue