EasyManua.ls Logo

Commodore Plus 4 - Page 220

Commodore Plus 4
464 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
208
Programming
Graphics
The
background
color
registers
are
all
global
color
sources.
This
means
you
have
four
global
(whole
screen)
colors.
The
foreground
bits
use
the
normal
color
memory
to
get
their
color
(and
luminance),
so
each
character
can
have
an
independent
foreground
color.
To
enter
extended
color
mode,
use
POKE
65286,PEEK(65286)0R64
To
put
the
chip
back
in
high-resolution
mode,
use
POKE
65286,PEEK(65S86)AUD191
The
background
registers
65301-65304,
which
are
used
for
coloring
the
back
ground
pixels,
can
be
assigned
any
of
the
16
colors
and
8
luminances.
To
calculate
the
value
needed,
use
luminance
*
16+color-1
where
the
luminance
is
0
through
7,
and
the
color
is
chosen
from
the
available
colors
(1-16).
The
color
assigned
to
background
registers
63501
and
63502
can
also
be
controlled
by
the
COLOR
command
for
sources
0
and
3,
respectively.
The
remaining
two
color
registers
cannot
be
changed
with
the
COLOR
command.
Note:
In
extended
background
color
mode,
the
cursor
is
invisible.
It
is
a
good
idea
to
return
to
high-resolution
character
mode
when
exiting
a
program.
Example:
10
SCNCLR
20
POKE65286,
PEEK
(65286
)OR64
30
FORI=1TO4
40
PRINT"COLOR,
LUMINANCE
FOR";I;:INPUTC,L
50
POKE65300+I,L*16+C-1:NEXT
60
FORI=0TO63
70
POKE3072+I,I
80
POKE3136+I,I+64
90
POKE3200+I,1+128
100
POKE3264+I,1+192
110
NEXT
120
1=0
130
PORC=0TO15:FORL=0TO7
140
POKE2048+IrL*16+C
150
POKE2176+I,L*16+C
160
1=1+1
170
NEXTL,C
180
PRINT"HIT
KEY":GETKEYK$:POKE65286rPEEK(65286)ANDl91
190
COLOR0,2,7

Other manuals for Commodore Plus 4

Related product manuals