good news: movies work! bad news: 1) movies don't work for TI83 yet 2) I broke some NES things, to be fixed in a later commit

This commit is contained in:
beirich 2011-05-08 00:06:43 +00:00
parent a02694b562
commit 33c300ff7b
15 changed files with 282 additions and 233 deletions

View File

@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Consoles.Calculator
bool m_CursorMoved; bool m_CursorMoved;
//------- //-------
public string GetControllersAsMnemonic() /* public string GetControllersAsMnemonic()
{ {
string input = "|"; string input = "|";
@ -240,7 +240,7 @@ namespace BizHawk.Emulation.Consoles.Calculator
Controller.ForceButton("COMMA"); Controller.ForceButton("COMMA");
if (mnemonic[50] != '.') if (mnemonic[50] != '.')
Controller.ForceButton("SIN"); Controller.ForceButton("SIN");
} }*/
public byte ReadMemory(ushort addr) public byte ReadMemory(ushort addr)
{ {

View File

@ -74,8 +74,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
} }
Controller.UpdateControls(Frame++); Controller.UpdateControls(Frame++);
if (resetSignal) //if (resetSignal)
Controller.UnpressButton("Reset"); //Controller.UnpressButton("Reset"); TODO fix this
resetSignal = Controller["Reset"]; resetSignal = Controller["Reset"];
ppu.FrameAdvance(); ppu.FrameAdvance();
if (lagged) if (lagged)

View File

@ -314,7 +314,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
return null; return null;
} }
public void SetControllersAsMnemonic(string mnemonic) /* public void SetControllersAsMnemonic(string mnemonic)
{ {
if (mnemonic.Length == 0) return; if (mnemonic.Length == 0) return;
@ -368,7 +368,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
input += "|"; input += "|";
return input; return input;
} }*/
public string GameName { get { return game_name; } } public string GameName { get { return game_name; } }
@ -489,8 +489,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
ser.Sync("ram", ref ram, false); ser.Sync("ram", ref ram, false);
ser.Sync("CIRAM", ref CIRAM, false); ser.Sync("CIRAM", ref CIRAM, false);
ser.Sync("cpu_accumulate", ref cpu_accumulate); ser.Sync("cpu_accumulate", ref cpu_accumulate);
string inp = GetControllersAsMnemonic(); //string inp = GetControllersAsMnemonic(); TODO sorry bout that
ser.SyncFixedString("input", ref inp, 32); //ser.SyncFixedString("input", ref inp, 32);
board.SyncState(ser); board.SyncState(ser);
ppu.SyncState(ser); ppu.SyncState(ser);
ser.EndSection(); ser.EndSection();

View File

@ -19,56 +19,6 @@
public ControllerDefinition ControllerDefinition { get { return PCEngineController; } } public ControllerDefinition ControllerDefinition { get { return PCEngineController; } }
public IController Controller { get; set; } public IController Controller { get; set; }
public void SetControllersAsMnemonic(string mnemonic)
{
if (mnemonic.Length == 0) return;
if (mnemonic[1] != '.')
Controller.ForceButton("Up");
if (mnemonic[2] != '.')
Controller.ForceButton("Down");
if (mnemonic[3] != '.')
Controller.ForceButton("Left");
if (mnemonic[4] != '.')
Controller.ForceButton("Right");
if (mnemonic[5] != '.')
Controller.ForceButton("I");
if (mnemonic[6] != '.')
Controller.ForceButton("II");
if (mnemonic[7] != '.')
Controller.ForceButton("Select");
if (mnemonic[8] != '.')
Controller.ForceButton("Run");
}
public string GetControllersAsMnemonic()
{
//TODO: Implement all controllers
string input = "|";
if (Controller.IsPressed("P1 Up")) input += "U";
else input += ".";
if (Controller.IsPressed("P1 Down")) input += "D";
else input += ".";
if (Controller.IsPressed("P1 Left")) input += "L";
else input += ".";
if (Controller.IsPressed("P1 Right")) input += "R";
else input += ".";
if (Controller.IsPressed("P1 B1")) input += "1";
else input += ".";
if (Controller.IsPressed("P1 B2")) input += "2";
else input += ".";
if (Controller.IsPressed("P1 Select")) input += "S";
else input += ".";
if (Controller.IsPressed("P1 Run")) input += "R";
else input += ".";
input += "|.|"; //TODO: Add commands like reset here
return input;
}
private int SelectedController; private int SelectedController;
private byte InputByte; private byte InputByte;
public bool SEL { get { return ((InputByte & 1) != 0) ;} } public bool SEL { get { return ((InputByte & 1) != 0) ;} }

View File

@ -13,83 +13,6 @@
} }
}; };
public void SetControllersAsMnemonic(string mnemonic)
{
if (mnemonic.Length == 0) return;
if (mnemonic[1] != '.')
Controller.ForceButton("P1 Up");
if (mnemonic[2] != '.')
Controller.ForceButton("P1 Down");
if (mnemonic[3] != '.')
Controller.ForceButton("P1 Left");
if (mnemonic[4] != '.')
Controller.ForceButton("P1 Right");
if (mnemonic[5] != '.')
Controller.ForceButton("P1 B1");
if (mnemonic[6] != '.')
Controller.ForceButton("P1 B2");
if (mnemonic[7] != '.')
Controller.ForceButton("P2 Up");
if (mnemonic[8] != '.')
Controller.ForceButton("P2 Down");
if (mnemonic[9] != '.')
Controller.ForceButton("P2 Left");
if (mnemonic[10] != '.')
Controller.ForceButton("P2 Right");
if (mnemonic[11] != '.')
Controller.ForceButton("P2 B1");
if (mnemonic[12] != '.')
Controller.ForceButton("P2 B2");
if (mnemonic[13] != '.')
Controller.ForceButton("Pause");
if (mnemonic[15] != '.' && mnemonic[15] != '0')
Controller.ForceButton("Reset");
}
public string GetControllersAsMnemonic()
{
string input = "|";
if (Controller.IsPressed("P1 Up")) input += "U";
else input += ".";
if (Controller.IsPressed("P1 Down")) input += "D";
else input += ".";
if (Controller.IsPressed("P1 Left")) input += "L";
else input += ".";
if (Controller.IsPressed("P1 Right")) input += "R";
else input += ".";
if (Controller.IsPressed("P1 B1")) input += "1";
else input += ".";
if (Controller.IsPressed("P1 B2")) input += "2";
else input += ".";
if (Controller.IsPressed("P2 Up")) input += "U";
else input += ".";
if (Controller.IsPressed("P2 Down")) input += "D";
else input += ".";
if (Controller.IsPressed("P2 Left")) input += "L";
else input += ".";
if (Controller.IsPressed("P2 Right")) input += "R";
else input += ".";
if (Controller.IsPressed("P2 B1")) input += "1";
else input += ".";
if (Controller.IsPressed("P2 B2")) input += "2";
else input += ".";
if (Controller.IsPressed("Pause")) input += "S";
else input += ".";
input += "|";
if (Controller.IsPressed("Reset")) input += "R";
else input += ".";
input += "|";
return input;
}
public ControllerDefinition ControllerDefinition { get { return SmsController; } } public ControllerDefinition ControllerDefinition { get { return SmsController; } }
public IController Controller { get; set; } public IController Controller { get; set; }

View File

@ -37,17 +37,7 @@ namespace BizHawk
{ {
return baseController.GetFloat(name); return baseController.GetFloat(name);
} }
public void UnpressButton(string name)
{
baseController.UnpressButton(name);
}
public void ForceButton(string button)
{
baseController.ForceButton(button);
}
private int frame; private int frame;
public void UpdateControls(int frame) public void UpdateControls(int frame)
@ -73,16 +63,6 @@ namespace BizHawk
writer.Seek(frame*2, SeekOrigin.Begin); writer.Seek(frame*2, SeekOrigin.Begin);
writer.Write((ushort)encodedValue); writer.Write((ushort)encodedValue);
} }
public void SetSticky(string button, bool sticky)
{
baseController.SetSticky(button, sticky);
}
public bool IsSticky(string button)
{
return baseController.IsSticky(button);
}
} }
public class InputPlayback : IController public class InputPlayback : IController

View File

@ -17,12 +17,6 @@ namespace BizHawk
bool IsPressed(string button); bool IsPressed(string button);
float GetFloat(string name); float GetFloat(string name);
void SetSticky(string button, bool sticky);
bool IsSticky(string button);
void UnpressButton(string button);
void ForceButton(string button);
void UpdateControls(int frame); void UpdateControls(int frame);
} }
} }

View File

@ -12,9 +12,6 @@ namespace BizHawk
ControllerDefinition ControllerDefinition { get; } ControllerDefinition ControllerDefinition { get; }
IController Controller { get; set; } IController Controller { get; set; }
string GetControllersAsMnemonic();
void SetControllersAsMnemonic(string mnemonic);
void LoadGame(IGame game); void LoadGame(IGame game);
void FrameAdvance(bool render); void FrameAdvance(bool render);

View File

@ -13,11 +13,12 @@ namespace BizHawk.MultiClient
public static Config Config; public static Config Config;
public static IEmulator Emulator; public static IEmulator Emulator;
public static RomGame Game; public static RomGame Game;
public static IController ClientControls; public static Controller ClientControls;
public static IController SMSControls; public static Controller SMSControls;
public static IController PCEControls; public static Controller PCEControls;
public static IController GenControls; public static Controller GenControls;
public static IController TI83Controls; public static Controller TI83Controls;
public static IController NESControls; public static Controller NESControls;
public static Controller ActiveController;
} }
} }

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
namespace BizHawk.MultiClient namespace BizHawk.MultiClient
{ {
@ -11,6 +12,19 @@ namespace BizHawk.MultiClient
private List<string> unpressedButtons = new List<string>(); private List<string> unpressedButtons = new List<string>();
private List<string> forcePressedButtons = new List<string>(); private List<string> forcePressedButtons = new List<string>();
private List<string> removeFromForcePressedButtons = new List<string>(); private List<string> removeFromForcePressedButtons = new List<string>();
private List<string> programmaticallyPressedButtons = new List<string>();
private bool movieMode;
public bool MovieMode
{
get { return movieMode; }
set
{
movieMode = value;
if (value == false)
programmaticallyPressedButtons.Clear();
}
}
public Controller(ControllerDefinition definition) public Controller(ControllerDefinition definition)
{ {
@ -52,6 +66,10 @@ namespace BizHawk.MultiClient
public bool IsPressed(string button) public bool IsPressed(string button)
{ {
if (MovieMode)
{
return programmaticallyPressedButtons.Contains(button);
}
if (forcePressedButtons.Contains(button)) if (forcePressedButtons.Contains(button))
{ {
removeFromForcePressedButtons.Add(button); removeFromForcePressedButtons.Add(button);
@ -117,5 +135,190 @@ namespace BizHawk.MultiClient
{ {
forcePressedButtons.Add(button); forcePressedButtons.Add(button);
} }
public string GetControllersAsMnemonic()
{
StringBuilder input = new StringBuilder("|");
if (type.Name == "SMS Controller")
{
input.Append(IsPressed("P1 Up") ? "U" : ".");
input.Append(IsPressed("P1 Down") ? "D" : ".");
input.Append(IsPressed("P1 Left") ? "L" : ".");
input.Append(IsPressed("P1 Right") ? "R" : ".");
input.Append(IsPressed("P1 B1") ? "1" : ".");
input.Append(IsPressed("P1 B2") ? "2" : ".");
input.Append("|");
input.Append(IsPressed("P2 Up") ? "U" : ".");
input.Append(IsPressed("P2 Down") ? "D" : ".");
input.Append(IsPressed("P2 Left") ? "L" : ".");
input.Append(IsPressed("P2 Right") ? "R" : ".");
input.Append(IsPressed("P2 B1") ? "1" : ".");
input.Append(IsPressed("P2 B2") ? "2" : ".");
input.Append("|");
input.Append(IsPressed("Pause") ? "P" : ".");
input.Append(IsPressed("Reset") ? "R" : ".");
return input.ToString();
}
if (type.Name == "PC Engine Controller")
{
input.Append(IsPressed("P1 Up") ? "U" : ".");
input.Append(IsPressed("P1 Down") ? "D" : ".");
input.Append(IsPressed("P1 Left") ? "L" : ".");
input.Append(IsPressed("P1 Right") ? "R" : ".");
input.Append(IsPressed("P1 B1") ? "1" : ".");
input.Append(IsPressed("P1 B2") ? "2" : ".");
input.Append(IsPressed("P1 Select") ? "S" : ".");
input.Append(IsPressed("P1 Run") ? "R" : ".");
input.Append("|");
input.Append(IsPressed("P2 Up") ? "U" : ".");
input.Append(IsPressed("P2 Down") ? "D" : ".");
input.Append(IsPressed("P2 Left") ? "L" : ".");
input.Append(IsPressed("P2 Right") ? "R" : ".");
input.Append(IsPressed("P2 B1") ? "1" : ".");
input.Append(IsPressed("P2 B2") ? "2" : ".");
input.Append(IsPressed("P2 Select") ? "S" : ".");
input.Append(IsPressed("P2 Run") ? "R" : ".");
input.Append("|");
input.Append(IsPressed("P3 Up") ? "U" : ".");
input.Append(IsPressed("P3 Down") ? "D" : ".");
input.Append(IsPressed("P3 Left") ? "L" : ".");
input.Append(IsPressed("P3 Right") ? "R" : ".");
input.Append(IsPressed("P3 B1") ? "1" : ".");
input.Append(IsPressed("P3 B2") ? "2" : ".");
input.Append(IsPressed("P3 Select") ? "S" : ".");
input.Append(IsPressed("P3 Run") ? "R" : ".");
input.Append("|");
input.Append(IsPressed("P4 Up") ? "U" : ".");
input.Append(IsPressed("P4 Down") ? "D" : ".");
input.Append(IsPressed("P4 Left") ? "L" : ".");
input.Append(IsPressed("P4 Right") ? "R" : ".");
input.Append(IsPressed("P4 B1") ? "1" : ".");
input.Append(IsPressed("P4 B2") ? "2" : ".");
input.Append(IsPressed("P4 Select") ? "S" : ".");
input.Append(IsPressed("P4 Run") ? "R" : ".");
input.Append("|");
input.Append(IsPressed("P5 Up") ? "U" : ".");
input.Append(IsPressed("P5 Down") ? "D" : ".");
input.Append(IsPressed("P5 Left") ? "L" : ".");
input.Append(IsPressed("P5 Right") ? "R" : ".");
input.Append(IsPressed("P5 B1") ? "1" : ".");
input.Append(IsPressed("P5 B2") ? "2" : ".");
input.Append(IsPressed("P5 Select") ? "S" : ".");
input.Append(IsPressed("P5 Run") ? "R" : ".");
input.Append("|");
return input.ToString();
}
if (type.Name == "NES Controls")
{
input.Append(IsPressed("Up") ? "U" : ".");
input.Append(IsPressed("Down") ? "D" : ".");
input.Append(IsPressed("Left") ? "L" : ".");
input.Append(IsPressed("Right") ? "R" : ".");
input.Append(IsPressed("A") ? "A" : ".");
input.Append(IsPressed("B") ? "B" : ".");
input.Append(IsPressed("Select") ? "s" : ".");
input.Append(IsPressed("Start") ? "S" : ".");
input.Append("|");
input.Append(IsPressed("Reset") ? "R" : ".");
return input.ToString();
}
return "?";
}
public void SetControllersAsMnemonic(string mnemonic)
{
MovieMode = true;
programmaticallyPressedButtons.Clear();
if (type.Name == "SMS Controller")
{
if (mnemonic[1] != '.') programmaticallyPressedButtons.Add("P1 Up");
if (mnemonic[2] != '.') programmaticallyPressedButtons.Add("P1 Down");
if (mnemonic[3] != '.') programmaticallyPressedButtons.Add("P1 Left");
if (mnemonic[4] != '.') programmaticallyPressedButtons.Add("P1 Right");
if (mnemonic[5] != '.') programmaticallyPressedButtons.Add("P1 B1");
if (mnemonic[6] != '.') programmaticallyPressedButtons.Add("P1 B2");
if (mnemonic[8] != '.') programmaticallyPressedButtons.Add("P2 Up");
if (mnemonic[9] != '.') programmaticallyPressedButtons.Add("P2 Down");
if (mnemonic[10] != '.') programmaticallyPressedButtons.Add("P2 Left");
if (mnemonic[11] != '.') programmaticallyPressedButtons.Add("P2 Right");
if (mnemonic[12] != '.') programmaticallyPressedButtons.Add("P2 B1");
if (mnemonic[13] != '.') programmaticallyPressedButtons.Add("P2 B2");
if (mnemonic[15] != '.') programmaticallyPressedButtons.Add("Pause");
if (mnemonic[16] != '.') programmaticallyPressedButtons.Add("Reset");
}
if (type.Name == "PC Engine Controller")
{
if (mnemonic[1] != '.') programmaticallyPressedButtons.Add("P1 Up");
if (mnemonic[2] != '.') programmaticallyPressedButtons.Add("P1 Down");
if (mnemonic[3] != '.') programmaticallyPressedButtons.Add("P1 Left");
if (mnemonic[4] != '.') programmaticallyPressedButtons.Add("P1 Right");
if (mnemonic[5] != '.') programmaticallyPressedButtons.Add("P1 B1");
if (mnemonic[6] != '.') programmaticallyPressedButtons.Add("P1 B2");
if (mnemonic[7] != '.') programmaticallyPressedButtons.Add("P1 Select");
if (mnemonic[8] != '.') programmaticallyPressedButtons.Add("P1 Run");
if (mnemonic[10] != '.') programmaticallyPressedButtons.Add("P2 Up");
if (mnemonic[11] != '.') programmaticallyPressedButtons.Add("P2 Down");
if (mnemonic[12] != '.') programmaticallyPressedButtons.Add("P2 Left");
if (mnemonic[13] != '.') programmaticallyPressedButtons.Add("P2 Right");
if (mnemonic[14] != '.') programmaticallyPressedButtons.Add("P2 B1");
if (mnemonic[15] != '.') programmaticallyPressedButtons.Add("P2 B2");
if (mnemonic[16] != '.') programmaticallyPressedButtons.Add("P2 Select");
if (mnemonic[17] != '.') programmaticallyPressedButtons.Add("P2 Run");
if (mnemonic[19] != '.') programmaticallyPressedButtons.Add("P3 Up");
if (mnemonic[20] != '.') programmaticallyPressedButtons.Add("P3 Down");
if (mnemonic[21] != '.') programmaticallyPressedButtons.Add("P3 Left");
if (mnemonic[22] != '.') programmaticallyPressedButtons.Add("P3 Right");
if (mnemonic[23] != '.') programmaticallyPressedButtons.Add("P3 B1");
if (mnemonic[24] != '.') programmaticallyPressedButtons.Add("P3 B2");
if (mnemonic[25] != '.') programmaticallyPressedButtons.Add("P3 Select");
if (mnemonic[26] != '.') programmaticallyPressedButtons.Add("P3 Run");
if (mnemonic[28] != '.') programmaticallyPressedButtons.Add("P4 Up");
if (mnemonic[29] != '.') programmaticallyPressedButtons.Add("P4 Down");
if (mnemonic[30] != '.') programmaticallyPressedButtons.Add("P4 Left");
if (mnemonic[31] != '.') programmaticallyPressedButtons.Add("P4 Right");
if (mnemonic[32] != '.') programmaticallyPressedButtons.Add("P4 B1");
if (mnemonic[33] != '.') programmaticallyPressedButtons.Add("P4 B2");
if (mnemonic[34] != '.') programmaticallyPressedButtons.Add("P4 Select");
if (mnemonic[35] != '.') programmaticallyPressedButtons.Add("P4 Run");
if (mnemonic[37] != '.') programmaticallyPressedButtons.Add("P5 Up");
if (mnemonic[38] != '.') programmaticallyPressedButtons.Add("P5 Down");
if (mnemonic[39] != '.') programmaticallyPressedButtons.Add("P5 Left");
if (mnemonic[40] != '.') programmaticallyPressedButtons.Add("P5 Right");
if (mnemonic[41] != '.') programmaticallyPressedButtons.Add("P5 B1");
if (mnemonic[42] != '.') programmaticallyPressedButtons.Add("P5 B2");
if (mnemonic[43] != '.') programmaticallyPressedButtons.Add("P5 Select");
if (mnemonic[44] != '.') programmaticallyPressedButtons.Add("P5 Run");
}
if (type.Name == "NES Controls")
{
if (mnemonic[1] != '.') programmaticallyPressedButtons.Add("Up");
if (mnemonic[2] != '.') programmaticallyPressedButtons.Add("Down");
if (mnemonic[3] != '.') programmaticallyPressedButtons.Add("Left");
if (mnemonic[4] != '.') programmaticallyPressedButtons.Add("Right");
if (mnemonic[5] != '.') programmaticallyPressedButtons.Add("A");
if (mnemonic[6] != '.') programmaticallyPressedButtons.Add("B");
if (mnemonic[7] != '.') programmaticallyPressedButtons.Add("Select");
if (mnemonic[8] != '.') programmaticallyPressedButtons.Add("Start");
if (mnemonic[10] != '.') programmaticallyPressedButtons.Add("Reset");
}
}
} }
} }

View File

@ -269,7 +269,7 @@ namespace BizHawk.MultiClient
private void resetToolStripMenuItem_Click(object sender, EventArgs e) private void resetToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (Global.Emulator.ControllerDefinition.BoolButtons.Contains("Reset")) if (Global.Emulator.ControllerDefinition.BoolButtons.Contains("Reset"))
Global.Emulator.Controller.ForceButton("Reset"); Global.ActiveController.ForceButton("Reset");
} }
private void pauseToolStripMenuItem_Click(object sender, EventArgs e) private void pauseToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -506,32 +506,33 @@ namespace BizHawk.MultiClient
case "SG": case "SG":
case "SMS": case "SMS":
Global.Emulator.Controller = Global.SMSControls; Global.ActiveController = Global.SMSControls;
break; break;
case "GG": case "GG":
Global.Emulator.Controller = Global.SMSControls; Global.ActiveController = Global.SMSControls;
break; break;
case "PCE": case "PCE":
Global.Emulator.Controller = Global.PCEControls; Global.ActiveController = Global.PCEControls;
break; break;
case "SGX": case "SGX":
Global.Emulator.Controller = Global.PCEControls; Global.ActiveController = Global.PCEControls;
break; break;
case "GEN": case "GEN":
Global.Emulator.Controller = Global.GenControls; Global.ActiveController = Global.GenControls;
break; break;
case "TI83": case "TI83":
Global.Emulator.Controller = Global.TI83Controls; Global.ActiveController = Global.TI83Controls;
break; break;
case "NES": case "NES":
Global.Emulator.Controller = Global.NESControls; Global.ActiveController = Global.NESControls;
break; break;
case "GB": case "GB":
break; break;
default: default:
break; break;
} }
Global.Emulator.Controller = Global.ActiveController;
Global.ActiveController.MovieMode = false;
} }
private bool LoadRom(string path) private bool LoadRom(string path)
@ -915,7 +916,7 @@ namespace BizHawk.MultiClient
UnpauseEmulator(); UnpauseEmulator();
} }
} }
wasPressed = Global.Emulator.GetControllersAsMnemonic(); wasPressed = Global.ActiveController.GetControllersAsMnemonic();
} }
else else
{ {
@ -967,7 +968,7 @@ namespace BizHawk.MultiClient
else if (!Global.Config.MuteFrameAdvance) else if (!Global.Config.MuteFrameAdvance)
genSound = true; genSound = true;
if (InputLog.GetMovieMode() == MOVIEMODE.PLAY) if (InputLog.GetMovieMode() == MOVIEMODE.PLAY)
Global.Emulator.SetControllersAsMnemonic(InputLog.GetInputFrame(Global.Emulator.Frame)+ 1); Global.ActiveController.SetControllersAsMnemonic(InputLog.GetInputFrame(Global.Emulator.Frame) + 1);
Global.Emulator.FrameAdvance(!throttle.skipnextframe); Global.Emulator.FrameAdvance(!throttle.skipnextframe);
RamWatch1.UpdateValues(); RamWatch1.UpdateValues();
RamSearch1.UpdateValues(); RamSearch1.UpdateValues();

View File

@ -353,7 +353,7 @@ namespace BizHawk.MultiClient
public string MakeInputDisplay() public string MakeInputDisplay()
{ {
string tmp = Global.Emulator.GetControllersAsMnemonic(); string tmp = Global.ActiveController.GetControllersAsMnemonic();
tmp = tmp.Replace(".", " "); tmp = tmp.Replace(".", " ");
tmp = tmp.Replace("|", ""); tmp = tmp.Replace("|", "");
return tmp; return tmp;

View File

@ -123,247 +123,247 @@ namespace BizHawk.MultiClient
private void button42_Click(object sender, EventArgs e) private void button42_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("ENTER"); Global.ActiveController.ForceButton("ENTER");
} }
private void button43_Click(object sender, EventArgs e) private void button43_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("DASH"); Global.ActiveController.ForceButton("DASH");
} }
private void button39_Click(object sender, EventArgs e) private void button39_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("2"); Global.ActiveController.ForceButton("2");
} }
private void ONE_Click(object sender, EventArgs e) private void ONE_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("1"); Global.ActiveController.ForceButton("1");
} }
private void THREE_Click(object sender, EventArgs e) private void THREE_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("3"); Global.ActiveController.ForceButton("3");
} }
private void FOUR_Click(object sender, EventArgs e) private void FOUR_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("4"); Global.ActiveController.ForceButton("4");
} }
private void FIVE_Click(object sender, EventArgs e) private void FIVE_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("5"); Global.ActiveController.ForceButton("5");
} }
private void SIX_Click(object sender, EventArgs e) private void SIX_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("6"); Global.ActiveController.ForceButton("6");
} }
private void SEVEN_Click(object sender, EventArgs e) private void SEVEN_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("7"); Global.ActiveController.ForceButton("7");
} }
private void EIGHT_Click(object sender, EventArgs e) private void EIGHT_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("8"); Global.ActiveController.ForceButton("8");
} }
private void NINE_Click(object sender, EventArgs e) private void NINE_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("9"); Global.ActiveController.ForceButton("9");
} }
private void ON_Click(object sender, EventArgs e) private void ON_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("ON"); Global.ActiveController.ForceButton("ON");
} }
private void STO_Click(object sender, EventArgs e) private void STO_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("STO"); Global.ActiveController.ForceButton("STO");
} }
private void PLUS_Click(object sender, EventArgs e) private void PLUS_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("PLUS"); Global.ActiveController.ForceButton("PLUS");
} }
private void LN_Click(object sender, EventArgs e) private void LN_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("LN"); Global.ActiveController.ForceButton("LN");
} }
private void MINUS_Click(object sender, EventArgs e) private void MINUS_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("MINUS"); Global.ActiveController.ForceButton("MINUS");
} }
private void LOG_Click(object sender, EventArgs e) private void LOG_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("LOG"); Global.ActiveController.ForceButton("LOG");
} }
private void MULTIPLY_Click(object sender, EventArgs e) private void MULTIPLY_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("MULTIPLY"); Global.ActiveController.ForceButton("MULTIPLY");
} }
private void button26_Click(object sender, EventArgs e) private void button26_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("SQUARED"); Global.ActiveController.ForceButton("SQUARED");
} }
private void button25_Click(object sender, EventArgs e) private void button25_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("COMMA"); Global.ActiveController.ForceButton("COMMA");
} }
private void button24_Click(object sender, EventArgs e) private void button24_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("PARAOPEN"); Global.ActiveController.ForceButton("PARAOPEN");
} }
private void button23_Click(object sender, EventArgs e) private void button23_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("PARACLOSE"); Global.ActiveController.ForceButton("PARACLOSE");
} }
private void button22_Click(object sender, EventArgs e) private void button22_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("DIVIDE"); Global.ActiveController.ForceButton("DIVIDE");
} }
private void button17_Click(object sender, EventArgs e) private void button17_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("NEG1"); Global.ActiveController.ForceButton("NEG1");
} }
private void button18_Click(object sender, EventArgs e) private void button18_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("SIN"); Global.ActiveController.ForceButton("SIN");
} }
private void button19_Click(object sender, EventArgs e) private void button19_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("COS"); Global.ActiveController.ForceButton("COS");
} }
private void button20_Click(object sender, EventArgs e) private void button20_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("TAN"); Global.ActiveController.ForceButton("TAN");
} }
private void button21_Click(object sender, EventArgs e) private void button21_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("EXP"); Global.ActiveController.ForceButton("EXP");
} }
private void button12_Click(object sender, EventArgs e) private void button12_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("MATH"); Global.ActiveController.ForceButton("MATH");
} }
private void button13_Click(object sender, EventArgs e) private void button13_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("MATRIX"); Global.ActiveController.ForceButton("MATRIX");
} }
private void button14_Click(object sender, EventArgs e) private void button14_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("PRGM"); Global.ActiveController.ForceButton("PRGM");
} }
private void button15_Click(object sender, EventArgs e) private void button15_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("VARS"); Global.ActiveController.ForceButton("VARS");
} }
private void button16_Click(object sender, EventArgs e) private void button16_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("CLEAR"); Global.ActiveController.ForceButton("CLEAR");
} }
private void button11_Click(object sender, EventArgs e) private void button11_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("ALPHA"); Global.ActiveController.ForceButton("ALPHA");
} }
private void button4_Click(object sender, EventArgs e) private void button4_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("X"); Global.ActiveController.ForceButton("X");
} }
private void button10_Click(object sender, EventArgs e) private void button10_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("STAT"); Global.ActiveController.ForceButton("STAT");
} }
private void button5_Click(object sender, EventArgs e) private void button5_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("2ND"); Global.ActiveController.ForceButton("2ND");
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("MODE"); Global.ActiveController.ForceButton("MODE");
} }
private void button3_Click(object sender, EventArgs e) private void button3_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("DEL"); Global.ActiveController.ForceButton("DEL");
} }
private void button47_Click(object sender, EventArgs e) private void button47_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("LEFT"); Global.ActiveController.ForceButton("LEFT");
} }
private void button49_Click(object sender, EventArgs e) private void button49_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("DOWN"); Global.ActiveController.ForceButton("DOWN");
} }
private void button48_Click(object sender, EventArgs e) private void button48_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("RIGHT"); Global.ActiveController.ForceButton("RIGHT");
} }
private void button50_Click(object sender, EventArgs e) private void button50_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("UP"); Global.ActiveController.ForceButton("UP");
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("Y"); Global.ActiveController.ForceButton("Y");
} }
private void button6_Click(object sender, EventArgs e) private void button6_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("WINDOW"); Global.ActiveController.ForceButton("WINDOW");
} }
private void button7_Click(object sender, EventArgs e) private void button7_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("ZOOM"); Global.ActiveController.ForceButton("ZOOM");
} }
private void button8_Click(object sender, EventArgs e) private void button8_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("TRACE"); Global.ActiveController.ForceButton("TRACE");
} }
private void button9_Click(object sender, EventArgs e) private void button9_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("GRAPH"); Global.ActiveController.ForceButton("GRAPH");
} }
private void PERIOD_Click(object sender, EventArgs e) private void PERIOD_Click(object sender, EventArgs e)
{ {
Global.Emulator.Controller.ForceButton("DOT"); Global.ActiveController.ForceButton("DOT");
} }
private void showHotkToolStripMenuItem_Click(object sender, EventArgs e) private void showHotkToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -52,7 +52,7 @@ namespace BizHawk.MultiClient
public void GetMnemonic() public void GetMnemonic()
{ {
if (MovieMode == MOVIEMODE.RECORD) if (MovieMode == MOVIEMODE.RECORD)
Log.AddFrame(Global.Emulator.GetControllersAsMnemonic()); Log.AddFrame(Global.ActiveController.GetControllersAsMnemonic());
} }
public string GetInputFrame(int frame) public string GetInputFrame(int frame)