Atari 7800 - basic mnemonics set up (input display and movie rerecording), however these mnemonics will change
This commit is contained in:
parent
e7c8053617
commit
054f0df3e4
|
@ -120,6 +120,12 @@ namespace BizHawk.MultiClient
|
|||
{"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"Button", "B"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Atari 7800 ProLine Joystick Controller", new Dictionary<string,string>()
|
||||
{
|
||||
{"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"Trigger", "1"}, {"Trigger 2", "2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Commodore 64 Controller", new Dictionary<string,string>()
|
||||
{
|
||||
|
@ -150,6 +156,7 @@ namespace BizHawk.MultiClient
|
|||
public static readonly Dictionary<string, Dictionary<string, string>> COMMANDS = new Dictionary<string, Dictionary<string, string>>()
|
||||
{
|
||||
{"Atari 2600 Basic Controller", new Dictionary<string, string>() {{"Reset", "r"}, {"Select", "s"}}},
|
||||
{"Atari 7800 ProLine Joystick Controller", new Dictionary<string, string>() {{"Reset", "r"}, {"Select", "s"}}},
|
||||
{"Gameboy Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
||||
{"GBA Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
||||
{"Genesis 3-Button Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
||||
|
@ -163,7 +170,7 @@ namespace BizHawk.MultiClient
|
|||
public static readonly Dictionary<string, int> PLAYERS = new Dictionary<string, int>()
|
||||
{
|
||||
{"Gameboy Controller", 1}, {"GBA Controller", 1}, {"Genesis 3-Button Controller", 2}, {"NES Controller", 4},
|
||||
{"SNES Controller", 4}, {"PC Engine Controller", 5}, {"SMS Controller", 2}, {"TI83 Controller", 1}, {"Atari 2600 Basic Controller", 2},
|
||||
{"SNES Controller", 4}, {"PC Engine Controller", 5}, {"SMS Controller", 2}, {"TI83 Controller", 1}, {"Atari 2600 Basic Controller", 2}, {"Atari 7800 ProLine Joystick Controller", 2},
|
||||
{"ColecoVision Basic Controller", 2}, {"Commodore 64 Controller", 2}
|
||||
};
|
||||
|
||||
|
|
|
@ -340,6 +340,8 @@ namespace BizHawk.MultiClient
|
|||
return "|.|";
|
||||
case "A26":
|
||||
return "|..|.....|.....|";
|
||||
case "A78":
|
||||
return "|..|......|......|";
|
||||
case "TI83":
|
||||
return "|..................................................|.|";
|
||||
case "NES":
|
||||
|
@ -448,6 +450,24 @@ namespace BizHawk.MultiClient
|
|||
return input.ToString();
|
||||
}
|
||||
|
||||
private string GetA78ControllersAsMnemonic()
|
||||
{
|
||||
StringBuilder input = new StringBuilder("|");
|
||||
input.Append(IsBasePressed("Reset") ? "r" : ".");
|
||||
input.Append(IsBasePressed("Select") ? "s" : ".");
|
||||
|
||||
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
||||
{
|
||||
foreach (string button in Global.BUTTONS[ControlType].Keys)
|
||||
{
|
||||
input.Append(IsBasePressed("P" + player + " " + button) ? Global.BUTTONS[ControlType][button] : ".");
|
||||
}
|
||||
input.Append('|');
|
||||
}
|
||||
|
||||
return input.ToString();
|
||||
}
|
||||
|
||||
public string GetControllersAsMnemonic()
|
||||
{
|
||||
if (ControlType == "Null Controller")
|
||||
|
@ -456,7 +476,7 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
else if (ControlType == "Atari 7800 ProLine Joystick Controller")
|
||||
{
|
||||
return "|.|"; //TODO
|
||||
return GetA78ControllersAsMnemonic();
|
||||
}
|
||||
else if (ControlType == "SNES Controller")
|
||||
{
|
||||
|
@ -783,7 +803,42 @@ namespace BizHawk.MultiClient
|
|||
Force("P" + player + " " + button, c[srcindex + start++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetAtari7800AsMnemonic(string mnemonic)
|
||||
{
|
||||
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
||||
MyBoolButtons.Clear();
|
||||
|
||||
if (mnemonic.Length < 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (mnemonic[1] == 'r')
|
||||
{
|
||||
Force("Reset", true);
|
||||
}
|
||||
else if (mnemonic[2] == 's')
|
||||
{
|
||||
Force("Select", true);
|
||||
}
|
||||
|
||||
|
||||
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
||||
{
|
||||
int srcindex = (player - 1) * (Global.BUTTONS[ControlType].Count + 1);
|
||||
|
||||
if (mnemonic.Length < srcindex + 4 + Global.BUTTONS[ControlType].Count - 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int start = 3;
|
||||
foreach (string button in Global.BUTTONS[ControlType].Keys)
|
||||
{
|
||||
Force("P" + player + " " + button, c[srcindex + start++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetC64ControllersAsMnemonic(string mnemonic)
|
||||
|
@ -839,6 +894,10 @@ namespace BizHawk.MultiClient
|
|||
SetGBAControllersAsMnemonic(mnemonic);
|
||||
return;
|
||||
}
|
||||
else if (ControlType == "Atari 7800 ProLine Joystick Controller")
|
||||
{
|
||||
SetAtari7800AsMnemonic(mnemonic);
|
||||
}
|
||||
|
||||
MnemonicChecker c = new MnemonicChecker(mnemonic);
|
||||
|
||||
|
|
Loading…
Reference in New Issue