09-05-2022, 11:48 PM
(09-05-2022, 08:26 PM)Under4Mhz Wrote: How do I set the set the colour attribute table on a colour Microbee?
I'd like to support colours in my game where it's supported in the hardware.
Colour in the Microbee is set per character cell on the screen. You can set the foreground and background colours separately.
The colour ram sits in the same memory space as the Programmable Character Generator (PCG) ram at 0F800h->0FFFFh and can
be accessed by switching the Colour ram in and out (replacing the PCG ram in memory space).
To do this, I/O port 08h bit 6 controls the colour ram switching.
Set bit 6 to switch colour ram into memory at 0F800h -> 0FFFFh (2k)
Reset bit 6 to switch the PCG ram back into memory at 0F800h -> 0FFFFh.
Use the same offset from the start of the ram block as you would for writing a character to the screen ram
IE: If you write a 'T' to 16 characters across on the first line of the screen, and then want to colour the 'T'
blue, you would write the value for blue at offset 16 from the start of colour ram (0F800h) = 0F810h
This is only a brief overview of course. The best thing to do would be to download the Microbee Technical manual
from the repository and read up on the hardware. Note that the original colour scheme and the Premium series
colour scheme are different, but are accessed in the same way.
