Sonic and Sega Retro Message Board: Some changes and fixes for Sonic 2 - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 15 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last ►
    Locked
    Locked Forum

Some changes and fixes for Sonic 2

#16 User is offline saxman 

Posted 10 June 2012 - 10:26 PM

  • Oldbie
  • Posts: 2625
  • Joined: 08-April 04
  • Gender:Male
  • Location:United States of America
  • Wiki edits:136
You guys are amazing! I really like these bug fixes. I have implemented a bunch in my ROM, mostly ones that I have found and fixed. However, lately I've been looking at posts about different bug fixes I wasn't aware of. These, for example, I didn't really notice until I saw this topic. I will gladly credit both Esrael and RHS when my work has been made public.

On a side note... although I personally don't believe in special labels for members (such as "Tech Member"), since Retro does it, I will gladly put this out there: RHS should be a tech member! Is anyone up stairs listening? This takes talent!

#17 User is offline KingofHarts 

Posted 11 June 2012 - 07:11 PM

  • WHY CANT I EDIT THE WIKIIII????
  • Posts: 1543
  • Joined: 07-August 10
  • Gender:Male
  • Project:Sonic 1 Complete (SHC 2016 Entry)
  • Wiki edits:1

View Postsaxman, on 10 June 2012 - 10:26 PM, said:

You guys are amazing! I really like these bug fixes. I have implemented a bunch in my ROM, mostly ones that I have found and fixed. However, lately I've been looking at posts about different bug fixes I wasn't aware of. These, for example, I didn't really notice until I saw this topic. I will gladly credit both Esrael and RHS when my work has been made public.

On a side note... although I personally don't believe in special labels for members (such as "Tech Member"), since Retro does it, I will gladly put this out there: RHS should be a tech member! Is anyone up stairs listening? This takes talent!


Preach on, brother... this, 1000x over.

#18 User is offline Esrael 

Posted 11 June 2012 - 09:23 PM

  • Posts: 175
  • Joined: 24-July 03
  • Gender:Male
  • Location:Brazil, São Paulo, Guarulhos
  • Project:Esrael Neto Assembler Editor / Sonic 2 Delta

View Postredhotsonic, on 07 June 2012 - 05:00 PM, said:

...

Something Cool for CPZ boss!

THIS IS JUST FOR LAUGHS, but I thought I'd share it anyway! Back at the label "loc_2E692:". See these two lines?

	btst	#2,$2D(a1)
	beq.s	loc_2E6CA


Comment them out! And everytime Eggman drops the gunge, this will happen!

Posted Image


Well, I found it funny =P


Looking into Boss code I find a way of Making this work as it was planned or not.

find the code:
 loc_2DAD4:
	move.w	d0,(a1)
	subq.b	#1,objoff_3E(a0)
	bne.s	return_2DAE8
	move.b	#$F,collision_flags(a0)
	bclr	#1,objoff_2D(a0)

return_2DAE8:
	rts



and add

 loc_2DAD4:
	move.w	d0,(a1)
        bset  	#1,objoff_2D(a0)   ; Add this line to code
	subq.b	#1,objoff_3E(a0)
	bne.s	return_2DAE8
	move.b	#$F,collision_flags(a0)
	bclr	#1,objoff_2D(a0)

return_2DAE8:
	rts



After you made the changes. Wait for robotnik filling the bootle and hit he. You will see the animation working.

Download Sonic 2 Delta with CPz boss Change

Posted ImagePosted Image
This post has been edited by Esrael: 11 June 2012 - 09:43 PM

#19 User is offline Endri 

Posted 11 June 2012 - 10:01 PM

  • Officer I don't have my drivers license with me. Can I give you something else?
  • Posts: 1871
  • Joined: 18-November 08
  • Gender:Male
  • Location:São Paulo, Brazil
  • Wiki edits:7
This is clever, and makes perfect sense! I believe this behavior is definitely how it was originally planned.

And, by the way *bows to the master* I can't believe that you are actually back in here, after such a long time, Esrael! It was all thanks to you that I got into the fabulous world of Sonic hacking back then.

Thank you, my master! :eng101:

#20 User is offline McAleeCh 

Posted 12 June 2012 - 02:11 AM

  • Posts: 664
  • Joined: 12-January 03
  • Gender:Male
  • Wiki edits:27
