Hi Nori, I also had garbage sprite problems when doing the final version of our last demo Prototype 1. My problem was that I never saw the garbage on my own screen, but only learned about it from reports by fellow sceners who tested our final release candidates (thanks!). My solution might be overdoing it a little, but mind you that I had to shoot blindly. Nevertheless it solved my problem.
So the context of this solution is that it was used in an AGA demo (some additional complications) and that I embodied the tips from How to Code #7
(esp. sprite fix from the startup code
- actually get the original LHA archive of How to Code 7
to learn some tricks about Amiga coding) as a matter of principle since the late 1990s.
That being said, this was my solution:
; -- set sprite pointers
lea sprpt(a6),a6 ;dff120
move.l d0,(a6)+ ;write sprpt
dc.l $8080,0,0,0 ;sprx(pos/ctl/data/datb)
I called _clearAllSprites every vertical blank.