diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs index 9a6c841359..ec0acddec1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/EEPROM.93c46.cs @@ -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(); + } } } diff --git a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs index 8f29ddaf9c..0ba7d4293d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.IStatable.cs @@ -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);