Showing changes from revision #11 to #12:
Added | Removed | Changed
Offset | Contents |
---|---|
+0 | Mode Selector Flags |
+4 | X resolution (pixels) |
+8 | Y resolution (pixels) |
+12 | Log2BPP value |
+16 | Frame rate (Hz), or -1 for first match |
+20 | Mode Variable Numbers (optional pairs of words, variable number followed by value) |
… | -1 (mode variable list terminator) |
This block of data is used by Wimp_SetMode, OS_ScreenMode, and various other APIs to describe screen modes. It is an improvement over the older mode number system as it allows for any arbitrary mode to be described. However just because a mode can be described, it does not mean that it is supported by the hardware.
The list of mode variables should be terminated by a single word containing -1. When processing mode selector blocks yourself, make sure you do not confuse a mode variable value of -1 with a terminator; it is only the first word of each pair (the variable number) that you should check against -1.
If left unspecified, the ModeFlags and NColour mode variables will take the default values that are listed in the “Conversions to/from Log2BPP values” section of the Valid Mode Variable Combinations page.
Note that as the Log2BPP value is already expressed in the main body of the block, it is invalid to also include it in the list of mode variables.
To describe a teletext mode, the mode variable list must include the Mode Flags variable with bits 1 (teletext) and 2 (gap mode) set. To dictate the number of text rows and columns, use the ScrRCol and ScrBRow variables.
Note that the use of custom teletext modes is only supported on OS versions where the T, TX and TY Mode String attributes are supported (RISC OS Select and RISC OS 5.23+); attempting to use a custom teletext mode with other OS versions may fail with an error or cause a bad mode to be entered.