jump to navigation

Deconstructing the Minus World Thursday 9/9/10

Posted by smcgamer in Archive, Technology.
Tags: , , ,

The Minus World of Super Mario Bros. is one of the most famous video game glitches.  But why does it happen?

Getting Through the Wall

Well, first, how do you get through the wall?  The game normally forces players out of solid objects if they get stuck inside them.  Usually you’re pushed opposite the direction you are facing.

It has to do with the sprites.  The NES could only support sprites that were 8×8 pixels or 8×16 pixels.  Super Mario is 16×32 pixels in size, so that’s 8 sprites in total.  When he crouches, Super Mario is only 16×16 pixels, or 4 sprites, the size of small Mario.  The brick blocks are also 16×16 pixels.

If you jump correctly, the bottom-most row of pixels of the block will be touching the top-most row of pixels of crouching Mario.  One pixel too low and you will have to try again.  One too high and you’ll break the block.

According to the Glitches section of Mario Mayhem, the game’s collision detection system constantly checks your position on the screen.  It takes your current location and checks if the height (in pixels) is divisible by 16.  If you are touching something, you just might be able to jump again.  This is wall-jumping and it’s incredibly difficult to pull off.

The poor collision detection can’t tell the difference between a ceiling and a floor, so, when you touch the ceiling, the game thinks you are standing on a floor, and you can stand back up.  Doing so puts you halfway through the ceiling, and you are forced into it.  Then you can jump in the pipe and go.

How the Warp Zone Works

According to this Warp Zone guide by Megabyte, you need to place a tile #69 in special row 2.  (There are three special rows under the main playing area for pipe pointers and things).  The Warp Zone seems to be triggered by a “Scroll Stop” tile, used in the bonus room to block off each section from each other.

Trying all of the pipes before they activate, you’ll find that the outer two lead to World -1, and the middle to World 5.  The World 5 warp is found in  4-2, but why is it repeated here?

The 4-2 Warp Zone seems to be the “base” Warp Zone for the game, for unknown reasons.

World 36

You have probably heard that World -1 is really World 36-1, this is true.  The reason is behind tiles.

All the tiles in the game are loaded at startup into the Picture Processing Unit, or PPU.  The PPU can store 255 tiles in memory at once, and they are addressed from 00-FF (hexadecimal).  The developers intentionally placed the number tiles 0-9 in slots 00-09.  This allows the Warp Zones to lead to their location via the tile number situated above the pipe.

A blank tile is needed in all sprite-based video games, to allow for spacing between other sprites.  For example, the spaces in Toad’s message in each castle are the blank tile.  Empty spaces between the ground and the clouds are also the blank tile.  This tile is numbered 36 (24 hex).

In World 4-2, there is only one pipe, leading to World 5, so tile #5 is used.  Every Warp Zone has three destinations, but only one was used here.  The other two numbers are the blank space, tile #36.  (Pipes aren’t included in a Warp Zone, they have to be added manually.)

So the pipes in 1-2 take you to World 36.

World 36? What?

There are more than eight worlds in the game?

The game doesn’t stop at World 8.  The simplistic level renderer can read practically any data and format it as a (somewhat) valid level.  The world/area counters in memory are eight bits wide, and can contain 256 values.

The game ends in World 8 because of the nature of the level exits.  If you get the flagpole, the area counter is incremented.  Ending a castle with a Toad increments the world counter.  Ending a castle with the princess wins the game, and offers you the hard mode.

With a level editor, placing a flagpole in a castle is easy.  Placing a flagpole in 1-4 will take you to 1-5, which is really 2-1.  Placing a flagpole in 2-4 will take you to 2-5, which is 3-1, and so on.  Placing a flagpole in 8-4 will take you to 8-5, which is an underwater castle.

There are 256 valid worlds, and, in theory, each world can have 256 areas, for a total of 65,536 playable levels.  This theory doesn’t work well, because:

  • Most of these odd worlds can’t be finished (or they loop)
  • There are only 40,960 bytes in the game’s data.

A romhack exists which takes use of the world-choosing mechanism in hard mode and expands the range to all worlds.  (Warning: downloading ROMs of video games is illegal.)  However, many people have compiled hundreds of videos of these strange worlds, the most prevalent being Marionaire.  She has an immense wealth of knowledge on the Super Mario map renderer, and this data can be found here.

Why does it loop?

Is the pipe glitched?

No, actually, the pipe is working properly.  All working pipes have a pointer that tells them where to lead.  This pointer is hidden in the special rows underneath the playing field.  If it can’t find a valid pointer, the game loops back to the starting location.  Otherwise it might just crash.

To the best of my knowledge, this pipe cannot be fixed to lead to the correct area.

Why does it look like World 2-2 (or 7-2)?

I don’t know for sure, but since the basic layout of the levels (blocks, pipes, etc.) are repeated in the main levels (but with different enemy data), this could be a cause.

Is it a bonus room?

No, because it can’t be left.

How can it be fixed?

To disable the glitch, one must shorten the ceiling length over the exit pipe of 1-2 by one block.  It must not connect to the wall on the right.  The “get stuck in the ceiling” glitch will work, but the player will just fall out on the other side.  Of course, this method could be used to make getting to the Minus World easier.

A more advanced fix would be to fundamentally change the nature of warp pipes and Warp Zones, and that would be a lot harder.

Does the second Warp Zone in 4-2 exhibit this glitch?

I don’t know.  There’s no ceiling to jump into, so the only way to find out would be to delete the ceiling over the pipes.

Edit: After seeing this link linked from Mario Mayhem, I found out that the end pipe may not be pointer-less, but is functioning like the pipes in 8-4.  The author discovered that if you take a certain path and get all the coins, the pipe will no longer be solid and you can swim through it.

Beyond the first end pipe is another, functioning end pipe leading you to World -2, which, according the author, is an underwater version of World 1-2.  Worlds -3 and -4 seem to be World 1-3 and 1-4.

The interesting thing is that each looping castle (4-4, 7-4 and 8-4) have specific code to make them work the way that they do.  The fact that this code can be applied to another level is amazing.


1. Deconstructing a Full Prescribing Information: Part I of Many | Smc_Gamer's Blog - Friday 1/7/11

[…] Don’t want to read this?  Check out my other Deconstructing the… article: Deconstructing the Minus World! […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: