N64: Save saveram as a part of a savestate

This commit is contained in:
pjgat09 2013-05-11 03:44:01 +00:00
parent fd26695fff
commit 6f2d75a260
1 changed files with 6 additions and 0 deletions

View File

@ -179,6 +179,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
writer.Write(data.Length);
writer.Write(data);
byte[] saveram = api.SaveSaveram();
writer.Write(saveram);
// other variables
writer.Write(IsLagFrame);
writer.Write(LagCount);
@ -192,6 +195,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
api.LoadState(data);
data = reader.ReadBytes(0x800 + 0x8000 * 4);
api.LoadSaveram(data);
// other variables
IsLagFrame = reader.ReadBoolean();
LagCount = reader.ReadInt32();