EasyManua.ls Logo

Commodore 128D - Page 131

Commodore 128D
427 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...
I
\
Line
99
is
another
delay
so
the
capsule
can
continue
to
move
across
the
screen.
Line
100
returns
you
to
text
mode.
Working
with
adjoining
sprites
can be
more
interesting
than
working
with
a
single
sprite.
The
main
points
to
remember
are:
(1)
Make
sure
you
position
the
SSHAPE
coordinates
at
the
correct
locations
on
the
screen,
so
you
save
the
picture
data
properly;
and
(2)
be
certain
to
'
position
the
sprite
coordinates
in
the
correct
location
when
you
are
joining
them
with
the
MOVESPR
statement.
In
this
example,
you
posi
tioned
sprite
2
at
a
location
24
pixels
to
the
right
of
sprite
1.
Once
you
master
the
technique
of
adjoining
two
sprites,
try
more
than
two.
The
more
sprites
you
join,
the
better
the
detail
and
anima
tion
will
be
in
your
programs.
The
C128
has
two
additional
SPRITE
commands,
SPRCOLOR
and
COLLISION,
which
are
not
covered
in
this
chapter.
To
learn
about
these
commands,
refer
to
Chapter
V,
the
BASIC
7.0
Encyclopedia.
Storing
Sprite
Data
in
Binary
Files
The
Commodore
128
has
two
new
commands,
BLOAD
and
BSAVE,
which
make
handling
sprite
data
neat
and
easy.
The
"B"
in
BLOAD
and
BSAVE
stand
for
BINARY.
The
BSAVE
and
BLOAD
commands
save
and
load
binary
files
to
and
from
disk.
A
binary
file
consists
of
either
a
portion
of
a
machine
language
program,
or
a
collection
of
data
within
a
specified
address
range.
You
may
be
familiar
with
the
SAVE
Command
within
the
built-in
machine
language
monitor.
When
you
use
this
SAVE
command,
the
resulting
file
on
disk
is
considered
a
binary
file.
A
binary
file
is
easier
to
work
with
than
an
object
code
file
since
you
can
load
a
binary
file
without
any
further
preparation.
An
object
code
file
must
be
loaded
with
a
loader,
as
in
the
Commo
dore
64
Assembler
Development
System;
then
the
SYSTEM
com
mand
(SYS)
must
be
used
to
execute
it.
You're
probably
wondering
what
this
has
to
do
with
sprites.
Here's
the
connection.
The
Commodore
128
has
a
dedicated
portion
of
memory
ranging
from
decimal
address
3584
($0E00)
through
4095
($0FFF),
where
sprite
data
is
stored.
This
portion
of
memory
takes
up
512
bytes.
As
you
know,
a
sprite
is
24
pixels
wide
by
21
pixels
tall.
Each
pixel
requires
one
bit
of
memory.
If
the
bit
in
a
sprite
is
off
(equal
to
0),
the
corresponding
pixel
on
the
screen
is
considered
off
and
it
takes
on
the
color
of
the
background.
If
a
pixel
within
a
sprite
is
123
USING
C128
MODE—Color,
Animation
and
Sprite
Graphics
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals