Culture and gamesFact or myth?
1982
Eight colours? Fifteen, and sometimes more
It's said that the Spectrum only had eight colours and that attribute clash was a flaw; there were fifteen, and the colour smudging was a choice made to save memory and money.
Partlythere are eight base colours, but the Spectrum shows fifteen, and attribute clash was a choice made for cost and memory, not a mistake.
The Spectrum screen is 256 × 192 pixels and takes up just 6,912 bytes: 6,144 for the pixels and 768 for the colour [1]. Colour is not set pixel by pixel but in 8 × 8 blocks, on a 32 × 24 grid. Each block has an attribute byte with the ink colour, the paper colour, a brightness bit and a flashing bit, FLASH [1].
That is where the first half-truth comes from. There are eight base colours, but each has a normal and a bright version, and since bright black is the same as black, that makes 15 different colours [1]. What you cannot do is mix brightness levels in the same block: the two colours of a cell share the brightness bit [1].
Clive's rule was a fixed price of four times the cost of the components.
And that is also where the famous attribute clash comes from: when a character enters a block that already has another colour, one of the two "catches" the other's colour. Programmers got round it in several ways: a two-colour play area with colour kept for the frame, as in Knight Lore (1984); huge characters, drawn by Don Priestley to fill whole blocks without looking square, as in Popeye and The Trap Door; or movement locked to the 8 × 8 grid, as in Light Force [3]. Knight Tyme even let the player choose how they wanted the colours [3].
It was not an oversight. With so little memory for colour, the scheme left more room for programs, which mattered above all on the 16 KB model [1]. And there was the money. In the Spectrum at 40 interviews, published by RWTH Aachen University, Richard Altwasser, who designed the hardware, explained that full colour and hardware sprites could have been done, but Clive's rule was a fixed price of four times the component cost [2].
And the Spectrum shows more than it seems to. The ULA reads the attributes again on every pixel line, and a program that swaps them quickly, line by line, can get colour in 8 × 1 or 8 × 2 blocks, the so-called multicolour [1]. There is also GigaScreen, which alternates two screens 50 times a second for the eye to blend the colours [1]. Einar Saukas's NIRVANA ENGINE gives multicolour graphics in 8 × 2 blocks across 30 columns of the screen, and can be used free of charge, even in commercial games, as long as you say it was made with it [4].
Sources
- [1]ZX Spectrum graphic modes · Wikipedia
- [2]Sinclair ZX Spectrum at 40: Interviews with Crispin Sinclair, Richard Altwasser, and Steven Vickers · Media Computing Group, RWTH Aachen University, 2022
- [3]Attribute clash · Wikipedia
- [4]NIRVANA ENGINE: instruções (Einar Saukas) · Spectrum Computing (ZXDB)