MODE

command

Set the graphics page size, colour depth, and HDMI framebuffer. MODE updates MM.HRES and MM.VRES, reallocates graphics pages, and retunes HDMI to the same width and height. PIXEL, LINE, BOX, TEXT and PAGE use that size. MM.INFO(MODE) is n + bits/100 (MODE 8,16 reads as 8.16).

MODE n [, bits] [, clscolour]

n - mode number 1 to 20 bits - 8, 12, 16 or 32 (default 8 if omitted) clscolour - if given, clear the page to that colour

bits selects how colours are stored on each page (8=RGB332, 12=RGB444, 16=RGB565, 32=RGB888). Eight drawing pages (0-7) are available.

Depths (quantised; pages store HDMI-native 16-bit): 8 RGB332 12 RGB444 (invalid on modes 9, 11, 12, 14) 16 RGB565 32 RGB888

Boot default if HDMI is 640x480: MODE 8,16 Otherwise: MODE 1,8

All supported modes (n, pixels, depths): 1 800x600 8,12,16,32 2 640x400 8,12,16,32 3 320x200 8,12,16,32 4 480x432 8,12,16,32 5 240x216 8,12,16,32 6 256x240 8,12,16,32 7 320x240 8,12,16,32 8 640x480 8,12,16,32 9 1024x768 8,16,32 10 848x480 8,12,16,32 11 1280x720 8,16,32 12 960x540 8,16,32 13 400x300 8,12,16,32 14 960x540 8,16,32 15 1280x1024 8,12,16,32 16 1920x1080 8,12,16,32 17 384x240 8,12,16,32 18 640x360 8,12,16,32 19 1366x768 8,12,16,32 20 683x384 8,12,16,32

Mode 19 is a full-screen 1366x768 HDMI display. Mode 20 is half that resolution (683x384) and is also full-screen. MODE retunes HDMI to the mode’s width and height, so both fill the display.

Unknown n or bits raises ?INVALID MODE.

Example:

MODE 8, 16
PRINT MM.HRES, MM.VRES
MODE 17, 8

Source: docs/help/mode.txt inmmcore. On the computer, typeHELP MODE.