I remember finding the graphics for that extra boss behaviour in the old "MD8123" Sonic 2 proto back in my "Knuckles Prower" days - I had no idea that the graphics existed in the final, or that code that referenced them was commented out, though! Amazing find, and great to see your tweak to return it to what was almost certainly the intended behaviour. = ) Never thought I'd see this in action!

One thing, though - the existing code seems to display the art slightly too far to the right for some reason. If you check out the old .GIF animation I made back when I originally found the graphics to show how it might look in action (currently viewable on the Sonic CulT S2 Proto Lost Sprites page), you can see that the graphics are actually designed to perfectly mask Robotnik's body, even including the small bits you can see through the shine in his Eggmobile's windscreen! For some reason though, the code you've found looks like it gets this alignment wrong by a few pixels - the whole graphic is 3 pixels too far to the right. Is there any way of shifting the goo-covered Robotnik sprite to the left by 3 pixels in order to fix this? = )
This post has been edited by McAleeCh: 12 June 2012 - 02:13 AM

#21 User is offline KingofHarts 

Posted 12 June 2012 - 03:23 AM

  • WHY CANT I EDIT THE WIKIIII????
  • Posts: 1543
  • Joined: 07-August 10
  • Gender:Male
  • Project:Sonic 1 Complete (SHC 2016 Entry)
  • Wiki edits:1
Fix that, and we can add that little tidbit to the wiki page. I'll be waiting for the update. :)

BTW Esrael... I thought you were awesome before, that is just even more amazing. Thats going into my Sonic 2 hack.

#22 User is offline dsrb 

Posted 12 June 2012 - 03:47 AM

  • Posts: 3150
  • Joined: 10-June 09
  • Gender:Male
  • Wiki edits:196
Posting in epic thread

Great find, Esrael: it does seem like that behaviour was lost somewhere in development, and with McAleeCh's fix of the alignment it'll be perfect. :)

So many of these things just cry out for a fully fixed-up Sonic 2 ROM, basically a sequel to Mercury's ReadySonic.

#23 User is offline KingofHarts 

Posted 12 June 2012 - 04:07 AM

  • WHY CANT I EDIT THE WIKIIII????
  • Posts: 1543
  • Joined: 07-August 10
  • Gender:Male
  • Project:Sonic 1 Complete (SHC 2016 Entry)
  • Wiki edits:1

View Postdsrb, on 12 June 2012 - 03:47 AM, said:

Posting in epic thread

Great find, Esrael: it does seem like that behaviour was lost somewhere in development, and with McAleeCh's fix of the alignment it'll be perfect. :)

So many of these things just cry out for a fully fixed-up Sonic 2 ROM, basically a sequel to Mercury's ReadySonic.


I'm sure someone will pump one out well before me (that will also be much better)... but I've been trying to learn from Mercury, and the SCHG in putting together fixed up, enhanced ROMS for Sonic's 1 AND 2... code-named Rev C. Nothing special, but I am a little bit new to hacking and would like to share a finished ROM with others when I'm done.

ReadySonic has been a big help in putting a lot of the stuff in (and correcting some of the stuff I have done before) But with the new stuff from RHS, and other things that weren't included (such as an extra life for every 50,000 pts) I'm hoping to put up what could be considered an update to ReadySonic.

#24 User is offline E-122-Psi 

Posted 12 June 2012 - 07:10 AM

  • Posts: 1710
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
Hah, you actually set up the whole animation, shame they didn't implement that little easter egg originally.

I'm not sure if you take requests, but I've thought of one change that could count as a valid fix; is it possible to enable debug for Tails?

#25 User is offline redhotsonic 

Posted 12 June 2012 - 07:37 AM

  • Also known as RHS
  • Posts: 1525
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic Bash!
  • Wiki edits:24

View PostEsrael, on 11 June 2012 - 09:23 PM, said:

Looking into Boss code I find a way of Making this work as it was planned or not.

find the code:
 loc_2DAD4:
	move.w	d0,(a1)
	subq.b	#1,objoff_3E(a0)
	bne.s	return_2DAE8
	move.b	#$F,collision_flags(a0)
	bclr	#1,objoff_2D(a0)

return_2DAE8:
	rts



