Actions

SCHG How-to

Add Spin Dash to Sonic 1/Part 1

From Sonic Retro

Revision as of 22:25, 25 December 2023 by DikinBaus (talk | contribs)

(Original guide by Lightning)

This tutorial was made possible thanks to the references, guides, and information found at Hacking CulT, The Sonic 2 Beta Page, Sonic Retro, and Sonicology. It was inspired by the guide at The Glowing Bridge that details porting the simpler Spin Dash from the Sonic 2 early beta.

This SCHG is property of DikinBaus. Sonic and all related characters and graphics that appear on this page are property of Sega and are used without permission for no profit.

Requirements

In making this tutorial, I used:

  • Clownacys Sonic 1 Disassembly
  • Other Sonic 1 Disassembly (needed for Flux 2)
  • Windows' Notepad
  • Flex 2
  • Kega Fusion


GitHub Disassembly

Alright, lets get started shall we? Open Constants.asm and scroll down to line 154. Now make a new space (or press enter) and define a new RAM equate by adding this line:

spindash_flag: equ $39


Directly copying the object code

Open sonic.asm in your text editor, and search for the phrase Sonic_MdNormal: (line 6948) and above bsr.w Sonic_Jump, make a new line and add bsr.w Sonic_SpinDash to it you should end up with this:
Sonic_MdNormal:
		bsr.w	Sonic_SpinDash
		bsr.w	Sonic_Jump
the code below bsr.w Sonic_Jump should not be worried about.

Now, to actually copy the Spin Dash subroutine. You have to add a new .asm file. To do that go into Sonic 1's disassembly, create a new file within _incObj folder named Sonic Spindash.asm, for the sake of this SCHG I will add a download right here with all the code. (please put it in the _incObj folder)

after that has been download and put in the _incObj folder. Go back to sonic.asm and go to loc_12EA6: (line 6996 lol) scroll until you see include "_incObj/Sonic JumpDirection.asm". Copy it, and right below it paste it but replace Sonic JumpDirection with Sonic SpinDash it should look something like this:

		include	"_incObj/Sonic Move.asm"
		include	"_incObj/Sonic RollSpeed.asm"
		include	"_incObj/Sonic JumpDirection.asm"
		include	"_incObj/Sonic SpinDash.asm"

Save your changes, navigate back to the main part of the disassembly and run build.bat

Spin Dashing with a strange animation

First Error

That's no good, as you can see on the image, sonic is displaying an "unused" animation. Let's address the bugs. First of all, and the obvious Sonic's Spin Dashing animation isn't present in Sonic 1, of course, therefore it's a messed up version of what seems like the drop dash. If you haven't noticed, collect a few rings then start SpinDashing, as you can see, the badnik(s) can hurt you in your SpinDash state. If you get hit while in state as said before, you'll still be in the SpinDashing state when you land, Sonic will charge forward (depends which way you got hit, forwards or backwards) usually it would destroy whatever badnik touches you in the first place, but that didn't happen. Second, go to high ground or somewhere where the camera can pan downward. Wait for the camera to fully pan down and start SpinDashing. The camera will continue to stay downwards until you stop SpinDashing/Rolling. Spin Dashing with low camera Another problem that the camera can result is that if you SpinDash before an area where your vertical position radically changes (a great example is the double S-Tube in GHZ1), the camera is too slow to catch up to Sonic in time. camera lagging behind Other than that, it works! Great start so far, but let's not get our hopes up.

Animations and Sounds

Now, usually you'd need to worry about changing the sound and allat. But since you already downloaded the Sonic_Spindash.asm we don't have to worry so let's go to the animation.

The animation is kind of the same as the sound. Since you already downloaded the Sonic_Spindash.asm we aight. The animation is currently set to $1F, we'll worry about that later. But for now you're okay. Therefore this section is useless (Mostly).


Fixing Bugs/Errors

First of all, the camera issue is already fixed. But there is one thing. The camera is still too slow. So, if you go down an S-Tube, you die. File:///C:/Users/artes/Videos/Captures/Fusion 3.64 - Genesis - SONIC THE HEDGEHOG 12 25 2023 3 39 47 AM.png

