NTSC: Change to NTSC_GetVblBar() from NTSC_GetVideoVert().

Debugger: fix video scanner position's visibility (green colour) for SHR - didn't work for lines $C0-C7.
This commit is contained in:
tomcw 2023-01-14 14:30:12 +00:00
parent d63a31a043
commit 597cea1d86
4 changed files with 10 additions and 11 deletions

View File

@ -1940,11 +1940,6 @@ uint16_t NTSC_VideoGetScannerAddress ( const ULONG uExecutedCycles )
return addr;
}
uint16_t NTSC_GetVideoVert(void)
{
return g_nVideoClockVert;
}
void NTSC_GetVideoVertHorzForDebugger(uint16_t& vert, uint16_t& horz)
{
ResetCyclesExecutedForDebugger(); // if in full-speed, then reset cycles so that CpuCalcCycles() doesn't ASSERT
@ -2741,9 +2736,15 @@ UINT NTSC_GetCyclesUntilVBlank(int cycles)
(cyclesPerFrames - cycleCurrentPos + cycleVBl);
}
bool NTSC_GetVblBar(void)
{
const UINT visibleScanLines = ((g_uNewVideoModeFlags & VF_SHR) == 0) ? VIDEO_SCANNER_Y_DISPLAY : VIDEO_SCANNER_Y_DISPLAY_IIGS;
return g_nVideoClockVert < visibleScanLines;
}
bool NTSC_IsVisible(void)
{
return (g_nVideoClockVert < VIDEO_SCANNER_Y_DISPLAY) && (g_nVideoClockHorz >= VIDEO_SCANNER_HORZ_START);
return NTSC_GetVblBar() && (g_nVideoClockHorz >= VIDEO_SCANNER_HORZ_START);
}
// For debugger

View File

@ -12,7 +12,6 @@ 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);
uint16_t NTSC_GetVideoVert(void);
void NTSC_GetVideoVertHorzForDebugger(uint16_t& vert, uint16_t& horz);
uint16_t NTSC_GetVideoVertForDebugger(void);
void NTSC_Destroy(void);
@ -28,5 +27,6 @@ UINT NTSC_GetCyclesPerFrame(void);
UINT NTSC_GetCyclesPerLine(void);
UINT NTSC_GetVideoLines(void);
UINT NTSC_GetCyclesUntilVBlank(int cycles);
bool NTSC_GetVblBar(void);
bool NTSC_IsVisible(void);
uint16_t NTSC_GetScannerAddressAndData(uint32_t& data, int& dataSize);

View File

@ -455,7 +455,7 @@ bool Video::VideoGetVblBarEx(const DWORD dwCyclesThisFrame)
NTSC_VideoClockResync(dwCyclesThisFrame);
}
return NTSC_GetVideoVert() < kVDisplayableScanLines;
return NTSC_GetVblBar();
}
// Called when *inside* CpuExecute()
@ -467,7 +467,7 @@ bool Video::VideoGetVblBar(const DWORD uExecutedCycles)
NTSC_VideoClockResync(CpuGetCyclesThisVideoFrame(uExecutedCycles));
}
return NTSC_GetVideoVert() < kVDisplayableScanLines;
return NTSC_GetVblBar();
}
//===========================================================================

View File

@ -295,8 +295,6 @@ private:
COLORREF g_nMonochromeRGB; // saved to Registry
bool m_hasVidHD;
static const int kVDisplayableScanLines = 192; // max displayable scanlines
static const UINT kVideoRomSize8K = kVideoRomSize4K*2;
static const UINT kVideoRomSize16K = kVideoRomSize8K*2;
static const UINT kVideoRomSizeMax = kVideoRomSize16K;