Super Mario Bros. 3: The Blinking Items Glitch

Поділитися
Вставка
  • Опубліковано 21 лис 2024
  • This was another glitch that fascinated me so much, that I just had to know how it worked.
    This is definitely one of the more amusing cases where fixing the glitch would be completely trivial, but the developers apparently never noticed it. I was going to show the actual assembly code for what happens when you bump the block, though I thought it was a bit much for my video, so I'll add it in the description.
    Here's what gets executed by the "coin / star block":
    PRG_8:
    $B830:
    LDA #$80 ; A = 0x80
    STA $0586 ; Preemtively set the sprite to flash
    LDY #$04 ; Y = 4 (value to spawn a starman after the RTS)
    LDA $0553 ; A = 1 if the player is already invincible.
    BNE $B83F ; If the player is invincible, jump to $B83F!
    JMP $B810 ; Otherwise, run the code for spawning a coin.
    $B83F:
    RTS ; Return
    To fix this bug, all you would need to do is move the LDA #$80 and the STA $0586 after the branch. The new code would be:
    PRG_8:
    $B830:
    LDY #$04 ; Y = 4 (value to spawn a starman after the RTS)
    LDA $0553 ; A = 1 if the player is already invincible.
    BNE $B83A ; If the player is invincible, jump to $B83A!
    JMP $B810 ; Otherwise, run the code for spawning a coin.
    $B83A:
    LDA #$80 ; A = 0x80
    STA $0586 ; Set the sprite to flash
    RTS ; Return
    And if we're really looking to optimize this, we could also move the LDY after the branch as well, since the code for spawning a coin will overwrite that value anyway. All of these changes would save 8 CPU cycles if we're only spawning a coin.

КОМЕНТАРІ • 7

  • @brightblackhole2442
    @brightblackhole2442 Рік тому +4

    the frog suit section was truly incredible. brought a tear to my eye at the impeccable optimization

  • @robuxyyyyyyyyyy4708
    @robuxyyyyyyyyyy4708 7 місяців тому +1

    Imagine if you picked up a star as small mario only for it to act like a mushroom

  • @SuperNickid
    @SuperNickid 3 роки тому +8

    @100th Coins: that also works in SNES Super mario All-stars version of the same game the only diffrence the fire flower does not blink.

    • @jdaster64
      @jdaster64 3 роки тому +1

      Was just wondering about this myself.

  • @Violeto250
    @Violeto250 Рік тому

    They did it on purpose cause they want for you to take the flower or any power else except of mushroom to be a big mario. I could be wrong but that's what i think

  • @_polpon
    @_polpon 3 роки тому +1

    Didn't know that! Very interesting!

  • @zimap
    @zimap Рік тому +1

    :)