From 3d5ed4de048ba95b774cb073cddddd057c93e5d0 Mon Sep 17 00:00:00 2001 From: tomcw Date: Fri, 13 Jan 2023 21:19:10 +0000 Subject: [PATCH] Debugger: add NTSC_GetVideoVForDebugger() just to get vert position --- source/Debugger/Debug.cpp | 5 ++--- source/NTSC.cpp | 7 +++++++ source/NTSC.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index f330bf35..ab800d01 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -1350,8 +1350,7 @@ int CheckBreakpointsVideo() if (pBP->eSource != BP_SRC_VIDEO_SCANNER) continue; - uint16_t vert, horz; - NTSC_GetVideoHVForDebugger(vert, horz); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164) + uint16_t vert = NTSC_GetVideoVForDebugger(); // update video scanner's vert/horz position - needed for when in fullspeed (GH#1164) if (_CheckBreakpointValue(pBP, vert)) { bBreakpointHit = BP_HIT_VIDEO_POS; @@ -8520,7 +8519,7 @@ void DebugContinueStepping(const bool bCallerWillUpdateDisplay/*=false*/) stopReason = (g_LBR == LBR_UNDEFINED) ? StrFormat("Interrupt occurred (LBR unknown)") : StrFormat("Interrupt occurred at $%04X", g_LBR); else if (g_bDebugBreakpointHit & BP_HIT_VIDEO_POS) - stopReason = StrFormat("Video scanner position matches at vpos=$%04X", g_nVideoClockVert); + stopReason = StrFormat("Video scanner position matches at vpos=$%04X", NTSC_GetVideoVForDebugger()); else if (g_bDebugBreakpointHit & BP_DMA_TO_IO_MEM) stopReason = StrFormat("HDD DMA to I/O memory or ROM at $%04X", g_DebugBreakOnDMAIO.memoryAddr); else if (g_bDebugBreakpointHit & BP_DMA_FROM_IO_MEM) diff --git a/source/NTSC.cpp b/source/NTSC.cpp index 64ed21ec..41eae4a8 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -1948,6 +1948,13 @@ void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz) horz = g_nVideoClockHorz; } +uint16_t NTSC_GetVideoVForDebugger(void) +{ + uint16_t vert, horz; + NTSC_GetVideoHVForDebugger(vert, horz); + return vert; +} + //=========================================================================== void NTSC_SetVideoTextMode( int cols ) { diff --git a/source/NTSC.h b/source/NTSC.h index 2825b6f3..aad683d8 100644 --- a/source/NTSC.h +++ b/source/NTSC.h @@ -15,6 +15,7 @@ uint32_t* NTSC_VideoGetChromaTable(bool bHueTypeMonochrome, bool bMonitorTypeCol void NTSC_VideoClockResync(const DWORD dwCyclesThisFrame); uint16_t NTSC_VideoGetScannerAddress(const ULONG uExecutedCycles); void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz); +uint16_t NTSC_GetVideoVForDebugger(void); void NTSC_Destroy(void); void NTSC_VideoInit(uint8_t *pFramebuffer); void NTSC_VideoReinitialize(DWORD cyclesThisFrame, bool bInitVideoScannerAddress);