From 47ec7f435542d26d5802c79d165784af25b362b7 Mon Sep 17 00:00:00 2001 From: tomcw Date: Sat, 23 Jun 2018 17:50:23 +0100 Subject: [PATCH] Reverted ad12a8e: video rendering from screen position -1: so now DHGR vertical column 559 is hidden again (see #555). Changed HGR rendering, such that that last video byte (at hpos=64) clears g_nLastColumnPixelNTSC so that the end-of-line off-screen pixel is zero (see #555). --- source/NTSC.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/NTSC.cpp b/source/NTSC.cpp index a167b811..ec480f67 100644 --- a/source/NTSC.cpp +++ b/source/NTSC.cpp @@ -1291,6 +1291,14 @@ void updateScreenSingleHires40 (long cycles6502) if (m & 0x80) bits = (bits << 1) | g_nLastColumnPixelNTSC; updatePixels( bits ); + + // For last hpos && bit6=1: (GH#555) + // * if bit7=0 (no shift) then clear g_nLastColumnPixelNTSC to prevent a 3rd 14M (aka DHGR) pixel being drawn + // . even though this is off-screen, it still has an on-screen affect (making the green dot more white on the screen edge). + // * if bit7=1 (half-dot shift) then also clear g_nLastColumnPixelNTSC + // . not sure if this is correct though + if (g_nVideoClockHorz == (VIDEO_SCANNER_MAX_HORZ-1)) + g_nLastColumnPixelNTSC = 0; } } updateVideoScannerHorzEOL(); @@ -1631,7 +1639,7 @@ void NTSC_VideoInit( uint8_t* pFramebuffer ) // wsVideoInit for (int y = 0; y < (VIDEO_SCANNER_Y_DISPLAY*2); y++) { uint32_t offset = sizeof(bgra_t) * GetFrameBufferWidth() * ((GetFrameBufferHeight() - 1) - y - GetFrameBufferBorderHeight()) + (sizeof(bgra_t) * GetFrameBufferBorderWidth()); -// offset -= sizeof(bgra_t); // GH#555: Start 1 RGBA pixel before frame to account for g_nLastColumnPixelNTSC +// offset -= sizeof(bgra_t); // GH#555: Start 1 RGBA pixel before frame to account for g_nLastColumnPixelNTSC // TC: revert as lose half an HGR pixel on left-edge g_pScanLines[y] = (bgra_t*) (g_pFramebufferbits + offset); }