News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Super Mario Bros. (NES) - Timer Glitch on Flagpole  (Read 1838 times)

SMB2J-2Q

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Super Mario Bros. (NES) - Timer Glitch on Flagpole
« on: April 01, 2014, 11:42:59 pm »
Late into April Fool's... but what the heck...

I'm wondering what you folks might be able to do in order to make the timer tick down from 1,000 seconds when you complete any level in Super Mario Bros. (Super Mario All-Stars version only) or Super Mario Bros. 2 (Japan) that isn't a castle level? The trick is to land on the flagpole with the timer reading 000 but without dying.

Normally, this glitch will only execute the 1,000 seconds (and your extra 50,000 points) in the castle (the x-4) levels, and only on SMB2J (both original and SMAS) and the SMAS version of SMB; the original NES version of SMB does not have a time bonus instruction for the castle levels.

What instruction(s) would I change in the ROMs for these NES titles in order to make the timer go down from 1,000 on flagpole levels if Mario or Luigi touches the pole on 000 without dying?

Thank you,



Benjamin "Ben" Edge (SMB2J-2Q)
« Last Edit: April 01, 2014, 11:51:19 pm by SMB2J-2Q »

FAST6191

  • Hero Member
  • *****
  • Posts: 2695
    • View Profile
Re: Super Mario Bros. (NES) - Timer Glitch on Flagpole
« Reply #1 on: April 02, 2014, 12:00:27 pm »
There are undoubtedly people out there that have fiddled so extensively with the mario games that they will be able to give a precise answer, that is not me but I will go the theory.

You want to recreate a glitch or just add the functionality?

For the former this would point at a fix during region hopping which was a rarity in those days, though certainly not unheard of. Here I would look at the fix and try to remove that. Personally I would just add 1 to the timer value at end of level (maybe tweaking the other bonus values to line up), the better fix would be proper edge case detection but that would take several more cycles.

From what you say I would guess the pole ending and the castle endings use different routines, possibly an odd way of doing things but nothing outrageous.

Here then I would look at something similar to death routines, walk through walls and the like. I would guess it is a glitch in earnest (though possibly one that was allowed to slide) as most lesser systems for subtraction would probably cycle back around to FFFF or something if you took 1 from 0000.
Thinking about it though the ways I would fix the glitches are probably also the ways I would add it back in -- either add in a compare and force to 1000 in the case of 0 on the timer or subtract 1 and ultimately force it back around in the case of 0.

SMB2J-2Q

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Super Mario Bros. (NES) - Timer Glitch on Flagpole
« Reply #2 on: April 02, 2014, 02:06:37 pm »
There are undoubtedly people out there that have fiddled so extensively with the mario games that they will be able to give a precise answer, that is not me but I will go the theory.

You want to recreate a glitch or just add the functionality?

For the former this would point at a fix during region hopping which was a rarity in those days, though certainly not unheard of. Here I would look at the fix and try to remove that. Personally I would just add 1 to the timer value at end of level (maybe tweaking the other bonus values to line up), the better fix would be proper edge case detection but that would take several more cycles.

From what you say I would guess the pole ending and the castle endings use different routines, possibly an odd way of doing things but nothing outrageous.

Here then I would look at something similar to death routines, walk through walls and the like. I would guess it is a glitch in earnest (though possibly one that was allowed to slide) as most lesser systems for subtraction would probably cycle back around to FFFF or something if you took 1 from 0000.
Thinking about it though the ways I would fix the glitches are probably also the ways I would add it back in -- either add in a compare and force to 1000 in the case of 0 on the timer or subtract 1 and ultimately force it back around in the case of 0.
What I want to do is allow the timer to count down from 1000 seconds on any of the flagpole levels (if you touch it with timer 000 without dying) and not just the castle levels.

Again, this is normally only possible for the x-4 (castle) levels in both SMB2J (FDS) and the versions of SMB and SMB2J within SMAS.

~Ben