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
  • 10 Pages +
  • ◄ First
  • 6
  • 7
  • 8
  • 9
  • 10
    Locked
    Locked Forum

Some changes and fixes for Sonic 2

#106 User is offline KingofHarts 

Posted 10 August 2012 - 03:13 AM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1

View Postredhotsonic, on 10 August 2012 - 02:51 AM, said:

View PostKingofHarts, on 06 August 2012 - 11:51 PM, said:

In Sonic 2 Metropolis Zone, die near a floating platform. The platform, if it normally moves, will no longer move when you die. If anyone can help with this, would be grand.

EDIT: This also happens when crushed by the solid platforms in Aquatic Ruins Zone.


Not a bug. Almost all objects freeze when you die (except Sonic/Tails, HUD, Game over, etc)


I understand that... but my guide is supposed to prevent these objects from freezing, opting to go in the Sonic CD 2011 route. BUT, I was pointing out that while my fix works, it still doesn't work on certain platforms. I wanna know... why does it still not work on these objects, if I removed the routine? It happens in Sonic 1 and 2 REV C. I think I implemented the change in the build I sent you... go to some kind of platform that moves (MZ platforms in lava, GHZ tall platforms, MZ floating blocks, etc.) There are still plenty of moving objects that keep freezing. So... in the context of what I'm trying to do, it IS indeed a bug... do I need to go directly into object code to fix this?

View Postredhotsonic, on 10 August 2012 - 02:51 AM, said:

View PostBSonirachi, on 08 August 2012 - 06:07 PM, said:

Perhaps someone might be able to fix up this game-stopping glitch which sometimes happens when destroying this boss:

http://www.youtube.c...feature=related


A very similar bug occurs in the ARZ boss. Been meaning to look into the ARZ boss bug, but never noticed it here. May look at the weekend and see if I can come up with anything.

I think flamewing took care of at least the ARZ boss... if its the same bug as the one you are thinking of. If so, I recall seeing him also post the fix somewhere in the thread. It was a while back though, early/mid 2011 IIRC. I could be completely mistaken about it being the correct bug you are referring to though, but its worth checking out. If I can find it, I'll quote it and come back.

View Postredhotsonic, on 10 August 2012 - 02:51 AM, said:

View Postdsrb, on 09 August 2012 - 11:53 PM, said:

Sure is green in here! :v: It's about time. Congrats.


Do you mean me or... eh?

I didn't need to comment on this, but since I did for the last two already, what the hell... We all mean you! Again, it's about god damned time! Congrats!
This post has been edited by KingofHarts: 10 August 2012 - 03:17 AM

#107 User is offline redhotsonic 

Posted 11 August 2012 - 05:40 AM

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

View PostKingofHarts, on 10 August 2012 - 03:13 AM, said:

I understand that... but my guide is supposed to prevent these objects from freezing, opting to go in the Sonic CD 2011 route. BUT, I was pointing out that while my fix works, it still doesn't work on certain platforms. I wanna know... why does it still not work on these objects, if I removed the routine? It happens in Sonic 1 and 2 REV C. I think I implemented the change in the build I sent you... go to some kind of platform that moves (MZ platforms in lava, GHZ tall platforms, MZ floating blocks, etc.) There are still plenty of moving objects that keep freezing. So... in the context of what I'm trying to do, it IS indeed a bug... do I need to go directly into object code to fix this?



