Sets the video mode of the CPC Screen, changing resolution and palette size.
void cpct_setVideoMode (u8 videoMode)
call cpct_setVideoMode_asm
(1B C) videoMode | [0-3] Video mode to set |
This function requires the CPC firmware to be DISABLED. Otherwise, it may not work, as firmware tends to restore video mode to its own selection.
This function changes the video mode for the Amstrad CPC into one of the 4 standard modes available. This 4 standard video modes are:
Mode | Resolution | # of colours -----|------------|------------------- 0 | 160x200 | 16 1 | 320x200 | 4 2 | 640x200 | 2 3 | 160x200 | 4 (undocumented)
The way this function works is by sending a SET_VIDEO_MODE command directly to the Gate Array (GA), through the 0x7F port. The 2 least significant bits from the byte sent to the GA contain the desired videomode.
AF, BC, HL
C-bindings | 14 bytes |
ASM-bindings | 13 bytes |
Case | microSecs | CPU Cycles | ------------------------------------- Any | 80 | 20 | ------------------------------------- Asm saving | -4 | -1 | -------------------------------------
This function was coded copying and modifying cpc_setMode from cpcrslib by Raul Simarro.