Save stating for the 93c46 too

This commit is contained in:
Tastyfish 2017-10-23 11:49:07 -04:00
parent 5e87b45df0
commit c594e48175
2 changed files with 20 additions and 4 deletions

View File

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Sega.MasterSystem
{
@ -218,5 +215,19 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
Flags = (EEPROMFlags)bit & ~EEPROMFlags.Ready;
}
public void SyncState(Serializer ser)
{
ser.BeginSection("93c46");
ser.Sync("Address", ref Address);
ser.Sync("Value", ref Value);
ser.Sync("BitsWritten", ref BitsWritten);
ser.Sync("BitsRead", ref BitsRead);
ser.Sync("WriteEnable", ref WriteEnable);
ser.SyncEnum("WriteMode", ref WriteMode);
ser.SyncEnum("ReadMode", ref ReadMode);
ser.SyncEnum("Flags", ref Flags);
ser.EndSection();
}
}
}

View File

@ -84,6 +84,11 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
{
YM2413.SyncState(ser);
}
if (EEPROM != null)
{
EEPROM.SyncState(ser);
}
ser.Sync("Frame", ref _frame);
ser.Sync("LagCount", ref _lagCount);