INtellivision fill out save states

This commit is contained in:
alyosha-tas 2016-12-07 10:55:25 -05:00 committed by GitHub
parent b7e616482d
commit ba149320c5
2 changed files with 28 additions and 15 deletions

View File

@ -1,6 +1,4 @@
using System;
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Components.CP1610
@ -47,16 +45,7 @@ namespace BizHawk.Emulation.Cores.Components.CP1610
Register[6],
Register[7])
};
}
public void SyncState(Serializer ser)
{
ser.BeginSection("CP1610");
// TODO
ser.EndSection();
}
}
private void Calc_FlagC(int result)
{

View File

@ -1,6 +1,6 @@
using System;
using System.IO;
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Components.CP1610
@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Components.CP1610
private bool FlagS, FlagC, FlagZ, FlagO, FlagI, FlagD, IntRM, BusRq, BusAk, Interruptible, Interrupted;
//private bool MSync;
private readonly ushort[] Register = new ushort[8];
private ushort[] Register = new ushort[8];
private ushort RegisterSP { get { return Register[6]; } set { Register[6] = value; } }
private ushort RegisterPC { get { return Register[7]; } set { Register[7] = value; } }
@ -35,7 +35,31 @@ namespace BizHawk.Emulation.Cores.Components.CP1610
private static bool Logging = true;
private static readonly StreamWriter Log;
static CP1610()
public void SyncState(Serializer ser)
{
ser.BeginSection("CP1610");
ser.Sync("Register", ref Register, false);
ser.Sync("FlagS", ref FlagS);
ser.Sync("FlagC", ref FlagC);
ser.Sync("FlagZ", ref FlagZ);
ser.Sync("FlagO", ref FlagO);
ser.Sync("FlagI", ref FlagI);
ser.Sync("FlagD", ref FlagD);
ser.Sync("IntRM", ref IntRM);
ser.Sync("BusRq", ref BusRq);
ser.Sync("BusAk", ref BusAk);
ser.Sync("BusRq", ref BusRq);
ser.Sync("Interruptible", ref Interruptible);
ser.Sync("Interrupted", ref Interrupted);
ser.Sync("Toal_executed_cycles", ref TotalExecutedCycles);
ser.Sync("Pending Cycles", ref PendingCycles);
ser.EndSection();
}
static CP1610()
{
if (Logging)
{