View Single Post
Old 03 April 2016, 19:06   #22
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Just less offended today, that's all. And hopefully floppy drives are manufactured to not harm disks by turning on the motor, else we have a slight design flaw

The key to avoid the infamous running crap sprites is to do the one-off pointer writes (change pointer, not DMA as I incorrectly wrote above!) when sprite DMA is not running.

How do you know it's not running? A simple way is to only change sprite pointers during vertical blanking of the screen. If you change them while bitplanes, coppers, and interrupts are running, you will not be 100% sure it won't cause crap. If you WaitTOF(), you are usually somewhere below line $0, but if you move the mouse as WaitTOF() executes, you could be well down on the screen, perhaps in the middle of the mouse pointer sprite. Likewise, the OS screen could be overscan, so that waiting for line $12c is not low enough. Turning off interrupts and waiting for $138 is the lowest you can go without wasting a whole extra frame before your program starts.

If bitplanes are off, sprite DMA will also be turned off. Some latch. From memory this happens just before DIWSTOP(?), I'm sure Toni can give the details of the behavior.
Photon is offline  
 
Page generated in 0.07654 seconds with 11 queries