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

Function updateScreenSHR

source/NTSC.cpp:1866–1895  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

1864
1865//===========================================================================
1866void updateScreenSHR(long cycles6502)
1867{
1868 for (; cycles6502 > 0; --cycles6502)
1869 {
1870 if (g_nVideoClockVert < VIDEO_SCANNER_Y_DISPLAY_IIGS)
1871 {
1872 uint16_t addr = getVideoScannerAddressSHR();
1873
1874 if (g_nVideoClockHorz >= VIDEO_SCANNER_HORZ_START)
1875 {
1876 uint32_t* pAux = (uint32_t*) MemGetAuxPtr(addr); // 8 pixels (320 mode) / 16 pixels (640 mode)
1877 uint32_t a = pAux[0];
1878
1879 uint8_t* pControl = MemGetAuxPtr(0x9D00 + g_nVideoClockVert); // scan-line control byte
1880 uint8_t c = pControl[0];
1881
1882 bool is640Mode = !!(c & 0x80);
1883 bool isColorFillMode = !!(c & 0x20);
1884 UINT paletteSelectCode = c & 0xf;
1885 const UINT kColorsPerPalette = 16;
1886 const UINT kColorSize = 2;
1887 uint16_t addrPalette = 0x9E00 + paletteSelectCode * kColorsPerPalette * kColorSize;
1888
1889 VidHDCard::UpdateSHRCell(is640Mode, isColorFillMode, addrPalette, g_pVideoAddress, a);
1890 g_pVideoAddress += 16;
1891 }
1892 }
1893 updateVideoScannerHorzEOL_SHR();
1894 }
1895}
1896
1897// Functions (Public) _____________________________________________________________________________
1898

Callers

nothing calls this directly

Calls 3

MemGetAuxPtrFunction · 0.85

Tested by

no test coverage detected