diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IStatable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IStatable.cs deleted file mode 100644 index 428887c250..0000000000 --- a/BizHawk.Emulation.Cores/Consoles/Atari/7800/Atari7800.IStatable.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.IO; - -using BizHawk.Common; -using BizHawk.Emulation.Common; -using EMU7800.Core; - -namespace BizHawk.Emulation.Cores.Atari.Atari7800 -{ - public partial class Atari7800 : IStatable - { - public bool BinarySaveStatesPreferred => true; - - public void SaveStateText(TextWriter writer) - { - SyncState(new Serializer(writer)); - } - - public void LoadStateText(TextReader reader) - { - SyncState(new Serializer(reader)); - } - - public void SaveStateBinary(BinaryWriter bw) - { - SyncState(new Serializer(bw)); - } - - public void LoadStateBinary(BinaryReader br) - { - SyncState(new Serializer(br)); - } - - public byte[] SaveStateBinary() - { - MemoryStream ms = new MemoryStream(); - BinaryWriter bw = new BinaryWriter(ms); - SaveStateBinary(bw); - bw.Flush(); - return ms.ToArray(); - } - - private void SyncState(Serializer ser) - { - byte[] core = null; - if (ser.IsWriter) - { - var ms = new MemoryStream(); - _theMachine.Serialize(new BinaryWriter(ms)); - ms.Close(); - core = ms.ToArray(); - } - - ser.BeginSection("Atari7800"); - ser.Sync("core", ref core, false); - ser.Sync("Lag", ref _lagcount); - ser.Sync("Frame", ref _frame); - ser.Sync("IsLag", ref _islag); - ser.EndSection(); - if (ser.IsReader) - { - _theMachine = MachineBase.Deserialize(new BinaryReader(new MemoryStream(core, false))); - _avProvider.ConnectToMachine(_theMachine, _gameInfo); - } - } - } -}