It's known that there is a bug in our Super Mario Bros. 2 when, if a player dies, there should be a short death sound playing while the jingle is (as in Doki Doki Panic), but as the DPCM is silenced on soundtrack changes, this sound is never actually heard.
The game has several "queues" as to handling music and sound effects. When a player dies, the game updates two of these queues: one for the death music, and the other for the death sound sample. But if both are queued at the same time, then the DPCM sample is bypassed.
Here is the code that applies to this routine (look for it at 1F759, or $F749, in a clean ROM with header):
Code: Select all
lda #Music2-DeathJingle
sta MusicQueue2
lda #DPCM_PlayerDeath
sta DPCMQueue
Thank you,
Ben