From b9c77106f7a02fae6b6772c6587de15374d56eec Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 18 Nov 2012 22:16:48 +0000 Subject: [PATCH] C64 - implement rerecording and input display --- BizHawk.MultiClient/Global.cs | 11 +++++++++++ BizHawk.MultiClient/movie/InputAdapters.cs | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index 2a1633ba91..7194c06534 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -115,6 +115,17 @@ namespace BizHawk.MultiClient {"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"Button", "B"} } }, + { + "Commodore 64 Keyboard", new Dictionary() + { + {"Key F1", "1"}, {"Key F3", "3"}, {"Key F5", "5"}, {"Key F7", "7"}, + {"Key Left Arrow", "l"}, {"Key 1", "1"}, {"Key 2", "2"}, {"Key 3", "3"}, {"Key 4", "4"}, {"Key 5", "5"}, {"Key 6", "6"}, {"Key 7", "7"}, {"Key 8", "8"}, {"Key 9", "9"}, {"Key 0", "0"}, {"Key Plus", "+"}, {"Key Minus", "-"}, {"Key Pound", "l"}, {"Key Clear/Home", "c"}, {"Key Insert/Delete", "i"}, + {"Key Control", "c"}, {"Key Q", "Q"}, {"Key W", "W"}, {"Key E", "E"}, {"Key R", "R"}, {"Key T", "T"}, {"Key Y", "Y"}, {"Key U", "U"}, {"Key I", "I"}, {"Key O", "O"}, {"Key P", "P"}, {"Key At", "@"}, {"Key Asterisk", "*"}, {"Key Up Arrow", "u"}, {"Key RST", "r"}, + {"Key Run/Stop", "s"}, {"Key Lck", "k"}, {"Key A", "A"}, {"Key S", "S"}, {"Key D", "D"}, {"Key F", "F"}, {"Key G", "G"}, {"Key H", "H"}, {"Key J", "J"}, {"Key K", "K"}, {"Key L", "L"}, {"Key Colon", ":"}, {"Key Semicolon", ":"}, {"Key Equal", "="}, {"Key Return", "e"}, + {"Key Commodore", "o"}, {"Key Left Shift", "s"}, {"Key Z", "Z"}, {"Key X", "X"}, {"Key C", "C"}, {"Key V", "V"}, {"Key B", "B"}, {"Key N", "N"}, {"Key M", "M"}, {"Key Comma", ","}, {"Key Period", "."}, {"Key Slash", "/"}, {"Key Right Shift", "s"}, {"Key Cursor Up/Down", "u"}, {"Key Cursor Left/Right", "l"}, + {"Key Space", "_"} + } + }, { "ColecoVision Basic Controller", new Dictionary() { diff --git a/BizHawk.MultiClient/movie/InputAdapters.cs b/BizHawk.MultiClient/movie/InputAdapters.cs index 369aaf943f..c86d892a25 100644 --- a/BizHawk.MultiClient/movie/InputAdapters.cs +++ b/BizHawk.MultiClient/movie/InputAdapters.cs @@ -406,9 +406,16 @@ namespace BizHawk.MultiClient { input.Append(IsBasePressed("P" + player + " " + button) ? Global.BUTTONS[ControlType][button] : "."); } - input.Append("|"); + input.Append('|'); } + foreach (string button in Global.BUTTONS["Commodore 64 Keyboard"].Keys) + { + input.Append(IsBasePressed(button) ? Global.BUTTONS["Commodore 64 Keyboard"][button] : "."); + } + input.Append('|'); + + input.Append('|'); return input.ToString(); } @@ -746,6 +753,12 @@ namespace BizHawk.MultiClient Force("P" + player + " " + button, c[srcindex + start++]); } } + + int startk = 13; + foreach (string button in Global.BUTTONS["Commodore 64 Keyboard"].Keys) + { + Force(button, c[startk++]); + } } ///