Showing changes from revision #4 to #5:
Added | Removed | Changed
Bit | Meaning when set |
---|---|
0 | Non-graphics mode |
1 | Teletext mode |
2 | Gap mode |
3 | BBC gap mode (Modes 3 & 6) |
4 | Hi-res mono mode |
5 | Double height VDU chars |
6 | Hardware scroll disabled |
7 | Full 256 entry palette (only valid if Log2BPP == 3) |
65536 colour RGB 5:6:5 mode (only valid if Log2BPP == 4 and NColour == 65535) | |
8 | Interlaced mode, with hardware using two separate framebuffers. |
9 | Greyscale palette, gradient from black to white (only valid in palletised modes) |
Indicates chroma sub-sampling mode (if NColour == 420 or 422) | |
10-11 | Reserved |
12-15 | Data format and colour space information |
Mode Flags bits 12-15 are really now made up as follows:
Bits 12-13 | Family | Bit 14 | Bit 15 | Meaning | Example uses |
---|---|---|---|---|---|
0 | RGB | 0 | 0 | TBGR | VIDC-compatible screen modes |
1 | 0 | TRGB | Iyonix DVI cards at 16bpp | ||
0 | 1 | ABGR | Alpha blended sprites/hardware overlays | ||
1 | 1 | ARGB | Alpha blended sprites/hardware overlays | ||
1 | Misc | 0 | 0 | KYMC (CMYK little-endian) | Printer driver bitmap |
1 | 0 | reserved | |||
0 | 1 | reserved | |||
1 | 1 | reserved | |||
2 | YCbCr | 0 | 0 | ITU-R BT.601, full range | JPEG (JFIF) |
1 | 0 | ITU-R BT.601, video range | ITU-R BT.656; MPEG standard definition | ||
0 | 1 | ITU-R BT.709, full range | |||
1 | 1 | ITU-R BT.709, video range | MPEG high definition | ||
3 | reserved | 1 | 0 | reserved | |
1 | 0 | reserved | |||
0 | 1 | reserved | |||
1 | 1 | reserved |
When the NColour mode variable is 420 or 422, Mode Flags bit 9 is used to describe the process used to perform horizontal chroma subsampling. Often, video plane hardware will only support one or the other of these.
Bit 9 | Meaning | Examples |
---|---|---|
0 | 0th chroma samples colocated with 0th luma sample | ITU-R BT.656, MPEG-2, MPEG-4 |
1 | 0th chroma samples located between 0th and 1st luma samples | JPEG (JFIF), MPEG-1 |
Vertical chroma subsampling only applies to NColour=420. It is assumed to be always be such that the 0th chroma row is located between 0th and 1st luma rows. There are a cases where other possibilities arise, but these are probably rare enough not to worry about. Note that when converting to/from a 4:2:0 format, you also need to take into account the setting of Mode Flags bit 8 (the interlace bit).
OS_ReadModeVariable can be used to read the mode flags for the current screen mode, or for a given screen mode.