Live data from Hacker News

Super Mario Bros warp zones were intended to work slightly differently [video]

youtube.com

81–90 of 108 posts

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#81
post #68
post #48

Earlier quoted context omitted.

The minus world is technically an out-of-bounds level. The game treats it at world 36-1 (since the digits are tile numbers 0-9, followed by the alphabet, then a space tile at $24 or 36). Since doing so reads a whole host of other data out-of-bounds as well, it ends up pointing at the level layout for 2-2, but without the data that properly sets the pipe destination, resulting in an infinitely-looping level. Other ver…

It’s pretty interesting how the game can continue to function in a level that isn’t supposed to exist. Metroid has similar areas I believe. It’s hard to imagine a modern game or any modern software handling a scenario like that without crashing.

It depends on the game, its level format, and how much error-checking it has. Games written in assembly from the 80's typically did not waste bytes & cycles on assertions/error-checks -- if you're at the point where you're decoding invalid level data, something's already gone so screwed up that it doesn't really matter what happen next. Add to that the fact that older consoles had no memory protection, so there's no such thing as a segmentation fault. You can even read from a memory address that's not mapped to anything, and you won't get an error; you'll get some value back based on analog effects of the memory bus.

Pretty much the only ways an NES game can "crash" is by calling an invalid function pointer, corrupting the stack, or getting stuck in an infinite loop somewhere. Otherwise, the game will more-or-less stumble on no matter what you throw at it -- accessing an array out of bounds will usually give you a nonsensical value taken from whatever comes after the array on the cartridge, dereferencing an invalid pointer will just give you some arbitrary data from RAM or ROM, etc. Therefore, the effects of going to an out-of-bounds level can vary from game to game, depending on what sort of format the game uses to store level data. Off the top of my head:

- Super Mario Bros. gives you slightly broken versions of regular levels, such as the various Minus Worlds. I haven't looked into the code, but presumably this is because a "level" is really just a header that contains indexes into tables of rooms & enemy lists & whatnot. So, going into an invalid level gives you a weird combination of existing rooms and enemies.

- Super Mario Bros. 3's level format has a lot of function pointers, so it usually crashes if you select an invalid level from the map screen. But the levels get decompressed into a big 2D array of tiles in RAM, so if you go out-of-bounds within a level you end up in a world of garbled tiles. Although some of those tiles will call invalid function pointers & crash the game when you interact with them; famously, this can be turned into an arbitrary code execution exploit. Here's a video of a speedrunner exploiting this in real time, manipulating enemies so that their positions in RAM form a short program that triggers the end cutscene: https://youtu.be/mUeozQtSmrg?t=202

- Mega Man 2 stores level data as a grid of tiles on the cartridge, but all the levels are stored consecutively, so if you go out-of-bounds you usually end up in a garbled version of another level.

- The famous MissingNo. glitch in Pokemon Red and Blue is caused by use of an uninitialized variable that causes a decompression routine to run on bad input, which then triggers a buffer overflow that stomps on part of your save file: https://youtu.be/ZI50XUeN6QE?t=880

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#82
post #76
post #51

Earlier quoted context omitted.

It feels to me that the voice is computer generated, but I can't be sure - if it is, text to speech has come a long, long way.

There's some pretty heavy emphasis on some words, but not when the same word is used elsewhere. Very consistent tone and timing otherwise though, and it feels like the voice was overly compressed which gives a pretty robotic vibe. I watched a bit of some earlier videos which sound less robotic, but otherwise a very similar voice. I'd guess it's just more that the presenter has been recording a lot of videos and has g…

It may also be that it's moderately heavily edited; what stood out to me was the "pauses" before "two" and other numbers sometimes, which is something that you hear in computer generated audio.

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#83
post #68

Earlier quoted context omitted.

It’s pretty interesting how the game can continue to function in a level that isn’t supposed to exist. Metroid has similar areas I believe. It’s hard to imagine a modern game or any modern software handling a scenario like that without crashing.

It depends on the game, its level format, and how much error-checking it has. Games written in assembly from the 80's typically did not waste bytes & cycles on assertions/error-checks -- if you're at the point where you're decoding invalid level data, something's already gone so screwed up that it doesn't really matter what happen next. Add to that the fact that older consoles had no memory protection, so there's no…

