Saturday, 15 August 2026

Pixel Addressable Colour on Freebee

The Microbee Premium had enough Programmable Character RAM to assign a unique PCG character to every spot on the screen, so you could display a picture that filled a 512 x 256 screen. It also had colour, but alas the colour was organised by character, not pixel. So a character had a foreground colour (1 of 16) and a background colour (also 1 of 16). So if you wanted to draw something that had more than 2 coulours in the same 8x16 character cell, you were out of luck.

Other computers of the time had pixel addressable colour, where an individual pixel could be any one of 16 colours. This makes for much more expressive games etc. There was usually a compromise though - full colour displays were usually only 320 x 240 (40 column), while monochrome displays did higher pixel densities.

On Freebee, only four of the attribute bits actually do anything. The other four are available for our use. Let's use attribute bit 7 to determine if a character cell is normal Microbee character colour or pixel colour. So if this bit is set, for that character rather than doing a screen addressed fetch for colour, then a character addressed fetch for character data, let's instead do a pair of character addressed fetches, yeilding 16 bits of data. Now if we make a character four pixels wide, we have enough data to describe a unique 4 bit colour to each of our four pixels. We are now able to display a glorious 320 x 264 full colour picture. Of course we need more memory for colour (say 32K rather than 2K, but this is easy. Just increase the video RAM size to 128K (a single 628128).

It's not at all Microbee compatible, and we don't care. Keep attribute bit 7 reset and it'll work like a normal Microbee. Indeed as the determinant for pixel colour is stored in the attribute RAM, we can freely mix pixel addressable colour on the same screen as character addressable colour, plus we get all the sorta-kinda advantages of PCG characters, where we can move character sized blocks around with just a couple of writes, rather than having to laboriously write every pixel.

Here's a schematic of the memory array and video data manipulation. It's same as Freebee Fremium, except that there is an extra latch (IC61) to store the additional 8 bits of character data, and when in pixel colour mode we take the output of a pair of 74HC153 4 to 1 multiplexers (IC62 & IC63) to generate the individual pixels. We also have a flip-flop to store the pixel or colour colour bit from Attribute, so we can make the decision of where to take our pixel data from.

No comments: