Showing changes from revision #4 to #5:
Added | Removed | Changed
Mode strings consist of a list of space or comma separated attributes, terminated with a control character. For example, “X640 Y480 C256” to describe a 256 colour VGA resolution mode.
In addition to the standard attributes, the string may start with a mode number. If this is the case then the additional attributes will act as modifiers on the base attributes of that mode. For example, “28 C16M” for a 16 million colour version of mode 28.
The following attributes are currently defined:
Attribute | Details |
---|---|
X | Mode X resolution in pixels, e.g. X1024 |
Y | Mode Y resolution in pixels, e.g. Y768 |
C | Number of colours: |
C2 = 2 colours (1bpp) | |
C4 = 4 colours (2bpp) | |
C16 = 16 colours (4bpp) | |
C64 = 64 colours (VIDC1 style 256 colour mode) (8bpp) | |
C256 = 256 colours (8bpp) | |
C4K/C4T = 4096 colours (16bpp) | |
C32K/C32T = 32768 colours (16bpp) | |
C64K/C64T = 65536 colours (16bpp) | |
C16M = 16 million colours (32bpp) | |
G | Number of greys/colours: |
G2 = 2 greys (1bpp) | |
G4 = 4 greys (2bpp) | |
G16 = 16 greys (4bpp) | |
G256 = 256 greys (8bpp) | |
G16M = 16 million colours (24bpp packed) | |
F | Framerate in Hz, e.g. F60 |
EX | X eigen factor (0-3), e.g. EX1 |
EY | Y eigen factor (0-3), e.g. EY1 |
T | Teletext mode with given number of colours, e.g. T16 |
TX | Teletext mode width in characters, e.g. TX40 |
TY | Teletext mode height in characters, e.g. TY25 |
L | Pixel layout |
LTBGR = Traditional VIDC format with red in low bits | |
LTRGB = Red/blue swapped | |
LABGR = VIDC format with alpha channel | |
LARGB = Red/blue swapped with alpha channel |
Specifying the same attribute more than once, or specifying conflicting attributes (e.g. both C and G attributes) is an invalid string and should result in an error being generated from most APIs.
Likewise, it is illegal to omit a required attribute. E.g. for a standard mode the X, Y and C or G attributes must be provided. However if a mode number has been provided, these attributes are optional as the default values will be taken from the definition of that mode.
For colour depths which have no space for a transparency/alpha channel (e.g. C64K, G16M) it is an error to specify a pixel layout which contains alpha. If the pixel layout is to be specified then only the LT… transparency-based layouts can be used.
Not all versions of RISC OS support all attributes: