Sign in to follow this  
Followers 0

Weird bug when drowning... in Sonic 1

3 posts in this topic

Posted

Hi,

I have tried to find the reason of this bug but I couldn't find nothing... it seems it something related with the small bobbles, but who knows where this come from...

The bug appear when Sonic drown and the water top is on the screen... when Sonic is falling with drowning animation, some garbled graphics can be seen and parts of the countdown numbers... any idea of what can be causing this or what should I look?

Thanks


Some shots of the bug:


drowningbug1.jpg

 

drowningbug2.jpg

 

 

0

Share this post


Link to post
Share on other sites

Posted

Well, I'd the same bug in my hack but I managed to fix it by replacing this code:

 

Obj0A_ChkWater:				; XREF: Obj0A_Index
		move.w	($FFFFF646).w,d0
		cmp.w	$C(a0),d0	; has bubble reached the water surface?
		bcs.s	Obj0A_Wobble	; if not, branch
		move.b	#6,$24(a0)
		addq.b	#7,$1C(a0)
		cmpi.b	#$D,$1C(a0)
		beq.s	Obj0A_Display
		bra.s	Obj0A_Display

 

With this one:

 

Obj0A_ChkWater:				; XREF: Obj0A_Index
		move.w	($FFFFF646).w,d0
		cmp.w	$C(a0),d0	; has bubble reached the water surface?
		bcs.s	Obj0A_Wobble	; if not, branch
		move.b	#6,$24(a0)
		addq.b	#7,$1C(a0)
		cmpi.b	#$D,$1C(a0)
		beq.s	Obj0A_Display
		bcs.s	Obj0A_Display	;Fix the bubble bug
		move.b	#$D,$1C(a0)     ;/
		bra.s	Obj0A_Display

 

I believe that the game wasn't designed to handle multiples bubbles on the screen, so when Sonic drowns, the wrong "anim" data is read, and that's why this glitch happens.

5

Share this post


Link to post
Share on other sites

Posted

Thanks! You are completely right and your fix works fine, nice found.

Thanks a lot for the help with this great first post here and welcome to SSRG.

1

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  
Followers 0