2014-11-30 16:42:58 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Common
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Savestate handling methods
|
|
|
|
|
/// </summary>
|
2014-12-04 02:12:57 +00:00
|
|
|
|
public interface IStatable : IEmulatorService, IEmulator
|
2014-11-30 16:42:58 +00:00
|
|
|
|
{
|
2014-12-05 03:16:08 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// true if the core would rather give a binary savestate than a text one. both must function regardless
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool BinarySaveStatesPreferred { get; }
|
|
|
|
|
|
2014-11-30 16:42:58 +00:00
|
|
|
|
void SaveStateText(TextWriter writer);
|
|
|
|
|
void LoadStateText(TextReader reader);
|
|
|
|
|
|
|
|
|
|
void SaveStateBinary(BinaryWriter writer);
|
|
|
|
|
void LoadStateBinary(BinaryReader reader);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// save state binary to a byte buffer
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>you may NOT modify this. if you call SaveStateBinary() again with the same core, the old data MAY be overwritten.</returns>
|
|
|
|
|
byte[] SaveStateBinary();
|
|
|
|
|
}
|
|
|
|
|
}
|