and add

 loc_2DAD4:
	move.w	d0,(a1)
        bset  	#1,objoff_2D(a0)   ; Add this line to code
	subq.b	#1,objoff_3E(a0)
	bne.s	return_2DAE8
	move.b	#$F,collision_flags(a0)
	bclr	#1,objoff_2D(a0)

return_2DAE8:
	rts



After you made the changes. Wait for robotnik filling the bootle and hit he. You will see the animation working.

Download Sonic 2 Delta with CPz boss Change

Posted ImagePosted Image





Am I the only one finding this new code not working? I thought on the last hit, the gunge was meant to fall on him, then he runs away, not still blow up. And sometimes, he drops it on himself then carries on attacking.

I tried Delta, and it does the same thing. =/

#26 User is offline Jayextee 

Posted 12 June 2012 - 07:48 AM

  • Comic Mischief
  • Posts: 3178
  • Joined: 22-October 07
  • Gender:Male
  • Location:Kathmandu, Nepal
  • Project:I DONE MAKED GAMES.
  • Wiki edits:27
Has anybody yet fixed Tails' tails when looking up? They animate faster for one 'cycle' before returning to the normal speed.

#27 User is offline redhotsonic 

Posted 12 June 2012 - 12:19 PM

  • Also known as RHS
  • Posts: 1525
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic Bash!
  • Wiki edits:24

View PostE-122-Psi, on 12 June 2012 - 07:10 AM, said:

I'm not sure if you take requests, but I've thought of one change that could count as a valid fix; is it possible to enable debug for Tails?


I might as well take on requests, as long as it's for Sonic 2, and you don't mind me using XenoWhirl's 2007 disassembly =P



To enable debug when using Tails



Go to "Obj02:" and change this:

Obj02:
	; a0=character
	cmpi.w	#2,(Player_mode).w
	bne.s	+
	move.w	(Camera_Min_X_pos).w,(Tails_Min_X_pos).w
	move.w	(Camera_Max_X_pos).w,(Tails_Max_X_pos).w
	move.w	(Camera_Max_Y_pos_now).w,(Tails_Max_Y_pos).w
+



to this:

Obj02:
	; a0=character
	cmpi.w	#2,(Player_mode).w
	bne.s	+
	move.w	(Camera_Min_X_pos).w,(Tails_Min_X_pos).w
	move.w	(Camera_Max_X_pos).w,(Tails_Max_X_pos).w
	move.w	(Camera_Max_Y_pos_now).w,(Tails_Max_Y_pos).w
	tst.w	(Debug_placement_mode).w	; is debug mode being used?
	beq.s	+				; if not, branch
	jmp	DebugMode
+


So, whenever debug mode is active, it will go to DebugMode



Next, go to "Obj02_Control:" and change this:

Obj02_Control:
	cmpa.w	#MainCharacter,a0
	bne.s	Obj02_Control_Joypad2
	move.w	(Ctrl_1_Logical).w,(Ctrl_2_Logical).w
	tst.b	(Control_Locked).w	; are controls locked?
	bne.s	Obj02_Control_Part2	; if yes, branch
	move.w	(Ctrl_1).w,(Ctrl_2_Logical).w	; copy new held buttons, to enable joypad control
	move.w	(Ctrl_1).w,(Ctrl_1_Logical).w
	bra.s	Obj02_Control_Part2



to this:

Obj02_Control:
	cmpa.w	#MainCharacter,a0	; Is Tails the main character?
	bne.s	Obj02_Control_Joypad2	; No?  Branch then
	move.w	(Ctrl_1_Logical).w,(Ctrl_2_Logical).w
	tst.w	(Debug_mode_flag).w	; is debug cheat enabled?
	beq.s	+			; if not, branch
	btst	#4,(Ctrl_1_Press).w	; is button B pressed?
	beq.s	+			; if not, branch
	move.w	#1,(Debug_placement_mode).w	; change Tails into a ring/item
	clr.b	(Control_Locked).w		; unlock control
	rts
+
	tst.b	(Control_Locked).w	; are controls locked?
	bne.s	Obj02_Control_Part2	; if yes, branch
	move.w	(Ctrl_1).w,(Ctrl_2_Logical).w	; copy new held buttons, to enable joypad control
	move.w	(Ctrl_1).w,(Ctrl_1_Logical).w
	bra.s	Obj02_Control_Part2


So when you have main control of Tails, you can enter debug by pressing B.



