Actions

SCHG

Difference between revisions of "Sonic the Hedgehog CD/MMD Tweaking"

From Sonic Retro

m (Text replacement - "{{SCHGuides}}" to "==References== <references /> {{SCHGuides}}")
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Here are some locations in an European Sonic CD level MMD which contain tweakable code (in 68k assembly).
+
__NOTOC__
 +
{{SCHG SCD}}
 +
Here are some locations in a European Sonic CD level MMD which contain tweakable code (in [[Motorola 68000]] assembly).
  
 
==Maximum rings allowed==
 
==Maximum rings allowed==
$AEFA:
+
<syntaxhighlight lang="asm">$AEFA:
move.w (word_FF1512).l,d1 ; Move number of rings into d1
+
move.w ($FF1512).l,d1 ; Move number of rings into d1
cmpi.w #$3E8,d1       ; Compare $3E8 (1000) with d1 (number of rings)
+
cmpi.w #$3E8,d1 ; Compare $3E8 (1000) with d1 (number of rings)
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,(word_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>
  
==Lowest number of rings required to access the special stage==
+
==Minimum rings for Giant Ring==
$D50C:
+
<syntaxhighlight lang="asm">$D50C:
cmpi.w #$32,(word_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>
  
==Number of rings you get when you break the ring monitor==
+
==Rings given by ring==
$A88E:
+
<syntaxhighlight lang="asm">$9F1A:
addi.w #$A,(word_FF1512).l ; Add 10 to the current number of rings
+
addq.w #1,($FF1512).l ; Add 1 to number of rings</syntaxhighlight>
  
==Invincibility duration time==
+
==Rings given by Ring Monitor==
$A8F8:
+
<syntaxhighlight lang="asm">$A88E:
        move.b #1,(byte_FF151F).l ; Enable invicibility
+
addi.w #$A,($FF1512).l ; Add 10 to the current number of rings</syntaxhighlight>
        move.w #$4b0,($ffffd032).w ; Set the invincibility duration time to $4B0
 
  
==Super Sneakers duration time==
+
==Invincibility duration==
$A95A:
+
<syntaxhighlight lang="asm">$A8F8:
        move.b #1,(byte_FF1520).l ; Enable super sneakers
+
move.b #1,($FF151F).l ; Enable invicibility
        move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0
+
move.w #$4B0,($FFFFD032).w ; Set the invincibility duration time to $4B0</syntaxhighlight>
  
==Maximum velocity and accelleration==
+
==Super Sneakers duration==
$4082:
+
<syntaxhighlight lang="asm">$A95A:
        move.w #$600,($FFFFF760).w ; Maximum velocity
+
move.b #1,($FF1520).l ; Enable super sneakers
        move.w #$C,($FFFFF762).w ; Maximum accelleration
+
move.w #$4B0,($FFFFD034).w ; Set the super sneakers duration time to $4B0</syntaxhighlight>
  
==Maximum velocity and accelleration (with Super sneakers)==
+
==Regular speed stats==
$A968:
+
<syntaxhighlight lang="asm">$4082:
        move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00
+
move.w #$600,($FFFFF760).w ; Maximum velocity
        move.w #$18,($FFFFF762).w ; Set maximum accelleration to $18
+
move.w #$C,($FFFFF762).w ; Maximum acceleration</syntaxhighlight>
  
 +
==Super Sneakers speed stats==
 +
<syntaxhighlight lang="asm">$A968:
 +
move.w #$C00,($FFFFF760).w ; Set maximum velocity to $C00
 +
move.w #$18,($FFFFF762).w ; Set maximum acceleration to $18</syntaxhighlight>
  
  
==Number of rings you get when you get a ring==
+
==References==
$9F1A:
+
<references />
        addq.w #1,(word_FF1512).l ; Add 1 to number of rings
 
 
 
 
 
  
 
{{SCHGuides}}
 
{{SCHGuides}}
[[Category:Sonic Community Hacking Guide]]
 

Latest revision as of 15:50, 24 March 2020

SCHG: Sonic the Hedgehog CD
Main Article
File Locations
File Locations
Art Editing
Editing Art
Nemesis Format Art
MMDs, A-P
Palmtree Panic MMDs
Collision Chaos MMDs
Tidal Tempest MMDs
Quartz Quadrant MMDs
Wacky Workbench MMDs
Stardust Speedway MMDs
Metallic Madness MMDs
MMDs, S-W
MMD Tweaking
Tweaking MMDs
Maximum rings allowed
Minimum rings for Giant Ring
Rings given by ring
Rings given by Ring Monitor
Invincibility duration
Super Sneakers duration
Regular speed stats
Super Sneakers speed stats
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

$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

Minimum rings for Giant Ring

$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

Rings given by ring

$9F1A:
	addq.w	#1,($FF1512).l	; Add 1 to number of rings

Rings given by Ring Monitor

$A88E:
	addi.w	#$A,($FF1512).l	; Add 10 to the current number of rings

Invincibility duration

$A8F8:
	move.b	#1,($FF151F).l	; Enable invicibility
	move.w	#$4B0,($FFFFD032).w	; Set the invincibility duration time to $4B0

Super Sneakers duration

$A95A:
	move.b	#1,($FF1520).l	; Enable super sneakers
	move.w	#$4B0,($FFFFD034).w	; Set the super sneakers duration time to $4B0

Regular speed stats

$4082:
	move.w	#$600,($FFFFF760).w	; Maximum velocity
	move.w	#$C,($FFFFF762).w	; Maximum acceleration

Super Sneakers speed stats

$A968:
	move.w	#$C00,($FFFFF760).w	; Set maximum velocity to $C00
	move.w	#$18,($FFFFF762).w	; Set maximum acceleration to $18


References


Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information