I beg your pardon, I should have noticed you were relating to that. Okay, here is the fix (SVN disassembly as that is what you're using). Go to "OscillateNumDo:" and you'll see:

OscillateNumDo:
	tst.w	(Two_player_mode).w
	bne.s	+
	cmpi.b	#6,(MainCharacter+routine).w
	bhs.s	OscillateNumDo_Return
+



Get rid of it. No longer needed. So you'll have:

OscillateNumDo:
	lea	(Oscillating_Numbers).w,a1
	lea	(Osc_Data2).l,a2
	move.w	(a1)+,d3
	moveq	#bytesToLcnt(Osc_Data2_End-Osc_Data2),d1
;	etc...







View PostKingofHarts, on 10 August 2012 - 03:13 AM, said:

View Postredhotsonic, on 10 August 2012 - 02:51 AM, said:

View Postdsrb, on 09 August 2012 - 11:53 PM, said:

Sure is green in here! :v: It's about time. Congrats.


Do you mean me or... eh?

I didn't need to comment on this, but since I did for the last two already, what the hell... We all mean you! Again, it's about god damned time! Congrats!


Just making sure! Thanks to you both =P

#108 User is offline MoDule 

Posted 12 August 2012 - 11:13 AM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52

View PostEsrael, on 14 June 2012 - 10:22 PM, said:

Did someone noticed that Bottom part of Background in CNz in 2 Player Mode don't scroll for Tails?
How To fix this:

Find This
; ===========================================================================
byte_D270:
	dc.b   4
	dc.b   4	; 1
	dc.b   8	; 2
	dc.b   8	; 3
	dc.b   8	; 4
	dc.b   8	; 5
	dc.b   8	; 6
	dc.b   8	; 7
	dc.b   8	; 8
	dc.b   8	; 9
	dc.b   0	; 10
	dc.b $78	; 11
; ===========================================================================



and add the following data:

Bg_Scroll_CNz_Data_Player_2: 
       dc.b    $08, $08, $08, $08, $08, $08, $08, $0C, $00, $78, $00, $00  



and find:
        move.w   #bytesToLcnt($1D0),d2
	lea	 (byte_D270+1).l,a3

; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||


sub_D216:




and change to:
        move.w   #bytesToLcnt($1D0),d2
	lea	(Bg_Scroll_CNz_Data_Player_2).l,a3

; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||


sub_D216:



I just tried this and noticed something was still a little off. The stars scroll at different rates for both screens. After a little tinkering I seem to have found the real source of the bug. The bottom screen's scrolling starts at the wrong line!
Let's look at the original code:
SwScrl_CNZ_2P:
	(...)
	lea	(Horiz_Scroll_Buf+$1B0).w,a1
	move.w	(Camera_BG_Y_pos_P2).w,d1
	moveq	#0,d0
	move.w	(Camera_X_pos_P2).w,d0
	move.w	#bytesToLcnt($1D0),d2
	lea	(byte_D270+1).l,a3

At the very first line we assume the bottom screen to start at line 108, even though it doesn't start until 112. So, what we do, is change the $1B0 to $1C0, or 112*2*2 (112 for the bottom half of the screen, *2 because each horizontal offset is a word long and again *2 for both FG and BG). Next, we change the second to last line to use $1C0, as well, since we'd otherwise set the loop counter too long. Finally, in the last line, we change the +1 to +2, since we want to use the same data, as the top screen. This should leave us with this:
	lea	(Horiz_Scroll_Buf+112*2*2).w,a1
	move.w	(Camera_BG_Y_pos_P2).w,d1
	moveq	#0,d0
	move.w	(Camera_X_pos_P2).w,d0
	move.w	#bytesToLcnt(112*2*2),d2
	lea	(byte_D270+2).l,a3


#109 User is offline redhotsonic 

Posted 16 September 2012 - 05:37 PM

  • Also known as RHS
  • Posts: 1128
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Okay, here's another short tip. You know them yellow springs in MTZ? There's a bug with them. If you roll on the floor, then jump from rolling into the yellow springs, you cannot control Sonic. And you could get stuck at the top of the springs indefinatly jumping side-to-side if didn't jump so high. To fix it, very easy, go to "loc_27104:" and just add this "bclr #4,status(a1)" so you have:

loc_27104:
	bclr	#4,status(a1)
	bclr	#5,status(a0)
	bclr	#6,status(a0)
	bclr	#5,status(a1)
	move.w	#$CC,d0
	jmp	(PlaySound).l


#110 User is offline KingofHarts 

Posted 21 September 2012 - 12:06 AM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1

View Postflamewing, on 26 July 2012 - 07:36 AM, said:

View PostKingofHarts, on 26 July 2012 - 01:23 AM, said:

You will notice a bug. When Tails flies past the cylinder, he goes into that animation. Has this been fixed in any revision/hack?

Mine will, on its next revision :v:

To fix it, you need to add two checks: first go to Obj06_Spiral (loc_21512 for those who refuse to use a better disassembly). You will find this, or something like it:
		lea	(MainCharacter).w,a1 ; a1=character
		moveq	#p1_standing_bit,d6
		bsr.s	+
		lea	(Sidekick).w,a1 ; a1=character
		addq.b	#1,d6
		+

Change it to this:
		lea	(MainCharacter).w,a1 ; a1=character
		moveq	#p1_standing_bit,d6
		bsr.s	+
		lea	(Sidekick).w,a1 ; a1=character
		addq.b	#1,d6
		cmpi.w	#4,(Tails_CPU_routine).w
		bgt.s	+
		rts
+

Then scan down to Obj06_Cylinder (loc_21808). There will be similar code (except for two extra lines loading addresses to a2), do the same changes.

The first case deals with EHZ spiral pathways; the second case deals with the cylinder in MTZ.

Edit: added quote due to page break.


This fix causes a bug with 2P mode, where Tails cannot run on the spiral. to fix this, change the code to this:
Obj06_Spiral:

	lea	(MainCharacter).w,a1 ; a1=character
	moveq	#p1_standing_bit,d6
	bsr.s	+
	lea	(Sidekick).w,a1 ; a1=character
	addq.b	#1,d6
        tst.w	(Two_player_mode).w	 ; is it two player mode?
	bne.s	+		         ; if so, branch to + to skip this code and prevent a bug
        cmpi.w  #4,(Tails_CPU_routine).w
	bgt.s   +
	rts
+



This adds a check for 2 player mode, and if you are playing 2 player mode, the last part that flamewing added will be skipped, thus preventing the bug and allowing Tails to run on the spiral.

#111 User is offline King 

Posted 30 September 2012 - 11:09 AM

  • Posts: 579
  • Joined: 24-January 04
  • Gender:Male
  • Location:United States
RHS, have you considered writing tutorials, in your awesome style, on how to fix the "Super Sonic bug" at the end of levels for completeness sake for both the SVN and XenoWhirl disassembles? :D

#112 User is offline redhotsonic 

Posted 02 October 2012 - 03:35 PM

  • Also known as RHS
  • Posts: 1128
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Not really. There's already Super Sonic fixes here. I'm sure it won't be hard to get it to work with both disassemblies.

#113 User is offline KingofHarts 

Posted 03 October 2012 - 04:04 AM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1

View Postredhotsonic, on 02 October 2012 - 03:35 PM, said:

Not really. There's already Super Sonic fixes here. I'm sure it won't be hard to get it to work with both disassemblies.


I can second this. The fixes work fine for both disassemblies. If I get any time, I could put some notes for both disassemblies, but there are not many differences to be had.

#114 User is offline KingofHarts 

Posted 18 November 2012 - 12:20 PM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1
I'm double posting as I have a question about a bug reported early on in the Sonic Classic Heroes thread regarding the MCZ vines. Apparantly there is a bug regarding 2P Tails and jumping off of the vine, in that it doesn't work... or something? I've never encountered this bug... or at least, I don't think I have... and I sure as shit don't really understand it.

The bug in question is reported on this post: Flamewing's response to OP about bug

I'll just repost what was said for those who don't feel like looking back...


Quote

Streak:
I'm having alot of fun with this!
There's an issue with the Mystic Cave vines, though. Sometimes you can't jump off, for whatever reason.
Anyway, I need to kill about 8 minutes until the time runs out and I can move again.


Quote

DigitalDuck:
Yeah, you can't jump off when playing as Tails or Knuckles. Tails can't jump off the vines in normal Sonic 2 when playing as Sonic and Tails either, and I think it's related.


flamewing:
It is indeed a but inherited from the Sonic 2 code. Basically, they checked the real controller input for Sonic and 1p Tails, and the logical controller input for 2p Tails. The problem was that the vine sets object control flag, hence the logical controller never gets set to the real input. I fixed it by reading the real input for human players and the logical input for CPU players.

Now, my question is... what bug is this? Unless I unknowingly fixed this already, I don't recall seeing this bug in my disassembly or in the original. Can someone help me point this out? Unless this bug in question is CPU Tails not being able to jump off the vine on his own... then I noticed that. My understanding was that apparantly 2P Tails couldn't jump off... which I don't believe is true.

#115 User is offline redhotsonic 

Posted 18 November 2012 - 07:07 PM

  • Also known as RHS
  • Posts: 1128
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
All I could find is that if you're in the main game and have Tails following you, when Tails jumps on the vine, he will never jump off. ALTHOUGH, you can make Tails jump off yourself if you make him jump with controller 2.

There's also a bug with both characters as player 1 or 2, CPU controlled or not, with both vines, that if you were rolling then jump from the roll onto the vine, you could only jump off downwards (it's rare to jump off to the side but if you do, you hardly jump far). If you were not holding a directional button when jumping downwards, you'd land back on the vine, so this could be a pain. So, I can show you how to fix both of these bugs.



