SMB2 (USA) -- Unused Death Sound Fix?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Post Reply
SMB2J-2Q
Posts: 154
Joined: Thu Jul 27, 2017 5:13 pm

SMB2 (USA) -- Unused Death Sound Fix?

Post by SMB2J-2Q »

https://www.youtube.com/watch?v=Bw98Rg79d2E

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
May I ask what the proper fix for this would be, please?

Thank you,



Ben
Post Reply