Another fun example is Super Mario Land 2, where going out of bounds can lead to a “level” where blocks on screen directly correspond to general work RAM values, and breaking the block corresponding to the “game end” flag rolls the credits. Feels very Tron.

https://www.youtube.com/watch?v=24XHkmOJebA

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#84
post #75

Earlier quoted context omitted.

I think it's a reflection of how incredibly simplistic these older systems and games really are. Modern games bear no resemblance to them as far as level design and asset storage go.

Such bugs are definitely still possible if you’re writing for modern systems in a similar style (large blocks of contiguous memory interpreted only as needed). Just yesterday I was storing my color planes in three separate adjacent buffers for reasons, and if you looped the player off the bottom of the screen it came back up in a different color on the top. Now I need to figure out what to do with that…

That's quite different from an actual, playable level appearing out of a bug.

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#85
post #20

Earlier quoted context omitted.

No. My philosophy has always been, if you want to play less of the game, why are you even playing it to begin with? :) So I just don't use them.

Warp zones allow players to see more of the game. If you were a kid playing SMB, and was only allowed 30 minutes a day to play a game, you would probably never get to experience any of the later levels without the warp feature. Not everyone games the same way. For many people, cheats add to the experience, they don't detract from it.

Yeah this. SMB was before save games :-)

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#86
post #67

Earlier quoted context omitted.

Surely if that was the only goal, it would be easier to have a debug menu come up when you enter a certain sequence of inputs? Among other things, getting to the warp zone still requires playing 1-1 and 1-2, and you can’t warp just anywhere. It could even only work for the P2 controller, or use inputs not normally possible like left + right simultaneously.

> use inputs not normally possible like left + right simultaneously. Are there NES games (or mods) that have different (useful) behavior when an emulator permits such inputs?

Not NES but I seem to recall playing Wonder Boy on a master system that had a missing D-pad and pressing up and down simultaneously made Wonder Boy drop through the earth and fall from the sky.

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#88
post #67

Earlier quoted context omitted.

Surely if that was the only goal, it would be easier to have a debug menu come up when you enter a certain sequence of inputs? Among other things, getting to the warp zone still requires playing 1-1 and 1-2, and you can’t warp just anywhere. It could even only work for the P2 controller, or use inputs not normally possible like left + right simultaneously.

> use inputs not normally possible like left + right simultaneously. Are there NES games (or mods) that have different (useful) behavior when an emulator permits such inputs?

You just compile a dev version of the game during development.

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#89

Does anyone out there remember / have more information on an effort to actually create the warp pipes in real life? I have a very distinct memory of reading about this in Nintendo Power magazine in the late 90s / early 00s but have never been able to find anything concrete on the internet about it. I'm curious if I'm having a Mandela Effect type thing going on.

You're not talking about Hyperloop are you? They sure seem like human sized pneumatic tubes to me, and are highly reminiscent of the Mario pipes.

Re: Super Mario Bros warp zones were intended to work slightly differently [video]

#90
post #67

Earlier quoted context omitted.

Surely if that was the only goal, it would be easier to have a debug menu come up when you enter a certain sequence of inputs? Among other things, getting to the warp zone still requires playing 1-1 and 1-2, and you can’t warp just anywhere. It could even only work for the P2 controller, or use inputs not normally possible like left + right simultaneously.

> use inputs not normally possible like left + right simultaneously. Are there NES games (or mods) that have different (useful) behavior when an emulator permits such inputs?

It's quite common for games to have bugs or unintentional behavior when pressing left+right simultaneously. Super Mario Bros. is one example (as another commenter points out); another example is Super Metroid (for the SNES), which allows you to repeatedly wall jump in-place if you hold left+right: https://wiki.supermetroid.run/L+R_Walljumping

This sparked a mild controversy recently in the speedrunning community: L+R walljumping makes it possible to climb walls underwater without Gravity Suit or Hi-Jump Boots. Through the use of very esoteric and difficult speedrun tech, this enabled a runner to complete the game while collecting only 13% of available items, which would beat the previous low% record of 14% if left+right runs were allowed on the leaderboard: https://wiki.supermetroid.run/13%25_xCharge

Post reply on HN