So, to fix this go into the _incObj folder and look for Sonic LevelBound once you find it, open it. Look for .bottom: (line 48) You should see this,

.bottom:
		cmpi.w	#(id_SBZ<<8)+1,(v_zone).w ; is level SBZ2 ?
		bne.w	KillSonic	; if not, kill Sonic
		cmpi.w	#$2000,(v_player+obX).w
		blo.w	KillSonic
		clr.b	(v_lastlamp).w	; clear	lamppost counter
		move.w	#1,(f_restart).w ; restart the level
		move.w	#(id_LZ<<8)+3,(v_zone).w ; set level to SBZ3 (LZ4)
		rts

Replace that whole code with this one

.bottom:		
		move.w (v_limitbtm1).w,d0 
		move.w (v_limitbtm2).w,d1 
		cmp.w d0,d1 ; screen still scrolling down? 
		blt.s .dontkill; if so, don't kill Sonic
		cmpi.w	#(id_SBZ<<8)+1,(v_zone).w ; is level SBZ2 ?
		bne.w	KillSonic	; if not, kill Sonic
		cmpi.w	#$2000,(v_player+obX).w
		blo.w	KillSonic
		clr.b	(v_lastlamp).w	; clear	lamppost counter
		move.w	#1,(f_restart).w ; restart the level
		move.w	#(id_LZ<<8)+3,(v_zone).w ; set level to SBZ3 (LZ4)
		rts
.dontkill: 
		rts
Now, if you go back to build your ROM. As you can see, you don't die even if the camera doesn't catch up to Sonic.

As you can see, Sonic doesn't have a SpinDash sprite as it's not present in Sonic 1, so open up Flex 2, bsr.w Sonic_LevelBound bsr.w Sonic_AnglePos move.w #$60,(v_lookshift).w ; reset looking up/down rts

;End of subroutine Sonic_SpinDash </syntaxhighlight>

Save, build the ROM, and test it. You should find that the camera does reset itself when you start to Spin Dash, but if you take the double-S-tube in GHZ1, you still barely outrun the screen vertically and get killed. To fix this, open the file _incObj\Sonic LevelBound.asm and find the code at the label @bottom. First, add a label just before the rts at the end of the block of code, named @dontkill. Then, at the beginning of @bottom, you're going to compare two values in memory. If (v_limitbtm1).w < (v_limitbtm2).w, then the screen is still scrolling down and you don't want to die. In this case, it should skip the part below that jumps to the routine KillSonic. You should add the following lines of code below @bottom:

		move.w (v_limitbtm1).w,d0 
		move.w (v_limitbtm2).w,d1 
		cmp.w d0,d1 ; screen still scrolling down? 
		blt.s @dontkill; if so, don't kill Sonic

You should end up with something like this:

@bottom:
		move.w (v_limitbtm1).w,d0 
		move.w (v_limitbtm2).w,d1 
		cmp.w d0,d1 ; screen still scrolling down? 
		blt.s @dontkill; if so, don't kill Sonic 
		cmpi.w	#(id_SBZ<<8)+1,(v_zone).w ; is level SBZ2 ?
		bne.w	KillSonic	; if not, kill Sonic
		cmpi.w	#$2000,(v_player+obX).w
		bcs.w	KillSonic
		clr.b	(v_lastlamp).w	; clear	lamppost counter
		move.w	#1,(f_restart).w ; restart the level
		move.w	#(id_LZ<<8)+3,(v_zone).w ; set level to SBZ3 (LZ4)
		rts	
@dontkill: 
		rts
''';==========================================================================='''
These fixes can also be found
Sonic Retro
here
.

Now, you'll fix the problem where Sonic is still in his Spin Dashing state after he gets injured. Open _incObj\sub ReactToItem.asm and find the subroutine HurtSonic. This is the code that handles hurting Sonic, if you couldn't guess. You're going to have it clear the flag in memory that stores whether or not Sonic is Spin Dashing. Scroll to the label @isleft and add the line move.b #0,(a0) directly below it. You should end up with:

