| 813 | #endif |
| 814 | |
| 815 | static void ClearOverscanVideoArea(void) |
| 816 | { |
| 817 | if (g_pFuncUpdateGraphicsScreen == updateScreenSHR) |
| 818 | return; |
| 819 | |
| 820 | bgra_t* pSaveVideoAddress = g_pVideoAddress; // save g_pVideoAddress |
| 821 | g_pVideoAddress = g_pScanLines[0]; |
| 822 | uint32_t* pLine1Prev = getScanlinePreviousInbetween(); |
| 823 | g_pVideoAddress = pSaveVideoAddress; // restore g_pVideoAddress |
| 824 | |
| 825 | const int kOverscanOffsetL = 3; // In updateVideoScannerAddress(), g_pVideoAddress could be adjusted by: -2 + -1 = -3 |
| 826 | const int kOverscanSpanL = 3; |
| 827 | const int kOverscanOverlapL = kOverscanSpanL - kOverscanOffsetL; |
| 828 | |
| 829 | const int kOverscanOffsetR = 2; |
| 830 | const int kOverscanSpanR = 4; // In updateVideoScannerHorzEOL() it writes 4 extra pixels |
| 831 | const int kOverscanOverlapR = kOverscanSpanR - kOverscanOffsetR; |
| 832 | |
| 833 | const int kHorzPixels = (VIDEO_SCANNER_MAX_HORZ - VIDEO_SCANNER_HORZ_START) * 14; |
| 834 | |
| 835 | pLine1Prev += GetVideo().GetFrameBufferCentringValue() - kOverscanOffsetL; // Centre the older //e video modes when running with a VidHD |
| 836 | |
| 837 | // Clear this line at Y=-1 |
| 838 | for (uint32_t i = 0; i < (kHorzPixels + (kOverscanSpanL - kOverscanOverlapL) + (kOverscanSpanR - kOverscanOverlapR)); i++) |
| 839 | *pLine1Prev++ = CLEAR_COLOUR_TOP | ALPHA32_MASK; |
| 840 | |
| 841 | // Clear overscan before & after display area |
| 842 | for (uint32_t i = 0; i < VIDEO_SCANNER_Y_DISPLAY*2; i++) |
| 843 | { |
| 844 | uint32_t* pScanLine = ((uint32_t*)g_pScanLines[i]); |
| 845 | pScanLine += GetVideo().GetFrameBufferCentringValue() - kOverscanOffsetL; // Centre the older //e video modes when running with a VidHD |
| 846 | |
| 847 | for (uint32_t j = 0; j < kOverscanSpanL + 1; j++) |
| 848 | pScanLine[j] = CLEAR_COLOUR_SIDE | ALPHA32_MASK; |
| 849 | |
| 850 | pScanLine += kOverscanOffsetL + kHorzPixels - kOverscanOffsetR; |
| 851 | |
| 852 | for (uint32_t j = 0; j < kOverscanSpanR; j++) |
| 853 | pScanLine[j] = CLEAR_COLOUR_SIDE | ALPHA32_MASK; |
| 854 | } |
| 855 | } |
| 856 | |
| 857 | //=========================================================================== |
| 858 | INLINE uint16_t getVideoScannerAddressTXT() |
no test coverage detected