Tape didn't sync properly -> fixed

This commit is contained in:
Kabuto 2015-09-29 21:36:15 +02:00
parent 004c8294fb
commit f09634c43e
1 changed files with 12 additions and 3 deletions

View File

@ -14,9 +14,10 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.CassettePort
*/
class Tape
{
private byte[] tapeData;
private byte version;
private uint pos, cycle, start, end;
private readonly byte[] tapeData;
private readonly byte version;
private uint pos, cycle;
private readonly uint start, end;
public Tape(byte version, byte[] tapeData, uint start, uint end)
{
@ -88,5 +89,13 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.CassettePort
}
return result;
}
public void SyncState(Serializer ser)
{
ser.BeginSection("tape");
ser.Sync("pos", ref pos);
ser.Sync("cycle", ref cycle);
ser.EndSection();
}
}
}