@isleft:
		move.b #0,f_spindash(a0) ; clear Spin Dash flag 
		move.w #0,obInertia(a0) 
		move.b #id_Hurt,obAnim(a0) 
		move.w #$120,$30(a0)

Save, build, and test. If all is well, those bugs should be gone! Now you have a functioning Spin Dash in Sonic 1. However, it doesn't look like the Spin Dash from Sonic 2. In the next sections, we will rectify this.

Adding new tiles

Now, you'll need to add the Spin Dash tiles from Sonic 2's tiles to Sonic 1's; However, you'll need to pad the file artunc/sonic.bin to get room for the new tiles first.

On Windows

To do this, you have to create a batch file (.bat) with following code in the project folder:

cd artunc

fsutil file createnew padding.bin 16384
 :: Create a file called "padding.bin" with 16KB

ren sonic.bin sonic_old.bin
 :: Rename the original "sonic.bin" to "sonic_old.bin"

copy /b sonic_old.bin+padding.bin sonic.bin
 :: Copy the 2 files into a new "sonic.bin"

cd ..

On Linux/BSD/Unix/Mac

To do this, you have to create a shell script (.sh) with following code in the project folder:

#!/bin/bash

cd artunc

# Create a file called "padding.bin" with 16KB
dd if=/dev/zero of=padding.bin bs=1024 count=16

# Rename the original "Sonic.bin" to "Sonic.bin.orig"
mv Sonic.bin{,.orig}

# Copy the 2 files into a new "Sonic.bin"
dd if=padding.bin of=Sonic.bin oflag=append conv=notrunc

cd ..

Run it and you will find your sonic.bin 16KB bigger. If anything went wrong, use the backup file named as sonic_old.bin (or Sonic.bin.orig of not on Windows).


Now, in your tile editor, open the padded artunc/sonic.bin and Sonic 2's art/uncompressed/Sonic's art.bin. These are the tiles you're after:

copying sonic's Spin Dash tiles

Copy them from the Sonic 2 tiles to the end of the Sonic 1 tiles. Do note that it shouldn't matter if you use the default palette of your tile editor, as long as the one you're using for Sonic 2's tiles matches the one you're using for Sonic 1's tiles.

Save the Sonic 1 file artunc/sonic.bin and close your tile editor. You may rebuild the ROM, but there shouldn't be any noticeable changes, since the game isn't coded to actually do anything with the tiles we put there yet.

Making PLCs for the tiles

Now, you'll add the pattern load cues to tell the game to load the tiles you just added. Open _maps/Sonic -Dynamic Gfx Script.asm in your text editor. At the bottom of the big table of offsets, and just before the label SonPLC_Null, add the following lines:

		dc.w SonPLC_SpinDash1-SonicDynPLC ;58
		dc.w SonPLC_SpinDash2-SonicDynPLC ;59
		dc.w SonPLC_SpinDash3-SonicDynPLC ;5A
		dc.w SonPLC_SpinDash4-SonicDynPLC ;5B
		dc.w SonPLC_SpinDash5-SonicDynPLC ;5C
		dc.w SonPLC_SpinDash6-SonicDynPLC ;5D

Note that the hex numbers commented to the side are indeces. If you were to number each line in the list you just added to in hex, starting at zero, those would be the numbers for those lines. These will be important later because they are the frame numbers that will be used in your animation.

Now, at the very bottom of the file, but just before the even, insert the following lines:

SonPLC_SpinDash1: dc.b 1, $F5, $10 ; 01 F 510 
SonPLC_SpinDash2: dc.b 1, $F5, $20 ; 01 F 520 
SonPLC_SpinDash3: dc.b 1, $F5, $30 ; 01 F 530 
SonPLC_SpinDash4: dc.b 1, $F5, $40 ; 01 F 540 
SonPLC_SpinDash5: dc.b 1, $F5, $50 ; 01 F 550 
SonPLC_SpinDash6: dc.b 1, $F5, $60 ; 01 F 560

