Actions

SCHG How-to

Difference between revisions of "Add final spindash to Sonic 2 Beta"

From Sonic Retro

(Fixing an error)
(Fixed a typographical error and other changes)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Hello everyone shadow05 here
+
{{GuideBy|Shadow05}}
Have you playing sonic 2 beta and been annoyed about the incomplete spindash
+
 
Well this guide is for people who can do basic asm editing inspired by the sonic 1 spindash guide
+
If you’ve ever played [[Sonic 2 Beta]] before, chances are you may have been annoyed about the incomplete Spindash. Well, this guide will show you how to port the Spindash from the final build of Sonic 2. This guide is made is for people who can do some basic ASM editing, and was inspired by the Sonic 1 Spindash guide.
I was using the super egg disassembly but this will work on the original esrael disassembly
+
 
 +
I will be using [[User:Super Egg|Super Egg]]'s disassembly for this guide, but this should work on [[User:Esrael|Esrael]]'s original disassembly. This guide would also work with the [[Sonic 2 Nick Arcade]] prototype as well, as it uses the exact same spindash system.
  
 
===Directly copying the object code===
 
===Directly copying the object code===
This will be very easy
+
First, we'll have to get a slightly modified version of the Sonic 1 Spindash code.
here's the code
+
 
 +
Search for "Sonic_SpinDash:". Replace the entire routine with this:
  
 
<syntaxhighlight lang="asm">
 
<syntaxhighlight lang="asm">
Line 109: Line 111:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
===Fixing an error===
+
===Fixing errors===
 
+
The coding is now there; however, when you get to building the ROM you will most likely encounter an error.
when you build it you most likely an error
+
To fix this issue, go to line 25863. You’ll see this line below:
to fix this go to line 25863
 
 
<syntaxhighlight lang="asm">
 
<syntaxhighlight lang="asm">
 
         bra    loc_FBF4
 
         bra    loc_FBF4
 
</syntaxhighlight>
 
</syntaxhighlight>
See this line delete it!
+
Delete it (or comment it out; it doesn’t matter).
  
Thank you for reading this guide and hopefully you'll be less annoyed
+
Note that if you are doing this on the Nick Arcade disassembly (text or split), this error won't happen.
  
warning the spindash sound will be high pitched but you can just turn down the volume
+
===Conclusion===
 +
And that’s it. If I was doing a part 2 of this guide, a lot of steps for the Nick Arcade and Simon Wai disassemblies would be the same as in the Sonic 1 tutorial for adding the Spindash, such as fixing the Monitor Bug, adding the sound effects, etc. Refer to those once you’ve got the Spindash working.
  
Update!
+
Thanks for reading this guide; hopefully you'll be less annoyed about the incomplete Spindash.
  
I found away to port the beta spindash to sonic 2 i'll make a new guide soon!
+
{{S2NAHowtos}}
 +
{{S2BHowtos}}

Latest revision as of 16:33, 28 July 2023

(Original guide by Shadow05)

If you’ve ever played Sonic 2 Beta before, chances are you may have been annoyed about the incomplete Spindash. Well, this guide will show you how to port the Spindash from the final build of Sonic 2. This guide is made is for people who can do some basic ASM editing, and was inspired by the Sonic 1 Spindash guide.

I will be using Super Egg's disassembly for this guide, but this should work on Esrael's original disassembly. This guide would also work with the Sonic 2 Nick Arcade prototype as well, as it uses the exact same spindash system.

Directly copying the object code

First, we'll have to get a slightly modified version of the Sonic 1 Spindash code.

Search for "Sonic_SpinDash:". Replace the entire routine with this:

Sonic_SpinDash:
		tst.b	$39(a0)
		bne.s	loc_1AC8E
		cmpi.b	#8,$1C(a0)
		bne.s	locret_1AC8C
		move.b	($FFFFF603).w,d0
		andi.b	#$70,d0
		beq.w	locret_1AC8C
		move.b	#9,$1C(a0)
		move.w	#$E0,d0
                jsr     (Play_Sfx)
		addq.l	#4,sp
		move.b	#1,$39(a0)
		move.w	#0,$3A(a0)
		cmpi.b	#$C,$28(a0)
		bcs.s	loc_1AC84
		move.b	#2,($FFFFD11C).w
loc_1AC84:
locret_1AC8C:
		rts	
; ---------------------------------------------------------------------------

loc_1AC8E:
		move.b	($FFFFF602).w,d0
		btst	#1,d0
		bne.w	loc_1AD30
		move.b	#$E,$16(a0)
		move.b	#7,$17(a0)
		move.b	#2,$1C(a0)
		addq.w	#5,$C(a0)
		move.b	#0,$39(a0)
		moveq	#0,d0
		move.b	$3A(a0),d0
		add.w	d0,d0
		move.w	Dash_Speeds(pc,d0.w),$14(a0)
		move.w	$14(a0),d0
		subi.w	#$800,d0
		add.w	d0,d0
		andi.w	#$1F00,d0
		neg.w	d0
		addi.w	#$2000,d0
		move.w	d0,($FFFFEED0).w
		btst	#0,$22(a0)
		beq.s	loc_1ACF4
		neg.w	$14(a0)

loc_1ACF4:
		bset	#2,$22(a0)
		move.b	#0,($FFFFD11C).w
		move.w	#$BC,d0
		jsr     (Play_Sfx)
		bra.s	loc_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
; ===========================================================================

loc_1AD30:				; If still charging the dash...
		tst.w	$3A(a0)
		beq.s	loc_1AD48
		move.w	$3A(a0),d0
		lsr.w	#5,d0
		sub.w	d0,$3A(a0)
		bcc.s	loc_1AD48
		move.w	#0,$3A(a0)

loc_1AD48:
		move.b	($FFFFF603).w,d0
		andi.b	#$70,d0	; 'p'
		beq.w	loc_1AD78
		move.w	#$900,$1C(a0)
		move.w	#$E0,d0  ; changed from #$E0
                jsr     (Play_Sfx)
		addi.w	#$200,$3A(a0)
		cmpi.w	#$800,$3A(a0)
		bcs.s	loc_1AD78
		move.w	#$800,$3A(a0)

loc_1AD78:
		addq.l	#4,sp
		cmpi.w	#$60,($FFFFEED8).w
		beq.s	loc_1AD8C
		bcc.s	loc_1AD88
		addq.w	#4,($FFFFEED8).w

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

loc_1AD8C:
		rts
; End of subroutine Sonic_SpinDash

Fixing errors

The coding is now there; however, when you get to building the ROM you will most likely encounter an error. To fix this issue, go to line 25863. You’ll see this line below:

        bra     loc_FBF4

Delete it (or comment it out; it doesn’t matter).

Note that if you are doing this on the Nick Arcade disassembly (text or split), this error won't happen.

Conclusion

And that’s it. If I was doing a part 2 of this guide, a lot of steps for the Nick Arcade and Simon Wai disassemblies would be the same as in the Sonic 1 tutorial for adding the Spindash, such as fixing the Monitor Bug, adding the sound effects, etc. Refer to those once you’ve got the Spindash working.

Thanks for reading this guide; hopefully you'll be less annoyed about the incomplete Spindash.

SCHG How-To Guide: Sonic 2 Nick Arcade (16-bit)
Fixing Bugs
Fix EHZ Deformation Bug
Design Choices
Add final spindash to Sonic 2 Beta | How to port paralax plouds to the Nick Arcade prototype
SCHG How-To Guide: Sonic 2 Beta (16-bit)
Fixing Bugs
Fix EHZ Deformation Bug
Design Choices
Add final spindash to Sonic 2 Beta