Coleco/Intellivision - Replace patterns like "Key0" with "Key 0" in button names for consistency and remove a hack in bk2 code that accounts for it
This commit is contained in:
parent
ee6d73aac7
commit
01ba63dd09
|
@ -10,6 +10,8 @@ namespace BizHawk.Client.Common
|
|||
public class Bk2ControllerAdapter : IMovieController
|
||||
{
|
||||
private readonly string _logKey = string.Empty;
|
||||
private readonly WorkingDictionary<string, bool> MyBoolButtons = new WorkingDictionary<string, bool>();
|
||||
private readonly WorkingDictionary<string, float> MyFloatControls = new WorkingDictionary<string, float>();
|
||||
|
||||
public Bk2ControllerAdapter()
|
||||
{
|
||||
|
@ -172,10 +174,5 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private readonly WorkingDictionary<string, bool> MyBoolButtons = new WorkingDictionary<string, bool>();
|
||||
private readonly WorkingDictionary<string, float> MyFloatControls = new WorkingDictionary<string, float>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ namespace BizHawk.Client.Common
|
|||
.Replace("P2 ", "")
|
||||
.Replace("P3 ", "")
|
||||
.Replace("P4 ", "")
|
||||
.Replace("Key", "")
|
||||
.Replace("Key ", "");
|
||||
|
||||
if (SystemOverrides.ContainsKey(Global.Emulator.SystemId) && SystemOverrides[Global.Emulator.SystemId].ContainsKey(key))
|
||||
|
|
|
@ -69,21 +69,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key1",
|
||||
Name = "P" + controller + " Key 1",
|
||||
DisplayName = "1",
|
||||
Location = new Point(27, 85),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key2",
|
||||
Name = "P" + controller + " Key 2",
|
||||
DisplayName = "2",
|
||||
Location = new Point(50, 85),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key3",
|
||||
Name = "P" + controller + " Key 3",
|
||||
DisplayName = "3",
|
||||
Location = new Point(73, 85),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
|
@ -91,21 +91,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key4",
|
||||
Name = "P" + controller + " Key 4",
|
||||
DisplayName = "4",
|
||||
Location = new Point(27, 108),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key5",
|
||||
Name = "P" + controller + " Key 5",
|
||||
DisplayName = "5",
|
||||
Location = new Point(50, 108),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key6",
|
||||
Name = "P" + controller + " Key 6",
|
||||
DisplayName = "6",
|
||||
Location = new Point(73, 108),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
|
@ -113,21 +113,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key7",
|
||||
Name = "P" + controller + " Key 7",
|
||||
DisplayName = "7",
|
||||
Location = new Point(27, 131),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key8",
|
||||
Name = "P" + controller + " Key 8",
|
||||
DisplayName = "8",
|
||||
Location = new Point(50, 131),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key9",
|
||||
Name = "P" + controller + " Key 9",
|
||||
DisplayName = "9",
|
||||
Location = new Point(73, 131),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
|
@ -142,7 +142,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
},
|
||||
new PadSchema.ButtonScema
|
||||
{
|
||||
Name = "P" + controller + " Key0",
|
||||
Name = "P" + controller + " Key 0",
|
||||
DisplayName = "0",
|
||||
Location = new Point(50, 154),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
namespace BizHawk.Emulation.Cores.Computers.Commodore64
|
||||
{
|
||||
sealed public partial class Motherboard
|
||||
public sealed partial class Motherboard
|
||||
{
|
||||
private int[] joystickPressed = new int[10];
|
||||
private int[] keyboardPressed = new int[64];
|
||||
|
||||
static private string[,] joystickMatrix = new string[2, 5]
|
||||
private static string[,] joystickMatrix = new string[2, 5]
|
||||
{
|
||||
{"P1 Up", "P1 Down", "P1 Left", "P1 Right", "P1 Button"},
|
||||
{"P2 Up", "P2 Down", "P2 Left", "P2 Right", "P2 Button"}
|
||||
};
|
||||
|
||||
static private string[,] keyboardMatrix = new string[8, 8]
|
||||
private static string[,] keyboardMatrix = new string[8, 8]
|
||||
{
|
||||
{"Key Insert/Delete", "Key Return", "Key Cursor Left/Right", "Key F7", "Key F1", "Key F3", "Key F5", "Key Cursor Up/Down"},
|
||||
{"Key 3", "Key W", "Key A", "Key 4", "Key Z", "Key S", "Key E", "Key Left Shift"},
|
||||
{"Key 5", "Key R", "Key D", "Key 6", "Key C", "Key F", "Key T", "Key X"},
|
||||
{"Key 7", "Key Y", "Key G", "Key 8", "Key B", "Key H", "Key U", "Key V"},
|
||||
{"Key 9", "Key I", "Key J", "Key 0", "Key M", "Key K", "Key O", "Key N"},
|
||||
{"Key Plus", "Key P", "Key L", "Key Minus", "Key Period", "Key Colon", "Key At", "Key Comma"},
|
||||
{"Key Pound", "Key Asterisk", "Key Semicolon", "Key Clear/Home", "Key Right Shift", "Key Equal", "Key Up Arrow", "Key Slash"},
|
||||
{"Key 1", "Key Left Arrow", "Key Control", "Key 2", "Key Space", "Key Commodore", "Key Q", "Key Run/Stop"}
|
||||
{ "Key Insert/Delete", "Key Return", "Key Cursor Left/Right", "Key F7", "Key F1", "Key F3", "Key F5", "Key Cursor Up/Down" },
|
||||
{ "Key 3", "Key W", "Key A", "Key 4", "Key Z", "Key S", "Key E", "Key Left Shift" },
|
||||
{ "Key 5", "Key R", "Key D", "Key 6", "Key C", "Key F", "Key T", "Key X" },
|
||||
{ "Key 7", "Key Y", "Key G", "Key 8", "Key B", "Key H", "Key U", "Key V" },
|
||||
{ "Key 9", "Key I", "Key J", "Key 0", "Key M", "Key K", "Key O", "Key N" },
|
||||
{ "Key Plus", "Key P", "Key L", "Key Minus", "Key Period", "Key Colon", "Key At", "Key Comma" },
|
||||
{ "Key Pound", "Key Asterisk", "Key Semicolon", "Key Clear/Home", "Key Right Shift", "Key Equal", "Key Up Arrow", "Key Slash" },
|
||||
{ "Key 1", "Key Left Arrow", "Key Control", "Key 2", "Key Space", "Key Commodore", "Key Q", "Key Run/Stop" }
|
||||
};
|
||||
|
||||
static private byte[] inputBitMask = new byte[] { 0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F };
|
||||
|
|
|
@ -11,13 +11,13 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
{
|
||||
"P1 Up", "P1 Down", "P1 Left", "P1 Right",
|
||||
"P1 L", "P1 R",
|
||||
"P1 Key0", "P1 Key1", "P1 Key2", "P1 Key3", "P1 Key4", "P1 Key5",
|
||||
"P1 Key6", "P1 Key7", "P1 Key8", "P1 Key9", "P1 Star", "P1 Pound",
|
||||
"P1 Key 0", "P1 Key 1", "P1 Key 2", "P1 Key 3", "P1 Key 4", "P1 Key 5",
|
||||
"P1 Key 6", "P1 Key 7", "P1 Key 8", "P1 Key 9", "P1 Star", "P1 Pound",
|
||||
|
||||
"P2 Up", "P2 Down", "P2 Left", "P2 Right",
|
||||
"P2 L", "P2 R",
|
||||
"P2 Key0", "P2 Key1", "P2 Key2", "P2 Key3", "P2 Key4", "P2 Key5",
|
||||
"P2 Key6", "P2 Key7", "P2 Key8", "P2 Key9", "P2 Star", "P2 Pound"
|
||||
"P2 Key 0", "P2 Key 1", "P2 Key 2", "P2 Key 3", "P2 Key 4", "P2 Key 5",
|
||||
"P2 Key 6", "P2 Key 7", "P2 Key 8", "P2 Key 9", "P2 Star", "P2 Pound"
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -47,20 +47,20 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
byte retval = 0;
|
||||
|
||||
// 0x00;
|
||||
if (Controller["P1 Key8"]) retval = 0x01;
|
||||
if (Controller["P1 Key4"]) retval = 0x02;
|
||||
if (Controller["P1 Key5"]) retval = 0x03;
|
||||
if (Controller["P1 Key 8"]) retval = 0x01;
|
||||
if (Controller["P1 Key 4"]) retval = 0x02;
|
||||
if (Controller["P1 Key 5"]) retval = 0x03;
|
||||
// 0x04;
|
||||
if (Controller["P1 Key7"]) retval = 0x05;
|
||||
if (Controller["P1 Key 7"]) retval = 0x05;
|
||||
if (Controller["P1 Pound"]) retval = 0x06;
|
||||
if (Controller["P1 Key2"]) retval = 0x07;
|
||||
if (Controller["P1 Key 2"]) retval = 0x07;
|
||||
// 0x08;
|
||||
if (Controller["P1 Star"]) retval = 0x09;
|
||||
if (Controller["P1 Key0"]) retval = 0x0A;
|
||||
if (Controller["P1 Key9"]) retval = 0x0B;
|
||||
if (Controller["P1 Key3"]) retval = 0x0C;
|
||||
if (Controller["P1 Key1"]) retval = 0x0D;
|
||||
if (Controller["P1 Key6"]) retval = 0x0E;
|
||||
if (Controller["P1 Key 0"]) retval = 0x0A;
|
||||
if (Controller["P1 Key 9"]) retval = 0x0B;
|
||||
if (Controller["P1 Key 3"]) retval = 0x0C;
|
||||
if (Controller["P1 Key 1"]) retval = 0x0D;
|
||||
if (Controller["P1 Key 6"]) retval = 0x0E;
|
||||
|
||||
if (Controller["P1 R"] == false) retval |= 0x40;
|
||||
retval |= 0x30; // always set these bits
|
||||
|
|
|
@ -125,13 +125,13 @@ namespace BizHawk.Emulation.Cores.Intellivision
|
|||
BoolButtons = {
|
||||
"P1 Up", "P1 Down", "P1 Left", "P1 Right",
|
||||
"P1 L", "P1 R",
|
||||
"P1 Key0", "P1 Key1", "P1 Key2", "P1 Key3", "P1 Key4", "P1 Key5",
|
||||
"P1 Key6", "P1 Key7", "P1 Key8", "P1 Key9", "P1 Enter", "P1 Clear",
|
||||
"P1 Key 0", "P1 Key 1", "P1 Key 2", "P1 Key 3", "P1 Key 4", "P1 Key 5",
|
||||
"P1 Key 6", "P1 Key 7", "P1 Key 8", "P1 Key 9", "P1 Enter", "P1 Clear",
|
||||
|
||||
"P2 Up", "P2 Down", "P2 Left", "P2 Right",
|
||||
"P2 L", "P2 R",
|
||||
"P2 Key0", "P2 Key1", "P2 Key2", "P2 Key3", "P2 Key4", "P2 Key5",
|
||||
"P2 Key6", "P2 Key7", "P2 Key8", "P2 Key9", "P2 Enter", "P2 Clear"
|
||||
"P2 Key 0", "P2 Key 1", "P2 Key 2", "P2 Key 3", "P2 Key 4", "P2 Key 5",
|
||||
"P2 Key 6", "P2 Key 7", "P2 Key 8", "P2 Key 9", "P2 Enter", "P2 Clear"
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -441,17 +441,17 @@
|
|||
"P1 Right": "RightArrow, J1 POV1R, X1 DpadRight, X1 LStickRight",
|
||||
"P1 L": "Z, J1 B5, X1 LeftShoulder",
|
||||
"P1 R": "X, J1 B6, X1 RightShoulder",
|
||||
"P1 Key1": "NumberPad1, J1 B1, X1 X",
|
||||
"P1 Key2": "NumberPad2, J1 B2, X1 A",
|
||||
"P1 Key3": "NumberPad3, J1 B3, X1 B",
|
||||
"P1 Key4": "NumberPad4, J1 B4, X1 Y",
|
||||
"P1 Key5": "NumberPad5, J1 RotationZ-, X1 RStickUp",
|
||||
"P1 Key6": "NumberPad6, J1 RotationZ+, X1 RStickDown",
|
||||
"P1 Key7": "NumberPad7, J1 Z-, X1 RStickLeft",
|
||||
"P1 Key8": "NumberPad8, J1 Z+, X1 RStickRight",
|
||||
"P1 Key9": "NumberPad9, J1 B11, X1 LeftThumb",
|
||||
"P1 Key 1": "NumberPad1, J1 B1, X1 X",
|
||||
"P1 Key 2": "NumberPad2, J1 B2, X1 A",
|
||||
"P1 Key 3": "NumberPad3, J1 B3, X1 B",
|
||||
"P1 Key 4": "NumberPad4, J1 B4, X1 Y",
|
||||
"P1 Key 5": "NumberPad5, J1 RotationZ-, X1 RStickUp",
|
||||
"P1 Key 6": "NumberPad6, J1 RotationZ+, X1 RStickDown",
|
||||
"P1 Key 7": "NumberPad7, J1 Z-, X1 RStickLeft",
|
||||
"P1 Key 8": "NumberPad8, J1 Z+, X1 RStickRight",
|
||||
"P1 Key 9": "NumberPad9, J1 B11, X1 LeftThumb",
|
||||
"P1 Star": "NumberPadEnter, J1 B9, X1 Back",
|
||||
"P1 Key0": "NumberPad0, J1 B12, X1 RightThumb",
|
||||
"P1 Key 0": "NumberPad0, J1 B12, X1 RightThumb",
|
||||
"P1 Pound": "NumberPadPeriod, J1 B10, X1 Start",
|
||||
"P2 Up": "",
|
||||
"P2 Down": "",
|
||||
|
|
Loading…
Reference in New Issue