Tuesday, November 28, 2017

Super Gum

If you examine the gumball object's setup code at sub_612A8, you may notice how the object's mapping frame is at no point determined by its subtype value. Instead, the code copies the ROM address of one of several animation scripts to offset $30 of its SST, which the object later processes by calling the Animate_Raw function:
word_61466: dc.w $7F08
            dc.w $8FC
word_6146A: dc.w $7F09
            dc.w $9FC
word_6146E: dc.w $7F0A
            dc.w $AFC
word_61472: dc.w $7F0B
            dc.w $BFC
word_61476: dc.w $7F0C
            dc.w $CFC
word_6147A: dc.w $7F0D
            dc.w $DFC
word_6147E: dc.w $7F0E
            dc.w $EFC
word_61482: dc.w $7F0F
            dc.w $FFC
word_61486: dc.w $110
            dc.w $11FC
Hmm, it doesn't look like an animation script? Blame the formatting in the disassembly. It should start looking a bit more familiar if we break it into bytes:
word_61466: dc.b  $7F,   8,   8, $FC
word_6146A: dc.b  $7F,   9,   9, $FC
word_6146E: dc.b  $7F,  $A,  $A, $FC
word_61472: dc.b  $7F,  $B,  $B, $FC
word_61476: dc.b  $7F,  $C,  $C, $FC
word_6147A: dc.b  $7F,  $D,  $D, $FC
word_6147E: dc.b  $7F,  $E,  $E, $FC
word_61482: dc.b  $7F,  $F,  $F, $FC
word_61486: dc.b    1, $10, $11, $FC
Ah, that's more like it. Unsurprisingly, the animations have nothing to them: the same mapping frame is displayed twice, and the animation starts over. It seems pointless for the gumball object to use animations at all, doesn't it? That is, until you realize there are nine scripts, and that the last one alternates between two distinct mapping frames:


Given the letter printed on its surface, and its flashing coloration reminiscent of Super Sonic, it think it's fair to say we're looking at an unused ninth gumball, which would change the player into their super form. Indeed, if the gumball object's subtype is manually set to 8, it will use a unique item collection routine along with this animation.


Unfortunately, the item collection routine doesn't do much: all it does is set bit 7 of the Saved_status_secondary RAM address, which has nothing to do with super transformations and whose bits are all cleared on level load except for the three elemental shield bits, anyway.
loc_61264:
    bset    #7,(Saved_status_secondary).w
    rts
My guess is that at some point, bit 7 would spawn the player directly in their super form. It would be pretty dumb for the gumball's effect to wear off as soon as you left the bonus stage!

3 comments:

  1. I'd imagine the developers had to consider what would happen if:
    -Tails got a Super ball if he didn't have a super form.
    -Hyper forms were to be created.
    And thus decided to not put this here. At least if I wanted to be Super Sonic that badly in this bonus stage, I'd play Sonic 3 alone, go the bonus stage as Sonic with all Chaos Emeralds, jump right when the level starts, and jump again. It even trashes your shield to facilitate this!

    ReplyDelete
    Replies
    1. Tails Uses The S TV Box For Super But It Isn't Good He Would Be Messed And Look Like A Monster! (Only Works With Tails Alone)

      Delete
  2. Is There a game genie code for this?

    ReplyDelete