View Single Post
Old 01 November 2018, 18:49   #65
Registered User

Join Date: Feb 2017
Location: Oslo
Posts: 46
Things became a lot clearer to me now
I observed that if (line == EVx) then DMA loads xPOS/xCTL regardless of the channel state.
I used to think xPOS/xCTL reloads would happen only if the sprite was about to go idle, but it turns out they don't depend on such a hairy condition after all (Puh! )

A consequence of this is that xPOS/xCTL can be loaded by DMA also for sprites in manual mode.

The following sums up the fetching rules for sprite DMA channels. (It's an edited version of post #34.)
1. if (current vpos == sprite start) set sprite DMA state to active.

2. if (current vpos == sprite end) set sprite DMA state to idle.

3. if (current vpos == first possible sprite line) sprite DMA slots are used to load SPRxPOS and SPRxCTL. Force disables DMA state.

4. if (current vpos == sprite end) sprite DMA slots are used to load SPRxPOS and SPRxCTL.

5. if (sprite DMA state == active) sprite DMA slots are used to load SPRxDATA and SPRxDATB.
- The conditions involving vpos are checked constantly, every horizontal position.
- first possible sprite line in point 3. refers to line 25 for PAL and line 20 for NTSC. (
- (current vpos == sprite end) has higher priority in case multiple conditions are satisfied simultaneously.

Thanks to ross and Toni, both made important contributions towards arriving at this model.

Last edited by adrazar; 02 November 2018 at 02:39.
adrazar is offline  
Page generated in 0.03986 seconds with 11 queries