Sonic and Sega Retro Message Board: MoDule's bugfix guides Vol. 1 - Sonic and Sega Retro Message Board

Jump to content

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

MoDule's bugfix guides Vol. 1 more to come

#16 User is offline flamewing 

Posted 20 May 2011 - 12:25 PM

  • Emerald Hunter
  • Posts: 831
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
The fix I have for that Super Sonic problem is this: find Sonic_RevertToNormal and modify the code so that this:
Syntax Highlighted Code: ASM
Sonic_RevertToNormal:
move.b #2,(Super_Sonic_palette).w ; Remove rotating palette
move.w #$28,(Palette_frame).w
move.b #0,(Super_Sonic_flag).w
move.b #1,next_anim(a0) ; Change animation back to normal ?
 

becomes this:
Syntax Highlighted Code: ASM
Sonic_RevertToNormal:
tst.b (Super_Sonic_palette).w ; Are we interrupting a transformation to Super Sonic?
bmi.s + ; branch if not
move.b #0,obj_control(a0) ; restore Sonic's movement if yes
bra.s ++ ; Do not change current palette index, which will be less than $28
+
move.w #$28,(Palette_frame).w ; Fade out from Super Sonic palette
+
move.b #2,(Super_Sonic_palette).w ; Remove rotating palette
move.b #0,(Super_Sonic_flag).w
 

