Difference between revisions of "Sonic the Hedgehog CD/MMD Tweaking"
From Sonic Retro
(Template, updating headings) |
Scarred Sun (talk | contribs) m (Text replacement - "</asm>" to "</syntaxhighlight>") |
||
Line 9: | Line 9: | ||
bcs.s loc_20AF10 ; If the number of rings is < 1000, branch | bcs.s loc_20AF10 ; If the number of rings is < 1000, branch | ||
move.w #$3E7,d1 ; Move $3E7 (999) into d1 | move.w #$3E7,d1 ; Move $3E7 (999) into d1 | ||
− | move.w d1,($FF1512).l ; Move d1 back to the address where the number of rings is at</ | + | move.w d1,($FF1512).l ; Move d1 back to the address where the number of rings is at</syntaxhighlight> |
==Minimum rings for Giant Ring== | ==Minimum rings for Giant Ring== | ||
Line 15: | Line 15: | ||
cmpi.w #$32,($FF1512).l ; Compare 50 with the number of rings | cmpi.w #$32,($FF1512).l ; Compare 50 with the number of rings | ||
bcc.s loc_20D51C ; If number of rings >= 50, allow entrance to the special stage. | bcc.s loc_20D51C ; If number of rings >= 50, allow entrance to the special stage. | ||
− | jmp sub_20788C ; Otherwise jump here</ | + | jmp sub_20788C ; Otherwise jump here</syntaxhighlight> |
==Rings given by ring== | ==Rings given by ring== | ||
<asm>$9F1A: | <asm>$9F1A: | ||
− | addq.w #1,($FF1512).l ; Add 1 to number of rings</ | + | addq.w #1,($FF1512).l ; Add 1 to number of rings</syntaxhighlight> |
==Rings given by Ring Monitor== | ==Rings given by Ring Monitor== | ||
<asm>$A88E: | <asm>$A88E: | ||
− | addi.w #$A,($FF1512).l ; Add 10 to the current number of rings</ | + | addi.w #$A,($FF1512).l ; Add 10 to the current number of rings</syntaxhighlight> |
==Invincibility duration== | ==Invincibility duration== | ||
<asm>$A8F8: | <asm>$A8F8: | ||
move.b #1,($FF151F).l ; Enable invicibility | move.b #1,($FF151F).l ; Enable invicibility | ||
− | move.w #$4B0,($FFFFD032).w ; Set the invincibility duration time to $4B0</ | + | move.w #$4B0,($FFFFD032).w ; Set the invincibility duration time to $4B0</syntaxhighlight> |
==Super Sneakers duration== | ==Super Sneakers duration== | ||
<asm>$A95A: | <asm>$A95A: | ||
move.b #1,($FF1520).l ; Enable super sneakers | move.b #1,($FF1520).l ; Enable super sneakers | ||
− | move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0</ | + | move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0</syntaxhighlight> |
==Regular speed stats== | ==Regular speed stats== | ||
<asm>$4082: | <asm>$4082: | ||
move.w #$600,($FFFFF760).w ; Maximum velocity | move.w #$600,($FFFFF760).w ; Maximum velocity | ||
− | move.w #$C,($FFFFF762).w ; Maximum acceleration</ | + | move.w #$C,($FFFFF762).w ; Maximum acceleration</syntaxhighlight> |
==Super Sneakers speed stats== | ==Super Sneakers speed stats== | ||
<asm>$A968: | <asm>$A968: | ||
move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00 | move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00 | ||
− | move.w #$18,($FFFFF762).w ; Set maximum acceleration to $18</ | + | move.w #$18,($FFFFF762).w ; Set maximum acceleration to $18</syntaxhighlight> |
{{SCHGuides}} | {{SCHGuides}} | ||
[[Category:Sonic Community Hacking Guide]] | [[Category:Sonic Community Hacking Guide]] |
Revision as of 21:28, 20 December 2015
SCHG: Sonic the Hedgehog CD |
---|
Main Article |
File Locations |
File Locations |
Art Editing |
Editing Art |
MMD Tweaking |
Tweaking MMDs |
RAM Editing |
RAM Editing |
Here are some locations in a European Sonic CD level MMD which contain tweakable code (in Motorola 68000 assembly).
Maximum rings allowed
<asm>$AEFA: move.w ($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,($FF1512).l ; Move d1 back to the address where the number of rings is at</syntaxhighlight>
Minimum rings for Giant Ring
<asm>$D50C: cmpi.w #$32,($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</syntaxhighlight>
Rings given by ring
<asm>$9F1A: addq.w #1,($FF1512).l ; Add 1 to number of rings</syntaxhighlight>
Rings given by Ring Monitor
<asm>$A88E: addi.w #$A,($FF1512).l ; Add 10 to the current number of rings</syntaxhighlight>
Invincibility duration
<asm>$A8F8: move.b #1,($FF151F).l ; Enable invicibility move.w #$4B0,($FFFFD032).w ; Set the invincibility duration time to $4B0</syntaxhighlight>
Super Sneakers duration
<asm>$A95A: move.b #1,($FF1520).l ; Enable super sneakers move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0</syntaxhighlight>
Regular speed stats
<asm>$4082: move.w #$600,($FFFFF760).w ; Maximum velocity move.w #$C,($FFFFF762).w ; Maximum acceleration</syntaxhighlight>
Super Sneakers speed stats
<asm>$A968: move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00 move.w #$18,($FFFFF762).w ; Set maximum acceleration to $18</syntaxhighlight>