A NEOchrome file is a 128-byte header followed by 32,000 bytes of screen memory, 32,128 bytes in all. Every word is two bytes, big-endian, as on the Atari ST’s 68000.
Fields
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 2 | u16 | flag | always 0 |
| 2 | 2 | u16 | resolution | 0 low, 1 medium, 2 high (below) |
| 4 | 32 | 16 × u16 | palette | colour registers 0 to 15 (below) |
| 36 | 12 | ASCII | file name | an 8.3 name; usually blank: eight spaces, a full stop and three spaces |
| 48 | 2 | u16 | colour animation limits | the range of palette registers to cycle (below) |
| 50 | 2 | u16 | colour animation speed and direction | below |
| 52 | 2 | u16 | colour steps | in a slide show, the number of colour animation steps to show before moving on to the next picture |
| 54 | 2 | u16 | X offset | unused; always 0 |
| 56 | 2 | u16 | Y offset | unused; always 0 |
| 58 | 2 | u16 | width | unused; 320 |
| 60 | 2 | u16 | height | unused; 200 |
| 62 | 66 | 33 × u16 | reserved | zeros |
| 128 | 32,000 | 16,000 × u16 | screen | the screen memory; see Screen data |
The size and offset words are not used: a reader takes the picture size from the resolution word alone.
Resolution
| Value | Mode | Picture | Bitplanes | Colours used |
|---|---|---|---|---|
| 0 | low | 320 × 200 | 4 | 16 |
| 1 | medium | 640 × 200 | 2 | 4: registers 0 to 3 |
| 2 | high | 640 × 400 | 1 | 2: black and white |
NEOchrome itself works in low resolution, and nearly every file is low resolution, but the published layouts define all three values and a reader should honour them.
Palette
The ST’s 16 colour registers, register 0 (the background) first. Each word holds three 3-bit intensities from 0 to 7:
| Bits | Meaning |
|---|---|
| 15–11 | unused; should be 0 |
| 10–8 | red, 0 to 7 |
| 7 | unused |
| 6–4 | green, 0 to 7 |
| 3 | unused |
| 2–0 | blue, 0 to 7 |
In hexadecimal the word reads 0RGB with each digit 0 to 7:
0777 is white and 0000 black. Some programs store other data
in the unused bits, so mask each word with 0777. To show a level on a
modern screen, scale it from 0–7 to 0–255.
Colour animation
NEOchrome can rotate a range of palette registers to animate a picture. Two words hold the settings, and each has a flag in bit 15.
Limits, offset 48
| Bits | Meaning |
|---|---|
| 15 | 1 when the animation settings are valid |
| 14–8 | unused |
| 7–4 | left (lower) limit: the first palette register of the range, 0 to 15 |
| 3–0 | right (upper) limit: the last palette register of the range, 0 to 15 |
Speed and direction, offset 50
| Bits | Meaning |
|---|---|
| 15 | 1 when the animation is on |
| 14–8 | unused |
| 7–0 | a signed byte x: its magnitude sets the speed in vertical blanks, and a negative value means the colours rotate left |
Baggett’s notes call the low byte the number of vertical blanks per step and then give the number of vertical blanks between cycles as |x| − 1; MultimediaWiki repeats this. Exactly how NEOchrome turns x into a delay is not confirmed beyond those two statements.
Example
| Offset | Bytes | Field | Value |
|---|---|---|---|
| 0 | 00 00 | flag | 0 |
| 2 | 00 00 | resolution | low, 320 × 200 |
| 4 | 00 00 07 77 … | palette | register 0 black, register 1 white, … |
| 36 | 20 20 20 20 20 20 20 20 2E 20 20 20 | file name | blank |
| 48 | 80 18 | limits | valid; registers 1 to 8 |
| 50 | 80 04 | speed | on; x = 4, rotating right |
| 52 | 00 00 | steps | 0 |
| 54 | 00 00 00 00 01 40 00 C8 | X, Y, width, height | 0, 0, 320, 200 |
| 62 | 66 × 00 | reserved | |
| 128 | 32,000 bytes | screen |