Correct Sonic 1 PAL Music Tempo
From Sonic Retro
(Original guide by Crash on SSRG)
This is a fix for a problem that not that many people are going to experience; I have a flash cart and a PAL console and it annoys the shit out of me that the music is slow (actually, the whole game is slower, but whatever).
What this does is run the sound driver a second time every 5th frame, increasing the tempo to match the NTSC tempo.
First we need to find a free byte in ram to keep count of how many times the sound driver has been run.
v_palmuscounter = $FFFFFFBF ; counts up to 5 then runs UpdateMusic twice
You can put this in any dissassembly as long as it's a free byte of ram.
Sonic 1 (GitHub/SVN)
This is where I put it in my hack.
Find this in s1.sounddriver.asm:
DoStartZ80:
startZ80
rts
and change it to this:
DoStartZ80:
startZ80
btst #6,(v_megadrive).w ; is Megadrive PAL?
beq.s @end ; if not, branch
cmpi.b #$5,(v_palmuscounter).w ; 5th frame?
bne.s @end ; if not, branch
move.b #$0,(v_palmuscounter).w ; reset counter
bra.w UpdateMusic ; run sound driver again
@end:
addq.b #$1,(v_palmuscounter).w ; add 1 to frame count
rts
Sonic 1 (Hivebrain)
Find in sonic1.asm
loc_71C44:
move.w #0,($A11100).l ; start the Z80
rts
and change it to this:
loc_71C44:
move.w #0,($A11100).l ; start the Z80
btst #6,($FFFFFFF8).w ; is Megadrive PAL?
beq.s @end ; if not, branch
cmpi.b #$5,(v_palmuscounter).w ; 5th frame?
bne.s @end ; if not, branch
move.b #$0,(v_palmuscounter).w ; reset counter
bra.w sub_71B4C ; run sound driver again
@end:
addq.b #$1,(v_palmuscounter).w ; add 1 to frame count
rts