Selecting A Dma Channel And Setting The Pointers - Commodore Amiga Hardware Reference Manual

Hide thumbs Also See for Amiga:
Table of Contents

Advertisement

4.
For each subsequent display field, during the vertical blanking interval, rewrite
the sprite pointers.
CAUTION
If sprite DMA is turned off while a sprite is being displayed (that is, after
VSTART but before VSTOP), the system will continue to display the line of
sprite data that was most recently fetched. This causes a vertical bar to
appear on the screen. It is recommended that sprite DMA be turned off only
during vertical blanking or during some portion of the display where you are
sure that no sprite is being displayed.
SELECTING A DMA CHANNEL AND SETTING THE POINTERS
In deciding which DMA channel to use, you should take into consideration the colors
assigned to the sprite and the sprite's video priority.
The sprite DMA channel uses two pointers to read in sprite data and control words.
During the vertical blanking interval before the first display of the sprite, you need to
write the sprite's memory address into these pointers. The pointers for each sprite are
called SPRxPTH and SPRxPTL, where "x" is the number of the sprite DMA channel.
SPRxPTH points to the high three bits of the memory address of the first word in the
sprite and SPRxPTL points to the low fifteen bits. As usual, you can write a long word
into SPRxPTH.
In the following example the processor initializes the data pointers for sprite O. Nor-
mally, this is done by the Copper. The sprite is at address $20000.
SPROPTH EQU
SPROPTL
EQU
MOVE.L
$DFF120
$DFF122
#$20000,SPROPTH ; Write $20000 to sprite 0 pointer
These pointers are dynamic; they are incremented by the sprite DMA channel to point
first to the control words, then to the data words, and finally to the end-of-data words.
After reading in the sprite control information and storing it in other registers, they
proceed to read in the color descriptor words. The color descriptor words are stored in
sprite data registers, which are used by the sprite DMA channel to display the data on
screen. For more information about how the sprite DMA channels handle the display,
see the "Hardware Details" section below.
Sprite Hardware 105

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents