diff --git a/src/debugger/TIADebug.cxx b/src/debugger/TIADebug.cxx index 3cc2983fc..982632e05 100644 --- a/src/debugger/TIADebug.cxx +++ b/src/debugger/TIADebug.cxx @@ -40,10 +40,6 @@ TIADebug::TIADebug(Debugger& dbg, Console& console) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const DebuggerState& TIADebug::getState() { - myState.ram.clear(); - for(int i = 0; i < 0x010; ++i) - myState.ram.push_back(myTIA.peek(i)); - // Color registers myState.coluRegs.clear(); myState.coluRegs.push_back(coluP0()); @@ -117,10 +113,6 @@ const DebuggerState& TIADebug::getState() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIADebug::saveOldState() { - myOldState.ram.clear(); - for(int i = 0; i < 0x010; ++i) - myOldState.ram.push_back(myTIA.peek(i)); - // Color registers myOldState.coluRegs.clear(); myOldState.coluRegs.push_back(coluP0()); diff --git a/src/debugger/TIADebug.hxx b/src/debugger/TIADebug.hxx index e53eba93a..1a33c262b 100644 --- a/src/debugger/TIADebug.hxx +++ b/src/debugger/TIADebug.hxx @@ -38,7 +38,6 @@ enum { class TiaState : public DebuggerState { public: - IntArray ram; IntArray coluRegs; IntArray fixedCols; IntArray gr; diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 8de4665e6..04c562e70 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -1409,11 +1409,12 @@ void TIA::delayedWrite(uInt8 address, uInt8 value) break; case HMCLR: - myMissile0.hmm(0); - myMissile1.hmm(0); - myPlayer0.hmp(0); - myPlayer1.hmp(0); - myBall.hmbl(0); + // We must update the shadow registers for each HM object too + myMissile0.hmm(0); myShadowRegisters[HMM0] = 0; + myMissile1.hmm(0); myShadowRegisters[HMM1] = 0; + myPlayer0.hmp(0); myShadowRegisters[HMP0] = 0; + myPlayer1.hmp(0); myShadowRegisters[HMP1] = 0; + myBall.hmbl(0); myShadowRegisters[HMBL] = 0; break; case GRP0: