Sonic the Hedgehog CD/MMD Tweaking
From Sonic Retro
European Sonic CD
Here are some locations in an level MMD which contain tweakable code (in 68k assembly).
Number of rings limit: (0xAEFA)
move.w (word_FF1512).l,d1 ; Move number of rings into d1
cmpi.w #$3E8,d1 ; Compare $3E8 (1000) with d1 (number of rings)
bcs.s loc_20AF10 ; If the number of rings is < 1000, branch
move.w #$3E7,d1 ; Move $3E7 (999) into d1
move.w d1,(word_FF1512).l ; Move d1 back to the address where the number of rings is at
Lowest number of rings required to access the special stage: (0xD50C)
cmpi.w #$32,(word_FF1512).l ; Compare 50 with the number of rings
bcc.s loc_20D51C ; If number of rings >= 50, allow entrance to the special stage.
jmp sub_20788C ; Otherwise jump here
Number of rings you get when you break the ring monitor: (0xA88E)
addi.w #$A,(word_FF1512).l ; Add 10 to the current number of rings