Magic Floor originally moved the dot by doing something like
Code: Select all
LDA #0 STA $2003 LDA $2004 CLC ADC YdirectionAndVelocity STA $2004 LDA #3 STA $2003 LDA $2004 CLC ADC XdirectionAndVelocity STA $2004
And despite the entire OAM being set on powerup (all #$EF or #$FF, I tried both), there's still garbage sprites appearing in the upper left corner (if I had to guess, somewhere around X=Y=16). And behavior still gets worse as the PPU gets warmer.
I finally switched the entire code to just use OAM DMA like everyone else, and it worked fine. So what's going on? Just how tricky is the OAM? Is it possible to do partial OAM updates on an NTSC NES? It seems silly to spend 513 or 514 cycles doing OAM DMA instead of ≈24.