These lines will be built in the ROM as the hex strings found commented beside each one. The format for mappings in Sonic 1 is NN(STTT), where NN is how many times (STTT) is repeated after it. S is one less than the number of tiles to be loaded in order, and TTT is the tile index from which the game should start loading. In each of your PLCs, NN is 01, meaning there is only one instance of (STTT) after it. Also, in each of your PLCs, S is $F, which means that $10 tiles will be loaded for each. The remaining TTT is the number of the first tile in the pattern (the first row of Spin Dash tiles you copied starts at tile number $510, the second at $520, etc.).

For more information about pattern load cues in Sonic 1, visit Sonicology.

Mappings

Now you will make the mappings for the Spin Dash, which define the shape and size of the area to be used in placing the tiles. Open the file _maps/Sonic.asm in your text editor. Again, you're going to add some entries in the big table at the beginning of the file, much like you did in editing the PLCs. Just above the line MS_Null: dc.b 0, add the following lines:

ptr_MS_Spindash1:	dc.w MS_Spindash1-Map_Sonic
ptr_MS_Spindash2:	dc.w MS_Spindash2-Map_Sonic
ptr_MS_Spindash3:	dc.w MS_Spindash3-Map_Sonic
ptr_MS_Spindash4:	dc.w MS_Spindash4-Map_Sonic
ptr_MS_Spindash5:	dc.w MS_Spindash5-Map_Sonic
ptr_MS_Spindash6:	dc.w MS_Spindash6-Map_Sonic

Then, at the end of the second table, just before the even, add:

MS_Spindash1:	dc.b 1		; Spindash 1
		dc.b	$F8, $F, 0, 0, $F4 
MS_Spindash2:	dc.b 1		; Spindash 2
		dc.b	$F8, $F, 0, 0, $F4 
MS_Spindash3:	dc.b 1		; Spindash 3
		dc.b	$F8, $F, 0, 0, $F4 
MS_Spindash4:	dc.b 1		; Spindash 4
		dc.b	$F8, $F, 0, 0, $F4 
MS_Spindash5:	dc.b 1		; Spindash 5
		dc.b	$F8, $F, 0, 0, $F4 
MS_Spindash6:	dc.b 1		; Spindash 6
		dc.b	$F8, $F, 0, 0, $F4

You might notice that these are all identical to each other, and are also very similar to the mappings for the jumping/rolling frames. The format of these mappings is structurally similar to the format of the PLCs: the first byte defines how many mapping pieces there are following it. The format is NN(YYSSFFTTXX), where NN is the number of (YYSSFFTTXX) following, YY is the Y position of the piece, SS is the size and shape (in this case, $F is a 4x4 tile square), FF is the control for certain flip and palette changes (0 in this case means not to touch it), TT is the first tile in VRAM to start reading (in this case 0 is the first tile), and XX is the X position of the piece. The Y position of these mappings, $F8, is slightly greater than that of the jumping/rolling animation, $F0. This is so Sonic doesn't appear to be hovering slightly above the ground while charging the Spin Dash.

These mappings use 4x4 pieces to hold 16 tiles. You might have noticed while you were copying the Spin Dash tiles before that each frame of the animation had a row of 16 tiles, one after the other. With these mappings, those tiles will be loaded in order in four columns of four, starting with the top left and working toward the bottom right. Try arranging the tiles yourself in your tile editor in a scratch file if you want to understand how they are arranged. Just don't save over any files we're using!

Then open constants.asm, scroll down to the end of the file add these lines:

fr_Spindash1:	equ (ptr_MS_Spindash1-Map_Sonic)/2	; $58
fr_Spindash2:	equ (ptr_MS_Spindash2-Map_Sonic)/2	; $59
fr_Spindash3:	equ (ptr_MS_Spindash3-Map_Sonic)/2	; $5A
fr_Spindash4:	equ (ptr_MS_Spindash4-Map_Sonic)/2	; $5B
fr_Spindash5:	equ (ptr_MS_Spindash5-Map_Sonic)/2	; $5C
fr_Spindash6:	equ (ptr_MS_Spindash6-Map_Sonic)/2	; $5D