; ----------------------------------------------------------------------------
; Object 7F - Vine switch that you hang off in MCZ (Stationary)
; ----------------------------------------------------------------------------


Go to "loc_2981E:" (Obj7F_Main:) and change:

	move.w	(Ctrl_2).w,d0


to

	move.w	(Ctrl_2_Held_Logical).w,d0	; Let CPU jump off as well



This will make Tails as the CPU jump off the stationary vine when you do. You can still make Tails jump off with Controller 2.


Then go to loc_2983C: (Obj7F_Action:) and just above:

	clr.b	obj_control(a1)



add this line:

	bclr	#4,status(a1)	; Clear the character's roll-jump flag



Now if you did roll-jump onto the vine, you can now jump off to the left or right.


Next:


; ----------------------------------------------------------------------------
; Object 80 - Vine that you hang off and it moves down from MCZ
; ----------------------------------------------------------------------------


Go to "loc_29AAE:" and change:

	move.w	(Ctrl_2).w,d0


to

	move.w	(Ctrl_2_Held_Logical).w,d0	; Let CPU jump off as well



This will make Tails as the CPU jump off the vine (the vine that moves down) when you do. You can still make Tails jump off with Controller 2.



Then go to loc_29ACC: (Obj80_Action:) and just above:

	clr.b	obj_control(a1)



