From 022c4be0c864c2c9641b72f0e5305dcff745a562 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 20 Feb 2011 02:17:09 +0000 Subject: [PATCH] add nes stub --- BizHawk.Emulation/BizHawk.Emulation.csproj | 3 ++- BizHawk.MultiClient/Global.cs | 1 + BizHawk.MultiClient/MainForm.cs | 15 +++++++++++++++ BizHawk.MultiClient/config/InputConfig.cs | 8 ++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation/BizHawk.Emulation.csproj b/BizHawk.Emulation/BizHawk.Emulation.csproj index d69c8bfa75..d863c333de 100644 --- a/BizHawk.Emulation/BizHawk.Emulation.csproj +++ b/BizHawk.Emulation/BizHawk.Emulation.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - 9.0.21022 + 9.0.30729 2.0 {197D4314-8A9F-49BA-977D-54ACEFAEB6BA} Library @@ -52,6 +52,7 @@ + diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index 4662b6bfe9..ad9a724cf0 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -18,5 +18,6 @@ namespace BizHawk.MultiClient public static IController PCEControls; public static IController GenControls; public static IController TI83Controls; + public static IController NESControls; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 6e9ce1c521..3c750fd973 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -9,6 +9,7 @@ using BizHawk.Emulation.Consoles.Sega; using BizHawk.Emulation.Consoles.TurboGrafx; using BizHawk.Emulation.Consoles.Calculator; using BizHawk.Emulation.Consoles.Gameboy; +using BizHawk.Emulation.Consoles.Nintendo; namespace BizHawk.MultiClient { @@ -245,6 +246,15 @@ namespace BizHawk.MultiClient TI83Controls.BindMulti("CLEAR", "Escape"); TI83Controls.BindMulti("DOT", "NumberPadPeriod"); Global.TI83Controls = TI83Controls; + + var NESControls = new Controller(NES.NESController); + NESControls.BindMulti("B", "Z"); + NESControls.BindMulti("A", "X"); + NESControls.BindMulti("UP", "UpArrow"); + NESControls.BindMulti("DOWN", "DownArrow"); + NESControls.BindMulti("LEFT", "LeftArrow"); + NESControls.BindMulti("RIGHT", "RightArrow"); + Global.NESControls = NESControls; } private static void FormDragEnter(object sender, DragEventArgs e) @@ -277,6 +287,7 @@ namespace BizHawk.MultiClient case "SGX": return "SuperGrafx"; case "GEN": return "Genesis"; case "TI83": return "TI-83"; + case "NES": return "NES"; case "GB": return "Game Boy"; } return ""; @@ -323,6 +334,10 @@ namespace BizHawk.MultiClient Global.Emulator = new TI83(); Global.Emulator.Controller = Global.TI83Controls; break; + case "NES": + Global.Emulator = new NES(); + Global.Emulator.Controller = Global.NESControls; + break; case "GB": Global.Emulator = new Gameboy(); break; diff --git a/BizHawk.MultiClient/config/InputConfig.cs b/BizHawk.MultiClient/config/InputConfig.cs index e03e4b5f82..292f4557c8 100644 --- a/BizHawk.MultiClient/config/InputConfig.cs +++ b/BizHawk.MultiClient/config/InputConfig.cs @@ -196,6 +196,11 @@ namespace BizHawk.MultiClient this.Text = ControllerStr + "TI-83"; } + private void DoNES() + { + this.Text = ControllerStr + "NES"; + } + private void DoGameBoy() { Label TempLabel; @@ -411,6 +416,9 @@ namespace BizHawk.MultiClient case "TI-83": DoTI83(); break; + case "NES": + DoNES(); + break; } CurSelectController = ControllComboBox.SelectedIndex; }