From d31a831ac2e243bb2fc4d6470e6878fec295842c Mon Sep 17 00:00:00 2001 From: tomcw Date: Fri, 13 Jan 2023 21:11:00 +0000 Subject: [PATCH] Debugger: Fix for tf when in full-speed (#1164) --- source/Debugger/Debug.cpp | 9 ++++++--- source/Debugger/Debugger_Display.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index 41ffe1b9..f330bf35 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -1351,7 +1351,7 @@ int CheckBreakpointsVideo() continue; uint16_t vert, horz; - NTSC_GetVideoHVForDebugger(vert, horz); // update g_nVideoClockHorz/g_nVideoClockVert - needed for when in fullspeed (GH#1164) + NTSC_GetVideoHVForDebugger(vert, horz); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164) if (_CheckBreakpointValue(pBP, vert)) { bBreakpointHit = BP_HIT_VIDEO_POS; @@ -7893,14 +7893,17 @@ void OutputTraceLine () if (g_bTraceFileWithVideoScanner) { + uint16_t vert, horz; + NTSC_GetVideoHVForDebugger(vert, horz); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164) + uint32_t data; int dataSize; uint16_t addr = NTSC_GetScannerAddressAndData(data, dataSize); fprintf( g_hTraceFile, "%04X %04X %04X %02X %02X %02X %02X %04X %s %s\n", - g_nVideoClockVert, - g_nVideoClockHorz, + vert, + horz, addr, (uint8_t)data, // truncated (unsigned)regs.a, diff --git a/source/Debugger/Debugger_Display.cpp b/source/Debugger/Debugger_Display.cpp index fdefc200..a3b4c59d 100644 --- a/source/Debugger/Debugger_Display.cpp +++ b/source/Debugger/Debugger_Display.cpp @@ -3232,7 +3232,7 @@ static void DrawVideoScannerValue(int line, int vert, int horz, bool isVisible) static void DrawVideoScannerInfo(int line) { uint16_t v, h; - NTSC_GetVideoHVForDebugger(v, h); // update g_nVideoClockHorz/g_nVideoClockVert - needed for when in fullspeed (GH#1164) + NTSC_GetVideoHVForDebugger(v, h); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164) if (g_videoScannerDisplayInfo.isHorzReal) {