Showing changes from revision #8 to #9:
Added | Removed | Changed
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 |
12 | YWindLimit | Number of y pixels on screen -1 |
The Mode Variables variables can (apart be from used the when setting a screen mode using Wimp_SetMode Mode Flags ) represent immutable properties of a screen mode. I.e. the only time they will change is when the screen mode changes or when output is OS_ScreenMode redirected to a sprite , . or when returning details about the current screen mode usingOS_ReadModeVariable
OS_ScreenMode and Wimp_SetMode allow you to directly or indirectly specify some of the mode variables when changing screen mode. OS_ReadModeVariable and OS_ReadVduVariables can be used to read mode variables for a mode.
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.