diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.IEmulator.cs index 2844c69f88..eed3a292e2 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/Stella.IEmulator.cs @@ -11,6 +11,8 @@ namespace BizHawk.Emulation.Cores.Atari.Stella private bool _leftDifficultyToggled; private bool _rightDifficultyToggled; + private bool _colorVideoToggled = true; + public bool FrameAdvance(IController controller, bool render, bool renderSound) { byte port1 = _controllerDeck.ReadPort1(controller); @@ -19,12 +21,13 @@ namespace BizHawk.Emulation.Cores.Atari.Stella // Handle all the console switches here if (controller.IsPressed("Toggle Right Difficulty")) _rightDifficultyToggled = !_rightDifficultyToggled; if (controller.IsPressed("Toggle Left Difficulty")) _leftDifficultyToggled = !_leftDifficultyToggled; + if (controller.IsPressed("Toggle TV Type")) _colorVideoToggled = !_colorVideoToggled; // select and reset switches default to an unpressed state - // unknown whether TV color switch matters for TASing, so default to Color for now - byte switchPort = 0b00001011; + byte switchPort = 0b0000_0011; if (_rightDifficultyToggled) switchPort |= 0b10000000; if (_leftDifficultyToggled) switchPort |= 0b01000000; + if (_colorVideoToggled) switchPort |= 0b0000_1000; if (controller.IsPressed("Select")) switchPort &= 0b11111101; // 0 = Pressed if (controller.IsPressed("Reset")) switchPort &= 0b11111110; // 0 = Pressed diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/StellaControllerDeck.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/StellaControllerDeck.cs index 25c6313ec5..944d112d7b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/StellaControllerDeck.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/Stella/StellaControllerDeck.cs @@ -16,11 +16,15 @@ namespace BizHawk.Emulation.Cores.Atari.Stella { BoolButtons = Port1.Definition.BoolButtons .Concat(Port2.Definition.BoolButtons) - .Concat( - [ - "Reset", "Select", "Power", "Toggle Left Difficulty", "Toggle Right Difficulty" + .Concat([ + "Reset", + "Select", + "Power", + "Toggle Left Difficulty", + "Toggle Right Difficulty", + "Toggle TV Type", ]) - .ToList() + .ToList(), }; foreach (var kvp in Port1.Definition.Axes) Definition.Axes.Add(kvp); diff --git a/src/BizHawk.Emulation.Cores/vpads_schemata/A26Schema.cs b/src/BizHawk.Emulation.Cores/vpads_schemata/A26Schema.cs index 40a1b063aa..f99d073540 100644 --- a/src/BizHawk.Emulation.Cores/vpads_schemata/A26Schema.cs +++ b/src/BizHawk.Emulation.Cores/vpads_schemata/A26Schema.cs @@ -201,7 +201,7 @@ namespace BizHawk.Emulation.Cores { return new ConsoleSchema { - Size = new Size(185, 75), + Size = new(185, 90), Buttons = new[] { new ButtonSchema(10, 15, "Select"), @@ -214,8 +214,9 @@ namespace BizHawk.Emulation.Cores new ButtonSchema(92, 40, "Toggle Right Difficulty") { DisplayName = "Right Difficulty" - } - } + }, + new ButtonSchema(10, 65, "Toggle TV Type") { DisplayName = "B&W / Color" }, + }, }; } }