add this line:

	bclr	#4,status(a1)	; Clear the character's roll-jump flag



Now if you did roll-jump onto the vine, you can now jump off to the left or right.



See that text in the red? This brings an annoying bug that when the vine moves down, Tails will try to jump off (CPU controlled Tails) when the vine moves down. If you do not hold a directional button as Sonic, Tails will just jump and land back on. If you are holding a directional button as Sonic, Tails will more than likely jump off. When the vine stops, Tails won't jump until you do. If you do not want this bug, then don't change the "Ctrl_2" in the red. But then you get the bug that Tails will never jump off. So it's entirely up to you which bug you want. This choice is only for the vine that moves down, this does not concern the stationary vine, so you can still change the "Ctrl_2" safely for the stationary vine.



Hope this fixes your problem. If this doesn't and the bug in question still exists, I have no idea.

#116 User is offline KingofHarts 

Posted 19 November 2012 - 11:06 AM

  • Call me back when people stop shitting in the punch bowl...
  • Posts: 1480
  • Joined: 07-August 10
  • Gender:Male
  • Wiki edits:1
That does fix the problem that they were probably referring to, though now I wonder how to fix that other bug with Tails jumping when he shouldn't.

Setting it to follow "logical" is what makes Tails follow Sonic, correct? So... perhaps Tails is jumping because Sonic is moving downward, and this is somehow telling Tails to jump for some reason...
Unless I'm mistaken, Tails exhibits similar behavior almost any time Sonic is moving due to another object, such as a platform or the like... (Prime examples being Tails walking off of faster moving platforms, such as the small platform in MCZ, the lift in HTZ, etc.)

I believe that this "new bug" is caused by the same thing that causes Tails to act wonky in the other situations and is not a new bug at all. The code that makes Tails follow Sonic is to blame and needs to be fixed. I think this also exists in Sonic 3 as well but I'm not exactly sure. I can look in the Tails object to start but I think someone more experienced than myself could probably do a bit more...

All this said, I'd say users should stick with your newest fix to these objects RHS, and then later add a fix for Tails' behavior later when one is found.
and nice catch with the rolling jump bug. That's the second one with that, following the MTZ wall spring bugfix... I wonder what other objects have that same issue?

#117 User is offline redhotsonic 

Posted 19 November 2012 - 12:22 PM

  • Also known as RHS
  • Posts: 1128
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Yeah, Tails jumping off with the vine is similar to when you go down the lifts on CNZ. Tails jumps then. Go stand right next to any solid object (monitor, spings, spikes) and Tails will jump on the spot.

In my Sonic 2 Recreation when the platform moves down in CAZ3, Tails jumps. It is to do with Sonic's movement. If I recall correctly, I think flamewing fixed this type of issue in his Classic Heroes.

#118 User is offline King 

Posted 22 November 2012 - 04:02 PM

  • Posts: 579
  • Joined: 24-January 04
  • Gender:Male
  • Location:United States
Just wondering if there's a download available of the latest Sonic 2 (Xenowhirl or SVN, doesn't matter) source with all fixes applied thus far? Thanks. :)

#119 User is offline redhotsonic 

Posted 23 November 2012 - 07:02 AM

  • Also known as RHS
  • Posts: 1128
  • Joined: 31-January 05
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic 2 Recreation
  • Wiki edits:24
Not to my knowledge. But why not just download the recent Xeno/SVN disassembly then apply these fixes yourself? It won't take you long. All the guides and fixes supplied are very decently clear that you should have no issues.

#120 User is offline King 

Posted 23 November 2012 - 02:26 PM

  • Posts: 579
  • Joined: 24-January 04
  • Gender:Male
  • Location:United States
I might when I get some more time. But I have done the Super Sonic fixes and a few more with the latest Hg disassembly. Anyways what fixes for Sonic 2 would you consider the highest priority to fix?

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.
This post has been edited by King: 23 November 2012 - 04:09 PM

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

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