For more information on mappings in Sonic 1, visit Sonicology.

Animation sequence

You're almost done adding in the Spin Dash graphics! Now you will add the animation sequence containing the list of frames to be used. Open the file _anim/Sonic.asm in your text editor. Yet again, we will be adding a line to the bottom of the table in the beginning, just before the line

SonAni_Walk:	dc.b $FF, fr_walk13, fr_walk14,	fr_walk15, fr_walk16, fr_walk11, fr_walk12, afEnd

you will add

ptr_Spindash:	dc.w SonAni_SpinDash-Ani_Sonic ;1F

The ;1F comment after it is again an index in the table. If you were to enumerate all of the lines in this table, starting at zero, this new line would be the $1Fth line. Notice that at index 2 is the rolling animation that we are currently using, and at index 9 is the warping one that it used before we fixed it!

Now, you will again add data just after the even at the end of the second table:

SonAni_SpinDash: dc.b 0, fr_Spindash1, fr_spindash2, fr_spindash1, fr_spindash3, fr_spindash1, fr_spindash4, fr_spindash1, fr_spindash5, fr_spindash1, fr_spindash6, afEnd
		even

The first byte in this animation script tells the game to use the fastest speed in this animation. Each subsequent word until the afEnd tells the game which animation frame to use. Notice that you could have use numbers ($58, $59, etc...) as they are the indeces of your Spin Dash PLCs. The afEnd at the end tells the game to loop the entire animation. Basically, this script will have the game cycle through the 1st, 2nd, 1st, 3rd, ..., 1st, 6th, 1st, 2nd, ... frames.

Now go to the very end of the file and add this line:

id_Spindash:	equ (ptr_Spindash-Ani_Sonic)/2	; $1F

Changing the animation again

Now that you have added all the necessary information for using the new Spin Dash tiles in an animation, it's time for the last step in adding this animation: actually having the game use it! Open Sonic Spindash.asm in your text editor (if you haven't already) and change the line you changed before,

		move.b #id_roll,obAnim(a0) ; changed from #9

to use your new animation found at $1F:

		move.b #id_Spindash,obAnim(a0) ; changed from #9

Then, find the line you commented out before,

;		move.w #$900,obAnim(a0)

uncomment it, and change the value to $1F00.

		move.w #$1F00,obAnim(a0) ; changed from #$900

Finally, save your code, build your ROM, and try it out.

Spin Dashing with Spin Dash animation

Success! However, there's a new bug that occurs now that the game is using this new animation: while charging a Spin Dash, let an enemy touch you. Sonic gets injured, when instead the enemy should be destroyed.

Another fix

This is a relatively easy bug to fix. Go back to sub ReactToItem.asm and search for the routine React_Enemy. Just above the line

		cmpi.b	#id_Roll,obAnim(a0) ; is Sonic rolling/jumping?

add the following two lines:

		cmpi.b	#id_Spindash,obAnim(a0)	; is Sonic Spin Dashing? 
		beq.w @donthurtsonic	; if yes, branch

You should end up with something like this:

React_Enemy:
		tst.b	(v_invinc).w	; is Sonic invincible?
		bne.s	@donthurtsonic	; if yes, branch
		cmpi.b	#id_Spindash,obAnim(a0)	; is Sonic Spin Dashing? 
		beq.w @donthurtsonic	; if yes, branch 
		cmpi.b	#id_Roll,obAnim(a0) ; is Sonic rolling/jumping?
		bne.w	React_ChkHurt	; if not, branch

This code adds a check to see if the animation is #$1F, our new animation. If it is, it branches over the code that jumps to the routine to hurt Sonic. Notice that there is another comparison for if the animation is #2 present, which concealed this bug before, since we were using that animation.

Save, build, and test.

killing an enemy while Spin Dashing

Pop! Congratulations, you've successfully ported the Spin Dash from Sonic 2 into Sonic 1, complete with animations. The only thing remaining to add is the Spin Dash smoke object, and fix a few more bugs.

Appendix

The Sonic_SpinDash routine in its entirety, with comments:

