mirror of https://github.com/stella-emu/stella.git
Flush the line cache after stepping.
Ensures that the display will match the step afterwards.
This commit is contained in:
parent
24cb2417fc
commit
ce204901dc
|
@ -306,7 +306,7 @@ int Debugger::step()
|
||||||
int cyc = mySystem.cycles();
|
int cyc = mySystem.cycles();
|
||||||
|
|
||||||
unlockBankswitchState();
|
unlockBankswitchState();
|
||||||
myOSystem.console().tia().updateScanlineByStep();
|
myOSystem.console().tia().updateScanlineByStep().flushLineCache();
|
||||||
lockBankswitchState();
|
lockBankswitchState();
|
||||||
|
|
||||||
return mySystem.cycles() - cyc;
|
return mySystem.cycles() - cyc;
|
||||||
|
@ -335,7 +335,7 @@ int Debugger::trace()
|
||||||
int targetPC = myCpuDebug->pc() + 3; // return address
|
int targetPC = myCpuDebug->pc() + 3; // return address
|
||||||
|
|
||||||
unlockBankswitchState();
|
unlockBankswitchState();
|
||||||
myOSystem.console().tia().updateScanlineByTrace(targetPC);
|
myOSystem.console().tia().updateScanlineByTrace(targetPC).flushLineCache();
|
||||||
lockBankswitchState();
|
lockBankswitchState();
|
||||||
|
|
||||||
return mySystem.cycles() - cyc;
|
return mySystem.cycles() - cyc;
|
||||||
|
@ -411,6 +411,8 @@ void Debugger::nextScanline(int lines)
|
||||||
--lines;
|
--lines;
|
||||||
}
|
}
|
||||||
lockBankswitchState();
|
lockBankswitchState();
|
||||||
|
|
||||||
|
myOSystem.console().tia().flushLineCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -905,27 +905,33 @@ void TIA::setJitterRecoveryFactor(Int32 f)
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TIA::updateScanline()
|
TIA& TIA::updateScanline()
|
||||||
{
|
{
|
||||||
// Update frame by one scanline at a time
|
// Update frame by one scanline at a time
|
||||||
uInt32 line = scanlines();
|
uInt32 line = scanlines();
|
||||||
while (line == scanlines())
|
while (line == scanlines())
|
||||||
updateScanlineByStep();
|
updateScanlineByStep();
|
||||||
|
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TIA::updateScanlineByStep()
|
TIA& TIA::updateScanlineByStep()
|
||||||
{
|
{
|
||||||
// Update frame by one CPU instruction/color clock
|
// Update frame by one CPU instruction/color clock
|
||||||
mySystem->m6502().execute(1);
|
mySystem->m6502().execute(1);
|
||||||
updateEmulation();
|
updateEmulation();
|
||||||
|
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void TIA::updateScanlineByTrace(int target)
|
TIA& TIA::updateScanlineByTrace(int target)
|
||||||
{
|
{
|
||||||
while (mySystem->m6502().getPC() != target)
|
while (mySystem->m6502().getPC() != target)
|
||||||
updateScanlineByStep();
|
updateScanlineByStep();
|
||||||
|
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -294,19 +294,19 @@ class TIA : public Device
|
||||||
/**
|
/**
|
||||||
This method should be called to update the TIA with a new scanline.
|
This method should be called to update the TIA with a new scanline.
|
||||||
*/
|
*/
|
||||||
void updateScanline();
|
TIA& updateScanline();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to update the TIA with a new partial
|
This method should be called to update the TIA with a new partial
|
||||||
scanline by stepping one CPU instruction.
|
scanline by stepping one CPU instruction.
|
||||||
*/
|
*/
|
||||||
void updateScanlineByStep();
|
TIA& updateScanlineByStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This method should be called to update the TIA with a new partial
|
This method should be called to update the TIA with a new partial
|
||||||
scanline by tracing to target address.
|
scanline by tracing to target address.
|
||||||
*/
|
*/
|
||||||
void updateScanlineByTrace(int target);
|
TIA& updateScanlineByTrace(int target);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Retrieve the last value written to a certain register
|
Retrieve the last value written to a certain register
|
||||||
|
|
Loading…
Reference in New Issue