Add islag to savestates (now lagframe alert status updates when loading a state)

This commit is contained in:
andres.delikat 2012-07-30 14:42:52 +00:00
parent daff01ad2e
commit a34bf45610
6 changed files with 48 additions and 36 deletions

View File

@ -48,6 +48,7 @@ namespace BizHawk
ser.Sync("ram", ref ram, false);
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
tia.SyncState(ser);
m6532.SyncState(ser);
mapper.SyncState(ser);

View File

@ -505,6 +505,7 @@ namespace BizHawk.Emulation.Consoles.Calculator
writer.WriteLine("m_LinkOutput {0}", m_LinkOutput);
writer.WriteLine("m_LinkState {0}", m_LinkState);
writer.WriteLine("lag {0}", _lagcount);
writer.WriteLine("islag {0}", islag);
writer.WriteLine("vram {0}", Util.BytesToHexString(vram));
writer.WriteLine("[/TI83]");
}
@ -549,6 +550,8 @@ namespace BizHawk.Emulation.Consoles.Calculator
m_LinkState = int.Parse(args[1]);
else if (args[0] == "lag")
_lagcount = int.Parse(args[1]);
else if (args[0] == "islag")
islag = bool.Parse(args[1]);
else if (args[0] == "vram")
vram = Util.HexStringToBytes(args[1]);
else

View File

@ -57,6 +57,7 @@ namespace BizHawk.Emulation.Consoles.Coleco
ser.Sync("ram", ref ram, false);
ser.Sync("Lag", ref _lagcount);
ser.Sync("Frame", ref _frame);
ser.Sync("IsLag", ref _islag);
}
public ControllerDefinition ControllerDefinition { get { return ColecoVisionControllerDefinition; } }

View File

@ -585,6 +585,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
ser.BeginSection("NES");
ser.Sync("Frame", ref _frame);
ser.Sync("Lag", ref _lagcount);
ser.Sync("IsLag", ref islag);
cpu.SyncState(ser);
ser.Sync("ram", ref ram, false);
ser.Sync("CIRAM", ref CIRAM, false);

View File

@ -301,6 +301,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
}
writer.WriteLine("Frame {0}", Frame);
writer.WriteLine("Lag {0}", _lagcount);
writer.WriteLine("IsLag {0}", islag);
if (Cpu.ReadMemory21 == ReadMemorySF2)
writer.WriteLine("SF2MapperLatch " + SF2MapperLatch);
writer.WriteLine("IOBuffer {0:X2}", IOBuffer);
@ -353,6 +354,8 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
Frame = int.Parse(args[1]);
else if (args[0] == "Lag")
_lagcount = int.Parse(args[1]);
else if (args[0] == "IsLag")
islag = bool.Parse(args[1]);
else if (args[0] == "SF2MapperLatch")
SF2MapperLatch = byte.Parse(args[1]);
else if (args[0] == "IOBuffer")

View File

@ -183,6 +183,7 @@ namespace BizHawk.Emulation.Consoles.Sega
VDP.SaveStateText(writer);
writer.WriteLine("Frame {0}", Frame);
writer.WriteLine("Lag {0}", _lagcount);
writer.WriteLine("IsLag {0}", islag);
writer.Write("MainRAM ");
Ram.SaveAsHex(writer);
writer.Write("Z80RAM ");
@ -212,6 +213,8 @@ namespace BizHawk.Emulation.Consoles.Sega
Frame = int.Parse(args[1]);
else if (args[0] == "Lag")
_lagcount = int.Parse(args[1]);
else if (args[0] == "IsLag")
islag = bool.Parse(args[1]);
else if (args[0] == "[PSG]")
PSG.LoadStateText(reader);
else if (args[0] == "[VDP]")