Thread: Psycheual
View Single Post
Old 11 March 2010, 11:03   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by Asman View Post
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..
Toni Wilen is online now  
 
Page generated in 0.08963 seconds with 11 queries