Login
Back to forumSee the full topicGo to last reply

Posted By

Csabo
on 2024-01-26
15:08:27
 Re: how does the colour and luminance ram store colours in a bitmap?

Kind of, technically there are 128 colors, but all the black are effectively the same, so it's 121 unique colors. So within one character, you can have any of those colors for foreground and background, giving you 121*121 (or 128*128) combinations.

First, the luminane values are stored: high nibble is background (paper), low nibble is foreground (ink). For both nibbles, the highest bit is ignored (luminance can only be 0-7). You have 1000 of these (+24 bytes not used).

Second, the color values are stored: high nibble is foreground (ink), low nibble is background (paper). So, that's backwards, compared to the luminance values.

So, assuming a hires bitmap, let's say you want to color the first character to have a lum 6 (bright) pink background (paper), and a lum 1 (dark) red foreground (ink). Assuming the lum/color map is on the default $1800 ($FF14 is what specifies this location):

>1800 61
>1C00 2B


That's effectively $6B for background, and $12 for foreground. The basic equivalent would be COLOR 0, 12, 6 : COLOR 1, 3, 1 : CHAR 1, 0, 0, "A".

I think this covers everything happy Let me know if you have more questions.



Back to top


Copyright © Plus/4 World Team, 2001-2024