Getbass related

Game now boots in game
Add missing analog input and buttons
This commit is contained in:
SpinDizzy 2020-08-25 08:48:25 +00:00
parent 97d61a970c
commit 9e8e993026
4 changed files with 21 additions and 3 deletions

View file

@ -235,3 +235,4 @@ InputFishingStickY = "JOY1_RYAXIS"
InputFishingReel = "KEY_SPACE,JOY1_ZAXIS_POS"
InputFishingCast = "KEY_Z,JOY1_BUTTON1"
InputFishingSelect = "KEY_X,JOY1_BUTTON2"
InputFishingTension = "KEY_T,JOY1_ZAXIS_NEG"

View file

@ -268,6 +268,7 @@ CInputs::CInputs(CInputSystem *system)
fishingStickY = AddAxisInput( "FishingStickY", "Stick Y-Axis", Game::INPUT_FISHING, "NONE", fishingStickUp, fishingStickDown, 0, 0x80, 0xFF);
fishingCast = AddSwitchInput( "FishingCast", "Cast", Game::INPUT_FISHING, "NONE");
fishingSelect = AddSwitchInput( "FishingSelect", "Select", Game::INPUT_FISHING, "NONE");
fishingTension = AddAnalogInput("FishingTension", "Tension", Game::INPUT_FISHING, "NONE"); // getbass only
}
CInputs::~CInputs()

View file

@ -227,7 +227,8 @@ public:
CAxisInput *fishingStickY;
CSwitchInput *fishingCast;
CSwitchInput *fishingSelect;
CAnalogInput *fishingTension;
/*
* Creates a set of inputs with the given input system.
*/

View file

@ -435,8 +435,18 @@ UINT8 CModel3::ReadInputs(unsigned reg)
if ((m_game.inputs & Game::INPUT_FISHING))
{
data &= ~(Inputs->fishingCast->value << 0);
data &= ~(Inputs->fishingSelect->value << 1);
if (m_game.name == "getbass")
{
// 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;
@ -514,6 +524,10 @@ UINT8 CModel3::ReadInputs(unsigned reg)
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
return serialFIFO1;
@ -584,6 +598,7 @@ UINT8 CModel3::ReadInputs(unsigned reg)
{
adc[0] = uint8_t(Inputs->fishingRodY->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[5] = uint8_t(Inputs->fishingStickX->value);
adc[4] = uint8_t(Inputs->fishingStickY->value);