From 94e77d3b940c549770cd731a0b0af9cb0a857a6b Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 28 Jan 2017 18:33:44 -0330 Subject: [PATCH] Partially implemented step by scanline in the debugger; I still have some questions for DirtyHairy before I can finish it. --- src/emucore/tia/TIA.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index f6f96ca33..e76461bbd 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -843,14 +843,14 @@ void TIA::setJitterRecoveryFactor(Int32 f) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIA::updateScanline() { -#if 0 - int totalClocks = (mySystem->cycles() * 3) - myClockWhenFrameStarted; - int endClock = ((totalClocks + 228) / 228) * 228; - - do { + // Update frame by one scanline at a time + uInt32 line = scanlines(); +cerr << "-> " << line << endl; + while (line == scanlines()) + { updateScanlineByStep(); - } while((mySystem->cycles() * 3) < endClock); -#endif +cerr << line << endl; + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -864,7 +864,7 @@ void TIA::updateScanlineByStep() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIA::updateScanlineByTrace(int target) { - while(mySystem->m6502().getPC() != target) + while (mySystem->m6502().getPC() != target) updateScanlineByStep(); }