EasyManua.ls Logo

Commodore VIC-20 - Page 105

Commodore VIC-20
308 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...
HI-RES
subroutines
from
your
BASIC
program,
using
the
SYS
command
from
BASiC.
That
way
you
get
both
the
ease
of
writing
in
BASIC,
and
the
speed
(for
graphics)
of
machine
language.
The
SUPER-EXPANDER
cartridge
also
is
available
to
add
HI-RES
commands
to
VIC
BASIC.
All
of
the
examples
given
in
this
section
will
be
in
BASIC
to
make
them
clear,
in
the
future,
you can
add
the
routines
to
your
own
programs
to
give
you
easy
HI-RES
graphics.
Now
to
the
technical
details.
Remember
programmable
characters?
Well,
bit
mapping
is
done
almost
the
same
way.
When
you
created
a
programmable
character,
you
could
watch
it
form
before
your
eyes,
if
the
character
was
on
the
screen
when
you
were
changing
it.
To
see
this
again,
type
this
program
in
and
RUN
it.
100
POKE
36869
,
255
110
FOR
I
-
7168
TO
7679
:
POKE
I,
PEEK(I
+
25600)
:
NEXT
120
PRINT
CHRS(147)
"A"
130
FORI
=
7176
TO
7183
140
FOR
L
=
1
TO
1000
:
NEXT
150
READ
A
:
POKE
I,
A
:
NEXT
160
DATA
60,36,36,36,36,36,255,255
The
character
changed
from
an
A
to
a
top
hat
as
you
watched!
This
is
the
trick
behind
HI-RES
graphics
on
the
VIC—making
changes
directly
on
the
character
memory.
When
the
character
is
already
on
the
screen
you see
the
changes
right
away!
The
best
way
to
set
up
the
HI-RES
display
screen
for
the
64-dot
by 64-dot
HI-RES
display
is
to
print
out
64
characters
in
a
square
box
or
matrix.
Setting
up
the
HI-RES
display
screen
is
the
first
step
in
HI-RES
graphics.
The
following
short
program
section
will
set
up
the
display
screen.
Type
NEW,
then
10
POKE
36879,8:PRINT
CHRS(147)
20
FOR
L
=
0
TO
7
:
FOR
M
=
0
TO
7
30
POKE
7680
+
M*22
+
L,
L'8
+
M
40
NEXT
:
NEXT
Now
RUN
the
program.
We
now
have 64
characters
on
the
screen;
they
can't
be
changed
in
any
way,
since
the
codes
for
the
letters
are
in
ROM.
If
we
change
the
character
memory
register
to