I had a ZX Spectrum 48KB, whose display was a 256*192 monochrome bitmap (plus separate per-block color attributes). I remember the display bitmaps scan lines were laid out in memory in a weird way - This was evident when trying to render to the screen via
poke, and also when loading games splash screens from tapes.
Why was this layout chosen?
- Screen was divided into 3 parts - top/middle/bottom
- In each part, the memory would render the first lines in every 8-line "text line", then the second lines etc.
For example, the layout of the top third would be:
Memory line 0 - Scan line 0 Memory line 1 - Scan line 8 ... Memory line 7 - Scan line 56 Memory line 8 - Scan line 1 Memory line 9 - Scan line 9 ... Memory line 15 - Scan line 57 (skip...) Memory line 56 - Scan line 7 Memory line 57 - Scan line 15 ... Memory line 63 - Scan line 63