diff --git a/src/common/StateManager.cxx b/src/common/StateManager.cxx index f1073f5d6..c38e55493 100644 --- a/src/common/StateManager.cxx +++ b/src/common/StateManager.cxx @@ -28,7 +28,7 @@ #include "StateManager.hxx" -#define STATE_HEADER "05000301state" +#define STATE_HEADER "05000302state" #define MOVIE_HEADER "03030000movie" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/AtariVox.cxx b/src/emucore/AtariVox.cxx index e990775e4..34695edf8 100644 --- a/src/emucore/AtariVox.cxx +++ b/src/emucore/AtariVox.cxx @@ -140,7 +140,7 @@ void AtariVox::clockDataIn(bool value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void AtariVox::reset() { - myLastDataWriteCycle = mySystem.cycles(); + myLastDataWriteCycle = 0; myEEPROM->systemReset(); } diff --git a/src/emucore/M6532.cxx b/src/emucore/M6532.cxx index c5c0b4b50..2a3bb7fbf 100644 --- a/src/emucore/M6532.cxx +++ b/src/emucore/M6532.cxx @@ -31,7 +31,8 @@ M6532::M6532(const Console& console, const Settings& settings) : myConsole(console), mySettings(settings), myTimer(0), mySubTimer(0), myDivider(1), - myTimerWrapped(false), myWrappedThisCycle(false), mySetTimerCycle(0), myLastCycle(0), + myTimerWrapped(false), myWrappedThisCycle(false), + mySetTimerCycle(0), myLastCycle(0), myDDRA(0), myDDRB(0), myOutA(0), myOutB(0), myInterruptFlag(false), myEdgeDetectPositive(false) @@ -54,8 +55,7 @@ void M6532::reset() myTimerWrapped = false; myWrappedThisCycle = false; - mySetTimerCycle = 0; - myLastCycle = mySystem->cycles(); + mySetTimerCycle = myLastCycle = 0; // Zero the I/O registers myDDRA = myDDRB = myOutA = myOutB = 0x00; diff --git a/src/emucore/M6532.hxx b/src/emucore/M6532.hxx index eff2ed92a..4076169f4 100644 --- a/src/emucore/M6532.hxx +++ b/src/emucore/M6532.hxx @@ -174,7 +174,7 @@ class M6532 : public Device uInt64 mySetTimerCycle; // Last cycle considered in emu updates - Int32 myLastCycle; + uInt64 myLastCycle; // Data Direction Register for Port A uInt8 myDDRA; diff --git a/src/emucore/System.cxx b/src/emucore/System.cxx index 7399e98d6..1f077d18a 100644 --- a/src/emucore/System.cxx +++ b/src/emucore/System.cxx @@ -70,7 +70,7 @@ void System::reset(bool autodetect) mySystemInAutodetect = autodetect; // Reset all devices - myCycles = 0; // Must be done first (the reset() methods use its value) + myCycles = 0; // Must be done first (the reset() methods may use its value) myM6532.reset(); myTIA.reset(); myCart.reset(); diff --git a/src/emucore/System.hxx b/src/emucore/System.hxx index 9c224027f..87eac85eb 100644 --- a/src/emucore/System.hxx +++ b/src/emucore/System.hxx @@ -388,7 +388,7 @@ class System : public Serializable // Cartridge device attached to the system Cartridge& myCart; - // Number of system cycles executed since instantiation + // Number of system cycles executed since last reset uInt64 myCycles; // Null device to use for page which are not installed