mirror of https://github.com/stella-emu/stella.git
Fix potential app lockups when emulated CPU execution fails in the debugger.
This commit is contained in:
parent
d92566ad40
commit
c1f7c5c90b
|
@ -1019,8 +1019,8 @@ 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() && mySystem->m6502().execute(1))
|
||||||
updateScanlineByStep();
|
updateEmulation();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -1029,8 +1029,8 @@ TIA& TIA::updateScanline()
|
||||||
TIA& 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);
|
if (mySystem->m6502().execute(1))
|
||||||
updateEmulation();
|
updateEmulation();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -1038,8 +1038,10 @@ TIA& TIA::updateScanlineByStep()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
TIA& TIA::updateScanlineByTrace(int target)
|
TIA& TIA::updateScanlineByTrace(int target)
|
||||||
{
|
{
|
||||||
while (mySystem->m6502().getPC() != target)
|
uInt32 count = 100; // only try up to 100 steps
|
||||||
updateScanlineByStep();
|
while (mySystem->m6502().getPC() != target && count-- &&
|
||||||
|
mySystem->m6502().execute(1))
|
||||||
|
updateEmulation();
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue