don't click here

A Robotnik boss battle...

Discussion in 'General Sonic Discussion' started by Trigahd, Jul 1, 2005.

Thread Status:
Not open for further replies.
  1. Trigahd

    Trigahd

    I am your gahd!! Member
    1,523
    0
    0
    Somewhere in the skies
    Nothing worth mentioning
    Okay, I was playing Final Zone on Sonic 1. As always, I was beating the crud out of Robotnik and then I delivered the final blow. Now normally I would be fine and dandy, watching the pretty explosions on the screen, when suddenly, as Robotnik was coming down the chute he appeared in, I hit him a second time. A second time, I tell you. With this second hit I hit him in, the battle resumed and the explosions disappeared. Soon, after a couple more hits, I realized that this would be one battle I would never win. Has anyone ever had this problem before?
     
  2. Galvatron

    Galvatron

    Member
    288
    14
    18
    UK
    I managed to place another hit, and the chute Robotnik was in flashed white as if it was taking a hit but the explosions continued and the boss fight didn't repeat itself, it ended as normal.
     
  3. Miles3298

    Miles3298

    Member
    583
    23
    18
    I've had this before, except it was on the real mega drive. I was really annoyed since I got all my precious chaos emeralds and could finally see the good ending but that screwed me up.
     
  4. Tiberious

    Tiberious

    Yeah, I'm furry. Got a problem? Oldbie
    778
    15
    18
    This is a known bug. The problem is that while Robotnik remains hittable, under normal circumstances the speed of the pistons (for lack of a better term) prevent you from hitting him again. On the 8th hit, they slow down, and if you get #8 in quickly enough, you have time to get a 9th in after he stops flashing. This 'lowers' his hit counter to FF (255), and you're screwed outside of debug mode.

    Someone made a hack that showed boss hits left. Try this bug there to see for yourself.
     
  5. SGR

    SGR

    Give me the gams. Member
    Sonic 1 +, right?
     
  6. Mystical Ninja

    Mystical Ninja

    For old time's sake. Oldbie
    3,342
    5
    18
    New Castle, Delaware
    Nothing that concerns this place in the least.
    I've done this before, lots of times. A few months ago, I tried this glitch in Hivebrain's Sonic 1+ hack, and the number of boss hits gets glitched up, so it doesn't really tell you how much is left. From what I've heard before, it takes 200+ hits to kill Robotnik after pulling off this glitch.
     
  7. Miles3298

    Miles3298

    Member
    583
    23
    18
    255 to be exact.
     
  8. Trigahd

    Trigahd

    I am your gahd!! Member
    1,523
    0
    0
    Somewhere in the skies
    Nothing worth mentioning
    This is known, huh? Well, you learn something new everyday ^_^ .
     
  9. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    This comes up at least once or twice a year.
     
  10. Mystical Ninja

    Mystical Ninja

    For old time's sake. Oldbie
    3,342
    5
    18
    New Castle, Delaware
    Nothing that concerns this place in the least.
    Also, just to add one more thing, it's best to use Debug Mode for this glitch if you're actually trying to have Robotnik killed. This is best, because there's no way you'll be able to defeat him within the normal nine minutes that're given to complete the stages. As you probably already know, you get unlimitted time in the Debug Mode, which gives you plenty of time to beat Robotnik.
     
  11. Weird Person

    Weird Person

    You lost two seconds reading this Member
    367
    0
    0
    Who knows?
    Let me see if I understand.

    Every time I hit, 1 is subtracted from a Byte,Word or (Longword?!) in RAM, If is a byte, after Reach 0, if 1 is Subtracted, the value will be -1 ($FF), But the game don't see difference between signed and unsigned values, so to defeat robotnik again I Have to give more 256 Hits?

    I Always thinked the quantity of Hits of Last boss would be word.
     
  12. Aurochs

    Aurochs

    Единый, могучий Советский Союз! Tech Member
    2,343
    0
    0
    Whatever catches my fancy
    That is, indeed, a byte. And that's correct. Seems the programming for that boss is messed up. :P
     
  13. LOst

    LOst

    Tech Member
    4,891
    8
    18
    You sound like a programmer now.

    The only check the engine does is if the hitcount byte is zero. You can simply fix the problem by making the hitcount a signed value, and check if the byte value is zero or if it got a sign (negative 128 to 255). Since hitcounts never are higher than 12 (final boss in Sonic 2), a sign check wouldn't be that bad.

    This bug may have been fixed in Sonic Jam's Sonic 1. I will check that someday.
     
  14. Weird Person

    Weird Person

    You lost two seconds reading this Member
    367
    0
    0
    Who knows?
    I was thinking, and somewhere in the boss programming must have this code (compiled of course!):

    Code (Text):
    1. cmp.b [offset where the byte is],0        ;Number of hits reached 0?
    2. beq.l [offset to jump if boss is defeated];Yes, Now run Robotnik!
    As far I can remeber, the first nybble to 2 byte Jump Instruction is $6, and the second nybble for Zero Flag Condition is $7. So, It's just find this instruction and change to $6D (BGE, Branch if Greater or Equal. This time, the Sign bit will make difference if the Number is negative or not.) , So, I'll jump if the Value is equal or Lower than 0 (This time , $FF [-1] is lower than 0) , even if you double hit Robotnik, that bug won't happen...

    I don't know if it's a short jump (1 byte range), long jump (2 byte range) or absolute jump (4 Bytes, this time a Offset.). The Information above may be wrong if it's not a 2 bytes Jump. Or may be wrong if the programming is different, I don't know how Naka programmed Sonic 1.

    It's might be easy to change, But I don't know where is the Final Boss programming, I'll search it and add this useful information to the SCHG and the Wiki. (nobody thinked in this before?)

    and also, these are just suppositions.

    (born a idea: A Bugfixes list to the SCHG and the Wiki?)
     
  15. Aurochs

    Aurochs

    Единый, могучий Советский Союз! Tech Member
    2,343
    0
    0
    Whatever catches my fancy
    Hey, don't steal my idea! :P

    Yeah, I'm trying to do something similar with my ASM hack of Sonic 2. Most of the bugs I'm trying to fix are related to Super Sonic now (including some that I introduced :P ), but I'll get to the Eggrobo collision bug and some of the weird collision stuff from Aquatic Ruin Zone at some point.
     
  16. LOst

    LOst

    Tech Member
    4,891
    8
    18
    To fix the bug for this boss only, defeat the boss if the hitcount is negative:

    Code (Text):
    1. tst.b hitcount ? ? ?;Test hitcount for conditions...
    2. beq [offset to jump if boss is defeated];was hitcount zero?
    3.  
    4. bmi [offset to jump if boss is defeated];was hitcount signed negative?
     
  17. Weird Person

    Weird Person

    You lost two seconds reading this Member
    367
    0
    0
    Who knows?
    Yeah, that's right, but that programming would add a extra hit to beat Robotnik. If normaly Robotnik is defeated when the byte = 0, so, only when the byte is lower than 0 ($FF or lower) robotnik would be defeated.

    But who cares? It's would be just one extra hit.

    [EDIT] and yes, My mistake. The Value is supposed to be lower, not greater. I just started to understand programming two weeks ago.
     
  18. LOst

    LOst

    Tech Member
    4,891
    8
    18
    No! I don't add an extra hit. BEQ checks to see if there are 0 hits left. BMI on the other hand is the fix so that if you by mistake make 9 hits, you will still beat the boss.
     
  19. Weird Person

    Weird Person

    You lost two seconds reading this Member
    367
    0
    0
    Who knows?
    If you don't change the "cmp.b [offset where the byte is],0" It will add a extra hit. That was I trying to say.
     
  20. LOst

    LOst

    Tech Member
    4,891
    8
    18
    Here's the code, and my fix applied to it:
    Code (Text):
    1. ROM:00019FA6 loc_19FA6:                             ; CODE XREF: ROM:00019F14j
    2. ROM:00019FA6                 tst.b   $21(a0)
    3. ROM:00019FAA                 beq.s   loc_19FBC
    4. LOst's fix:                                      bmi.s loc_19FBC
    5. ROM:00019FAC                 addq.b  #2,$34(a0)
    6. ROM:00019FB0                 move.w  #-1,$30(a0)
    7. ROM:00019FB6                 clr.w   $32(a0)
    8. ROM:00019FBA                 rts    
    9. ROM:00019FBC; ---------------------------------------------------------------------------
    10. ROM:00019FBC
    11. ROM:00019FBC loc_19FBC:                             ; CODE XREF: ROM:00019FAAj
    12. ROM:00019FBC                 move.b  #6,$34(a0)
    13. ROM:00019FC2                 move.w  #$25C0,8(a0)
    14. ROM:00019FC8                 move.w  #$53C,$C(a0)
    15. ROM:00019FCE                 move.b  #$14,$16(a0)
    16. ROM:00019FD4                 rts
     
Thread Status:
Not open for further replies.