There's a bug that's been in my game since I first implemented the sound engine, that I've decided it's time to squash it. The bug is like this: The 'right' button of the controller is being 'pushed' by the sound engine some how. Not constantly, but for just 1 frame every few seconds or so. I've actually narrowed it down to my DMC routine.
If I comment out the below code the bug is gone:
Code: Select all
LDA #$0F
STA $4015 ; stop DMC if it's currently playing
LDA #$1F
STA $4015 ; and restart it
I'm really stumped, any ideas?