Next, go to "Obj02_Hurt:" and change this:

Obj02_Hurt:
	jsr	ObjectMove
	addi.w	#$30,y_vel(a0)
	btst	#6,status(a0)
	beq.s	+
	subi.w	#$20,y_vel(a0)



to this:

Obj02_Hurt:
	cmpa.w	#MainCharacter,a0	; Is Tails the main character?
	bne.s	Obj02_Hurt_Normal	; No?  Branch then
	tst.w	(Debug_mode_flag).w
	beq.s	Obj02_Hurt_Normal
	btst	#4,(Ctrl_1_Press).w
	beq.s	Obj02_Hurt_Normal
	move.w	#1,(Debug_placement_mode).w
	clr.b	(Control_Locked).w
	rts

Obj02_Hurt_Normal:
	jsr	ObjectMove
	addi.w	#$30,y_vel(a0)
	btst	#6,status(a0)
	beq.s	+
	subi.w	#$20,y_vel(a0)


So when Tails is hurt, you can enter debug by pressing B.



Next, go to "Obj02_Dead:" and change this:

Obj02_Dead:
	bsr.w	Obj02_CheckGameOver
	jsr	ObjectMoveAndFall
	bsr.w	Tails_RecordPos
	bsr.w	Tails_Animate
	bsr.w	LoadTailsDynPLC
	jmp	DisplaySprite



to this:

Obj02_Dead:
	cmpa.w	#MainCharacter,a0	; Is Tails the main character?
	bne.s	+			; No?  Branch then
	tst.w	(Debug_mode_flag).w
	beq.s	+
	btst	#4,(Ctrl_1_Press).w
	beq.s	+
	move.w	#1,(Debug_placement_mode).w
	clr.b	(Control_Locked).w
	rts
+
	bsr.w	Obj02_CheckGameOver
	jsr	ObjectMoveAndFall
	bsr.w	Tails_RecordPos
	bsr.w	Tails_Animate
	bsr.w	LoadTailsDynPLC
	jmp	DisplaySprite


So when Tails is dead (dying), you can enter debug by pressing B.



Next, go to "loc_41C56:" (part of the debugmode code) and change this:

loc_41C56:
	btst	#4,(Ctrl_1_Press).w
	beq.s	return_41CB6
	moveq	#0,d0
	move.w	d0,(Debug_placement_mode).w
	lea	(MainCharacter).w,a1 ; a1=character
	move.l	#Mapunc_Sonic,mappings(a1)
	move.w	#$780,art_tile(a1)
	tst.w	(Two_player_mode).w
	beq.s	loc_41C82
	move.w	#$3C0,art_tile(a1)



to this:

loc_41C56:
	btst	#4,(Ctrl_1_Press).w
	beq.s	return_41CB6
	moveq	#0,d0
	move.w	d0,(Debug_placement_mode).w
	lea	(MainCharacter).w,a1 ; a1=character
	move.l	#Mapunc_Sonic,mappings(a1)
	move.w	#$780,art_tile(a1)
	cmpi.b	#2,(Maincharacter).w	; are you Tails?
	bne.s	+			; if not, branch
	move.l	#MapUnc_Tails,mappings(a1)
	move.w	#$7A0,art_tile(a1)
+
	tst.w	(Two_player_mode).w
	beq.s	loc_41C82
	move.w	#$3C0,art_tile(a1)


So when you exit debug mode, the correct mappings will load.



Next, go to "loc_41C82:" and change this:

loc_41C82:
	bsr.s	sub_41CB8
	move.b	#$13,y_radius(a1)
	move.b	#9,x_radius(a1)
	move.w	($FFFFFFCC).w,(Camera_Min_Y_pos).w
	move.w	($FFFFFFCE).w,(Camera_Max_Y_pos).w
	cmpi.b	#$10,(Game_Mode).w	; special stage mode?
	bne.s	return_41CB6		; if not, branch
	move.b	#2,(MainCharacter+anim).w
	bset	#2,(MainCharacter+status).w
	bset	#1,(MainCharacter+status).w



to this:

loc_41C82:
	bsr.s	sub_41CB8
	move.b	#$13,y_radius(a1)
	move.b	#9,x_radius(a1)
	cmpi.b	#2,(Maincharacter).w	; are you Tails?
	bne.s	+			; if not, branch
	move.b	#$F,y_radius(a1)	
