Re-enabled TIA::saveDisplay() and TIA::loadDisplay().

This means the debugger rewind feature is working again.  More testing
is required to make sure this is the same as Stella 4.x functionality.
This commit is contained in:
Stephen Anthony 2017-03-25 19:32:58 -02:30
parent fd4122e017
commit 73beb8cb40
1 changed files with 25 additions and 4 deletions

View File

@ -710,17 +710,38 @@ bool TIA::poke(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// TODO: stub
bool TIA::saveDisplay(Serializer& out) const
{
return false;
try
{
out.putByteArray(myCurrentFrameBuffer.get(), 160*320);
}
catch(...)
{
cerr << "ERROR: TIA::saveDisplay" << endl;
return false;
}
return true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// TODO: stub
bool TIA::loadDisplay(Serializer& in)
{
return false;
try
{
// Reset frame buffer pointer and data
clearBuffers();
in.getByteArray(myCurrentFrameBuffer.get(), 160*320);
memcpy(myPreviousFrameBuffer.get(), myCurrentFrameBuffer.get(), 160*320);
}
catch(...)
{
cerr << "ERROR: TIA::loadDisplay" << endl;
return false;
}
return true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -