The 32,000 bytes from offset 128 are an exact, uncompressed copy of the Atari ST’s screen memory: 16,000 big-endian words. NEOchrome files are never compressed.
Interleaved bitplanes
The ST stores its screen in planes, one bit of each pixel’s colour number per plane, and interleaves them word by word. Each line is cut into groups of 16 pixels. For each group there is one word per plane, plane 0 first; the groups follow left to right, then line after line from the top, with no gaps.
Within a word, bit 15 is the leftmost of the 16 pixels and bit 0 the rightmost. A pixel’s colour number is its plane 0 bit, plus 2 times its plane 1 bit, plus 4 times plane 2, plus 8 times plane 3, and it selects that palette register.
| Resolution word | Planes | Bytes per 16-pixel group | Groups per line | Bytes per line | Lines |
|---|---|---|---|---|---|
| 0, low | 4 | 8: planes 0, 1, 2, 3 | 20 | 160 | 200 |
| 1, medium | 2 | 4: planes 0, 1 | 40 | 160 | 200 |
| 2, high | 1 | 2: plane 0 | 40 | 80 | 400 |
Finding a pixel
For the pixel at column x and line y, from 0 at the top left, the word holding its bit in plane p is at this file offset, and the bit is 15 − (x mod 16):
| Resolution | File offset of the word |
|---|---|
| low | 128 + 160y + 8 × floor(x / 16) + 2p |
| medium | 128 + 160y + 4 × floor(x / 16) + 2p |
| high | 128 + 80y + 2 × floor(x / 16) |
Example
The first 8 bytes of the screen in a low-resolution file, the first 16 pixels of the top line:
| Offset | Bytes | Plane | Bits |
|---|---|---|---|
| 128 | FF 00 | 0 | 1111 1111 0000 0000 |
| 130 | 0F 0F | 1 | 0000 1111 0000 1111 |
| 132 | 00 00 | 2 | 0000 0000 0000 0000 |
| 134 | 00 00 | 3 | 0000 0000 0000 0000 |
Pixels 0 to 3 are colour 1, pixels 4 to 7 colour 3 (1 + 2), pixels 8 to 11 colour 0 and pixels 12 to 15 colour 2.