I understand. Now I have added "pause" in my game, and when paused, the copper trashes the second half of the stars.
I'm suspecting a control word issue.
it's 100% for half of the screen, but second half is sometimes glitchy.
The control word/pos I'm using takes X and Y into account, and I noticed that Y doesn't matter. Or does it?
YES it does. It worked somehow with my previous attempt but I have to specify Y=256 else control word is wrong, and fun fact sometimes it work sometimes it doesn't...
Code:
add.w #6*8,d0 | add 48 offset because of screen centering
move.w #256,d1 | max Y, else glitchy stars
bsr store_sprite_pos_16 ; X,Y => sprite control / pos longword
Mystery solved, thanks
But now DMA sprite is conflicting with that system. If I turn off sprite DMA, I get perfect star scroll, but when using sprites "classically" I get the glitch...
Can't I use "classical" dma controlled sprites with copper-controlled sprites like this? Of course this multiplexed sprite in the copper is using sprite 7 and other sprites are 0,1,2,3,4,5 only.
At the start of my copperlist, I'm setting a blank sprite in all sprites. As long as I don't display any of the sprites using a valid control word, the star scroller is OK.
but as soon as I enable, say sprite 0 by writing a valid position/control words, then the stars begin to glitch (WinUAE, didn't test on real hardware but I'm pretty confident that it will be the same on real hardware, I still have to test on it)