KingofHarts, on 26 July 2011 - 01:28 PM, said:
Got something interesting... It's gonna need some testing. But, I was fighting the ARZ boss, and got 7 of 8 hits. I was Tails, (w/ Sonic and Knuckles) and One of the sidekicks hit the boss for the last hit , and suddenly, the pillars sunk quickly and the boss took off without any delay... the camera immediately panned toward the capsule (following me again, as it would normally after the boss leaves... but it isnt supposed to be sudden like that). I hit the capsule and instead of normal animals, I got little critters with what can only be described as tiles from the explosion graphic, mapped out as animals. All this mind you, while the boss music never stopped until the score tally. I don't know how this bug happened, I reckon I could try it again and see if I can take a stab at what it could be, but I think you'd have a better idea than I would... you're the hacker. Just thought I'd share.
I was looking into the ARZ boss code for a completely unrelated thing and I took the opportunity to figure out what was causing this: the problem is that once the ARZ boss is reaches a pillar, the following happens, in order:
- Boss checks to see if he has been hit; if so, and if this is the last hit, set subroutine counter (stored in angle/$26 on the normal game) to 8 (exploding after defeat) and variable Boss_Countdown to $B3;
- When an internal counter reaches zero, the boss begins to swing the hammer; this increases the subroutine counter (stored in angle/$26 on the normal game) by 2 and Boss_Countdown to $1E.
If The boss is defeated on the same when the internal counter reaches zero, the subroutine counter is set to 8 (exploding after defeat), then increased by 2 (bobbing up and down before blasting off); similarly, Boss_Countdown is set to $B3 then changed to $1E. Either of those two values would have the same basic effect, with a difference of a couple of frames: in subroutine $A, a value of $1E is after the threshold to load the animal PLCs (so they show pieces of explosions), and after 2 frames of being incremented, it reaches $20, which further increases the subroutine counter by 2 (Robotnik going away).
The fix? After this block of code:
add the following 2 lines:
cmpi.b #8,angle(a0) ; Has Robotnik been defeated?
beq.s loc_306F8 ; If so, branch
That is it. I am now wondering if I should add the fix to SCH...