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
Loading News Feed...
 

Some changes and fixes for Sonic 2

#121 User is offline redhotsonic 

Posted 23 November 2012 - 05:15 PM

  • Also known as RHS
  • Posts: 971
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24

View PostKing, on 23 November 2012 - 02:26 PM, said:

Oh, here's an interesting "bug" I encounter in Sonic 2 but I don't know if it's been mentioned yet. Beat the Metropolis Zone boss without destroying any of the balloon Robotniks (you can try avoiding the balloons and beating the boss as Super Sonic or cheating with debug mode to avoid the balloons) then press the egg prison with them bouncing towards you. They start to glitch out then they all disappear when one hits you and causes you to lose your rings.


Too many sprites, that's the issue.


Anyway, to make all the little Eggman's pop when Dr Eggman himself start's flying away, go to "loc_32C66:" and just under the label, insert this:

	tst.b	($FFFFF7A7).w	; Is boss defeated?
	bne.s	+		; If so, branch



So you have this:

loc_32C66:
	tst.b	($FFFFF7A7).w	; Is boss defeated?
	bne.s	+		; If so, branch
	cmpi.b	#4,(MainCharacter+routine).w
	beq.s	loc_32C76
	cmpi.b	#4,(Sidekick+routine).w
	bne.s	loc_32C82



Then, go to "loc_32C82:" and between "cmpi.b #-2,collision_property(a0)" and "bgt.s return_32C96", insert a new label +, so you have this:

loc_32C82:
	cmpi.b	#-2,collision_property(a0)
	bgt.s	return_32C96
+
	move.b	#$14,mapping_frame(a0)
	move.b	#6,anim(a0)



Now, when you defeat the MTZ boss, as soon as Dr Eggman stops exploding then starts flying away, all remaining little Eggmans will automatically pop.

#122 User is offline King 

Posted 23 November 2012 - 05:34 PM

  • Posts: 574
  • Joined: 24-January 04
  • Gender:Male
  • Location:United States
Works great, thanks! I knew the balloons glitching was because of the Genesis sprite limit, but was referring to them coming after you after the boss is defeated. :P I've started applying fixes to the Xenowhirl disassembly since it seems most fixes on the wiki are geared towards it more than the SVN disassembly (most do work on both though). The only "issue" I've noticed is the Super Sonic transformation, one of the sprites (head region) becomes a garbled reddish mess while transforming. I'm not sure if it's a side effect of one of the fixes or because of the Genesis sprite limit.

EDIT: What's the proper fix for the SVN disassembly? Thinking I might apply fixes to both.
This post has been edited by King: 23 November 2012 - 06:12 PM

#123 User is offline redhotsonic 

Posted 23 November 2012 - 06:38 PM

  • Also known as RHS
  • Posts: 971
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Seems like Sonic's art is not aligned properly. Find Sonic's art (ArtUnc_Sonic:) and then above it, you should see something like "align $200". Increase it. $10000 should do fine. This will increase the ROM size quite a bit, but it fixes it. If it still appears glitched, then it might be a different bug.

#124 User is offline King 

Posted 23 November 2012 - 07:41 PM

  • Posts: 574
  • Joined: 24-January 04
  • Gender:Male
  • Location:United States
Appears to have fixed it, thanks! :)

#125 User is offline redhotsonic 

Posted 08 May 2013 - 04:02 PM

  • Also known as RHS
  • Posts: 971
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Okay, I haven't posted any fixes for a long time, but I just came across a bug in my hack. This isn't a bug in Sonic 2, but in Sonic 2 and Knuckles, but this wasn't worth making it's own topic. See, in my hack, all characters celebrate at the end of the act, but if I made Knuckles glide and slide on the floor, as soon as he went into the celebration stage, he was stuck in the floor like so:

Posted Image


Looking at Knuckles sliding in slow motion, he slides fine on floor, but for 1 frame only, he is in the ground by a couple of pixels:

Posted Image


But by the very next frame, he's on the floor fine. So I had to look into a fix, which I did. But I got curious. I ported Knuckles from "Sonic 2 and Knuckles", so I wondered if the bug is in there... and it is:

Posted Image


But if you look in the original "Sonic 3 and Knuckles", this bug is already fixed and Knuckles has no ground issues:

Posted Image



So, let's apply this fix. Assuming you've ported Knuckles from S2K, and haven't changed any of the official labels, go to "loc_315926:" and you should see these four commands under the label:

		move.b	$16(a0),d0
		sub.b	#$13,d0
		ext.w	d0
		add.w	d0,$C(a0)



You may comment these out (or delete them). Instead, you can put this in:

		subi.w	#9,$C(a0)			; This fixes Knuckles getting stuck in the ground



So, you end up with this:

loc_315926:					  ; ...
		move.w	#0,$14(a0)
		move.w	#0,$10(a0)
		move.w	#0,$12(a0)
;		move.b	$16(a0),d0
;		sub.b	#$13,d0
;		ext.w	d0
;		add.w	d0,$C(a0
		subi.w	#9,$C(a0)			; This fixes Knuckles getting stuck in the ground
		bsr.w	Knuckles_ResetOnFloor_Part2
		move.w	#$F,$2E(a0)
		move.b	#$22,$1C(a0)
		rts



So now, for this one single frame, it will move Knuckles up 9 pixels, so he appears on the floor correctly. As the rest of the frames were fine in the first place, no need to make any other changes.



EDIT: If anyone wants to put this on the wiki, feel free.
This post has been edited by redhotsonic: 08 May 2013 - 04:06 PM

  • 9 Pages +
  • ◄ First
  • 7
  • 8
  • 9
    Locked
    Locked Forum

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