Fix that, and we can add that little tidbit to the wiki page. I'll be waiting for the update. BTW Esrael... I thought you were awesome before, that is just even more amazing. Thats going into my Sonic 2 hack.
Posting in epic thread Great find, Esrael: it does seem like that behaviour was lost somewhere in development, and with McAleeCh's fix of the alignment it'll be perfect. So many of these things just cry out for a fully fixed-up Sonic 2 ROM, basically a sequel to Mercury's ReadySonic.
I'm sure someone will pump one out well before me (that will also be much better)... but I've been trying to learn from Mercury, and the SCHG in putting together fixed up, enhanced ROMS for Sonic's 1 AND 2... code-named Rev C. Nothing special, but I am a little bit new to hacking and would like to share a finished ROM with others when I'm done. ReadySonic has been a big help in putting a lot of the stuff in (and correcting some of the stuff I have done before) But with the new stuff from RHS, and other things that weren't included (such as an extra life for every 50,000 pts) I'm hoping to put up what could be considered an update to ReadySonic.
Hah, you actually set up the whole animation, shame they didn't implement that little easter egg originally. I'm not sure if you take requests, but I've thought of one change that could count as a valid fix; is it possible to enable debug for Tails?
Am I the only one finding this new code not working? I thought on the last hit, the gunge was meant to fall on him, then he runs away, not still blow up. And sometimes, he drops it on himself then carries on attacking. I tried Delta, and it does the same thing. =/
Has anybody yet fixed Tails' tails when looking up? They animate faster for one 'cycle' before returning to the normal speed.
I might as well take on requests, as long as it's for Sonic 2, and you don't mind me using XenoWhirl's 2007 disassembly =P To enable debug when using Tails Go to "Obj02:" and change this: Code (ASM): Obj02: ; a0=character cmpi.w #2,(Player_mode).w bne.s + move.w (Camera_Min_X_pos).w,(Tails_Min_X_pos).w move.w (Camera_Max_X_pos).w,(Tails_Max_X_pos).w move.w (Camera_Max_Y_pos_now).w,(Tails_Max_Y_pos).w + to this: Code (ASM): Obj02: ; a0=character cmpi.w #2,(Player_mode).w bne.s + move.w (Camera_Min_X_pos).w,(Tails_Min_X_pos).w move.w (Camera_Max_X_pos).w,(Tails_Max_X_pos).w move.w (Camera_Max_Y_pos_now).w,(Tails_Max_Y_pos).w tst.w (Debug_placement_mode).w ; is debug mode being used? beq.s + ; if not, branch jmp DebugMode + So, whenever debug mode is active, it will go to DebugMode Next, go to "Obj02_Control:" and change this: Code (ASM): Obj02_Control: cmpa.w #MainCharacter,a0 bne.s Obj02_Control_Joypad2 move.w (Ctrl_1_Logical).w,(Ctrl_2_Logical).w tst.b (Control_Locked).w ; are controls locked? bne.s Obj02_Control_Part2 ; if yes, branch move.w (Ctrl_1).w,(Ctrl_2_Logical).w ; copy new held buttons, to enable joypad control move.w (Ctrl_1).w,(Ctrl_1_Logical).w bra.s Obj02_Control_Part2 to this: Code (ASM): Obj02_Control: cmpa.w #MainCharacter,a0 ; Is Tails the main character? bne.s Obj02_Control_Joypad2 ; No? Branch then move.w (Ctrl_1_Logical).w,(Ctrl_2_Logical).w tst.w (Debug_mode_flag).w ; is debug cheat enabled? beq.s + ; if not, branch btst #4,(Ctrl_1_Press).w ; is button B pressed? beq.s + ; if not, branch move.w #1,(Debug_placement_mode).w ; change Tails into a ring/item clr.b (Control_Locked).w ; unlock control rts + tst.b (Control_Locked).w ; are controls locked? bne.s Obj02_Control_Part2 ; if yes, branch move.w (Ctrl_1).w,(Ctrl_2_Logical).w ; copy new held buttons, to enable joypad control move.w (Ctrl_1).w,(Ctrl_1_Logical).w bra.s Obj02_Control_Part2 So when you have main control of Tails, you can enter debug by pressing B. Next, go to "Obj02_Hurt:" and change this: Code (ASM): Obj02_Hurt: jsr ObjectMove addi.w #$30,y_vel(a0) btst #6,status(a0) beq.s + subi.w #$20,y_vel(a0) to this: Code (ASM): Obj02_Hurt: cmpa.w #MainCharacter,a0 ; Is Tails the main character? bne.s Obj02_Hurt_Normal ; No? Branch then tst.w (Debug_mode_flag).w beq.s Obj02_Hurt_Normal btst #4,(Ctrl_1_Press).w beq.s Obj02_Hurt_Normal move.w #1,(Debug_placement_mode).w clr.b (Control_Locked).w rts Obj02_Hurt_Normal: jsr ObjectMove addi.w #$30,y_vel(a0) btst #6,status(a0) beq.s + subi.w #$20,y_vel(a0) So when Tails is hurt, you can enter debug by pressing B. Next, go to "Obj02_Dead:" and change this: Code (ASM): Obj02_Dead: bsr.w Obj02_CheckGameOver jsr ObjectMoveAndFall bsr.w Tails_RecordPos bsr.w Tails_Animate bsr.w LoadTailsDynPLC jmp DisplaySprite to this: Code (ASM): Obj02_Dead: cmpa.w #MainCharacter,a0 ; Is Tails the main character? bne.s + ; No? Branch then tst.w (Debug_mode_flag).w beq.s + btst #4,(Ctrl_1_Press).w beq.s + move.w #1,(Debug_placement_mode).w clr.b (Control_Locked).w rts + bsr.w Obj02_CheckGameOver jsr ObjectMoveAndFall bsr.w Tails_RecordPos bsr.w Tails_Animate bsr.w LoadTailsDynPLC jmp DisplaySprite So when Tails is dead (dying), you can enter debug by pressing B. Next, go to "loc_41C56:" (part of the debugmode code) and change this: Code (ASM): loc_41C56: btst #4,(Ctrl_1_Press).w beq.s return_41CB6 moveq #0,d0 move.w d0,(Debug_placement_mode).w lea (MainCharacter).w,a1 ; a1=character move.l #Mapunc_Sonic,mappings(a1) move.w #$780,art_tile(a1) tst.w (Two_player_mode).w beq.s loc_41C82 move.w #$3C0,art_tile(a1) to this: Code (ASM): loc_41C56: btst #4,(Ctrl_1_Press).w beq.s return_41CB6 moveq #0,d0 move.w d0,(Debug_placement_mode).w lea (MainCharacter).w,a1 ; a1=character move.l #Mapunc_Sonic,mappings(a1) move.w #$780,art_tile(a1) cmpi.b #2,(Maincharacter).w ; are you Tails? bne.s + ; if not, branch move.l #MapUnc_Tails,mappings(a1) move.w #$7A0,art_tile(a1) + tst.w (Two_player_mode).w beq.s loc_41C82 move.w #$3C0,art_tile(a1) So when you exit debug mode, the correct mappings will load. Next, go to "loc_41C82:" and change this: Code (ASM): loc_41C82: bsr.s sub_41CB8 move.b #$13,y_radius(a1) move.b #9,x_radius(a1) move.w ($FFFFFFCC).w,(Camera_Min_Y_pos).w move.w ($FFFFFFCE).w,(Camera_Max_Y_pos).w cmpi.b #$10,(Game_Mode).w ; special stage mode? bne.s return_41CB6 ; if not, branch move.b #2,(MainCharacter+anim).w bset #2,(MainCharacter+status).w bset #1,(MainCharacter+status).w to this: Code (ASM): loc_41C82: bsr.s sub_41CB8 move.b #$13,y_radius(a1) move.b #9,x_radius(a1) cmpi.b #2,(Maincharacter).w ; are you Tails? bne.s + ; if not, branch move.b #$F,y_radius(a1) + move.w ($FFFFFFCC).w,(Camera_Min_Y_pos).w move.w ($FFFFFFCE).w,(Camera_Max_Y_pos).w cmpi.b #$10,(Game_Mode).w ; special stage mode? bne.s return_41CB6 ; if not, branch move.b #2,(MainCharacter+anim).w bset #2,(MainCharacter+status).w bset #1,(MainCharacter+status).w return_41CB6: rts So when you exit debug mode, the correct height of the character will load. All done. EDIT: It's meant to be him "flicking" his tails. But if you do not like that, you can fix it like this: Code (ASM): Obj05AniSelection: dc.b 0,0 ; TailsAni_Walk,Run -> dc.b 3 ; TailsAni_Roll -> Directional dc.b 3 ; TailsAni_Roll2 -> Directional dc.b 9 ; TailsAni_Push -> Pushing dc.b 1 ; TailsAni_Wait -> Swish dc.b 0 ; TailsAni_Balance -> Blank dc.b 2 ; TailsAni_LookUp -> Flick dc.b 1 ; TailsAni_Duck -> Swish dc.b 7 ; TailsAni_Spindash -> Spindash dc.b 0,0,0 ; TailsAni_Dummy1,2,3 -> dc.b 8 ; TailsAni_Stop -> Skidding dc.b 0,0 ; TailsAni_Float,2 -> dc.b 0 ; TailsAni_Spring -> dc.b 0 ; TailsAni_Hang -> dc.b 0,0 ; TailsAni_Blink,2 -> dc.b $A ; TailsAni_Hang2 -> Hanging dc.b 0 ; TailsAni_Bubble -> dc.b 0,0,0,0 ; TailsAni_Death,2,3,4 -> dc.b 0,0 ; TailsAni_Hurt,Slide -> dc.b 0 ; TailsAni_Blank -> dc.b 0,0 ; TailsAni_Dummy4,5 -> dc.b 0 ; TailsAni_HaulAss -> dc.b 0 ; TailsAni_Fly -> even Code (ASM): dc.b 2 ; TailsAni_LookUp -> Flick See that? Change the 2 to a 1 and it will be fine.
Under "Next, go to "loc_41C56:" (part of the debugmode code) and change this:" you typed "cmpi.b #3,(Maincharacter).w ; are you Tails?" instead of "cmpi.b #2,(Maincharacter).w ; are you Tails?".
While on the subject of Tails bugs, I've noticed one that I don't think I've seen mentioned before. When Tails is standing next to a solid object, his tails use their pushing animation as opposed to his standard tail animation (the improper animation is in pic 1). Also, during the few frames before Tails enters his actual pushing animation, his tails look corrupted (pic 2). This behavior was corrected in Sonic 3, so there's a good place to start. By the way, awesome work redhotsonic. You're really on top of these fixes!
On the subject of the ARZ boss, I've got another that I don't think anyone's mentioned. It's hard to trigger accidentally, but if you defeat the boss while a character is standing on one of the two pillars at either side of the screen, that character will suffer from the walking on air glitch. The Fix: Locate the label loc_30B4A. The code should look like this: Code (ASM): loc_30B4A: move.b #1,(Screen_Shaking_Flag).w addi.w #1,y_pos(a0) cmpi.w #$510,y_pos(a0) blt.s BranchTo2_JmpTo37_DisplaySprite move.b #0,(Screen_Shaking_Flag).w bra.w JmpTo55_DeleteObject Now add the following lines so it looks like this: Code (ASM): loc_30B4A: move.b status(a0),d0 andi.b #standing_mask|pushing_mask,d0 ; is someone touching the pillar? beq.s Pillar_Lower ; if not, branch move.b d0,d1 andi.b #p1_standing|p1_pushing,d1 ; is it the main character? beq.s + ; if not, branch andi.b #$D7,(MainCharacter+status).w ori.b #2,(MainCharacter+status).w ; prevent Sonic from walking in the air + andi.b #p2_standing|p2_pushing,d0 ; is it the sidekick? beq.s Pillar_Lower ; if not, branch andi.b #$D7,(Sidekick+status).w ori.b #2,(Sidekick+status).w ; prevent Tails from walking in the air Pillar_Lower: move.b #1,(Screen_Shaking_Flag).w addi.w #1,y_pos(a0) cmpi.w #$510,y_pos(a0) blt.s BranchTo2_JmpTo37_DisplaySprite move.b #0,(Screen_Shaking_Flag).w bra.w JmpTo55_DeleteObject Everything up to the label Pillar_Lower is new and what it does is check if any character is interacting with the pillar and clears their interaction bits if necessary. A little more: Alternatively, if you want the pillars to stay solid even while the are being lowered into the ground, change the code to this: Code (ASM): loc_30B4A: move.w #$23,d1 move.w #$44,d2 move.w #$45,d3 move.w x_pos(a0),d4 move.w y_pos(a0),-(sp) addi.w #4,y_pos(a0) bsr.w JmpTo26_SolidObject move.w (sp)+,y_pos(a0) move.b #1,(Screen_Shaking_Flag).w addi.w #1,y_pos(a0) cmpi.w #$510,y_pos(a0) blt.s BranchTo2_JmpTo37_DisplaySprite move.b status(a0),d0 andi.b #standing_mask|pushing_mask,d0 ; is someone touching the pillar? beq.s Pillar_Lower ; if not, branch move.b d0,d1 andi.b #p1_standing|p1_pushing,d1 ; is it the main character? beq.s + ; if not, branch andi.b #$D7,(MainCharacter+status).w ori.b #2,(MainCharacter+status).w ; prevent Sonic from walking in the air + andi.b #p2_standing|p2_pushing,d0 ; is it the sidekick? beq.s Pillar_Lower ; if not, branch andi.b #$D7,(Sidekick+status).w ori.b #2,(Sidekick+status).w ; prevent Tails from walking in the air Pillar_Lower: move.b #0,(Screen_Shaking_Flag).w bra.w JmpTo55_DeleteObject Explanation: For an object to have solidity, which for instance allows the player objects to stand on top of it, it has to call one of the SolidObject routines. These routines handle player positioning and flags in such a way so as to make the object appear solid. When a character stands on an object, its on-object status bit is set. When this bit is set, the character no longer follows the level's terrain, but instead walks in a straight line along the object's surface, ignoring gravity. Walking off the edge of an object will cause the SolidObject routine to clear the on-object flag and make the character subject to gravity again. Should an object stop calling SolidObject while a player is standing on it, that player's on-object bit won't be reset and this causes the walking on air glitch. In the case of the ARZ boss's pillars, SolidObject is called in every state except the "moving down" state which is triggered when the boss is defeated. This causes the pillars to eventually vanish without making sure the player's on-object bits are cleared.
Download Sonic 2 Delta with SaveStates This only work when Bottle are full filled with gunge and you hit the boss in correct time. To show it working I have made two savestates. Run this version with Gens and Load the Savestates. Edit: 28/05/2019 - Fixed broken links Best regards: ---------------------- Neto.
Fixing the alignment is easy. Just edit mappings into following file: Obj5D_MapUnc_2EADC: BINCLUDE "mappings/sprite/obj5D_a.bin" The last 3 mappings in the file is animation: Change from Code (Text): 0001E00A004A0025FFF0 0001E80D00530029FFF0 0001E80D005B002DFFF0 To Code (Text): 0001E00A004A0025FFED 0001E80D00530029FFED 0001E80D005B002DFFED
The thing is, mate, I thought he was only to do this once. And only on the last hit, and instead of exploding. I thought that was the theory? If not, shut me up! =P Also, Module, nice fix. Never knew about that one. Probably because I'm hitting Eggman and Tails is too stupid to stand on the poles =P
That animation looks cool, but I can see why they didn't use it. It won't turn around when Robotnik's ship does, leaving the goo-with-eyes occasionally floating away from Robotnik's head. They might not have considered fixing it a top priority, being in the rush they were.
Alternatively just load the mapping file along with the CPZ Boss art file on SonMapEd and nudge the last three sprites three pixels left. Or if you're feeling really lazy just replace the mapping file with this one: http://www.sendspace.com/file/4hiy86 These are brilliant fixes by the way, don't forget to put them in the How To section in the wiki (maybe list the bugs in the game's Bug List page as well).
I think the "oozed" Robotnik animation deserves its own wiki-ed guide, seeing how it can also be fixed after being restored... Speaking of, I'm surprised that it survived hidden up to the final version. Does it work and have the same mapping problems in the many prototypes with a working CPZ boss?
I'll get on it as soon as I can. I would've liked to earlier today, but something came up. (Technically I AM on business trip today) I'll try to get to it as soon as I can get back online.
To fix this find: Code (ASM): loc_2E790: subi.b #1,anim_frame_duration(a0) bpl.s loc_2E7B6 and add the following code: Code (ASM): loc_2E790: ;------------------------------------------------------------------------------- cmpi.b #$25, mapping_frame(A0) blt.s _CPz_2 move.w (MainCharacter+x_pos).w, D0 sub.w x_pos(A0), D0 bgt.s _CPz_1 bclr #$00, render_flags(A0) bra.s _CPz_2 _CPz_1: bset #$00, render_flags(A0) _CPz_2: ;------------------------------------------------------------------------------- subi.b #1,anim_frame_duration(a0) bpl.s loc_2E7B6
Hey, Sonic 2 fixes! One thing that's always bothered me a lot (and it isn't fixed in 3&K, either) is the camera jump when Tails rolls up. You see, because of the change in size of Sonic's collision box when he rolls up, the camera has an offset of 5 pixels to compensate. But Tails doesn't change in size as drastically, since he's so small to begin with. However, the camera code is the same for both characters, making it jump by 4 pixels if you roll while playing as Tails. It's not much, but once you notice it, you can't unsee and it starts to give you a headache. Anyway, to fix it, just add the lines between the semicolons: Code (ASM): loc_D78E: btst #2,status(a0) beq.s loc_D798 subq.w #5,d0 ; cmpi.w #2,(Player_mode).w ; Player_mode is $FFFFFF70 bne.s loc_D798 addq.w #4,d0 ; loc_D798: If your disasm doesn't have the same labels, you can find this code by searching for "subq.w #5,d0".