From ac12f3c29420085541d79e3ea22c829464a98ff6 Mon Sep 17 00:00:00 2001 From: tomcw Date: Mon, 2 Jan 2023 11:15:40 +0000 Subject: [PATCH] Fix video junk on RHS edge for TV & Monitor video modes. (Fixes #1157) --- source/NTSC.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/NTSC.cpp b/source/NTSC.cpp index b0ccec8a..32a89808 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -703,8 +703,10 @@ inline void updateVideoScannerHorzEOL() g_pFuncUpdateHuePixel(g_nLastColumnPixelNTSC); // last pixel in 14M video modes g_pFuncUpdateHuePixel(0); // 14M ringing pixel! (better definition for 80COL char's right-hand edge) // Direct write instead of g_pFuncUpdateHuePixel(0) to avoid random pixels on RHS in VT_COLOR_MONITOR_NTSC - *(uint32_t*)g_pVideoAddress++ = 0 | ALPHA32_MASK; - *(uint32_t*)g_pVideoAddress++ = 0 | ALPHA32_MASK; + *(uint32_t*)g_pVideoAddress = 0 | ALPHA32_MASK; + *(getScanlineNextInbetween()) = 0 | ALPHA32_MASK; g_pVideoAddress++; // Clear junk on RHS for TV (Color/B&W) & Monitor (NTSC/PAL). (GH#1157) + *(uint32_t*)g_pVideoAddress = 0 | ALPHA32_MASK; + *(getScanlineNextInbetween()) = 0 | ALPHA32_MASK; g_pVideoAddress++; // Clear junk on RHS for TV (Color/B&W) & Monitor (NTSC/PAL). (GH#1157) } }