Difference between revisions of "Sonic the Hedgehog CD/MMD Tweaking"
From Sonic Retro
m |
(Formatting) |
||
Line 2: | Line 2: | ||
==Maximum rings allowed== | ==Maximum rings allowed== | ||
− | + | <asm>$AEFA: | |
− | + | 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</asm> | |
==Lowest number of rings required to access the special stage== | ==Lowest number of rings required to access the special stage== | ||
− | + | <asm>$D50C: | |
− | + | 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</asm> | |
==Number of rings you get when you break the ring monitor== | ==Number of rings you get when you break the ring monitor== | ||
− | + | <asm>$A88E: | |
− | + | addi.w #$A,(word_FF1512).l ; Add 10 to the current number of rings</asm> | |
==Invincibility duration time== | ==Invincibility duration time== | ||
− | + | <asm>$A8F8: | |
− | + | move.b #1,(byte_FF151F).l ; Enable invicibility | |
− | + | move.w #$4b0,($ffffd032).w ; Set the invincibility duration time to $4B0</asm> | |
==Super Sneakers duration time== | ==Super Sneakers duration time== | ||
− | + | <asm>$A95A: | |
− | + | move.b #1,(byte_FF1520).l ; Enable super sneakers | |
− | + | move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0</asm> | |
==Maximum velocity and accelleration== | ==Maximum velocity and accelleration== | ||
− | + | <asm>$4082: | |
− | + | move.w #$600,($FFFFF760).w ; Maximum velocity | |
− | + | move.w #$C,($FFFFF762).w ; Maximum accelleration</asm> | |
==Maximum velocity and accelleration (with Super sneakers)== | ==Maximum velocity and accelleration (with Super sneakers)== | ||
− | + | <asm>$A968: | |
− | + | move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00 | |
− | + | move.w #$18,($FFFFF762).w ; Set maximum accelleration to $18</asm> | |
==Number of rings you get when you get a ring== | ==Number of rings you get when you get a ring== | ||
− | + | <asm>$9F1A: | |
− | + | addq.w #1,(word_FF1512).l ; Add 1 to number of rings</asm> | |
− | |||
{{SCHGuides}} | {{SCHGuides}} | ||
[[Category:Sonic Community Hacking Guide]] | [[Category:Sonic Community Hacking Guide]] |
Revision as of 05:30, 31 August 2008
Here are some locations in an European Sonic CD level MMD which contain tweakable code (in 68k assembly).
Contents
- 1 Maximum rings allowed
- 2 Lowest number of rings required to access the special stage
- 3 Number of rings you get when you break the ring monitor
- 4 Invincibility duration time
- 5 Super Sneakers duration time
- 6 Maximum velocity and accelleration
- 7 Maximum velocity and accelleration (with Super sneakers)
- 8 Number of rings you get when you get a ring
Maximum rings allowed
<asm>$AEFA: 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</asm>
Lowest number of rings required to access the special stage
<asm>$D50C: 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</asm>
Number of rings you get when you break the ring monitor
<asm>$A88E: addi.w #$A,(word_FF1512).l ; Add 10 to the current number of rings</asm>
Invincibility duration time
<asm>$A8F8: move.b #1,(byte_FF151F).l ; Enable invicibility move.w #$4b0,($ffffd032).w ; Set the invincibility duration time to $4B0</asm>
Super Sneakers duration time
<asm>$A95A: move.b #1,(byte_FF1520).l ; Enable super sneakers move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0</asm>
Maximum velocity and accelleration
<asm>$4082: move.w #$600,($FFFFF760).w ; Maximum velocity move.w #$C,($FFFFF762).w ; Maximum accelleration</asm>
Maximum velocity and accelleration (with Super sneakers)
<asm>$A968: move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00 move.w #$18,($FFFFF762).w ; Set maximum accelleration to $18</asm>
Number of rings you get when you get a ring
<asm>$9F1A: addq.w #1,(word_FF1512).l ; Add 1 to number of rings</asm>