; ---------------------------------------------------------------------------
; Subroutine to make Sonic perform a spindash
; ---------------------------------------------------------------------------
 
; ||||||||||||||| S U B	R O U T	I N E |||||||||||||||||||||||||||||||||||||||
 
 
Sonic_SpinDash:
		tst.b	f_spindash(a0)			; already Spin Dashing?
		bne.s	loc2_1AC8E		; if set, branch
		cmpi.b	#id_duck,obAnim(a0)		; is anim duck
		bne.s	locret2_1AC8C		; if not, return
		move.b	(v_jpadpress2).w,d0	; read controller
		andi.b	#$70,d0			; pressing A/B/C ?
		beq.w	locret2_1AC8C		; if not, return
		move.b	#id_spindash,obAnim(a0)		; set Spin Dash anim (9 in s2)
		move.w	#$BE,d0			; spin sound ($E0 in s2)
		jsr	(PlaySound_Special).l	; play spin sound
		addq.l	#4,sp			; Add 4 bytes to the stack return address to skip Sonic_Jump on next rts to Obj01_MdNormal, preventing conflicts with button presses.
		move.b	#1,f_spindash(a0)		; set Spin Dash flag
		move.w	#0,$3A(a0)		; set charge count to 0
		cmpi.b	#$C,$28(a0)		; ??? oxygen remaining?
		bcs.s	loc2_1AC84		; ??? branch if carry
		move.b	#2,($FFFFD11C).w	; ??? $D11C is used for
						; the smoke/dust object
loc2_1AC84:
		bsr.w	Sonic_LevelBound
		bsr.w	Sonic_AnglePos

locret2_1AC8C:
		rts	
; ---------------------------------------------------------------------------

loc2_1AC8E:
		move.b	(v_jpadhold2).w,d0	; read controller
		btst	#1,d0			; check down button
		bne.w	loc2_1AD30		; if set, branch
		move.b	#$E,$16(a0)		; $16(a0) is height/2
		move.b	#7,$17(a0)		; $17(a0) is width/2
		move.b	#id_roll,obAnim(a0)		; set animation to roll
		addq.w	#5,$C(a0)		; $C(a0) is Y coordinate
		move.b	#0,f_spindash(a0)		; clear Spin Dash flag
		moveq	#0,d0
		move.b	$3A(a0),d0		; copy charge count
		add.w	d0,d0			; double it
		move.w	Dash_Speeds(pc,d0.w),obInertia(a0) ; get normal speed
		move.w	obInertia(a0),d0		; get inertia
		subi.w	#$800,d0		; subtract $800
		add.w	d0,d0			; double it
		andi.w	#$1F00,d0		; mask it against $1F00
		neg.w	d0			; negate it
		addi.w	#$2000,d0		; add $2000
		move.w	d0,($FFFFEED0).w	; move to $EED0
		btst	#0,$22(a0)		; is sonic facing right?
		beq.s	loc2_1ACF4		; if not, branch
		neg.w	obInertia(a0)			; negate inertia

loc2_1ACF4:
		bset	#2,$22(a0)		; set unused (in s1) flag
		move.b	#0,($FFFFD11C).w	; clear $D11C (smoke)
		move.w	#$BC,d0			; spin release sound
		jsr	(PlaySound_Special).l	; play it!
		bra.s	loc2_1AD78
; ===========================================================================
Dash_Speeds:
		dc.w  $800		; 0
		dc.w  $880		; 1
		dc.w  $900		; 2
		dc.w  $980		; 3
		dc.w  $A00		; 4
		dc.w  $A80		; 5
		dc.w  $B00		; 6
		dc.w  $B80		; 7
		dc.w  $C00		; 8
; ===========================================================================

loc2_1AD30:				; If still charging the dash...
		tst.w	$3A(a0)		; check charge count
		beq.s	loc2_1AD48	; if zero, branch
		move.w	$3A(a0),d0	; otherwise put it in d0
		lsr.w	#5,d0		; shift right 5 (divide it by 32)
		sub.w	d0,$3A(a0)	; subtract from charge count
		bcc.s	loc2_1AD48	; ??? branch if carry clear
		move.w	#0,$3A(a0)	; set charge count to 0

