2026-09-25 21:39 UTC
The palette register will be 32-entries, in part coz one of the modes will pair each of the 8 bits from the bitmap bytes with the lower/upper nybble of accompanying attribute bytes. Not unlike VGA text mode, except there’s only bandwidth for 40 columns. But that’s still like the VIC-II on crack.
Each palette entry is 6-bit (c0-5) plus an ‘expand’ bit that says how to convert c0-5 into 12-bit RGB. If expand = 0 then Red = (c1,c0,c1,c0), Green = (c3,c2,c3,c2), Blue = (c5,c4,c5,c4) which is basically the Master System palette. If expand = 1 then Red = (c3, c2, c1, c0), Green = (c4,c2,c1,c0), Blue = (c5,c2,c1,c0) which is what enables the 16-level greyscale.
Yeah, I could just store 12-bit values in the palette but that’d require two writes per entry, which would make it harder for raster interrupts to change colours mid-frame. I’m also interested in experimenting with a kind of hold-and-modify whereby if the palette entry’s HAM bit (its eighth and final) is set then the RGB output channels are EORed by c0-5.
Replies (0)
No replies.