Sachen8259: Save states

This commit is contained in:
Souryo 2016-06-18 21:42:51 -04:00
parent a86649d170
commit 3796755ec2

View file

@ -23,6 +23,7 @@ protected:
uint16_t GetCHRPageSize() { return _variant == Sachen8259Variant::Sachen8259D ? 0x400 : 0x800; }
uint16_t RegisterStartAddress() { return 0x4100; }
uint16_t RegisterEndAddress() { return 0x7FFF; }
void InitMapper()
{
_currentReg = 0;
@ -31,6 +32,14 @@ protected:
SelectPRGPage(0, 0);
}
void StreamState(bool saving)
{
BaseMapper::StreamState(saving);
ArrayInfo<uint8_t> regs{ _regs,8 };
Stream(_currentReg, regs);
}
void UpdateState()
{
bool simpleMode = (_regs[7] & 0x01) == 0x01;