In deciding which DMA channel to use, you should take into consideration the colors assigned to the sprite and the sprites 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 contains the high three bits of the memory address of the first word in the sprite and SPRxPTL contains the low sixteen bits. The least significant bit of SPRxPTL is ignored, as sprite data must be word aligned. Thus, only fifteen bits of SPRxPTL are used. As usual, you can write a long word into SPRxPTH. In the following example the processor initializes the data pointers for sprite 0. Normally, this is done by the Copper. The sprite is at address $20000. MOVE.L #$20000,SPR0PTH+CUSTOM ;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.
[Back to Amiga Developer Docs]