Debugger: Fix for tf when in full-speed (#1164)

This commit is contained in:
tomcw 2023-01-13 21:11:00 +00:00
parent 244799ec5a
commit d31a831ac2
2 changed files with 7 additions and 4 deletions

View File

@ -1351,7 +1351,7 @@ int CheckBreakpointsVideo()
continue; continue;
uint16_t vert, horz; 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)) if (_CheckBreakpointValue(pBP, vert))
{ {
bBreakpointHit = BP_HIT_VIDEO_POS; bBreakpointHit = BP_HIT_VIDEO_POS;
@ -7893,14 +7893,17 @@ void OutputTraceLine ()
if (g_bTraceFileWithVideoScanner) 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; uint32_t data;
int dataSize; int dataSize;
uint16_t addr = NTSC_GetScannerAddressAndData(data, dataSize); uint16_t addr = NTSC_GetScannerAddressAndData(data, dataSize);
fprintf( g_hTraceFile, fprintf( g_hTraceFile,
"%04X %04X %04X %02X %02X %02X %02X %04X %s %s\n", "%04X %04X %04X %02X %02X %02X %02X %04X %s %s\n",
g_nVideoClockVert, vert,
g_nVideoClockHorz, horz,
addr, addr,
(uint8_t)data, // truncated (uint8_t)data, // truncated
(unsigned)regs.a, (unsigned)regs.a,

View File

@ -3232,7 +3232,7 @@ static void DrawVideoScannerValue(int line, int vert, int horz, bool isVisible)
static void DrawVideoScannerInfo(int line) static void DrawVideoScannerInfo(int line)
{ {
uint16_t v, h; 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) if (g_videoScannerDisplayInfo.isHorzReal)
{ {