This restores normal movement from an unfinished transformation (Super_Sonic_palette >= 0 means the transformation hasn't finished). It changes the code to also fade out from super palette only if it is needed: it fades from current palette index instead of flashing to full super palette before fading. This works because Palette_frame is less than $28 if Super_Sonic_palette >= 0. The next_anim line can be (and was) removed without any ill effects; all it does is reset the animation (except for the running animation, which is not reset).

"next_anim" is a misnomer, by the way; "prev_anim" or "last_anim" are better names: if you look at Sonic_Animate, you will see that if anim(a0) != next_anim(a0), then next_anim(a0) is set to anim(a0) and the animation is reset. This clearly is not the behavior you expect from the name.

#17 User is offline MoDule 

Posted 20 May 2011 - 03:48 PM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52
Hmm, removing that next_anim line fixes my fix. I also moved it up to Sonic_Super, which has the added effect of delaying Super Sonic's ring drain until his transformation is done. Here it is:
Syntax Highlighted Code: ASM
; loc_1ABA6:
Sonic_Super:
tst.b (Super_Sonic_flag).w ; Ignore all this code if not Super Sonic
beq.w return_1AC3C
 
cmpi.b #1,(Super_Sonic_palette).w ; <-- is Super Sonic's transformation sequence finished?
beq.s return_1ABA4 ; if not, branch
 
tst.b (Update_HUD_timer).w
beq.s Sonic_RevertToNormal ; ?
 
[...]
 
; loc_1ABF2:
Sonic_RevertToNormal:
 
move.b #2,(Super_Sonic_palette).w ; Remove rotating palette
move.w #$28,(Palette_frame).w
move.b #0,(Super_Sonic_flag).w
; move.b #1,next_anim(a0) ; <-- Change animation back to normal ?


#18 User is offline Eduardo Knuckles 

Posted 20 May 2011 - 07:21 PM

  • Posts: 378
  • Joined: 07-January 07
  • Gender:Male
  • Location:You don't need to know it.
  • Project:Sonic Harder Levels: Rebirth
  • Wiki edits:66
Is there any Hivebrain disassembler's version of these guides? They are greatly useful, but I'm not using the SVN source and I'm too lazy for convert the values.

#19 User is offline Mercury 

Posted 21 May 2011 - 04:48 PM

  • His Name Is Sonic
  • Posts: 1711
  • Joined: 13-November 08
  • Gender:Not Telling
  • Location:Location Location
  • Project:AeStHete
  • Wiki edits:130
QUOTE (Eduardo Knuckles @ May 21 2011, 12:21 AM)
Is there any Hivebrain disassembler's version of these guides? They are greatly useful, but I'm not using the SVN source and I'm too lazy for convert the values.

I'm obligated to post this again, no matter how annoying it's probably getting.

#20 User is offline MoDule 

Posted 24 May 2011 - 05:25 PM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52
QUOTE (Eduardo Knuckles @ May 21 2011, 02:21 AM)
Is there any Hivebrain disassembler's version of these guides? They are greatly useful, but I'm not using the SVN source and I'm too lazy for convert the values.
I'd like to have versions for the different disassemblies, but since I don't use them myself I can't do much towards providing them. Someone else will have to take care of that.

After some procrastination, I have a few more guides ready:
How-to:Fix camera y position for Tails
This one's always really bothered me and I don't even use Tails that often. The way this fix is done, no special code will ever be necessary to handle the character changing height, at least as far as the camera is concerned.
How-to:Fix bug in ARZ Boss arrow's platform behavior
Not that noticeable or problematic, but it's still nice to have it fixed.
How-to:Collide with water after being hurt
I put this one down as a design choice, since it's debatable weather the original behavior was intentional or not. The Advance series indicates that at least one person thought it wasn't.

I kind of screwed up moving the articles to the guides section. The name on the page is wrong and there's a redirect on top. I tried my best to fix it, but couldn't figure out what to do, so if anyone knows how, I'd be very grateful.

I've got three more in the pipeline and then I'll be done for now.

#21 User is offline flamewing 

Posted 24 May 2011 - 06:18 PM

  • Emerald Hunter
  • Posts: 831
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
QUOTE (MoDule @ May 24 2011, 07:25 PM)
How-to:Fix camera y position for Tails
This one's always really bothered me and I don't even use Tails that often. The way this fix is done, no special code will ever be necessary to handle the character changing height, at least as far as the camera is concerned.

I know that the guide is for S2, but you should mention that S3&K fixes it differently (by taking into account the difference between the standing and rolling heights) and the fix is not needed there.

Also, the pages are showing a wrong title for all 3 bug fixes.

Edit: also, I think that the arrow width might be mentioned as being optional: it is an arrow, after all, and it makes sense for Sonic to try to balance on it.
This post has been edited by flamewing: 24 May 2011 - 06:25 PM

#22 User is offline ICEknight 

Posted 25 May 2011 - 08:33 AM

  • Posts: 9289
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18
Hmm, so the arrows don't have a set width to them? If that's not causing any problems, it might indeed be debatable wether it's an oversight or a design decision to make the characters always use their balance animation when standing on them.

QUOTE (flamewing @ May 24 2011, 07:18 PM)
I know that the guide is for S2, but you should mention that S3&K fixes it differently (by taking into account the difference between the standing and rolling heights) and the fix is not needed there.

Yeah, having the official bugfixes documented as well would be sweet.

#23 User is offline MoDule 

Posted 25 May 2011 - 10:27 AM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52
QUOTE (flamewing @ May 25 2011, 01:18 AM)
QUOTE (MoDule @ May 24 2011, 07:25 PM)
How-to:Fix camera y position for Tails
This one's always really bothered me and I don't even use Tails that often. The way this fix is done, no special code will ever be necessary to handle the character changing height, at least as far as the camera is concerned.

I know that the guide is for S2, but you should mention that S3&K fixes it differently (by taking into account the difference between the standing and rolling heights) and the fix is not needed there.
I don't know what you mean. I see the bug both in S3 and S3&K. The camera is always a few pixels too high when Tails rolls. I even checked the vertical scroll routine and it makes the same mistake as S2.

QUOTE (flamewing @ May 25 2011, 01:18 AM)
Also, the pages are showing a wrong title for all 3 bug fixes.
I know. That happened when I moved the guides from my personal space to the guides section and screwed up the first time. Now they're stuck with those weird titles and I don't know how to fix it.

QUOTE (flamewing @ May 25 2011, 01:18 AM)
Edit: also, I think that the arrow width might be mentioned as being optional: it is an arrow, after all, and it makes sense for Sonic to try to balance on it.
You raise a good point. I'll do that right away.

#24 User is offline flamewing 

Posted 25 May 2011 - 10:35 AM

  • Emerald Hunter
  • Posts: 831
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
QUOTE (MoDule @ May 25 2011, 12:27 PM)
I don't know what you mean. I see the bug both in S3 and S3&K. The camera is always a few pixels too high when Tails rolls. I even checked the vertical scroll routine and it makes the same mistake as S2.

Really? That is odd: when I look in frame advance, I don't see the camera moving at all when Sonic, Tails or Knuckles roll in S3&K (or Sonic/Knuckles in S2), but I see the jerking you mention in S2 with Tails.

Edit: the above is not meant as sarcasm, by the way: I am genuinely stumped (but rereading the post left some ambiguity in interpretation).
This post has been edited by flamewing: 25 May 2011 - 10:41 AM

#25 User is offline MoDule 

Posted 25 May 2011 - 10:45 AM

  • Posts: 308
  • Joined: 03-October 07
  • Gender:Male
  • Project:Procrastinating from writing bug-fix guides
  • Wiki edits:52
It's not so much during the roll as in the transition from walking to rolling. I just tested it with debug mode in CNZ act 1 (Carnival Night Zone, S3&K), looking at the camera positions. For walking it gives me a y position of $670 and for rolling a position of $66C. It's also pretty noticeable if you look at the bottom of the screen. This is with Tails; it doesn't happen for the other two.
This post has been edited by MoDule: 25 May 2011 - 10:47 AM

#26 User is offline flamewing 

Posted 25 May 2011 - 10:59 AM

  • Emerald Hunter
  • Posts: 831
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
You are correct. As it turns out, I was testing at the start of AIZ1, where strangely it doesn't happen. I also assumed that S3&K fixed by using the height difference because I had already fixed it in my hack when I ported S3&K default height/default width to fix a few bugs with ground iteraction that rendered the bubble shield useless. So at least for S3&K, there is an alternate bug fix which is worth singling out.

Regarding the page titles: they were wrong because the page was being incorrectly redirected to itself. I moved the content from the redirected target page to the correct location.

#27 User is offline FraGag 

Posted 25 May 2011 - 11:31 PM

  • Posts: 659
  • Joined: 09-January 08
  • Gender:Male
  • Location:Québec, Canada
  • Project:an assembler
  • Wiki edits:6
QUOTE (flamewing @ May 25 2011, 11:59 AM)
Regarding the page titles: they were wrong because the page was being incorrectly redirected to itself. I moved the content from the redirected target page to the correct location.

The actual problem was that MoDule first moved them by adding http://info.sonicretro.org/ at the beginning of the article name. In the revision history, I can see that he tried again without, but it was already too late, apparently. The articles starting with Http://info.sonicretro.org/ (with a capital H due to the wiki naming rules) cannot be accessed through the short URL because MediaWiki moves a slash around, which causes it to not find the page. I tried to move one of the pages back, but it gave me an error so I gave up. The bad articles should be deleted by a wiki sysop: here, here and here.

#28 User is offline King 

Posted 03 June 2011 - 11:52 PM

  • Posts: 579
  • Joined: 24-January 04
  • Gender:Male
  • Location:United States
This is an awesome topic with vital information and insight to various bugs for hack developers. But I'm curious though if any of these fixes can be utilized by the normal gamer using Game Genie or Pro Action Replay codes.

#29 User is offline flamewing 

Posted 17 July 2011 - 02:48 PM

  • Emerald Hunter
  • Posts: 831
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12

View Postflamewing, on 19 May 2011 - 03:12 PM, said:

In any case, the fix for the screen boundary spindash bug is done.

I have updated this guide because the bug fix was slightly buggy in itself, and the description of the bug wasn't 100%. As an additional bonus, the new fix also removes the bug where pressing jump right after releasing a spindash causes Sonic to jump straight up instead of forward.
This post has been edited by flamewing: 17 July 2011 - 02:50 PM

#30 User is offline MoDule 

Posted 22 July 2011 - 02:41 PM

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

View Postflamewing, on 17 July 2011 - 02:48 PM, said:

I have updated this guide because the bug fix was slightly buggy in itself, and the description of the bug wasn't 100%. As an additional bonus, the new fix also removes the bug where pressing jump right after releasing a spindash causes Sonic to jump straight up instead of forward.

I'm curious, what was wrong with the original one? The new version is quite different.

So I finally got around to writing another guide. This time it's about a known bug in OOZ (you know, the fun one which lets you go really fast).

How-to:Fix the OOZ launcher speed up glitch

I also updated the Tails roll camera guide. The original fix only worked if the player was on the ground. There's a similar bug when a player rolls while going up/down a wall, but I haven't been able to come up with a satisfactory fix for this yet.

Lastly, I added my version for that other Super Sonic bug. If you want to add yours as an alternative, feel free to do so.

Just for fun, here's a list of text files to show what else I'm working on (slowly):
  • Fix the Rexxon crash bug.txt
  • Retain speed on slope after getting hit.txt
  • Give characters individual chain bonus counters.txt
  • Fix CPZ spin tube bug.txt
  • Fix bug in pinball mode object.txt

They're all empty right now and there's a few for which I haven't even made a file yet, but I'm sure you get the idea.

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

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