loc2_1AD48:
		move.b	(v_jpadpress2).w,d0	; read controller
		andi.b	#$70,d0			; pressing A/B/C?
		beq.w	loc2_1AD78		; if not, branch
		move.w	#$1F00,obAnim(a0)	; reset spdsh animation
		move.w	#$BE,d0			; was $E0 in sonic 2
		jsr	(PlaySound_Special).l	; play charge sound
		addi.w	#$200,$3A(a0)		; increase charge count
		cmpi.w	#$800,$3A(a0)		; check if it's maxed
		bcs.s	loc2_1AD78		; if not, then branch
		move.w	#$800,$3A(a0)		; reset it to max

loc2_1AD78:
		addq.l	#4,sp			; Add 4 bytes to the stack return address to skip Sonic_Jump on next rts to Obj01_MdNormal, preventing conflicts with button presses.
		cmpi.w	#$60,($FFFFEED8).w	; $EED8 only ever seems
		beq.s	loc2_1AD8C		; to be used in Spin Dash
		bcc.s	loc2_1AD88
		addq.w	#4,($FFFFEED8).w

loc2_1AD88:
		subq.w	#2,($FFFFEED8).w

loc2_1AD8C:
		bsr.w	Sonic_LevelBound
		bsr.w	Sonic_AnglePos
		move.w	#$60,(v_lookshift).w	; reset looking up/down
		rts
; End of subroutine Sonic_SpinDash

Note: while not necessary, the loc_, locret_, etc. labels from the Sonic 2 disassembly were replaced with loc2_, locret2_, etc. to avoid potential conflict.

Pu7o's continuation

Pu7o has written a wonderful guide that picks up from this point.


SCHG How-To Guide: Sonic the Hedgehog (16-bit)
Fixing Bugs
Fix Demo Playback | Fix a Race Condition with Pattern Load Cues | Fix the SEGA Sound | Display the Press Start Button Text | Fix the Level Select Menu | Fix the Hidden Points Bug | Fix Accidental Deletion of Scattered Rings | Fix Ring Timers | Fix the Walk-Jump Bug | Correct Drowning Bugs | Fix the Death Boundary Bug | Fix the Camera Follow Bug | Fix Song Restoration Bugs | Fix the HUD Blinking | Fix the Level Select Graphics Bug | Fix a remember sprite related bug
Changing Design Choices
Change Spike Behavior | Collide with Water After Being Hurt | Fix Special Stage Jumping Physics | Improve the Fade In\Fade Out Progression Routines | Fix Scattered Rings' Underwater Physics | Remove the Speed Cap | Port the REV01 Background Effects | Port Sonic 2's Level Art Loader | Retain Rings Between Acts | Add Sonic 2 (Simon Wai Prototype) Level Select | Improve ObjectMove Subroutines | Port Sonic 2 Level Select
Adding Features
Add Spin Dash ( Part 1 / Part 2 / Part 3 / Part 4 ) | Add Eggman Monitor | Add Super Sonic | Add the Air Roll
Sound Features
Expand the Sound Index | Play Different Songs Per Act | Port Sonic 2 Final Sound Driver | Port Sonic 3's Sound Driver | Port Flamewing's Sonic 3 & Knuckles Sound Driver | Change The SEGA Sound
Extending the Game
Load Chunks From ROM | Add Extra Characters | Make an Alternative Title Screen | Use Dynamic Tilesets | Make GHZ Load Alternate Art | Make Ending Load Alternate Art | Add a New Zone | Set Up the Goggle Monitor | Add New Moves | Add a Dynamic Collision System | Dynamic Special Stage Walls System | Extend Sprite Mappings and Art Limit | Enigma Credits | Use Dynamic Palettes
Miscellaneous
Convert the Hivebrain 2005 Disassembly to ASM68K
Split Disassembly Guides
Set Up a Split Disassembly | Basic Level Editing | Basic Art Editing | Basic ASM Editing (Spin Dash)

|Add Spin Dash to Sonic 1/Part 1]]