EasyManua.ls Logo

Commodore Amiga - Figure 4-9 Typical Example of Sprite Reuse

Commodore Amiga
321 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...
Part
ofa
screen
display
Each image
of
this sprite
may be placed
at
any
desired spot, horizontally
or
vertically.
However,
at
least
one
video line
must separate
the
bottom
of
one
usage
of
a sprite .
from
the
starting
point
of
the
next
usage.
Figure
4-9:
Typical Example of Sprite Reuse
In
single-sprite usage, two all-zero words are placed
at
the end of the
data
structure
to
stop the
DMA
channel from retrieving any more
data
for
that
particular sprite during
that
display field.
To
reuse a DMA channel, you replace this pair of zero words with
another complete sprite
data
structure, which describes the reuse of the DMA channel
at
a position lower on the screen than the first use. You place the two all-zero words
at
the
end of the
data
structure
that
contains the information for all usages of the DMA chan-
nel.
For
example, figure 4-10 shows the
data
structure
that
describes the picture above.
The
only restrictions on the
re.use
of sprites during a single display
field
is
that
the bot-
tom line of one usage of a sprite must be separated from the top line of the next usage
by
at
least one horizontal scan line. This restriction is necessary because only two DMA
cycles per horizontal scan line are allotted to each of the eight channels.
The
sprite
channel needs the time during the blank line to fetch the control word describing the
next usage of the sprite.
The
following example displays the spaceship sprite and then redisplays it as a different
object. Only the sprite
data
list
is
affected, so only the
data
list
is
shown here.
How-
ever, the sprite looks best with the color registers set as shown in the example.
112
Sprite Hardware

Table of Contents

Other manuals for Commodore Amiga

Related product manuals