diff --git a/BizHawk.Emulation/Consoles/Coleco/Input.cs b/BizHawk.Emulation/Consoles/Coleco/Input.cs
index f7ada8df09..5fc4129c50 100644
--- a/BizHawk.Emulation/Consoles/Coleco/Input.cs
+++ b/BizHawk.Emulation/Consoles/Coleco/Input.cs
@@ -14,7 +14,7 @@
"P2 Up", "P2 Down", "P2 Left", "P2 Right",
"P2 L", "P2 R",
- "P1 Key0", "P2 Key1", "P2 Key2", "P2 Key3", "P2 Key4", "P2 Key5",
+ "P2 Key0", "P2 Key1", "P2 Key2", "P2 Key3", "P2 Key4", "P2 Key5",
"P2 Key6", "P2 Key7", "P2 Key8", "P2 Key9", "P2 Star", "P2 Pound"
}
};
diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj
index d2c4a806bd..728b646f9a 100644
--- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj
+++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj
@@ -386,6 +386,7 @@
HexFind.cs
+
Component
@@ -426,6 +427,12 @@
VirtualPadC64Keyboard.cs
+
+ UserControl
+
+
+ VirtualPadColeco.cs
+
Form
@@ -540,6 +547,9 @@
VirtualPadC64Keyboard.cs
+
+ VirtualPadColeco.cs
+
VirtualPadForm.cs
diff --git a/BizHawk.MultiClient/Global.cs b/BizHawk.MultiClient/Global.cs
index 7331f15536..be58378778 100644
--- a/BizHawk.MultiClient/Global.cs
+++ b/BizHawk.MultiClient/Global.cs
@@ -112,9 +112,9 @@ namespace BizHawk.MultiClient
{
"ColecoVision Basic Controller", new Dictionary()
{
- {"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"L", "L"}, {"R", "R"},
- {"Key0", "0"}, {"Key1", "1"}, {"Key2", "2"}, {"Key3", "3"}, {"Key4", "4"}, {"Key5", "5"},
- {"Key6", "6"}, {"Key7", "7"}, {"Key8", "8"}, {"Key9", "9"}, {"Star", "*"}, {"Pound", "#"}
+ {"Up", "U"}, {"Down", "D"}, {"Left", "L"}, {"Right", "R"}, {"L", "l"}, {"R", "r"},
+ {"Key1", "1"}, {"Key2", "2"}, {"Key3", "3"}, {"Key4", "4"}, {"Key5", "5"}, {"Key6", "6"},
+ {"Key7", "7"}, {"Key8", "8"}, {"Key9", "9"}, {"Star", "*"}, {"Key0", "0"}, {"Pound", "#"}
}
}
};
diff --git a/BizHawk.MultiClient/tools/IVirtualPad.cs b/BizHawk.MultiClient/tools/IVirtualPad.cs
new file mode 100644
index 0000000000..eda523bc5f
--- /dev/null
+++ b/BizHawk.MultiClient/tools/IVirtualPad.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BizHawk.MultiClient
+{
+ public interface IVirtualPad
+ {
+ string GetMnemonic();
+ void Clear();
+ void SetButtons(string buttons);
+ }
+}
diff --git a/BizHawk.MultiClient/tools/VirtualPad.cs b/BizHawk.MultiClient/tools/VirtualPad.cs
index 64e9e4d42c..474d2c45af 100644
--- a/BizHawk.MultiClient/tools/VirtualPad.cs
+++ b/BizHawk.MultiClient/tools/VirtualPad.cs
@@ -8,7 +8,7 @@ using System.Globalization;
namespace BizHawk.MultiClient
{
- public class VirtualPad : Panel
+ public class VirtualPad : Panel , IVirtualPad
{
public Point[] ButtonPoints = new Point[16];
diff --git a/BizHawk.MultiClient/tools/VirtualPadColeco.Designer.cs b/BizHawk.MultiClient/tools/VirtualPadColeco.Designer.cs
new file mode 100644
index 0000000000..6b56daeae7
--- /dev/null
+++ b/BizHawk.MultiClient/tools/VirtualPadColeco.Designer.cs
@@ -0,0 +1,319 @@
+namespace BizHawk.MultiClient
+{
+ partial class VirtualPadColeco
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.PU = new System.Windows.Forms.CheckBox();
+ this.PR = new System.Windows.Forms.CheckBox();
+ this.PD = new System.Windows.Forms.CheckBox();
+ this.PL = new System.Windows.Forms.CheckBox();
+ this.KeyLeft = new System.Windows.Forms.CheckBox();
+ this.KeyRight = new System.Windows.Forms.CheckBox();
+ this.KP7 = new System.Windows.Forms.CheckBox();
+ this.KP8 = new System.Windows.Forms.CheckBox();
+ this.KP9 = new System.Windows.Forms.CheckBox();
+ this.KP6 = new System.Windows.Forms.CheckBox();
+ this.KP5 = new System.Windows.Forms.CheckBox();
+ this.KP4 = new System.Windows.Forms.CheckBox();
+ this.KP3 = new System.Windows.Forms.CheckBox();
+ this.KP2 = new System.Windows.Forms.CheckBox();
+ this.KP1 = new System.Windows.Forms.CheckBox();
+ this.KPPound = new System.Windows.Forms.CheckBox();
+ this.KP0 = new System.Windows.Forms.CheckBox();
+ this.KPStar = new System.Windows.Forms.CheckBox();
+ this.SuspendLayout();
+ //
+ // PU
+ //
+ this.PU.Appearance = System.Windows.Forms.Appearance.Button;
+ this.PU.AutoSize = true;
+ this.PU.Image = global::BizHawk.MultiClient.Properties.Resources.BlueUp;
+ this.PU.Location = new System.Drawing.Point(43, 3);
+ this.PU.Name = "PU";
+ this.PU.Size = new System.Drawing.Size(22, 22);
+ this.PU.TabIndex = 0;
+ this.PU.UseVisualStyleBackColor = true;
+ this.PU.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // PR
+ //
+ this.PR.Appearance = System.Windows.Forms.Appearance.Button;
+ this.PR.AutoSize = true;
+ this.PR.Image = global::BizHawk.MultiClient.Properties.Resources.Forward;
+ this.PR.Location = new System.Drawing.Point(64, 15);
+ this.PR.Name = "PR";
+ this.PR.Size = new System.Drawing.Size(22, 22);
+ this.PR.TabIndex = 1;
+ this.PR.UseVisualStyleBackColor = true;
+ this.PR.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // PD
+ //
+ this.PD.Appearance = System.Windows.Forms.Appearance.Button;
+ this.PD.AutoSize = true;
+ this.PD.Image = global::BizHawk.MultiClient.Properties.Resources.BlueDown;
+ this.PD.Location = new System.Drawing.Point(43, 24);
+ this.PD.Name = "PD";
+ this.PD.Size = new System.Drawing.Size(22, 22);
+ this.PD.TabIndex = 2;
+ this.PD.UseVisualStyleBackColor = true;
+ this.PD.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // PL
+ //
+ this.PL.Appearance = System.Windows.Forms.Appearance.Button;
+ this.PL.AutoSize = true;
+ this.PL.Image = global::BizHawk.MultiClient.Properties.Resources.Back;
+ this.PL.Location = new System.Drawing.Point(22, 15);
+ this.PL.Name = "PL";
+ this.PL.Size = new System.Drawing.Size(22, 22);
+ this.PL.TabIndex = 3;
+ this.PL.UseVisualStyleBackColor = true;
+ this.PL.CheckStateChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KeyLeft
+ //
+ this.KeyLeft.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KeyLeft.AutoSize = true;
+ this.KeyLeft.Location = new System.Drawing.Point(5, 51);
+ this.KeyLeft.Name = "KeyLeft";
+ this.KeyLeft.Size = new System.Drawing.Size(23, 23);
+ this.KeyLeft.TabIndex = 4;
+ this.KeyLeft.Text = "L";
+ this.KeyLeft.UseVisualStyleBackColor = true;
+ this.KeyLeft.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KeyRight
+ //
+ this.KeyRight.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KeyRight.AutoSize = true;
+ this.KeyRight.Location = new System.Drawing.Point(82, 51);
+ this.KeyRight.Name = "KeyRight";
+ this.KeyRight.Size = new System.Drawing.Size(25, 23);
+ this.KeyRight.TabIndex = 5;
+ this.KeyRight.Text = "R";
+ this.KeyRight.UseVisualStyleBackColor = true;
+ this.KeyRight.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP7
+ //
+ this.KP7.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP7.AutoSize = true;
+ this.KP7.Location = new System.Drawing.Point(22, 129);
+ this.KP7.Name = "KP7";
+ this.KP7.Size = new System.Drawing.Size(23, 23);
+ this.KP7.TabIndex = 6;
+ this.KP7.Text = "7";
+ this.KP7.UseVisualStyleBackColor = true;
+ this.KP7.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP8
+ //
+ this.KP8.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP8.AutoSize = true;
+ this.KP8.Location = new System.Drawing.Point(45, 129);
+ this.KP8.Name = "KP8";
+ this.KP8.Size = new System.Drawing.Size(23, 23);
+ this.KP8.TabIndex = 8;
+ this.KP8.Text = "8";
+ this.KP8.UseVisualStyleBackColor = true;
+ this.KP8.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP9
+ //
+ this.KP9.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP9.AutoSize = true;
+ this.KP9.Location = new System.Drawing.Point(67, 129);
+ this.KP9.Name = "KP9";
+ this.KP9.Size = new System.Drawing.Size(23, 23);
+ this.KP9.TabIndex = 8;
+ this.KP9.Text = "9";
+ this.KP9.UseVisualStyleBackColor = true;
+ this.KP9.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP6
+ //
+ this.KP6.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP6.AutoSize = true;
+ this.KP6.Location = new System.Drawing.Point(67, 106);
+ this.KP6.Name = "KP6";
+ this.KP6.Size = new System.Drawing.Size(23, 23);
+ this.KP6.TabIndex = 10;
+ this.KP6.Text = "6";
+ this.KP6.UseVisualStyleBackColor = true;
+ this.KP6.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP5
+ //
+ this.KP5.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP5.AutoSize = true;
+ this.KP5.Location = new System.Drawing.Point(45, 106);
+ this.KP5.Name = "KP5";
+ this.KP5.Size = new System.Drawing.Size(23, 23);
+ this.KP5.TabIndex = 11;
+ this.KP5.Text = "5";
+ this.KP5.UseVisualStyleBackColor = true;
+ this.KP5.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP4
+ //
+ this.KP4.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP4.AutoSize = true;
+ this.KP4.Location = new System.Drawing.Point(22, 106);
+ this.KP4.Name = "KP4";
+ this.KP4.Size = new System.Drawing.Size(23, 23);
+ this.KP4.TabIndex = 9;
+ this.KP4.Text = "4";
+ this.KP4.UseVisualStyleBackColor = true;
+ this.KP4.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP3
+ //
+ this.KP3.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP3.AutoSize = true;
+ this.KP3.Location = new System.Drawing.Point(67, 83);
+ this.KP3.Name = "KP3";
+ this.KP3.Size = new System.Drawing.Size(23, 23);
+ this.KP3.TabIndex = 13;
+ this.KP3.Text = "3";
+ this.KP3.UseVisualStyleBackColor = true;
+ this.KP3.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP2
+ //
+ this.KP2.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP2.AutoSize = true;
+ this.KP2.Location = new System.Drawing.Point(45, 83);
+ this.KP2.Name = "KP2";
+ this.KP2.Size = new System.Drawing.Size(23, 23);
+ this.KP2.TabIndex = 14;
+ this.KP2.Text = "2";
+ this.KP2.UseVisualStyleBackColor = true;
+ this.KP2.CheckStateChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP1
+ //
+ this.KP1.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP1.AutoSize = true;
+ this.KP1.Location = new System.Drawing.Point(22, 83);
+ this.KP1.Name = "KP1";
+ this.KP1.Size = new System.Drawing.Size(23, 23);
+ this.KP1.TabIndex = 12;
+ this.KP1.Text = "1";
+ this.KP1.UseVisualStyleBackColor = true;
+ this.KP1.CheckStateChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KPPound
+ //
+ this.KPPound.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KPPound.AutoSize = true;
+ this.KPPound.Location = new System.Drawing.Point(67, 152);
+ this.KPPound.Name = "KPPound";
+ this.KPPound.Size = new System.Drawing.Size(24, 23);
+ this.KPPound.TabIndex = 16;
+ this.KPPound.Text = "#";
+ this.KPPound.UseVisualStyleBackColor = true;
+ this.KPPound.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KP0
+ //
+ this.KP0.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KP0.AutoSize = true;
+ this.KP0.Location = new System.Drawing.Point(45, 152);
+ this.KP0.Name = "KP0";
+ this.KP0.Size = new System.Drawing.Size(23, 23);
+ this.KP0.TabIndex = 17;
+ this.KP0.Text = "0";
+ this.KP0.UseVisualStyleBackColor = true;
+ this.KP0.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // KPStar
+ //
+ this.KPStar.Appearance = System.Windows.Forms.Appearance.Button;
+ this.KPStar.AutoSize = true;
+ this.KPStar.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.KPStar.Location = new System.Drawing.Point(22, 152);
+ this.KPStar.Name = "KPStar";
+ this.KPStar.Size = new System.Drawing.Size(21, 23);
+ this.KPStar.TabIndex = 15;
+ this.KPStar.Text = "*";
+ this.KPStar.UseVisualStyleBackColor = true;
+ this.KPStar.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
+ //
+ // VirtualPadColeco
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.KPPound);
+ this.Controls.Add(this.KP0);
+ this.Controls.Add(this.KPStar);
+ this.Controls.Add(this.KP3);
+ this.Controls.Add(this.KP2);
+ this.Controls.Add(this.KP1);
+ this.Controls.Add(this.KP6);
+ this.Controls.Add(this.KP5);
+ this.Controls.Add(this.KP4);
+ this.Controls.Add(this.KP9);
+ this.Controls.Add(this.KP8);
+ this.Controls.Add(this.KP7);
+ this.Controls.Add(this.KeyRight);
+ this.Controls.Add(this.KeyLeft);
+ this.Controls.Add(this.PL);
+ this.Controls.Add(this.PD);
+ this.Controls.Add(this.PR);
+ this.Controls.Add(this.PU);
+ this.Name = "VirtualPadColeco";
+ this.Size = new System.Drawing.Size(115, 193);
+ this.Load += new System.EventHandler(this.VirtualPadColeco_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.CheckBox PU;
+ private System.Windows.Forms.CheckBox PR;
+ private System.Windows.Forms.CheckBox PD;
+ private System.Windows.Forms.CheckBox PL;
+ private System.Windows.Forms.CheckBox KeyLeft;
+ private System.Windows.Forms.CheckBox KeyRight;
+ private System.Windows.Forms.CheckBox KP7;
+ private System.Windows.Forms.CheckBox KP8;
+ private System.Windows.Forms.CheckBox KP9;
+ private System.Windows.Forms.CheckBox KP6;
+ private System.Windows.Forms.CheckBox KP5;
+ private System.Windows.Forms.CheckBox KP4;
+ private System.Windows.Forms.CheckBox KP3;
+ private System.Windows.Forms.CheckBox KP2;
+ private System.Windows.Forms.CheckBox KP1;
+ private System.Windows.Forms.CheckBox KPPound;
+ private System.Windows.Forms.CheckBox KP0;
+ private System.Windows.Forms.CheckBox KPStar;
+ }
+}
diff --git a/BizHawk.MultiClient/tools/VirtualPadColeco.cs b/BizHawk.MultiClient/tools/VirtualPadColeco.cs
new file mode 100644
index 0000000000..9efd6ec230
--- /dev/null
+++ b/BizHawk.MultiClient/tools/VirtualPadColeco.cs
@@ -0,0 +1,196 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace BizHawk.MultiClient
+{
+ public partial class VirtualPadColeco : UserControl , IVirtualPad
+ {
+ public string Controller = "P1";
+ public VirtualPadColeco()
+ {
+ SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ SetStyle(ControlStyles.UserPaint, true);
+ SetStyle(ControlStyles.DoubleBuffer, true);
+ this.BorderStyle = BorderStyle.Fixed3D;
+ this.Paint += new System.Windows.Forms.PaintEventHandler(this.VirtualPad_Paint);
+ InitializeComponent();
+ }
+
+ private void VirtualPadColeco_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
+ {
+ if (keyData == Keys.Up)
+ {
+ //TODO: move to next logical key
+ this.Refresh();
+ }
+ else if (keyData == Keys.Down)
+ {
+ this.Refresh();
+ }
+ else if (keyData == Keys.Left)
+ {
+ this.Refresh();
+ }
+ else if (keyData == Keys.Right)
+ {
+ this.Refresh();
+ }
+ else if (keyData == Keys.Tab)
+ {
+ this.Refresh();
+ }
+ return true;
+ }
+
+ private void VirtualPad_Paint(object sender, PaintEventArgs e)
+ {
+
+
+ }
+ public string GetMnemonic()
+ {
+ StringBuilder input = new StringBuilder("");
+ input.Append(PU.Checked ? "U" : ".");
+ input.Append(PD.Checked ? "D" : ".");
+ input.Append(PL.Checked ? "L" : "L");
+ input.Append(PR.Checked ? "R" : "R");
+
+ input.Append(KeyLeft.Checked ? "l" : ".");
+ input.Append(KeyRight.Checked ? "r" : ".");
+ input.Append(KP1.Checked ? "1" : ".");
+ input.Append(KP2.Checked ? "2" : ".");
+ input.Append(KP3.Checked ? "3" : ".");
+ input.Append(KP4.Checked ? "4" : ".");
+ input.Append(KP5.Checked ? "5" : ".");
+ input.Append(KP6.Checked ? "6" : ".");
+ input.Append(KP7.Checked ? "7" : ".");
+ input.Append(KP8.Checked ? "8" : ".");
+ input.Append(KP9.Checked ? "9" : ".");
+ input.Append(KPStar.Checked ? "*" : ".");
+ input.Append(KP0.Checked ? "0" : ".");
+ input.Append(KPPound.Checked ? "#" : ".");
+ input.Append("|");
+ return input.ToString();
+ }
+
+ public void SetButtons(string buttons)
+ {
+ if (buttons.Length < 18) return;
+ if (buttons[0] == '.') PU.Checked = false; else PU.Checked = true;
+ if (buttons[1] == '.') PD.Checked = false; else PD.Checked = true;
+ if (buttons[2] == '.') PL.Checked = false; else PL.Checked = true;
+ if (buttons[3] == '.') PR.Checked = false; else PR.Checked = true;
+
+ if (buttons[4] == '.') KeyLeft.Checked = false; else KeyLeft.Checked = true;
+ if (buttons[5] == '.') KeyRight.Checked = false; else KeyRight.Checked = true;
+ if (buttons[6] == '.') KP1.Checked = false; else KP1.Checked = true;
+ if (buttons[6] == '.') KP2.Checked = false; else KP2.Checked = true;
+ if (buttons[6] == '.') KP3.Checked = false; else KP3.Checked = true;
+ if (buttons[6] == '.') KP4.Checked = false; else KP4.Checked = true;
+ if (buttons[6] == '.') KP5.Checked = false; else KP5.Checked = true;
+ if (buttons[6] == '.') KP6.Checked = false; else KP6.Checked = true;
+ if (buttons[6] == '.') KP7.Checked = false; else KP7.Checked = true;
+ if (buttons[6] == '.') KP8.Checked = false; else KP8.Checked = true;
+ if (buttons[6] == '.') KP9.Checked = false; else KP9.Checked = true;
+ if (buttons[6] == '.') KPStar.Checked = false; else KPStar.Checked = true;
+ if (buttons[6] == '.') KP0.Checked = false; else KP0.Checked = true;
+ if (buttons[6] == '.') KPPound.Checked = false; else KPPound.Checked = true;
+ }
+
+ private void Buttons_CheckedChanged(object sender, EventArgs e)
+ {
+ if (Global.Emulator.SystemId != "Coleco") return;
+ if (sender == PU)
+ Global.StickyXORAdapter.SetSticky(Controller + " Up", PU.Checked);
+ else if (sender == PD)
+ Global.StickyXORAdapter.SetSticky(Controller + " Down", PD.Checked);
+ else if (sender == PL)
+ Global.StickyXORAdapter.SetSticky(Controller + " Left", PL.Checked);
+ else if (sender == PR)
+ Global.StickyXORAdapter.SetSticky(Controller + " Right", PR.Checked);
+
+ else if (sender == KeyLeft)
+ Global.StickyXORAdapter.SetSticky(Controller + " L", KeyLeft.Checked);
+ else if (sender == KeyRight)
+ Global.StickyXORAdapter.SetSticky(Controller + " R", KeyRight.Checked);
+ else if (sender == KP1)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key1", KP1.Checked);
+ else if (sender == KP2)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key2", KP2.Checked);
+ else if (sender == KP3)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key3", KP3.Checked);
+ else if (sender == KP4)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key4", KP4.Checked);
+ else if (sender == KP5)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key5", KP5.Checked);
+ else if (sender == KP6)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key6", KP6.Checked);
+ else if (sender == KP7)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key7", KP7.Checked);
+ else if (sender == KP8)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key8", KP8.Checked);
+ else if (sender == KP9)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key9", KP9.Checked);
+ else if (sender == KPStar)
+ Global.StickyXORAdapter.SetSticky(Controller + " Star", KPStar.Checked);
+ else if (sender == KP0)
+ Global.StickyXORAdapter.SetSticky(Controller + " Key0", KP0.Checked);
+ else if (sender == KPPound)
+ Global.StickyXORAdapter.SetSticky(Controller + " Pound", KPPound.Checked);
+ }
+
+ public void Clear()
+ {
+ if (Global.Emulator.SystemId != "Coleco") return;
+ PU.Checked = false;
+ PD.Checked = false;
+ PL.Checked = false;
+ PR.Checked = false;
+
+ KeyLeft.Checked = false;
+ KeyRight.Checked = false;
+ KP1.Checked = false;
+ KP2.Checked = false;
+ KP3.Checked = false;
+ KP4.Checked = false;
+ KP5.Checked = false;
+ KP6.Checked = false;
+ KP7.Checked = false;
+ KP8.Checked = false;
+ KP9.Checked = false;
+ KPStar.Checked = false;
+ KP0.Checked = false;
+ KPPound.Checked = false;
+
+ Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Left", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Right", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " L", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " R", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key0", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key1", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key2", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key3", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key4", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key5", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key6", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key7", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key8", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Key9", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Star", false);
+ Global.StickyXORAdapter.SetSticky(Controller + " Pound", false);
+ }
+ }
+}
diff --git a/BizHawk.MultiClient/tools/VirtualPadColeco.resx b/BizHawk.MultiClient/tools/VirtualPadColeco.resx
new file mode 100644
index 0000000000..29dcb1b3a3
--- /dev/null
+++ b/BizHawk.MultiClient/tools/VirtualPadColeco.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/BizHawk.MultiClient/tools/VirtualPadForm.Designer.cs b/BizHawk.MultiClient/tools/VirtualPadForm.Designer.cs
index 659d978927..2d07319a75 100644
--- a/BizHawk.MultiClient/tools/VirtualPadForm.Designer.cs
+++ b/BizHawk.MultiClient/tools/VirtualPadForm.Designer.cs
@@ -31,6 +31,8 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(VirtualPadForm));
this.ControllerBox = new System.Windows.Forms.GroupBox();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autolaodToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -38,22 +40,37 @@
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StickyBox = new System.Windows.Forms.CheckBox();
- this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
+ this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// ControllerBox
//
+ this.ControllerBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.ControllerBox.ContextMenuStrip = this.contextMenuStrip1;
this.ControllerBox.Location = new System.Drawing.Point(9, 26);
this.ControllerBox.Name = "ControllerBox";
- this.ControllerBox.Size = new System.Drawing.Size(367, 207);
+ this.ControllerBox.Size = new System.Drawing.Size(367, 251);
this.ControllerBox.TabIndex = 5;
this.ControllerBox.TabStop = false;
this.ControllerBox.Text = "Controllers";
//
+ // contextMenuStrip1
+ //
+ this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.clearToolStripMenuItem});
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ this.contextMenuStrip1.Size = new System.Drawing.Size(102, 26);
+ //
+ // clearToolStripMenuItem
+ //
+ this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
+ this.clearToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
+ this.clearToolStripMenuItem.Text = "&Clear";
+ this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
+ //
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -105,9 +122,10 @@
//
// StickyBox
//
+ this.StickyBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.StickyBox.AutoSize = true;
this.StickyBox.Enabled = false;
- this.StickyBox.Location = new System.Drawing.Point(12, 247);
+ this.StickyBox.Location = new System.Drawing.Point(9, 283);
this.StickyBox.Name = "StickyBox";
this.StickyBox.Size = new System.Drawing.Size(55, 17);
this.StickyBox.TabIndex = 7;
@@ -115,38 +133,24 @@
this.StickyBox.UseVisualStyleBackColor = true;
this.StickyBox.CheckedChanged += new System.EventHandler(this.StickyBox_CheckedChanged);
//
- // contextMenuStrip1
- //
- this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.clearToolStripMenuItem});
- this.contextMenuStrip1.Name = "contextMenuStrip1";
- this.contextMenuStrip1.Size = new System.Drawing.Size(102, 26);
- //
- // clearToolStripMenuItem
- //
- this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
- this.clearToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
- this.clearToolStripMenuItem.Text = "&Clear";
- this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
- //
// VirtualPadForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(388, 274);
- this.Controls.Add(this.StickyBox);
+ this.ClientSize = new System.Drawing.Size(388, 312);
this.Controls.Add(this.ControllerBox);
+ this.Controls.Add(this.StickyBox);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
- this.MaximumSize = new System.Drawing.Size(404, 312);
- this.MinimumSize = new System.Drawing.Size(404, 312);
+ this.MaximumSize = new System.Drawing.Size(404, 350);
+ this.MinimumSize = new System.Drawing.Size(404, 350);
this.Name = "VirtualPadForm";
this.Text = "Virtual Pads";
this.Load += new System.EventHandler(this.VirtualPadForm_Load);
+ this.contextMenuStrip1.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
- this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
diff --git a/BizHawk.MultiClient/tools/VirtualPadForm.cs b/BizHawk.MultiClient/tools/VirtualPadForm.cs
index 7e4a35a9b9..2e35158a63 100644
--- a/BizHawk.MultiClient/tools/VirtualPadForm.cs
+++ b/BizHawk.MultiClient/tools/VirtualPadForm.cs
@@ -17,7 +17,7 @@ namespace BizHawk.MultiClient
//Restore defaults
//Autoload
- List Pads = new List();
+ List Pads = new List();
public VirtualPadForm()
{
@@ -60,12 +60,12 @@ namespace BizHawk.MultiClient
ataripad2.Controller = "P2";
Pads.Add(ataripad1);
Pads.Add(ataripad2);
- ControllerBox.Controls.Add(Pads[0]);
- ControllerBox.Controls.Add(Pads[1]);
+ ControllerBox.Controls.Add(ataripad1);
+ ControllerBox.Controls.Add(ataripad2);
VirtualPadA26Control ataricontrols = new VirtualPadA26Control();
ataricontrols.Location = new Point(8, 109);
Pads.Add(ataricontrols);
- ControllerBox.Controls.Add(Pads[2]);
+ ControllerBox.Controls.Add(Pads[2] as Control);
break;
case "NES":
VirtualPadNES nespad1 = new VirtualPadNES();
@@ -76,12 +76,12 @@ namespace BizHawk.MultiClient
nespad2.Controller = "P2";
Pads.Add(nespad1);
Pads.Add(nespad2);
- ControllerBox.Controls.Add(Pads[0]);
- ControllerBox.Controls.Add(Pads[1]);
+ ControllerBox.Controls.Add(nespad1);
+ ControllerBox.Controls.Add(nespad2);
VirtualPadNESControl controlpad1 = new VirtualPadNESControl();
controlpad1.Location = new Point(8, 109);
Pads.Add(controlpad1);
- ControllerBox.Controls.Add(Pads[2]);
+ ControllerBox.Controls.Add(controlpad1);
break;
case "SMS":
case "SG":
@@ -94,12 +94,12 @@ namespace BizHawk.MultiClient
smspad2.Controller = "P2";
Pads.Add(smspad1);
Pads.Add(smspad2);
- ControllerBox.Controls.Add(Pads[0]);
- ControllerBox.Controls.Add(Pads[1]);
+ ControllerBox.Controls.Add(smspad1);
+ ControllerBox.Controls.Add(smspad2);
VirtualPadSMSControl controlpad2 = new VirtualPadSMSControl();
controlpad2.Location = new Point(8, 109);
Pads.Add(controlpad2);
- ControllerBox.Controls.Add(Pads[2]);
+ ControllerBox.Controls.Add(Pads[2] as Control);
break;
case "PCE":
VirtualPadPCE pcepad1 = new VirtualPadPCE();
@@ -118,10 +118,10 @@ namespace BizHawk.MultiClient
Pads.Add(pcepad2);
Pads.Add(pcepad3);
Pads.Add(pcepad4);
- ControllerBox.Controls.Add(Pads[0]);
- ControllerBox.Controls.Add(Pads[1]);
- ControllerBox.Controls.Add(Pads[2]);
- ControllerBox.Controls.Add(Pads[3]);
+ ControllerBox.Controls.Add(pcepad1);
+ ControllerBox.Controls.Add(pcepad2);
+ ControllerBox.Controls.Add(pcepad3);
+ ControllerBox.Controls.Add(pcepad4);
break;
case "SNES":
VirtualPadSNES snespad1 = new VirtualPadSNES();
@@ -143,11 +143,11 @@ namespace BizHawk.MultiClient
Pads.Add(snespad3);
Pads.Add(snespad4);
Pads.Add(snescontrolpad);
- ControllerBox.Controls.Add(Pads[0]);
- ControllerBox.Controls.Add(Pads[1]);
- ControllerBox.Controls.Add(Pads[2]);
- ControllerBox.Controls.Add(Pads[3]);
- ControllerBox.Controls.Add(Pads[4]);
+ ControllerBox.Controls.Add(snespad1);
+ ControllerBox.Controls.Add(snespad2);
+ ControllerBox.Controls.Add(snespad3);
+ ControllerBox.Controls.Add(snespad4);
+ ControllerBox.Controls.Add(snescontrolpad);
break;
case "GB":
case "GBC":
@@ -155,18 +155,30 @@ namespace BizHawk.MultiClient
gbpad1.Location = new Point(8, 19);
gbpad1.Controller = "";
Pads.Add(gbpad1);
- ControllerBox.Controls.Add(Pads[0]);
+ ControllerBox.Controls.Add(gbpad1);
VirtualPadGBControl gbcontrolpad = new VirtualPadGBControl();
gbcontrolpad.Location = new Point(8, 109);
Pads.Add(gbcontrolpad);
- ControllerBox.Controls.Add(Pads[1]);
+ ControllerBox.Controls.Add(gbcontrolpad);
break;
case "GEN":
VirtualPadGen3Button genpad1 = new VirtualPadGen3Button();
genpad1.Location = new Point(8, 19);
genpad1.Controller = "P1";
Pads.Add(genpad1);
- ControllerBox.Controls.Add(Pads[0]);
+ ControllerBox.Controls.Add(genpad1);
+ break;
+ case "Coleco":
+ VirtualPadColeco coleco1 = new VirtualPadColeco();
+ coleco1.Location = new Point(8, 19);
+ coleco1.Controller = "P1";
+ VirtualPadColeco coleco2 = new VirtualPadColeco();
+ coleco2.Location = new Point(130, 19);
+ coleco2.Controller = "P2";
+ Pads.Add(coleco1);
+ Pads.Add(coleco2);
+ ControllerBox.Controls.Add(coleco1);
+ ControllerBox.Controls.Add(coleco2);
break;
}
}
@@ -278,3 +290,4 @@ namespace BizHawk.MultiClient
}
}
}
+
diff --git a/BizHawk.MultiClient/tools/VirtualPadNES.cs b/BizHawk.MultiClient/tools/VirtualPadNES.cs
index ee1113bcbf..3608d41ef9 100644
--- a/BizHawk.MultiClient/tools/VirtualPadNES.cs
+++ b/BizHawk.MultiClient/tools/VirtualPadNES.cs
@@ -171,16 +171,16 @@ namespace BizHawk.MultiClient
public override void SetButtons(string buttons)
{
if (buttons.Length < 8) return;
- if (buttons[0] == '.') PU.Checked = false; else PU.Checked = true;
- if (buttons[1] == '.') PD.Checked = false; else PD.Checked = true;
- if (buttons[2] == '.') PL.Checked = false; else PL.Checked = true;
- if (buttons[3] == '.') PR.Checked = false; else PR.Checked = true;
+ if (buttons[0] == '.') PU.Checked = false; else PU.Checked = true;
+ if (buttons[1] == '.') PD.Checked = false; else PD.Checked = true;
+ if (buttons[2] == '.') PL.Checked = false; else PL.Checked = true;
+ if (buttons[3] == '.') PR.Checked = false; else PR.Checked = true;
- if (buttons[4] == '.') B1.Checked = false; else B1.Checked = true;
- if (buttons[5] == '.') B2.Checked = false; else B2.Checked = true;
- if (buttons[6] == '.') B3.Checked = false; else B3.Checked = true;
- if (buttons[7] == '.') B4.Checked = false; else B4.Checked = true;
- }
+ if (buttons[4] == '.') B1.Checked = false; else B1.Checked = true;
+ if (buttons[5] == '.') B2.Checked = false; else B2.Checked = true;
+ if (buttons[6] == '.') B3.Checked = false; else B3.Checked = true;
+ if (buttons[7] == '.') B4.Checked = false; else B4.Checked = true;
+ }
private void Buttons_CheckedChanged(object sender, EventArgs e)
{
@@ -215,7 +215,7 @@ namespace BizHawk.MultiClient
B2.Checked = false;
B3.Checked = false;
B4.Checked = false;
-
+
Global.StickyXORAdapter.SetSticky(Controller + " Up", false);
Global.StickyXORAdapter.SetSticky(Controller + " Down", false);
Global.StickyXORAdapter.SetSticky(Controller + " Left", false);