Super Mario Bros.

From SDA Knowledge Base

Jump to: navigation, search
SDAlogo runner.png This game has a run page on SDA!

DISCLAIMER: This page is referring to the NTSC NES/Famicom original release, not any of the remakes.
However many techniques still work in the same or a similiar way in the releases. Almost everything works exactly the same in the sequel SMB2j (aka Lost Levels).

General Game Mechanics

General Movement Rules

• You accelerate faster in the direction you are not facing. So if you need to bump into a wall, do a backwards jump into it.
• Maximum walking speed is 3/5 of maximum running speed.
• If you fall under the maximum walking speed during a jump, you cannot go above it again until you touch the ground again.
• If you touch the ground while holding right and letting go off B, you will be immediately reduced to maximum walking speed. If you need to shoot just as you land, briefly let go off right.
• Shooting while running on the ground will not slow you down in the slightest, if you repress B quickly enough. If you let go off B for too long, you will be reduced to maximum walking speed.
• Acceleration in water is the same on the ground as in the water, but the maximum walking speed underwater is 2/3 of the maximum swimming speed.
• If you touch underwater ground while holding right, you will be immediately reduced to maximum walking speed. If you need to only briefly touch the ground, don't hold right and start holding right just after you press A to leave the ground again. Of course longer stays on the ground will reduce you to below maximum walking speed, so hold right in these cases to stay at maximum walking speed.
• You can let go off right while swimming or jumping.
• When you need to reverse direction and get below the platform, you are standing on, (for example when getting to the warp pipes in 4-2), you can reverse some of your speed by bumping into a wall and holding the opposite direction. If the gap between the platform, you want to fall off and the wall is less than 3 blocks, it's faster to do so than to just reverse at the edge of the platform.


Every time you enter a new level, the game delays for a varying amount of time. The delay actually waits for a counter that loops every 21 frames (~0.35 seconds).

As an example, this means that if you complete a level in
• 1 frame, the level length will be N+21 frames
• 15 frames, the level length will be N+21 frames
• 20 frames, the level length will be N+21 frames
• 21 frames, the level length will be N+21 frames
• 22 frames, the level length will be N+42 frames
• 30 frames, the level length will be N+42 frames
• 42 frames, the level length will be N+42 frames
• 43 frames, the level length will be N+63 frames
And so on, where N is a constant minimum length of the black screen.

The only exception to this rule is the last level and certain events, during which the counter does not run, such as pauses, lag, transformations or entering pipes.

Flagpole jump

If you hit a flagpole at the highest possible position, Mario will enter the castle about 11 frames faster. In most levels this saves a frame rule.

Avoiding fireworks

The fireworks are set off when a level is completed with the last digit of the timer at 1, 3, or 6.
Getting them wastes time, so you should slow down instead of hitting a time that yields 3 or 6 fireworks.


There can only be 5 "enemies" at once on the screen. The following count towards this total: living enemies, dead enemies as long as their sprite is still on the screen, all moving platforms, climbing vines
When there are already 5 enemies on the screen, further enemies will simply not appear. This can be to your advantage, but also to your disadvantage.

• In 4-2: Hit the vine block to despawn a piranha plant.
• In 5-3: Stomp (not shoot) either the Koopa or the Goomba before the 2 moving platforms, otherwise one of them will despawn.

Hit Detection

The visual appearance of an enemy does not perfectly show which part of it is actually lethal.
It is possible to stand on the edge of a pipe even when a plant has risen out of it. There are a few pixels of room on both sides of the pipe that you can land on and immediately jump off again.

When a lot of hammers are on the screen, you can sometimes go through a hammer without getting hit, and sometimes a hammer can be invisible but still hit you.

You don't need to hit the top of an enemy to kill it. As long as you're moving downward as you hit the enemy, you'll kill it.

When entering a pipe with a piranha plant sticking out of it, jump into the middle and start holding down early, this will trigger the pipe transition and allow you to survive some encounters with the plant, which would normally kill you, if you did not hold down.

Known pseudorandom enemy patterns

The random number generation in this game is purely frame-based. If you reach an enemy at the same frame from reset, it will behave the same. Due to the 21 frame rule (which also applies to the title screen), it is possible to know what frame you are on.
This can be used in 8-3 to safely avoid the Hammer Bros.

Useful Glitches

Wrong Warp

The Wrong Warp glitch occurs when a pipe takes you somewhere other than its intended destination.
Theory: The game can have only one "entry point" (a pipe or vine) per screen. The reason lies in how the game is designed: There is just one global variable in the game RAM that determines where pipes or vines in the current screen lead. Once the screen scrolls far enough for the next target label to be loaded from the level data, all entry points in the current screen will lead to that destination instead.

