Quote:
Originally Posted by Asman
Thank you for answer. But if I understand correctly that I can do something like:
wait for vertical beam, set sprite pointer in copperlist and set sprite data ( position ), right ?
|
Yes, it is always perfectly safe as long as you do it before sprite DMA starts. (line 25/20)
Updating coordinates while sprite DMA is fetching SPRxPOS/SPRxCTL data will cause glitches because sometimes DMA gets new SPRxPOS data and old SPRxCTL data or vice versa and sometimes both registers gets old data or both registers gets new data. 3 different glitches possible
(Sprite DMA always has priority over CPU)
This is something that isn't very well explained in HRM.
Sprite DMA is idle until line 25/20, all sprites' POS and CTL are updated by sprite DMA during line 25/20 (if DMA bit in DMACON is set). DMA goes back to idle mode until current vpos matches vstart, sprite is enabled, disabled when vpos matches vstop, during following line POS and CTL are updated again and back to idle again and so on..