SNES - hook up power cycle to mnemonics for recording & input display, TAStudio - hook up the power button on virtual pad
This commit is contained in:
parent
ef710a84b9
commit
32ca8fba61
|
@ -121,7 +121,7 @@ namespace BizHawk.MultiClient
|
||||||
{"Gameboy Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
{"Gameboy Controller", new Dictionary<string, string>() {{"Power", "P"}}},
|
||||||
{"Genesis 3-Button Controller", new Dictionary<string, string>() {}},
|
{"Genesis 3-Button Controller", new Dictionary<string, string>() {}},
|
||||||
{"NES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
{"NES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
||||||
{"SNES Controller", new Dictionary<string, string>() {{"Reset", "r"}}},
|
{"SNES Controller", new Dictionary<string, string>() {{"Power", "P"}, {"Reset", "r"}}},
|
||||||
{"PC Engine Controller", new Dictionary<string, string>() {}},
|
{"PC Engine Controller", new Dictionary<string, string>() {}},
|
||||||
{"SMS Controller", new Dictionary<string, string>() {{"Pause", "p"}, {"Reset", "r"}}},
|
{"SMS Controller", new Dictionary<string, string>() {{"Pause", "p"}, {"Reset", "r"}}},
|
||||||
{"TI83 Controller", new Dictionary<string, string>() {}}
|
{"TI83 Controller", new Dictionary<string, string>() {}}
|
||||||
|
|
|
@ -366,6 +366,16 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
StringBuilder input = new StringBuilder("|");
|
StringBuilder input = new StringBuilder("|");
|
||||||
input.Append(IsBasePressed("Reset") ? Global.COMMANDS[ControlType]["Reset"] : ".");
|
input.Append(IsBasePressed("Reset") ? Global.COMMANDS[ControlType]["Reset"] : ".");
|
||||||
|
|
||||||
|
if (IsBasePressed("Power"))
|
||||||
|
{
|
||||||
|
input.Append(Global.COMMANDS[ControlType]["Power"]);
|
||||||
|
}
|
||||||
|
else if (IsBasePressed("Reset"))
|
||||||
|
{
|
||||||
|
input.Append(Global.COMMANDS[ControlType]["Reset"]);
|
||||||
|
}
|
||||||
|
|
||||||
input.Append("|");
|
input.Append("|");
|
||||||
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
||||||
{
|
{
|
||||||
|
@ -608,6 +618,16 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
|
|
||||||
Force("Reset", mnemonic[1] != '.' && mnemonic[1] != '0' && mnemonic[1] != 'l');
|
Force("Reset", mnemonic[1] != '.' && mnemonic[1] != '0' && mnemonic[1] != 'l');
|
||||||
|
|
||||||
|
if (mnemonic[1] == 'P')
|
||||||
|
{
|
||||||
|
Force("Power", true);
|
||||||
|
}
|
||||||
|
else if (mnemonic[1] != '.' && mnemonic[1] != '0')
|
||||||
|
{
|
||||||
|
Force("Reset", true);
|
||||||
|
}
|
||||||
|
|
||||||
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
for (int player = 1; player <= Global.PLAYERS[ControlType]; player++)
|
||||||
{
|
{
|
||||||
int srcindex = (player - 1) * (Global.BUTTONS[ControlType].Count + 1);
|
int srcindex = (player - 1) * (Global.BUTTONS[ControlType].Count + 1);
|
||||||
|
|
|
@ -36,7 +36,6 @@ namespace BizHawk.MultiClient
|
||||||
this.B1.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
this.B1.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||||
this.B1.UseVisualStyleBackColor = true;
|
this.B1.UseVisualStyleBackColor = true;
|
||||||
this.B1.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
|
this.B1.CheckedChanged += new System.EventHandler(this.Buttons_CheckedChanged);
|
||||||
this.B1.Enabled = false; //Until a hard reset is emulated by SNESHawk
|
|
||||||
this.B1.ForeColor = Color.Red;
|
this.B1.ForeColor = Color.Red;
|
||||||
|
|
||||||
this.B2 = new CheckBox();
|
this.B2 = new CheckBox();
|
||||||
|
@ -88,7 +87,18 @@ namespace BizHawk.MultiClient
|
||||||
public override string GetMnemonic()
|
public override string GetMnemonic()
|
||||||
{
|
{
|
||||||
StringBuilder input = new StringBuilder("");
|
StringBuilder input = new StringBuilder("");
|
||||||
input.Append(B2.Checked ? "r" : ".");
|
if (B1.Checked)
|
||||||
|
{
|
||||||
|
input.Append('P');
|
||||||
|
}
|
||||||
|
else if (B2.Checked)
|
||||||
|
{
|
||||||
|
input.Append('r');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
input.Append('.');
|
||||||
|
}
|
||||||
input.Append("|");
|
input.Append("|");
|
||||||
return input.ToString();
|
return input.ToString();
|
||||||
}
|
}
|
||||||
|
@ -96,10 +106,14 @@ namespace BizHawk.MultiClient
|
||||||
public override void SetButtons(string buttons)
|
public override void SetButtons(string buttons)
|
||||||
{
|
{
|
||||||
if (buttons.Length < 1) return;
|
if (buttons.Length < 1) return;
|
||||||
if (buttons[0] == '.' || buttons[0] == 'l' || buttons[0] == '0')
|
if (buttons[0] == '.' || buttons[0] == '0')
|
||||||
{
|
{
|
||||||
B2.Checked = false;
|
B2.Checked = false;
|
||||||
}
|
}
|
||||||
|
else if (buttons[0] == 'P')
|
||||||
|
{
|
||||||
|
B1.Checked = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
B2.Checked = true;
|
B2.Checked = true;
|
||||||
|
@ -112,6 +126,18 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (sender == B1)
|
||||||
|
{
|
||||||
|
Global.StickyXORAdapter.SetSticky("Power", B1.Checked);
|
||||||
|
if (B1.Checked == true)
|
||||||
|
{
|
||||||
|
B1.BackColor = Color.Pink;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
B1.BackColor = SystemColors.Control;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (sender == B2)
|
else if (sender == B2)
|
||||||
{
|
{
|
||||||
Global.StickyXORAdapter.SetSticky("Reset", B2.Checked);
|
Global.StickyXORAdapter.SetSticky("Reset", B2.Checked);
|
||||||
|
@ -137,6 +163,7 @@ namespace BizHawk.MultiClient
|
||||||
B1.Checked = false;
|
B1.Checked = false;
|
||||||
B2.Checked = false;
|
B2.Checked = false;
|
||||||
Global.StickyXORAdapter.SetSticky("Reset", false);
|
Global.StickyXORAdapter.SetSticky("Reset", false);
|
||||||
|
Global.StickyXORAdapter.SetSticky("Power", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue