Screen resolution and 8x8/8x1 attribute selection is made using 4bit register 0010.
Not all resolutions or features are available for all screen data decode methods. Where a resolution is not available, Prism reverts to 256x192, 8x8 attributes and non-gigascreen*.
OUT 8E3B, 0010xxxx Screen resolution selection where xxxx is:
0000 – 256x192 8x8 attributes
0001 – 512x192 (vertically halved
display) 8x8 attributes0010 – 256x384 (horizontally halved display) 8x8 attributes
0011 – 512x384 (quartered display) 8x8 attributes
0100 – 256x192 8x1 attributes (“hicolour”)
0101 – 512x192 (vertically halved display) 8x1 attributes
0110 – 256x384 (horizontally halved display) 8x1 attributes
0111 – 512x384 (quartered display) 8x1 attributes
1000 – 256x192 Hardware GIGASCREEN 8x8 attributes *
1001 – 512x192 Hardware GIGASCREEN 8x8 attributes *
1010 – reserved
1011 – reserved
1100 – 256x192 Hardware GIGASCREEN 8x1 attributes *
1101 – reserved
1110 – reserved
1111 – reserved
*Hardware gigascreen is an experimental feature which on even frames interlaces the even lines of screen 0 with odd lines of screen 1 and on odd frames interlaces the odd lines of screen 0 with even lines of screen 1.
Screen data decoding method selection is made using 4bit register 0011:
OUT 8E3B, 0100xxxx ZX Prism palette selection where xxxx is:
0000 – DEFAULT
ATTR: D0-D2 ink, D3-D5, paper, D6
bright, D7 Flash0001 – 16+16 Colour
ATTR: D0-D2 ink, D3-D5, paper, D6 ink bright, D7 paper bright
0010 - 32 Colour
ATTR: D0-D2 ink, D3-D5, paper, D6
bright, D7 NOT halfbright
0011 - 16C (4 bits per pixel chunky
mode)
0100 – 256 Colour mode 1
ATTR: D0-D7 - ink colour, BORDER –
paper colour
0101 – 256 Colour mode 2 - 2 byte
attribute read.
ATTR: D0-D7 - ink colour, D8-D15 -
paper colour
0110 – 16
colour Planar mode
0111 – [Reserved]
1000 – [Reserved]
1001 – [Reserved]
1010 – [Reserved]1011 – [Reserved]
1100 – [Reserved]
1101 – Rasterscan (pixel colour = BORDER colour)
1110 – [Reserved]
1111 – 256 colour chunky (8 bits
per pixel) mode
256(i) colour mode uses the entire attribute byte to dictate the ink colour. Paper colour is dictated by the BORDER colour stored at IO address 0x9E3B. |
256(ii) colour mode uses two attribute bytes. The first to dictate the ink colour, the second to dictate the paper colour. |
There are 3 methods of decoding the "logical colour" into a physical colour:
- Default palette. This is a hard-coded palette. The first 16 colours are identical to the ZX Spectrum's colours, the next 16 are dimmer versions of the first 16. Colours 0-7 – intensity 1 colours; Colours 8-15 = intensity 3 versions of colours 0-7; Colours 16-23 = intensity 0 versions of colours 0-7; Colours 24-31 = intensity 2 versions of colours 0-7. [The remainder of the default palette are awaiting definition]
- Prism palette. This is a user-defined palette. Each colour can be assigned 8 bit red, green and blue elements. Whilst the Prism specification allows 24bit definitions for each colour, some implementations may transcode these into 9bit colour (3 bits per element), 12 bit colour (4 bits per element) etc. My implementation currently uses 12 bit colour (4 bits per element) as shown in the diagrams above
- GggRrrBb (aka G3R3D2 encoding) is a hard-coded palette as used by ULAplus, MSX etc. Bits 0 and 1 define the blue element; 2,3 and 4 define the red element and 5,6 and 6 define the green element.
OUT 8E3B, 0011xxxx ZX Prism palette selection where xxxx is:
0000 – DEFAULT
Colour 0 – Black, Colour 1 –
Blue, Colour 2 – Red, Colour 3 – Magenta
Colour 4 – Green, Colour 5 –
Cyan, Colour 6 – Yellow, Colour 7 – WhiteColours 0-7 – intensity 1 colours (as numbered above)
Colours 8-15 = intensity 3 versions of colours 0-7
Colours 16-23 = intensity 0 versions of colours 0-7
Colours 24-31 = intensity 2 versions of colours 0-7
0001 – GGGRRRBB
bit (0) – blue(0)
bit (1) – blue(1)
bit (2) – red(0)bit (3) – red(1)
bit (4) – red(2)
bit (5) – green(0)
bit (6) – green(1)
bit(7) – green(2)
0010 – ZX Prism PALETTE
Colour 0-255 looked up vs the user-defined ZXPrism Palette