Currently I have 3 screen modes implemented:
- 00000xxx - Normal Spectrum mode ( Fl Br P2 P1 P0 I2 I1 I0 )
- 00001xxx - 32 colour mode (Br1 Br0 P2 P1 P0 I2 I1 I0)
- 01010xxx - 256 colour mode, paletted (I7 I6 I5 I4 I3 I2 I1 I0), paper=border colour
In the 256 colour mode, the paper colour is determined by the 256 colour border colour stored in another 8 bit latch at 0x4E3B. The 256 colour border is available in all modes when the "normal" spectrum border is set to colour 0.
This is a paletted mode, and by default all colours are set to black. The palette is controlled as follows:
OUT 48699,colour number
OUT 65083,red level
OUT 65083,green level
OUT 65083,blue level
The colour to be redefined is stored in a counter at 0xBE3B. Then the red,green and blue levels for that colour are output to 0xFE3B. Each successive write to 0xFE3B goes to the next colour element - red, then green, then blue. After the blue level is written, the colour number increments and therefore a subsequent write to 0xFE3B will define the red level for the next colour and so on.
Initial tests of the paletted mode are encouraging. The colours are able to be redefined, however there are some interesting effects due to timings which will need to be ironed out.
No comments:
Post a Comment