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 Code (ASM): ; =========================================================================== 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: Code (ASM): Bg_Scroll_CNz_Data_Player_2: dc.b $08, $08, $08, $08, $08, $08, $08, $0C, $00, $78, $00, $00 and find: Code (ASM): 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: Code (ASM): 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 don't recall, has anyone ever fixed the collision? -- when Sonic (or Tails) is colliding with two objects at once, only one registers? This is why Sonic walks through certain badniks in ARZ when he's scattering leaves, and why he can't collect dropped rings in lava without jumping.
Cool. I never managed to fix this one in a way I was satisfied with. What the hell was the original code trying to do, anyway? For me, it's observing the games obsessively. Not a very difficult fix, I think, but it probably wouldn't be feasible without s3k's faster collision checking.
I normally find bugs with my hack "Sonic 2 Recreation". When I notice these bugs, I look to see if it's in the original game, which 95% of the time, it is. Because I fix it for S2R, I might as well tell people how to fix it for the originals, otherwise everyone will have the same bugs. eh? This shouldn't happen. I've tried this many times, and it works okay to me. In both HTZ and MTZ. Anyway, seeming as we've moved on from bosses, I have another bug to show: How to fix Spindash's height collision Here's Sonic standing with an arrow heading towards him. Obviously, the arrow is going to hurt him. Here's Sonic ducking with an arrow heading towards him. Obviously, the arrow is going to miss him. Here's Sonic spindashing with an arrow heading towards him. This should miss him. But in Sonic 2, it doesn't! Bug? I think so! Here's how to fix. (again, I'm using Xenowhirl's 2007 disassembly) Go to "TouchResponse:" and find this bit of coding: Code (ASM): cmpi.b #$4D,mapping_frame(a0) ; is Sonic ducking? bne.s Touch_NoDuck ; if not, branch addi.w #$C,d3 moveq #$A,d5 ; loc_3F592: Touch_NoDuck: What it's doing here, is comparing if Sonic is ducking. If so, do NOT branch, and shorten his y_radius (to $A) and edits his y_pos before carrying on with the routine. It only does this with the ducking though. Because of this, when you spindash, it's still branching to continue with the routine without making any edits to his y_radius, so Sonic's y_radius is still the same as Sonic's standing y_radius ($13). When Sonic rolls, his y_radius is changed, but that's set elsewhere. Anyway, change the coding you see above, to this below: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashing ; if so, branch cmpi.b #$4D,mapping_frame(a0) ; is Sonic ducking? bne.s Touch_NoDuck ; if not, branch Duckinganddashing: ; So, Sonic is spindashing or ducking addi.w #$C,d3 moveq #$A,d5 ; loc_3F592: Touch_NoDuck: Now, it's doing an extra check to see if Sonic is spindashing, and if so, it will branch to a new label and shorten his y_radius. If not, it will then ask if you're ducking and if so, it won't branch and shorten the y_radius. If you're not ducking either, it will branch to "Touch_NoDuck" and carry on with the routine. The codes above run the majority of the time of the game, so this affects most of the objects. You need to do the same for "Touch_Boss:" So go to that label and change this bit of the coding: Code (ASM): cmpi.b #$4D,mapping_frame(a0) bne.s loc_3F68E addi.w #$C,d3 moveq #$A,d5 loc_3F68E: To this: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashingboss ; if so, branch cmpi.b #$4D,mapping_frame(a0) bne.s loc_3F68E Duckinganddashingboss: addi.w #$C,d3 moveq #$A,d5 loc_3F68E: This part of the code only runs when there is a boss present. Two more, we need to do it again at "loc_170D0:" Go there and change this part of the coding: Code (ASM): cmpi.b #$4D,mapping_frame(a0) bne.s loc_17104 addi.w #$C,d3 moveq #$A,d5 loc_17104: Change it to this: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashingrings ; if so, branch cmpi.b #$4D,mapping_frame(a0) bne.s loc_17104 Duckinganddashingrings: addi.w #$C,d3 moveq #$A,d5 loc_17104: This code runs in the Ring Manager part of the coding. This only affects the rings collision. One more, but I'm not sure if this is important. It's part of the Specialbumpers routine for CNZ. But I don't see how you can hit the bumpers whilst spindashing. But in case you want to implement it anyway, go to "loc_174DE:" and change this part of the coding: Code (ASM): cmpi.b #$4D,mapping_frame(a0) bne.s loc_17508 addi.w #$C,d3 moveq #$A,d5 loc_17508: to this: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashingbumps ; if so, branch cmpi.b #$4D,mapping_frame(a0) bne.s loc_17508 Duckinganddashingbumps: addi.w #$C,d3 moveq #$A,d5 loc_17508: Done. You should start to see results like this: Cheers, redhotsonic
Bloody hell, you guys just keep blowing this game apart! And then putting it back together way more awesome. I can't imagine how many things you might find for S1 if you were to try, but by no means should either of you break your momentum here!
I had fixed a lot of other bugs, Infinite Scrolling in Sonic 2 Beta screen used in Sonic 2 Delta when Sound Test is highlighted. In normal Sonic 2 Beta you will never notice the bug, since the Demo Mode runs. Metal Sonic and Spinner Legs in Sonic 2 rev 2 And others. Not Showed since no other persons uses Sonic 2 Beta or Sonic 2 rev 2 as bases for your hacks. Some of these I had fixed a long time ago, you can confirm just playing older versions of Sonic 2 Delta. And Thanks for all persons which show your fixes which can make the Most famous Game (Sonic the Hedgehog 2) more stable than original. I do know this is not important but I will release my disassembly of Sonic 2 rev 2 (extracted from Sonic Classics (in Brazil) or Compilation) soon.
It's pretty impressive, especially since a lot of these bugs weren't even noticed by many to begin with. You're really putting Sonic Team to shame, especially since they've had who knows how many tries to fix them (how could that CPZ gag not be used in any release? How?).
While applying and testing these I have found another which are present for Miles. The original code only checks for Sonic Ducking. If you playing as Miles you will be Hurt while ducking. To Fix just add the following code in all instances: Normal: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashing ; if so, branch ;------------------------------------------------------------------------------- cmpi.b #$02, (A0) ; Is Miles? bne.s Touch_Check_Sonic ; Not goto Sonic routine cmpi.b #$5B, mapping_frame(A0) ; is Miles ducking bne.s Touch_NoDuck bra.s Duckinganddashing Touch_Check_Sonic: ;------------------------------------------------------------------------------- cmpi.b #$4D,mapping_frame(a0) ; is Sonic ducking? bne.s Touch_NoDuck ; if not, branch Duckinganddashing: ; So, Sonic is spindashing or ducking addi.w #$C,d3 moveq #$A,d5 ; loc_3F592: Touch_NoDuck: Boss: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashingboss ; if so, branch ;------------------------------------------------------------------------------- cmpi.b #$02, (A0) ; Is Miles? bne.s Touch_Boss_Check_Sonic ; Not goto Sonic routine cmpi.b #$5B, mapping_frame(A0) ; is Miles ducking bne.s loc_3F68E bra.s Duckinganddashingboss Touch_Boss_Check_Sonic: ;------------------------------------------------------------------------------- cmpi.b #$4D,mapping_frame(a0) bne.s loc_3F68E Duckinganddashingboss: addi.w #$C,d3 moveq #$A,d5 loc_3F68E: Rings: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashingrings ; if so, branch ;------------------------------------------------------------------------------- cmpi.b #$02, (A0) ; Is Miles? bne.s Touch_Rings_Check_Sonic ; Not goto Sonic routine cmpi.b #$5B, mapping_frame(A0) ; is Miles ducking bne.s loc_17104 bra.s Duckinganddashingrings Touch_Rings_Check_Sonic: ;------------------------------------------------------------------------------- cmpi.b #$4D,mapping_frame(a0) bne.s loc_17104 Duckinganddashingrings: addi.w #$C,d3 moveq #$A,d5 loc_17104: Edit all codes with Miles fix
That's a nice fix, but the problem here is that the code is starting to get too long. Seeming as Sonic AND Tails runs this all the time, it can start to slow the game down a little (okay, hardly by any, but still...) There is another and quicker fix, but it does have a little problem. Which I'm about to explain. Instead of having this: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashing ; if so, branch cmpi.b #$4D,mapping_frame(a0) ; is Sonic ducking? bne.s Touch_NoDuck ; if not, branch Duckinganddashing: ; So, Sonic is spindashing or ducking addi.w #$C,d3 moveq #$A,d5 ; loc_3F592: Touch_NoDuck: You could do this: Code (ASM): cmpi.b #9,anim(a0) ; is Sonic spindashing? beq.s Duckinganddashing ; if so, branch cmpi.b #8,anim(a0) ; is Sonic ducking? bne.s Touch_NoDuck ; if not, branch Duckinganddashing: ; So, Sonic is spindashing or ducking addi.w #$C,d3 moveq #$A,d5 ; loc_3F592: Touch_NoDuck: Instead of mapping_frame, it will compare the anim. Both for Sonic and Tails, their duck is anim #8 and their spindash is anim #9. That way, the code won't be too long. Obviously, do the same thing at "Touch_Boss:", "loc_170D0:" and "loc_174DE:". This is perfect for Tails, but for Sonic, it has one very slight problem: Whilst going into his ducking position, he will now have the shorter y_radius. This only happens for a split second, and probably isn't noticable. If you're not bothered about that, then this is the way to go; replacing "#$4D,mapping_frame(a0)" with "#8,anim(a0)". But, if you are bothered about this, then Esrael's idea is the way to go. It's just a little bit slower as it has to do all these checks for both Sonic and Tails all the time.
Man, if I could make an appropriate surprised face right now via text, I'd be doing it like crazy right now. Those CPZ and crouching fixes not only make the game more "perfect," but they add flair to it at the same time! As someone who doesn't see video games quite as timeless as other forms of media, I'm ecstatic to see all these fixes come out for the game. Excellent work, Esrael and redhotsonic! I hope I'm not coming off as rude, but I'm not sure if you guys caught the bug I mentioned a couple of pages back (it was post #30). I can see it easily getting buried in these posts because MoDule posed another fix just minutes after my post, making it appear a page behind. If you haven't checked it out yet, you're welcome to do so!
Whoops, must have missed that, sorry. Okay, here's the fix (Xenowhirls 2007 again): Go to "Obj05_Main:" and find this coding: Code (ASM): moveq #0,d0 move.b anim(a2),d0 btst #5,status(a2) beq.s + moveq #4,d0 + When Tails is next to something he's about to push, his pushing tails animation is set. The thing is, just before he pushes, one walking anim appears, which conflicts both tails animations. So, change it to this: Code (ASM): moveq #0,d0 move.b anim(a2),d0 btst #5,status(a2) ; is Tails about to push against something? beq.s + ; if not, branch cmpi.b #$63,mapping_frame(a2) ; Is Tails in his pushing animation yet? blt.s + ; If not yet, branch, and do not set tails' tail pushing animation moveq #4,d0 + Now, as soon as he's about to push, it will still do his one walking animation, but his mapping_frame wouldn't have reach #$63 yet, so it won't set the tails tail pushing animation. That means no more conflicts. Then when he does do his pushing animation, the tails tails animation will set accordingly without conflicting. Resulting in this: Done Cheers, redhotsonic
Dang. That was fast! Thanks for that fix, redhotsonic! It's amazing to see all these bugfixes pile up at one time. Here's hoping a fully-fixed Sonic 2 ROM/patch pops up someday! (That's not a request of any kind, just a thought. Or a wonder, whatever.)
You're most welcome. We can make a new hack with all these bug fixes and call it "Sonic 2: Health and Safety" =P Anyway, here's another. Firstly, I aplogise if there has already been a fix out there for this. I am aware that people know this bug as it's on the Retro Wiki, but I couldn't see anywhere about a member telling others how to fix it. So here's how How to fix the Rexon badnik crash in Hill Top Zone As it doesn't tell you how to fix it, and I couldn't see anyone mentioning it, here's how. Go to "loc_37454:" and you should see this: Code (ASM): loc_37454: bsr.w loc_3750C subq.b #1,objoff_2A(a0) bmi.s loc_37462 bra.w JmpTo39_MarkObjGone That "branch to subroutine - loc_3750C" is what is causing the problem. It's happening too early. We need to move that command down a little bit. So change it to this: Code (ASM): loc_37454: subq.b #1,objoff_2A(a0) bmi.s loc_37462 bsr.w loc_3750C ; Now moved here to help fix Rexon crash bra.w JmpTo39_MarkObjGone One more, go to "loc_37488:" and you should see this: Code (ASM): loc_37488: bsr.w loc_3750C moveq #$10,d0 add.w d0,x_vel(a0) subq.b #1,objoff_2A(a0) bmi.s loc_374A0 bsr.w JmpTo26_ObjectMove bra.w JmpTo39_MarkObjGone Again, "branch to subroutine - loc_3750C" is too early. So change it to this: Code (ASM): loc_37488: moveq #$10,d0 add.w d0,x_vel(a0) subq.b #1,objoff_2A(a0) bmi.s loc_374A0 bsr.w loc_3750C ; Now moved here to help fix Rexon crash bsr.w JmpTo26_ObjectMove bra.w JmpTo39_MarkObjGone Done. The rexon crash will no longer happen. Cheers, redhotsonic
Btw I apologize. I'm slipping on documenting these in the wiki. This is a result of having no wifi at home, otherwise they'd be done immediately. I'll do my best to catch up later this week. Please hang tight. Got some wifi close to home, temporary solution. Here's to start: http://info.sonicret...Fix_Rexon_crash http://info.sonicret...animation_error And here's the CPz boss feature that Esrael put in. http://info.sonicretro.org/SCHG_How-to:Restore_lost_CPZ_boss_feature
Pretty cool stuff guys, please do keep it coming. Just wondering, is this the same fix as the official one from v.02?
In rev 2 this was fixed by Sega. As I had promissed here is the Sonic 2 rev 2 source. You will see some changes in the code. This disassembly was generated from Esrael Neto Assembly Editor using other labels definitions. For curiosity Your fixes for Rexon can be found in Obj_0x97.asm (label Offset_0x036F20 The source was not modified by me. This is original from Sega (Sonic Compilation /Classics) with New Header Only. Sonic 2 rev 2 (Sonic compilation / Classics) Edit: 28/05/2019 - Fixed broken links Best regards: ---------------------- Neto.
About these fixes, I don't know if this part was noticed or not. But without these you will be forced to do a hard reset when you die and try placing an object while debugging/testing in Real Hardware.
Here's one of MoDule's... I'm on my iPod... So any errors, sorry, I'm doing the best I can. http://info.sonicretro.org/SCHG_How-to:Fix_ARZ_Boss_Walking_on_Air_Glitch