View Single Post
Old 01 November 2018, 21:22   #66
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 1,823
I think it can be further simplified.

Cases 2, 3 and 4 can be merged:
3. if (current vpos == sprite end) sprite DMA slots are used to load SPRxPOS and SPRxCTL. Force DMA state to idle. Disable happens even if SPRxCTL write is not possible due to bitplane DMA stealing sprite cycles. Initial sprite end is hard-fixed to the first DMA fetch for the sprite.

"Force DMA state to idle. Disable happens even if SPRxCTL write is not possible due to bitplane DMA stealing sprite cycles.": that made possible the very special case used in my code.
Because is valid in every lines not only on line 25(20).
So my write disarms the sprite and set line=EVx that trigger special case (active in every horizontal position).
You can also add to your table that only a DMA write to SPRxCTL can force DMA in idle mode, a CPU write only disarms the sprite (obviously excluding the indirect and special case indicated, that requires compliance with specific conditions).

Last edited by ross; 01 November 2018 at 22:09. Reason: added case 2 to the 'big merge'
ross is offline  
 
Page generated in 0.04288 seconds with 11 queries