From a0281498d3d5812e958bc4a1e5b58d4d6b2541b5 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 17 Nov 2012 21:57:39 +0000 Subject: [PATCH] Coleco - fix mnemonics, hookup up controller 1 autofire --- BizHawk.MultiClient/Config.cs | 2 ++ BizHawk.MultiClient/Global.cs | 3 ++- BizHawk.MultiClient/MainForm.cs | 24 +++++++++++++++++++ .../config/ControllerConfig.cs | 6 +++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index 2d51c796a3..5d2b9b997b 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -55,6 +55,7 @@ namespace BizHawk.MultiClient SNESAutoController[3] = new SNESControllerTemplate(false); ColecoController = new ColecoVisionControllerTemplate(true); + ColecoAutoController = new ColecoVisionControllerTemplate(false); C64Joysticks[0] = new SingleButtonJoyStickTemplate(true, true); C64Joysticks[1] = new SingleButtonJoyStickTemplate(false); @@ -684,6 +685,7 @@ namespace BizHawk.MultiClient //ColecoVision public ColecoVisionControllerTemplate ColecoController = new ColecoVisionControllerTemplate(true); + public ColecoVisionControllerTemplate ColecoAutoController = new ColecoVisionControllerTemplate(false); //NES settings public NESControllerTemplate[] NESController = new NESControllerTemplate[4]; diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs index c801ded1ed..0273eb23bb 100644 --- a/BizHawk.MultiClient/Global.cs +++ b/BizHawk.MultiClient/Global.cs @@ -45,6 +45,7 @@ namespace BizHawk.MultiClient public static AutofireController AutofireGenControls; public static AutofireController AutofireAtari2600Controls; public static AutofireController AutofireCommodore64Controls; + public static AutofireController AutofireColecoControls; public static readonly Dictionary> BUTTONS = new Dictionary>() { @@ -112,7 +113,7 @@ namespace BizHawk.MultiClient "ColecoVision Basic Controller", new Dictionary() { {"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"L1", "l"}, {"L2", "L"}, {"R1", "r"}, {"R2", "R"}, //adelikat: These mnemonics are terrible but I can't think of anything better - {"Key1", "1"}, {"Key2", "2"}, {"Key3", "3"}, {"Key4", "4"}, {"Key5", "5"}, {"Key6", "6"}, {"Key7", "7"}, + {"Key0", "0"}, {"Key1", "1"}, {"Key2", "2"}, {"Key3", "3"}, {"Key4", "4"}, {"Key5", "5"}, {"Key6", "6"}, {"Key7", "7"}, {"Key8", "8"}, {"Key9", "9"}, {"Star", "*"}, {"Pound", "#"} } } diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index b3865afcc7..06022bcce1 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -976,6 +976,29 @@ namespace BizHawk.MultiClient colecoControls.BindMulti("P1 Pound", Global.Config.ColecoController.Pound); Global.ColecoControls = colecoControls; + var acolecoControls = new AutofireController(ColecoVision.ColecoVisionControllerDefinition); + acolecoControls.BindMulti("P1 Up", Global.Config.ColecoAutoController.Up); + acolecoControls.BindMulti("P1 Left", Global.Config.ColecoAutoController.Left); + acolecoControls.BindMulti("P1 Right", Global.Config.ColecoAutoController.Right); + acolecoControls.BindMulti("P1 Down", Global.Config.ColecoAutoController.Down); + acolecoControls.BindMulti("P1 L1", Global.Config.ColecoAutoController.L1); + acolecoControls.BindMulti("P1 L2", Global.Config.ColecoAutoController.L2); + acolecoControls.BindMulti("P1 R1", Global.Config.ColecoAutoController.R1); + acolecoControls.BindMulti("P1 R2", Global.Config.ColecoAutoController.R2); + acolecoControls.BindMulti("P1 Key0", Global.Config.ColecoAutoController._0); + acolecoControls.BindMulti("P1 Key1", Global.Config.ColecoAutoController._1); + acolecoControls.BindMulti("P1 Key2", Global.Config.ColecoAutoController._2); + acolecoControls.BindMulti("P1 Key3", Global.Config.ColecoAutoController._3); + acolecoControls.BindMulti("P1 Key4", Global.Config.ColecoAutoController._4); + acolecoControls.BindMulti("P1 Key5", Global.Config.ColecoAutoController._5); + acolecoControls.BindMulti("P1 Key6", Global.Config.ColecoAutoController._6); + acolecoControls.BindMulti("P1 Key7", Global.Config.ColecoAutoController._7); + acolecoControls.BindMulti("P1 Key8", Global.Config.ColecoAutoController._8); + acolecoControls.BindMulti("P1 Key9", Global.Config.ColecoAutoController._9); + acolecoControls.BindMulti("P1 Star", Global.Config.ColecoAutoController.Star); + acolecoControls.BindMulti("P1 Pound", Global.Config.ColecoController.Pound); + Global.AutofireColecoControls = acolecoControls; + var TI83Controls = new Controller(TI83.TI83Controller); TI83Controls.BindMulti("0", Global.Config.TI83Controller[0]._0); TI83Controls.BindMulti("1", Global.Config.TI83Controller[0]._1); @@ -1439,6 +1462,7 @@ namespace BizHawk.MultiClient break; case "Coleco": Global.ActiveController = Global.ColecoControls; + Global.AutoFireController = Global.AutofireColecoControls; break; case "C64": Global.ActiveController = Global.Commodore64Controls; diff --git a/BizHawk.MultiClient/config/ControllerConfig.cs b/BizHawk.MultiClient/config/ControllerConfig.cs index 19c329c323..99f2f55c0f 100644 --- a/BizHawk.MultiClient/config/ControllerConfig.cs +++ b/BizHawk.MultiClient/config/ControllerConfig.cs @@ -104,6 +104,12 @@ namespace BizHawk.MultiClient COLController1Panel.ColumnWidth = 170; COLController1Panel.LoadSettings(Global.Config.ColecoController); + + COLAutofire1Panel.InputSize = 110; + COLAutofire1Panel.LabelWidth = 50; + COLAutofire1Panel.ColumnWidth = 170; + COLAutofire1Panel.LoadSettings(Global.Config.ColecoAutoController); + SetAutoTab(true); }