in atari_py/ale_interface/src/emucore/TIA.cxx [404:501]
bool TIA::load(Deserializer& in)
{
string device = name();
try
{
if(in.getString() != device)
return false;
myClockWhenFrameStarted = (Int32) in.getInt();
myClockStartDisplay = (Int32) in.getInt();
myClockStopDisplay = (Int32) in.getInt();
myClockAtLastUpdate = (Int32) in.getInt();
myClocksToEndOfScanLine = (Int32) in.getInt();
myScanlineCountForLastFrame = (Int32) in.getInt();
myCurrentScanline = (Int32) in.getInt();
myVSYNCFinishClock = (Int32) in.getInt();
myEnabledObjects = (uInt8) in.getInt();
myVSYNC = (uInt8) in.getInt();
myVBLANK = (uInt8) in.getInt();
myNUSIZ0 = (uInt8) in.getInt();
myNUSIZ1 = (uInt8) in.getInt();
myCOLUP0 = (uInt32) in.getInt();
myCOLUP1 = (uInt32) in.getInt();
myCOLUPF = (uInt32) in.getInt();
myCOLUBK = (uInt32) in.getInt();
myCTRLPF = (uInt8) in.getInt();
myPlayfieldPriorityAndScore = (uInt8) in.getInt();
myREFP0 = in.getBool();
myREFP1 = in.getBool();
myPF = (uInt32) in.getInt();
myGRP0 = (uInt8) in.getInt();
myGRP1 = (uInt8) in.getInt();
myDGRP0 = (uInt8) in.getInt();
myDGRP1 = (uInt8) in.getInt();
myENAM0 = in.getBool();
myENAM1 = in.getBool();
myENABL = in.getBool();
myDENABL = in.getBool();
myHMP0 = (Int8) in.getInt();
myHMP1 = (Int8) in.getInt();
myHMM0 = (Int8) in.getInt();
myHMM1 = (Int8) in.getInt();
myHMBL = (Int8) in.getInt();
myVDELP0 = in.getBool();
myVDELP1 = in.getBool();
myVDELBL = in.getBool();
myRESMP0 = in.getBool();
myRESMP1 = in.getBool();
myCollision = (uInt16) in.getInt();
myPOSP0 = (Int16) in.getInt();
myPOSP1 = (Int16) in.getInt();
myPOSM0 = (Int16) in.getInt();
myPOSM1 = (Int16) in.getInt();
myPOSBL = (Int16) in.getInt();
myCurrentGRP0 = (uInt8) in.getInt();
myCurrentGRP1 = (uInt8) in.getInt();
// pointers
// myCurrentBLMask = ourBallMaskTable[0][0];
// myCurrentM0Mask = ourMissleMaskTable[0][0][0];
// myCurrentM1Mask = ourMissleMaskTable[0][0][0];
// myCurrentP0Mask = ourPlayerMaskTable[0][0][0];
// myCurrentP1Mask = ourPlayerMaskTable[0][0][0];
// myCurrentPFMask = ourPlayfieldTable[0];
myLastHMOVEClock = (Int32) in.getInt();
myHMOVEBlankEnabled = in.getBool();
myM0CosmicArkMotionEnabled = in.getBool();
myM0CosmicArkCounter = (uInt32) in.getInt();
myDumpEnabled = in.getBool();
myDumpDisabledCycle = (Int32) in.getInt();
// Load the sound sample stuff ...
mySound->load(in);
// Reset TIA bits to be on
enableBits(true);
}
catch(char *msg)
{
ale::Logger::Error << msg << endl;
return false;
}
catch(...)
{
ale::Logger::Error << "Unknown error in load state for " << device << endl;
return false;
}
return true;
}