mirror of https://github.com/stella-emu/stella.git
Update TIA shadow registers for HMCLR (and code cleanup). Fixes #211.
This commit is contained in:
parent
21bf401836
commit
52c16d604b
|
@ -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());
|
||||
|
|
|
@ -38,7 +38,6 @@ enum {
|
|||
class TiaState : public DebuggerState
|
||||
{
|
||||
public:
|
||||
IntArray ram;
|
||||
IntArray coluRegs;
|
||||
IntArray fixedCols;
|
||||
IntArray gr;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue