Value | Name | Meaning |
---|---|---|
0 | ModeFlags | Assorted flags |
1 | ScrRCol | Number of text columns -1 |
2 | ScrBRow | Number of text rows -1 |
3 | Ncolour | Maximum logical colour |
4 | XEigFactor | Indicates the number of bits by which an x co-ordinate must be shifted right to convert to screen pixels. E.g. for a value of n, then one screen pixel corresponds to 2n external co-ordinates in the x direction |
5 | YEigFactor | Indicates the number of bits by which an y co-ordinate must be shifted right to convert to screen pixels. E.g. for a value of n, then one screen pixel corresponds to 2n external co-ordinates in the y direction |
6 | LineLength | Number of bytes per pixel row |
7 | ScreenSize | Number of bytes for entire screen display |
8 | YShiftSize | Deprecated. Do not use |
9 | Log2BPP | Log base 2 of bits per pixel |
10 | Log2BPC | Log base 2 of bytes per character |
11 | XWindLimit | Number of x pixels on screen – 1 |
12 | YWindLimit | Number of y pixels on screen -1 |
The Mode Variables can be used when setting a screen mode using Wimp_SetMode or OS_ScreenMode, or when returning details about the current screen mode using OS_ReadModeVariable
Ordinarily, the Log2BPP and Log2BPC values match, as each text character is eight pixels wide. However in screen modes 2, 5 and 10, characters are sixteen pixels wide, and so Log2BPC takes the value of Log2BPP+1. This discrepancy is due to the way that BBC Micro modes 2 and 5 are emulated. On BBC hardware the modes are 160×256 pixels in size, and the hardware stretches the pixels in order to provide an image at the correct aspect ratio. On Archimedes hardware (and above) the modes are physically 320×256 pixels in size, and the OS doubles the pixels in software in order to provide an emulated 160×256 pixel resolution. This pixel doubling is applied in all OS rendering APIs, including plain text output, OS_Plot VDU primitives, and sprite rendering.