EasyManua.ls Logo

Commodore Amiga - SELECTING THE DATA OUTPUT RATE

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...
End-or-data
Words
When the vertical position of the beam counter is equal
to
the VSTOP value in the
sprite control words,
the
next two words fetched from the sprite
data
structure are writ-
ten into the sprite control registers instead of being sent to the color registers. These
two words are interpreted by the hardware
in
the same manner as the original words
that
were first loaded into the control registers.
If
the VSTART value contained in
these words is lower than the current beam position, this sprite will not be reused in this
display field. For consistency, the value 0 should be used for both words when ending
the usage of a sprite. Sprite reuse is discussed later.
The
following
data
structure
is
for the spaceship sprite.
It
will be located
at
V =
65
and H = 128 on the screen.
SPRITE:
DC.W
DC.W
DC.'V
DC.W
DC.W
DC.W
DC.W
$6D60,$7200
$0990,$07EO
$13C8,$OFFO
$23C4,$lFF8
$13C8,$OFFO
$0990,$07EO
$0000,$0000
Displaying
a
Sprite
;VSTART,
lISTART,
VSTOP
;First pair
of
descriptor words
;End
of
sprite data
After building the
data
structure, you need
to
tell the system to display it. This section
describes the display of sprites
in
"automatic" mode. In this mode, once the sprite DMA
channel begins to retrieve and display the data, the display continues until the VSTOP
position
is
reached. Manual mode
is
described later on in this chapter.
The following steps are used
in
displaying the sprite:
1. Decide which of the eight sprite DMA channels to use.
2. Set the sprite pointers
to
tell the system where
to
find the sprite data.
3.
Turn
on sprite direct memory access if
it
is not already on.
104 Sprite Hardware

Table of Contents

Other manuals for Commodore Amiga

Related product manuals