Commodore 128 Programmer's Reference Manual page 236

Hide thumbs Also See for 128:
Table of Contents

Advertisement

226
COMMODORE 128
HOW COLOR MEMORY IS
INTERPRETED
The contents of the color RAM locations contains the color codes 0-15. Each color
memory location may have a different color code. The lower four bits (nybble) of
COLOR RAM are significant. Figure 8-14 shows the COLOR RAM color codes:
0 Black
8 Orange
1 White
9 Brown
j j
2 Red
10 Light Red
U
3 Cyan
11 Dark Gray
4 Purple
12 Medium Gray
I .
5 Green
13 Light Green
) <
6 Blue
14 Light Blue
u
7 Yellow
15 Light Gray
\
|
Figure 8-14. Color Codes—40 Columns
jj
Notice these color code values are one less than the color codes used by the
I j
keyboard and BASIC. If you want to store a value directly into COLOR RAM, store the
U
values in the table above, not the color codes used by BASIC and the keyboard. For
example:
^ j
POKE 55296,1
J
colors the character in the HOME position white. From the monitor, place the value 1 in
location $D800, and the same results occur.
j j
Remember, these color codes only control the color of the foreground character.
LJ
The background color is controlled by background color register 0 (53281). The pixels
that make up the character image are enabled by bits in character memory. If the bit is
j j
enabled, the pixel in the foreground is turned on in the foreground color, and is
L>
therefore controlled by color RAM. If the bits making up the character are turned off,
they default to the color in background color register 0. The combination of on and off
\
bits makes up the image of the character. The value of these bits determines whether the
L
color data comes from color RAM or background color register 0. You'll learn more
about character patterns in the next few paragraphs.
i <
l
t
CHARACTER MEMORY
In standard character mode, the C128 receives character data from the CHARACTER
I I
ROM. The character ROM is stored in the range 53248 ($D000) through 57343
U
($DFFF). Since the VIC chip is capable of accessing 16K at a time, the C128 needs a
way to have the character ROM available in the 16K VIC range. In C128 mode, the
j j
character ROM is available in any VIC bank in C128 mode, based on the value of
^
\
i

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents