This is an old revision of the document!
Sinclair QL - Displaying Bitmaps & Text
Direct video memory
Video memory starts at 0x20000
In Mode 4 (512×256 4 colour) the memory is laid out in byte pairs (or words)
Red byte | Green byte 0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 0
Those 16 bits set a series of 8 contiguous horizontal pixels. The values of the Red and Green byte are AND-ed to get the final colour:
Red | Green | Result 1 | 0 | Red 0 | 1 | Green 1 | 1 | White 0 | 0 | Black
Example 1:
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
…would draw an 8 pixel horizontal line in Red.
Example 2:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
…would draw an 8 pixel horizontal line in White.