Atari 7800 - make difficulty switches behave like toggles instead of buttons, also add mnemonic info for them, fixes #726
This commit is contained in:
parent
8505cebbf8
commit
75654b9f33
|
@ -104,7 +104,10 @@ namespace BizHawk.Client.Common
|
|||
{ "Triangle", 'T' },
|
||||
{ "Circle", 'O' },
|
||||
{ "Cross", 'X' },
|
||||
{ "Square", 'Q' }
|
||||
{ "Square", 'Q' },
|
||||
|
||||
{ "Left Difficulty", 'l' },
|
||||
{ "Right Difficulty", 'r' }
|
||||
};
|
||||
|
||||
private readonly Dictionary<string, Dictionary<string, char>> SystemOverrides = new Dictionary<string, Dictionary<string, char>>
|
||||
|
|
|
@ -219,16 +219,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
s.RaiseInput(0, MachineInput.Reset, c["Reset"]);
|
||||
s.RaiseInput(0, MachineInput.Select, c["Select"]);
|
||||
s.RaiseInput(0, MachineInput.Color, c["BW"]);
|
||||
s.RaiseInput(0, MachineInput.LeftDifficulty, c["Left Difficulty"]);
|
||||
s.RaiseInput(0, MachineInput.RightDifficulty, c["Right Difficulty"]);
|
||||
if (c["Left Difficulty"]) { s.RaiseInput(0, MachineInput.LeftDifficulty, c["Left Difficulty"]); }
|
||||
if (c["Right Difficulty"]) { s.RaiseInput(0, MachineInput.RightDifficulty, c["Right Difficulty"]); }
|
||||
}
|
||||
static void ConvertConsoleButtons7800(IController c, InputState s)
|
||||
{
|
||||
s.RaiseInput(0, MachineInput.Reset, c["Reset"]);
|
||||
s.RaiseInput(0, MachineInput.Select, c["Select"]);
|
||||
s.RaiseInput(0, MachineInput.Color, c["Pause"]);
|
||||
s.RaiseInput(0, MachineInput.LeftDifficulty, c["Left Difficulty"]);
|
||||
s.RaiseInput(0, MachineInput.RightDifficulty, c["Right Difficulty"]);
|
||||
if (c["Left Difficulty"]) { s.RaiseInput(0, MachineInput.LeftDifficulty, c["Left Difficulty"]); }
|
||||
if (c["Right Difficulty"]) { s.RaiseInput(0, MachineInput.RightDifficulty, c["Right Difficulty"]); }
|
||||
}
|
||||
static void ConvertDirections(IController c, InputState s, int p)
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
|
||||
static void ConvertJoystick(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons(c, s);
|
||||
ConvertDirections(c, s, 0);
|
||||
ConvertDirections(c, s, 1);
|
||||
|
@ -255,7 +255,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
}
|
||||
static void ConvertPaddles(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons(c, s);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
@ -266,7 +266,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
}
|
||||
static void ConvertKeypad(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons(c, s);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
@ -294,7 +294,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
};
|
||||
static void ConvertDriving(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons(c, s);
|
||||
ConvertTrigger(c, s, 0);
|
||||
ConvertTrigger(c, s, 1);
|
||||
|
@ -303,7 +303,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
}
|
||||
static void ConvertBoosterGrip(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons(c, s);
|
||||
ConvertDirections(c, s, 0);
|
||||
ConvertDirections(c, s, 1);
|
||||
|
@ -317,7 +317,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
}
|
||||
static void ConvertProLineJoystick(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons7800(c, s);
|
||||
ConvertDirections(c, s, 0);
|
||||
ConvertDirections(c, s, 1);
|
||||
|
@ -328,7 +328,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
|
|||
}
|
||||
static void ConvertLightgun(IController c, InputState s)
|
||||
{
|
||||
s.ClearAllInput();
|
||||
s.ClearControllerInput();
|
||||
ConvertConsoleButtons7800(c, s);
|
||||
ConvertTrigger(c, s, 0);
|
||||
ConvertTrigger(c, s, 1);
|
||||
|
|
|
@ -227,6 +227,15 @@ namespace EMU7800.Core
|
|||
ClearRightJackInput();
|
||||
}
|
||||
|
||||
// For Bizhawk
|
||||
// Emu7800's client does not call Clear input every frame so console switches behave like switches
|
||||
// Bizhawk needs to call a clear input function every frame, if we put switches in there, they would behave like buttons
|
||||
public void ClearControllerInput()
|
||||
{
|
||||
ClearLeftJackInput();
|
||||
ClearRightJackInput();
|
||||
}
|
||||
|
||||
public void ClearInputByPlayer(int playerNo)
|
||||
{
|
||||
_nextInputState[OhmsIndex + (playerNo & 3)] = 0;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue