Difference between revisions of "Fix Oil Ocean Music Bug"
From Sonic Retro
(Created page with "In Sonic 2 there is a bug which happens when you use the 14 continues cheat basically it only plays the oil ocean theme it was fixed in REV02 but it can easily be fixed. Thes...") |
(Overhauled) |
||
Line 1: | Line 1: | ||
− | + | There is a bug that occurs when you input the [[Cheat_Codes:Sonic_the_Hedgehog_2_(16-bit)#Cheat_Codes|14 Continues cheat]], which causes the game to play Oil Ocean Zone's music forever. | |
− | + | The cause of this can be found in the ''CheckCheats'' function: | |
− | |||
− | |||
− | |||
− | |||
<syntaxhighlight lang="asm"> | <syntaxhighlight lang="asm"> | ||
move.b #SndID_ContinueJingle&$7F,d0 ; Play the continue jingle | move.b #SndID_ContinueJingle&$7F,d0 ; Play the continue jingle | ||
+ | jsrto (PlayMusic).l, JmpTo_PlayMusic | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | ||
+ | The issue here is that the game is sending an invalid [[sega:SMPS|SMPS]] sound command: valid sound commands start at $80, yet this command is actually $3F. The sound driver doesn't handle this properly, causing it to malfunction, and prevent itself from playing any new sounds or music. | ||
+ | |||
+ | To fix this, remove the '&$7F'. This changes the command to $BF, which is handled properly. | ||
+ | |||
+ | {{S2Howtos}} | ||
+ | [[Category:SCHG How-tos|{{PAGENAME}}]] |
Revision as of 17:55, 8 August 2018
There is a bug that occurs when you input the 14 Continues cheat, which causes the game to play Oil Ocean Zone's music forever.
The cause of this can be found in the CheckCheats function:
move.b #SndID_ContinueJingle&$7F,d0 ; Play the continue jingle
jsrto (PlayMusic).l, JmpTo_PlayMusic
The issue here is that the game is sending an invalid SMPS sound command: valid sound commands start at $80, yet this command is actually $3F. The sound driver doesn't handle this properly, causing it to malfunction, and prevent itself from playing any new sounds or music.
To fix this, remove the '&$7F'. This changes the command to $BF, which is handled properly.