RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Mode Flags (Rev #5)

Mode Variable Numbers
» Mode Flags

Mode Flags

(Mode Variable #0)
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).

Notes

OS_ReadModeVariable can be used to read the mode flags for the current screen mode, or for a given screen mode.

See also

  • Mode Specifier Block
  • OS_ReadModeVariable
  • Wimp_SetMode
  • OS_ScreenMode
  • Valid Mode Variable Combinations
  • Mode Variable Numbers
Revision from January 22, 2014 13:57:14 by Jeffrey Lee (213)
Forward in time (2 more) | Back in time (4 more) | See current | See changes | History | Rollback | Linked from: Mode Variable Numbers, Mode Selector Block, Sprite Mode Word, Font Background Blending, OS_SpriteOp 38, Valid Mode Variable Combinations, GraphicsV 17, Mode Selector Block (français), Sprite Mode Word (français), Screen Mode Types

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys