===========================================================================
| 1994 | |
| 1995 | //=========================================================================== |
| 1996 | void NTSC_SetVideoMode( uint32_t uVideoModeFlags, bool bDelay/*=false*/ ) |
| 1997 | { |
| 1998 | g_uNewVideoModeFlags = uVideoModeFlags; |
| 1999 | |
| 2000 | if (uVideoModeFlags & VF_SHR) |
| 2001 | { |
| 2002 | g_pFuncUpdateGraphicsScreen = updateScreenSHR; |
| 2003 | g_pFuncUpdateTextScreen = updateScreenSHR; |
| 2004 | return; |
| 2005 | } |
| 2006 | |
| 2007 | if (g_pFuncUpdateGraphicsScreen == updateScreenSHR && !(uVideoModeFlags & VF_SHR)) |
| 2008 | { |
| 2009 | // Was SHR mode, so clear the framebuffer to remove any SHR residue in the borders |
| 2010 | GetVideo().ClearFrameBuffer(); |
| 2011 | } |
| 2012 | |
| 2013 | if (bDelay && !g_bFullSpeed) |
| 2014 | { |
| 2015 | // (GH#670) NB. if g_bFullSpeed then NTSC_VideoUpdateCycles() won't be called on the next 6502 opcode. |
| 2016 | // - Instead it's called when !g_bFullSpeed (eg. drive motor off), then the stale g_uNewVideoModeFlags will get used for NTSC_SetVideoMode()! |
| 2017 | g_bDelayVideoMode = true; |
| 2018 | return; |
| 2019 | } |
| 2020 | |
| 2021 | g_nVideoMixed = uVideoModeFlags & VF_MIXED; |
| 2022 | g_nVideoCharSet = GetVideo().VideoGetSWAltCharSet() ? 1 : 0; |
| 2023 | |
| 2024 | RGB_DisableTextFB(); |
| 2025 | |
| 2026 | g_nTextPage = 1; |
| 2027 | g_nHiresPage = 1; |
| 2028 | if (uVideoModeFlags & VF_PAGE2) |
| 2029 | { |
| 2030 | // Apple IIe, Technical Notes, #3: Double High-Resolution Graphics |
| 2031 | // 80STORE must be OFF to display page 2 |
| 2032 | if (0 == (uVideoModeFlags & VF_80STORE)) |
| 2033 | { |
| 2034 | g_nTextPage = 2; |
| 2035 | g_nHiresPage = 2; |
| 2036 | } |
| 2037 | } |
| 2038 | |
| 2039 | if( uVideoModeFlags & VF_PAGE0) // Pseudo page ($0000) |
| 2040 | { |
| 2041 | g_nHiresPage = 0; |
| 2042 | } |
| 2043 | |
| 2044 | if( uVideoModeFlags & VF_PAGE3) // Pseudo page ($6000) |
| 2045 | { |
| 2046 | g_nHiresPage = 3; |
| 2047 | } |
| 2048 | |
| 2049 | if( uVideoModeFlags & VF_PAGE4) // Pseudo page ($8000) |
| 2050 | { |
| 2051 | g_nHiresPage = 4; |
| 2052 | } |
| 2053 |
no test coverage detected