Login
Back to forumReply to this topicGo to last reply

Posted By

the777
on 2024-01-26
13:33:46
 how does the colour and luminance ram store colours in a bitmap?

i know there are 16 colours and 8 luminance's, so a total of 128 ink colours. but what about the 'paper' colour for each 8x8 block? if you were poking at address 7168, would you go beyond 16 to get the 'paper' colour? so you could have any ink colour on any paper colour? so 16x16 would be 256 possibilities. and the same with the luminescence, 8x8 possibilities so you could have 64 possible combinations of ink and paper luminescence's? therefore a possible 16384 paper and ink combinations if you apply both? i cant find anything that answers this question in any of the reference books.


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.

Posted By

gerliczer
on 2024-01-26
15:45:34
 Re: how does the colour and luminance ram store colours in a bitmap?

These are not Z80 machines. Paper and ink terminology does not compute here. grin

Posted By

Luca
on 2024-01-27
07:19:09
 Re: how does the colour and luminance ram store colours in a bitmap?

@gerliczer oh well... Have to say that the explicit icons in Botticelli represents ink and paper actually wink And this due to the fact that hires bitmap rules are almost the same.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024