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

This commit is contained in:
tomcw 2023-01-12 21:51:08 +00:00
parent 0fe774dbdf
commit 244799ec5a
4 changed files with 9 additions and 7 deletions

View File

@ -1350,7 +1350,9 @@ int CheckBreakpointsVideo()
if (pBP->eSource != BP_SRC_VIDEO_SCANNER)
continue;
if (_CheckBreakpointValue(pBP, g_nVideoClockVert))
uint16_t vert, horz;
NTSC_GetVideoHVForDebugger(vert, horz); // update g_nVideoClockHorz/g_nVideoClockVert - needed for when in fullspeed (GH#1164)
if (_CheckBreakpointValue(pBP, vert))
{
bBreakpointHit = BP_HIT_VIDEO_POS;
pBP->bEnabled = false; // Disable, otherwise it'll trigger many times on this scan-line

View File

@ -3231,10 +3231,8 @@ static void DrawVideoScannerValue(int line, int vert, int horz, bool isVisible)
//===========================================================================
static void DrawVideoScannerInfo(int line)
{
NTSC_UpdateVideoHVForDebugger(); // update g_nVideoClockHorz/g_nVideoClockVert
int v = g_nVideoClockVert;
int h = g_nVideoClockHorz;
uint16_t v, h;
NTSC_GetVideoHVForDebugger(v, h); // update g_nVideoClockHorz/g_nVideoClockVert - needed for when in fullspeed (GH#1164)
if (g_videoScannerDisplayInfo.isHorzReal)
{

View File

@ -1940,10 +1940,12 @@ uint16_t NTSC_VideoGetScannerAddress ( const ULONG uExecutedCycles )
return addr;
}
void NTSC_UpdateVideoHVForDebugger(void)
void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz)
{
ResetCyclesExecutedForDebugger(); // if in full-speed, then reset cycles so that CpuCalcCycles() doesn't ASSERT
NTSC_VideoGetScannerAddress(0);
vert = g_nVideoClockVert;
horz = g_nVideoClockHorz;
}
//===========================================================================

View File

@ -14,7 +14,7 @@ void NTSC_SetVideoTextMode(int cols);
uint32_t* NTSC_VideoGetChromaTable(bool bHueTypeMonochrome, bool bMonitorTypeColorTV);
void NTSC_VideoClockResync(const DWORD dwCyclesThisFrame);
uint16_t NTSC_VideoGetScannerAddress(const ULONG uExecutedCycles);
void NTSC_UpdateVideoHVForDebugger(void);
void NTSC_GetVideoHVForDebugger(uint16_t& vert, uint16_t& horz);
void NTSC_Destroy(void);
void NTSC_VideoInit(uint8_t *pFramebuffer);
void NTSC_VideoReinitialize(DWORD cyclesThisFrame, bool bInitVideoScannerAddress);