• If Mario is far on the right side of the screen, the entry point variable will be out of date, so a new entry point will lead to the target of the previous one (Example: In 4-2 of SMB1, if Mario is far enough on the right side of the screen, he can use the pipe to go to the warp room since the destination info of the vine is still valid. Making the vine appear is not required for this glitch. The only thing needed is that the screen hasn't scrolled too far when the pipe is entered.)
• If the screen is ahead of Mario (Mario is on the left side of screen), the variable will have updated too soon, so you can access a future entry point's target from an earlier entry point. (Example: In 8-4 of SMB1, in the area before the water area, instead of going in the pipe after the lava pit, go a little past the previous pipe, and then turn around and go in that pipe, and it will take you to the water area instead of taking you back to the beginning of the level.)

Methods of getting Mario to the left side of the screen
• Just move back.
Methods of getting Mario to the right side of the screen
• If you enter a wall, the wall will automatically transport Mario towards the right edge of the screen without scrolling.
• If Mario bumps into the left edge of an obstacle (wall, pipe, coin block etc.) while jumping, the screen scrolling will momentarily stop even if Mario continues to move to the right. Since Mario accelerates faster in the direction he isn't facing, you should use this trick while jumping backwards (with Mario facing left).


A walljump is when you jump towards a wall and somehow Mario's foot catches the wall and allows to jump again, boosting from the wall.
Walljumps happen because the game does a floor check (a simple "is there a solid block below him?" test) even during a wall-ejection. Wall-ejection is SMB's mechanism for pushing Mario out of a wall he has partially entered.

To perform a walljump, you need two things:
• Some horizontal speed
• Mario's feet must hit the wall exactly at a block boundary (every 16 pixels)

• Reach the pipe to the third room of 8-4 more quickly by walljumping off it saving about 0.7 seconds.
• only as Mario: Skip waiting for the elevator in 1-2 of SMB2j to reach the warp zone by walljumping off the big vertical pipe instead.
• only as Luigi: Skip hitting the invisible block and climbing up them just before the warp zone in 1-2 of SMB2j by walljumping off the wall instead.

Full flagpole glitch

Enter the block below the flagpole and touch the flagpole from inside the block to skip lowering the flag and get ejected to the left side of the block, which then skips the routine of Mario walking to the castle and entering it.

Enemies can be used for this glitch. Stomp a Bullet Bill just as it reaches the flagpole at maximum speed.

• With a lucky Bullet Bill spawn this trick is possible in 8-2 saving up to 0.7 seconds.
• Do this trick at the end of -1 in the Minus World to save several seconds.

Going through walls as big Mario

When Mario is big, he can simply perform a duck-jump into the corner and start walking. This is because his head will be well inside the ceiling, enabling the ejection to the right. (If he ducks again before he is fully inside the wall, he'll be ejected to the left instead.)

Applications in SMB1:
• In 1-2 this can be done to enter the wall at the end of the level and walk through it to get to the Minus World.
• In 4-4 this can be used to more quickly bypass the part of the maze, where you need to turn around normally saving 0.35 seconds.
• In -3 of the Minus World this can be done to skip having to turn around or break the ceiling.

Applications in SMB2j:

Jump in mid-air

If you grab a mushroom in mid-air, you can jump again. To do this let go of A before you touch the mushroom and then hold A until the transformation is over.

Ducking while swimming

Duck on the ground and start swimming, Mario will still look as usual, but his hitbox is as though he was small and he will be unable to shoot fireballs. The optimal way to start this is:
• accelerate to maximum speed
• let go off right and hold down (this will not slow you down)
• briefly touch the ground
• press A
• hold right until you are back to maximum speed
Repeat this each time you have to touch the ground.
To stop ducking and enable fireballs again simply let go off all directional buttons and touch the ground.

Ducking while falling

Just hold down before sliding off a platform and Mario will have the small hitbox despite looking big.

The Minus World

This is a well-known glitch which occurs when Mario glitches behind the wall in 1-2 in SMB1 and enters the first pipe.
The minus world is basically just a random location of the game ROM, it is not a real world. It wasn't designed that way ― it's just an oversight of the programmers that you can get into the pipe before the correct warp labels are assigned.

In the NES version of Super Mario Bros., the "minus world" was a looping, uncompleteable copy of world 2-2. In the FDS version, however, it is an underwater 1-3, 7-3, and an underground 4-4, making it completable.
Completing the game this way would give the "in another castle" message, but would return to the title screen as if 8-4 had been beaten; hard mode and the level selection become accessible, as well.

Off-screen wall climbing

This trick is trivial to perform. When there is a hole on the left side of the screen, you can cram Mario in between the screen edge and the wall and climb up. Mario will be unable to fall down. It can be used to reach the ceiling of the dungeon in places where there normally is no way to do that.

By jumping repeatedly and steering to the left, the trick can also be used for entering the wall.

Application: In 5-2 of SMB2j enter the pipe before the vine using this glitch and hold down. Mario will enter the pipe in reverse direction and appear in the warp zone to world 8.

Advanced Techniques

Backwards jump acceleration

When you need to accelerate from zero speed, you can do it faster if you jump a small jump backwards and steer to the opposite direction Mario is facing. This can be used to start a level faster and to accelerate faster after exiting a pipe.

• In the first room of 8-4 this can be used to save a tiny amount of time, which is only relevant for finishing the level with an ingame time of 316.
• In the third room of 8-4 this can be used to save about 0.03 seconds.
• In the fourth room of 8-4 in SMB2j this can be used to save about 0.1 seconds.

Half flagpole glitch

Complete the level without lowering the flag by glitching into the base block of the flagpole and touching the flapole from inside. Doing so is faster than lowering the flag.
Extremely precise trick, which hasn't been done in realtime yet.

Going through walls as small Mario

Jump into a solid object below a floor

For the purpose of activating this glitch, any solid object (including pipes) counts as a floor. It is really difficult to perform (much harder than the walljump), but here are the instructions.

1. You need the right speed. If the object is only 2 blocks tall, such as the pipe in the end of 1-2, you can not jump into it while running. Deaccelerate before jumping. If you have too high speed, you'll just find yourself standing on top of the object instead of inside it.
2. You need the right position. The right position is: as near as possible. You are too near, if when you jump toward the object, you'll bump into it without getting ejected pixel by pixel.
3. Immediately before the wall starts ejecting Mario, start steering away from it. This causes the wall to pull you in instead of push you out.
4. Immediately after your vertical movement stops, start moving to the direction you want to go. If the wall is ejecting you now, you failed some of the previous steps.

The easiest way to perform this trick is into 2-block tall obstacles at walking speed.
1. Do a minimal height jump (hold A for 1 frame) at the exactly right distance.
◦ You're too close if you bump into the wall without a chance to counter the ejection.
◦ You held A for more than 1 frame (or your jumping platform was less than 2 blocks from the floor) if you land on top of the floor.
2. As the wall-eject is about to start, hold the opposite direction from the obstacle.
3. Once Mario lands in the wall, start walking normally.
◦ If the wall just ejects Mario, you were too far from the wall when you jumped.

Application: In 1-2 this can be done to enter the top of the pipe at the end of the level and walk through it to get to the Minus World as fast as possible.

Jump into a wall just below a solid ceiling and walk through it

To perform the trick, do a walljump at a position right below the ceiling. When you get foothold, jump immediately. When you land, jump again. When you land again, jump again. Each jump embeds you deeper into the wall. Usually three or four jumps are enough for passing through.

During each of the jumps, you need to steer in the direction opposite to where you're traveling. Otherwise Mario gets ejected.

Jump into a solid wall and walk through it

It is possible to perform the wall-entry trick even without a ceiling. However, it requires extremely precise positioning and speed. This is the hardest of all of the tricks.

Instructions: You will need to have the right X-subpixel position for this to work. A subpixel is a position component which is not rendered onscreen. In this game a pixel is made up of 16 subpixels. Try jumping into a wall. You are either pushed out immediately without having entered the wall at all, or otherwise you might have been able to partially enter the wall. The latter is what you want, but there is no way to effectively influence the subpixel value besides holding left for a few frames while running and hoping for the best outcome.

1. Jump towards a wall from a position as close to it as possible (but not touching it). 2. Before the wall starts ejecting you, immediately start steering away from it. This causes the wall to pull you in instead of pushing you out.
3. As soon as you land inside the wall, repeatedly jump while moving away from the wall.
4. After you have entered the wall deep enough, start moving in the direction you want to go as soon as you land. If the wall is ejecting you now, you failed the previous steps.

Application: In 4-2 this can be done on the wall directly after the powerup at the start of the stage. The subpixel value you get by just holding right and B happens to work. The ejection from the wall can be used as an alternative way to get Mario to the right side of the screen to perform the Wrong Warp. However this is still a very hard trick and must also be done in a very optimized manner to match the time from the optimal backwards jumps method instead, so this is likely useless.


SDA discussion thread
TAS resource page
SMB1 Leaderboard
SMB2j Leaderboard

Personal tools