+
	move.w	($FFFFFFCC).w,(Camera_Min_Y_pos).w
	move.w	($FFFFFFCE).w,(Camera_Max_Y_pos).w
	cmpi.b	#$10,(Game_Mode).w	; special stage mode?
	bne.s	return_41CB6		; if not, branch
	move.b	#2,(MainCharacter+anim).w
	bset	#2,(MainCharacter+status).w
	bset	#1,(MainCharacter+status).w

return_41CB6:
	rts


So when you exit debug mode, the correct height of the character will load.



All done.





EDIT:

View PostJayextee, on 12 June 2012 - 07:48 AM, said:

Has anybody yet fixed Tails' tails when looking up? They animate faster for one 'cycle' before returning to the normal speed.



It's meant to be him "flicking" his tails. But if you do not like that, you can fix it like this:

Obj05AniSelection:
	dc.b	0,0	; TailsAni_Walk,Run	->
	dc.b	3	; TailsAni_Roll		-> Directional
	dc.b	3	; TailsAni_Roll2	-> Directional
	dc.b	9	; TailsAni_Push		-> Pushing
	dc.b	1	; TailsAni_Wait		-> Swish
	dc.b	0	; TailsAni_Balance	-> Blank
	dc.b	2	; TailsAni_LookUp	-> Flick
	dc.b	1	; TailsAni_Duck		-> Swish
	dc.b	7	; TailsAni_Spindash	-> Spindash
	dc.b	0,0,0	; TailsAni_Dummy1,2,3	->
	dc.b	8	; TailsAni_Stop		-> Skidding
	dc.b	0,0	; TailsAni_Float,2	->
	dc.b	0	; TailsAni_Spring	->
	dc.b	0	; TailsAni_Hang		->
	dc.b	0,0	; TailsAni_Blink,2	->
	dc.b	$A	; TailsAni_Hang2	-> Hanging
	dc.b	0	; TailsAni_Bubble	->
	dc.b	0,0,0,0	; TailsAni_Death,2,3,4	->
	dc.b	0,0	; TailsAni_Hurt,Slide	->
	dc.b	0	; TailsAni_Blank	->
	dc.b	0,0	; TailsAni_Dummy4,5	->
	dc.b	0	; TailsAni_HaulAss	->
	dc.b	0	; TailsAni_Fly		->
	even



	dc.b	2	; TailsAni_LookUp	-> Flick


See that? Change the 2 to a 1 and it will be fine.
This post has been edited by redhotsonic: 12 June 2012 - 01:58 PM

#28 User is online MainMemory 

Posted 12 June 2012 - 01:12 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 3766
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
Under "Next, go to "loc_41C56:" (part of the debugmode code) and change this:" you typed "cmpi.b #3,(Maincharacter).w ; are you Tails?" instead of "cmpi.b #2,(Maincharacter).w ; are you Tails?".

#29 User is offline redhotsonic 

Posted 12 June 2012 - 01:59 PM

  • Also known as RHS
  • Posts: 1525
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic Bash!
  • Wiki edits:24

View PostMainMemory, on 12 June 2012 - 01:12 PM, said:

Under "Next, go to "loc_41C56:" (part of the debugmode code) and change this:" you typed "cmpi.b #3,(Maincharacter).w ; are you Tails?" instead of "cmpi.b #2,(Maincharacter).w ; are you Tails?".



Small typo =P

Thanks for pointing that out. Changed it in the post.

#30 User is offline That One Jig 

Posted 12 June 2012 - 03:14 PM

  • Well, shoot.
  • Posts: 62
  • Joined: 04-July 11
  • Gender:Male
  • Location:Somewhere in America
  • Project:Anti-Hoarding
While on the subject of Tails bugs, I've noticed one that I don't think I've seen mentioned before. When Tails is standing next to a solid object, his tails use their pushing animation as opposed to his standard tail animation (the improper animation is in pic 1). Also, during the few frames before Tails enters his actual pushing animation, his tails look corrupted (pic 2).

Posted ImagePosted Image

This behavior was corrected in Sonic 3, so there's a good place to start.

By the way, awesome work redhotsonic. You're really on top of these fixes!
This post has been edited by That One Jig: 12 June 2012 - 03:15 PM

  • 15 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last ►
    Locked
    Locked Forum

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users