MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / updateFramebufferTVDoubleScanline

Function updateFramebufferTVDoubleScanline

source/NTSC.cpp:534–551  ·  view source on GitHub ↗

Original: Prev1(inbetween) = 50% current + 50% of previous AppleII scanline

Source from the content-addressed store, hash-verified

532
533// Original: Prev1(inbetween) = 50% current + 50% of previous AppleII scanline
534inline void updateFramebufferTVDoubleScanline( uint16_t signal, bgra_t *pTable )
535{
536 uint32_t *pLine0Curr = getScanlineCurrent();
537 uint32_t *pLine1Prev = getScanlinePreviousInbetween();
538 uint32_t *pLine2Prev = getScanlinePrevious();
539 const uint32_t color0 = getScanlineColor( signal, pTable );
540 const uint32_t color2 = *pLine2Prev;
541 const uint32_t color1 = ((color0 & 0x00fefefe) >> 1) + ((color2 & 0x00fefefe) >> 1); // 50% Blend
542
543 *pLine1Prev = color1 | ALPHA32_MASK;
544 *pLine0Curr = color0;
545
546 // GH#650: Draw to final inbetween scanline to avoid residue from other video modes (eg. Amber->TV B&W)
547 if (g_nVideoClockVert == (VIDEO_SCANNER_Y_DISPLAY-1))
548 *getScanlineNextInbetween() = ((color0 & 0x00fefefe) >> 1) | ALPHA32_MASK; // (50% current + black)) = 50% of current
549
550 g_pVideoAddress++;
551}
552
553//===========================================================================
554inline void updateFramebufferMonitorSingleScanline( uint16_t signal, bgra_t *pTable )

Calls 5

getScanlineCurrentFunction · 0.85
getScanlinePreviousFunction · 0.85
getScanlineColorFunction · 0.85
getScanlineNextInbetweenFunction · 0.85

Tested by

no test coverage detected