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 String

OS SWI Calls
» OS_ScreenMode
» Mode String

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.

Attributes

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

Notes

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:

  • RISC OS 3.5 only understands the X, Y, C, G, F, EX and EY attributes. 4096 & 64K colour, and 24bpp packed are not supported, and neither is specifying a base mode number.
  • RISC OS Select adds support for 64K colour modes, the T, TX and TY attributes, and specifying a base mode number
  • RISC OS 5.21+ supports all features and attributes except T, TX and TY.
    • T, TX and TY support is introduced in RISC OS 5.23

See also

  • Mode Specifier
  • OS_ScreenMode
  • OS_ScreenMode 13
  • OS_ScreenMode 14
  • OS_ScreenMode 15
  • *WimpMode
Other languages documentation

Mode String

Revised on February 15, 2018 11:23:57 by Etienne SOBOLE (3572)? (195.200.162.2)
Edit | Back in time (4 revisions) | See changes | History | Views: Print | Source | Linked from: Extended Framebuffer Format Specification, Mode Selector Block, *WimpMode, Valid Mode Variable Combinations, OS_ScreenMode 13, OS_ScreenMode 14, OS_ScreenMode 15, Mode Selector Block (français), Mode String (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