diff --git a/BizHawk.Emulation/Consoles/Calculator/TI83.cs b/BizHawk.Emulation/Consoles/Calculator/TI83.cs index 9be0b686b5..459b1e44a8 100644 --- a/BizHawk.Emulation/Consoles/Calculator/TI83.cs +++ b/BizHawk.Emulation/Consoles/Calculator/TI83.cs @@ -377,7 +377,8 @@ namespace BizHawk.Emulation.Consoles.Calculator public void FrameAdvance(bool render) { - //I eyeballed this speed + Frame++; + //I eyeballed this speed for (int i = 0; i < 5; i++) { onPressed = Controller.IsPressed("ON"); @@ -409,10 +410,8 @@ namespace BizHawk.Emulation.Consoles.Calculator disp_x = disp_y = 0; } - public int Frame - { - get { return 0; } - } + public int Frame {get; set;} + public bool DeterministicEmulation { get { return true; } set { } } public byte[] SaveRam { get { return null; } } @@ -424,10 +423,22 @@ namespace BizHawk.Emulation.Consoles.Calculator public void SaveStateText(TextWriter writer) { + writer.WriteLine("[TI83]\n"); + writer.WriteLine("Frame {0}", Frame); + writer.WriteLine("[/TI83]"); } public void LoadStateText(TextReader reader) { + while (true) + { + string[] args = reader.ReadLine().Split(' '); + if (args[0].Trim() == "") continue; + if (args[0] == "[TI83]") continue; + if (args[0] == "[/TI83]") break; + if (args[0] == "Frame") + Frame = int.Parse(args[1]); + } } public void SaveStateBinary(BinaryWriter writer) diff --git a/BizHawk.MultiClient/RomGame.cs b/BizHawk.MultiClient/RomGame.cs index bec60dce3d..696a99ea82 100644 --- a/BizHawk.MultiClient/RomGame.cs +++ b/BizHawk.MultiClient/RomGame.cs @@ -118,6 +118,7 @@ namespace BizHawk.MultiClient case "GB": return "Gameboy/SaveRAM/" + Name + ".SaveRAM"; case "GEN": return "Genesis/SaveRAM/" + Name + ".SaveRAM"; case "NES": return "NES/SaveRAM/" + Name + ".SaveRAM"; + case "TI83": return "TI83/SaveRAM/" + "TI83" + ".SaveRAM"; default: return ""; } } @@ -137,6 +138,7 @@ namespace BizHawk.MultiClient case "GB": return "Gameboy/State/" + Name; case "GEN": return "Genesis/State/" + Name; case "NES": return "NES/State/" + Name; + case "TI83": return "TI83/State/" + "TI83"; default: return ""; } @@ -157,6 +159,7 @@ namespace BizHawk.MultiClient case "GB": return "Gameboy/Movie/" + Name; case "GEN": return "Genesis/Movie/" + Name; case "NES": return "NES/Movie/" + Name; + case "TI83": return "TI83/Movie/" + Name; default: return ""; } } @@ -176,6 +179,7 @@ namespace BizHawk.MultiClient case "GB": return "Gameboy/Screenshot/" + Name; case "GEN": return "Genesis/Screenshot/" + Name; case "NES": return "NES/Screenshot/" + Name; + case "TI83": return "TI83/Screenshot/" + "TI83"; default: return ""; } }