I'm old enough to remember Minus World being a rumor passed from kid to kid, like Lavender Town or specific cheat codes for SNES Mortal Kombat. Insane how it turned out to not be false.
Great content as always. As a programmer, it is really interesting how people worked with the very little hardware they had at this time. Nobody would make such a crazy level loading routine today, since its hard to find bugs.
Question about Lost Levels: I know that some Hammer Bros in the game are coded to constantly chase you, a behavior that is otherwise triggered by waiting around on a screen they're on for too long. How is this handled?
I think it's simply that Hammer Bros. will always move towards you immediately if you're on world 7 or later. (Someone can correct me if I'm wrong, though.)
When the world number is between 1-1 to 4-3 then the Hammer Bro will wait 128 frame rules (one frame rule is 21 frames) which is about 45 seconds. When the world number is between 4-4 to 6-4 or A-1 to D-4 then the Hammer Bros will wait 80 frame rules which is about 28 seconds. In Worlds 7 to 9 they won't wait at all. This works the same way in SMB1, except Hammer Bros always need to wait at least 80 frame rules as there is no special case for Worlds 7 to 9.
@@sugar_700 Oh, I didn't realize there were a couple different durations for the waiting periods for the Hammer Bros. that don't charge after you immediately. Interesting.
@@SomeGuy712x They even used the same logic for the Chain Chomps in Super Mario Bros. 3, except you have to wait 160 frames before they jump out to get you.
9-year-old me: "Why does the level look funny when you take this pipe?" Today me: "Well ... " * plays Displaced and GME videos * " ... so you see, it's just a matter of default values, pointers to wrong data arrays, and dummy objects that have some effect on stage transitions." 9-year-old me: " .... Wanna play Duck Hunt?"
Since the height flag for the looping objects in World 8-4 is set to F0, it's clear what you need to do in order to bypass the level loop: hack Captain Falcon into the game and Falcon Punch your way past it.
22:43 - Now this raises an interesting question; what if this checkpoint for 8-4 is triggered? Say you moved that checkpoint to be accessible to the player. What happens then?
All of the rooms in 8-4 (aside from the water room) are located in the same level, the only thing separating them being those loop objects. If you could pass the checkpoints, you would move to the next "room" without needing to go in the pipes. In fact, if you play a glitch level version of 8-4, none of the looping objects work at all (since you aren't in world 8), so you can get all the way to Bowser without going in a single pipe. (This also happens for 4-4 and 7-4.)
Oh, one thing I don't think you mentioned about the minus world (36-1) in the original game is that the midpoint for that level is actually set inside the first pit, so if you die after that point, you'll immediately fall into that pit and die again on your next life unless you're rapidly tapping the A button to swim out immediately. So, what is it that causes the midpoint of the minus world to be on a different screen from the normal 2-2/7-2?
There is another comment that explains it in more detail, but essentially there is another table in ROM that assigns 4 bits to each level: the 4-bit screen number to act as the midway point (a value of 0 basically means no checkpoint, like in castles). This table is indexed by the current world number and level, so a glitch world would end up with junk midway point value.
Much like the pipe exit logic, since this is well past World 7, the halfway page bits do not apply so if you die at all here, you're back at the beginning of the stage.
@@ClassicTVMan1981X Actually, in this case, you do indeed respawn in the first pit if you die past it in world -1 (36-1), and have to be rapidly mashing the A button as soon as you appear in order to avoid immediately dying again.
talented, brilliant, incredible, amazing, show stopping, spectacular, never the same, totally unique, completely not ever been done before, unafraid to reference or not reference
Seeing how different level loading is handled between SMB1 and Lost Levels makes me wonder how different it is in SMB special, and if things are handled differently between the PC-88 and Sharp X1 versions
Timestamps for each section: 3:24 - Why does the game crash sometimes? 5:25 - How can there be 5 tile objects in a single column? 9:56 - How does the Minus World work? 11:51 - What about the Famicom Disk System release? 14:06 - What about Lost Levels? 19:47 - What about Super Mario All-Stars? 20:48 - How does the 4-2 wrong warp work? 22:12 - How do looping levels work? 24:20 - Outro
6:23 I have made a hack of SMB1 PAL and in 4-1 there is a mushroom platform stem that overwrites a tile. (Sadly I managed to miss this before releasing it). I wonder why that happened. Maybe the PAL version is different? Or is it because it's near the bottom of the screen. Who knows...
he said "never overwrite _certain_ tiles", so i assume the tile you tried to place wasn't in that place. I'm guessing some of the tiles would be brick, question and leaf blocks (special platform top)
@@IrisGalaxis huh... maybe the edges are not in the tile list. I'm sure after some digging you may be able to find the table with the non-removable tiles
I have a future request for you regarding Super Mario Bros. 1: the scale lifts in World 4-3, why they go wrong and what to do to fix them. Thank you and I hope you had a happy New Year's weekend!
Really love your videos, can't describe my excitement every time you upload a new one. So very happy this "footnote" became another video - I'm not embarrassed to say i savour your vids with several rewatches so this new video was such a lovely surprise! Thank you!
i absolutely love these kinds of videos it not only increases my respect for the almighty makers of the OG mario and other old games it also sooths my "Listening to something while doing something else" need
14:00 I think it's really interesting that the game handles "Is it the princess in this post-Bowser room?" and "Is this the final level of the game?" differently - this Minus World acts like it's a normal Toad (though the sprite isn't there) but still kicks you back to the title screen aterwards. I guess the part that determines if it should use the princess instead of Toad is "if world number is eight exactly" while if it should clear the game is "if world number is greater than seven". Interesting that those are different checks in the game code.
After seeing how these levels were packed/compressed I'm wonder what methods level designers used to make them. This is a pretty complicated process with some arbitrary restrictions; do we think there was any tooling that made the map design process easier at this point?
I could imagine that given computer coding at the time, their “tooling” for level design might have been paper forms where a designer would draw out one screen at a time, and another person in development would work out the hex code (probably recorded on the second half of the form) based on factors, positions, and a cheat sheet of basically all the same info about sprites and object that this creator covered across this series. They would enter in the codes via hex and test run the game, make tweaks, rinse and repeat until it’s perfect.
@@cll1out But I mean the hard part is _the designer_ having to keep in mind all the engine limitations and rules, otherwise the iterations take forever. So there must have been a tool (digital or not) that tells you whether the tiles you're drawing/inventing are possible to implement with the limited resources.
Great explanations! It's fascinating to see how this game works in detail! Something else I've been wondering about is lag frames. The game's rendering somehow appears to get messed up during those frames. Can you explain why that happens? I've also seen some interesting things about sprites failing to spawn. I know Kosmic made a video about flag despawning and it can also lead to springboards malfunctioning. If you're planning on making another SMB video, I'd love to hear more details about that as well.
Are you interested in ever working on cool glitches and mechanics in newer old games? One I’ve always found interesting is the Dorrie glitch in world 4 in NSMB
Video suggestion: YEAAAA explained. I've investigated it a bit myself, and it seems like it's as follows: Every frame, it resets a location in a VRAM buffer to 0. YEAAAA makes it reset a different location instead. Not resetting the location leads to some effects (such as enemies starting to look like bowsers), and resetting a different location results in other effects. Also, it sometimes needs to reset a different location. Not resetting the needed value results in these effects, but resetting both locations (which takes less code) doesn't seem to result in much: all I've noticed is question mark and empty (used) blocks flashing underground dark cyan But I can see that you try to follow an association chain with these videos. I'd like to see how you'll continue it
I have a question We know there are 256 world, but how many level? Is there 1024 level (256×4=1024)? Or is there 65.536 (256×256=65.536)? And how does SMB1 handle that many level?
An interesting fact involving area pointers and glitch levels. If the base level is force loaded in the world it originates from (for example, Underwater 1-1 in World 1), then area pointers from the base level will exist. In most cases they don't do anything. However with Underwater 1-2 loaded in World 1 specifically, the area pointers do lead to a new area (if the address is no longer frozen as the area ID for Underwater 1-2, otherwise the game just crashes). I have not tested every level, only just a few.
I was wondering why warps in World 9 of SMBLL work when the world number used by level transition object is 3 bits, and after checking the disassembly I noticed the regular check is skipped entirely for World 9 (this essentially means that if you are in glitch level within World 9 then all warp objects will work).
Looking forward to the explanation on everything going wrong in Pokemon Scarlet/Violet Tera Raid battles in 30 years. Like, random thing, it seems there's something like a damage queue where occasionally your very first damage actually ends up stuck at the end, only applied at the end of battle. Also stuff like the Tera Pokemon doing damage with 0HP, killing player Pokemon, taking no further damage, yet thankfully still being able to be caught despite the time counter also falling to zero. Several things scream... race condition, but with queues, rather than multiprocessing. And, yes... in single-player. (I still love the game, but what the hell guys?)
Yeah, definitely sounds like a serious race condition. Work with async/await in JS enough and you figure out pretty quickly you don't actually need separate threads for those to happen.
Another request: the area change timer data. As originally coded, right after the offset for the initial value is loaded into Y (which corresponds to value $A0), a flag for the left page location is loaded into A. This was supposed to apply only to the pipe intro scene (Worlds 1-2, 2-2, 4-2 and 7-2), but due to the RAM address for the left page location, this check applies to the leftmost page for every area, which is why when you leave the first underground coin room (in Worlds 1-1, 2-1 and 7-1) there is a longer time delay before returning to the level proper. In Super Mario All-Stars, it was changed to the second value in the area change timer data table ($34), which fixes the time delay for leaving the first underground coin room, but it also shortens the time delay for the transition between the pipe intro scene and the level proper (Worlds 1-2, 2-2, 4-2 and 7-2).
@@RGMechExhhh ok, I was wondering if Nintendo fixed it by changing the values of the left and right pipes in the World 4 warp zone that takes you to world 5, but I just realised that they were changed to be 1-1 lmao.
I wonder if through SMAS + SMW an Arbitrary Code Execution in Super Mario World could allow us to enter glitched worlds in SMB1 and potentially other glitched worlds in SMB2, 2J, SMB3 and SMW.
Displaced Gamers has a followup video that talks about the changes in the code between versions (Talkin' Code Episode 5). They fixed it in a really jank way.
A bit late and slightly off-topic but one thing what's IMO really interesting is that the SMAS remake has got a literal background detail with dynamic backgrounds for SMB1, SMBTLL and even SMB2. SMB3 is the only game with a static background for one reason or another (I put my money on space constraints since SMB3 uses a lot more memory for its levels compared to the other three games and not much space is left for the backgrounds).
@@RGMechEx Right, that pointer for World 3-2 was unnecessary; I suppose during the development of the game they were considering making 3-2 an underwater level as well, and forgot to remove it when they decided instead to make 7-2 the second underwater level. Lost Levels' 3-2 was an underwater stage, though.
does this mean that the speedrun for SMB1 could be faster than ~5m on FDS since you could do 1-1, 1-2, 36-1, 36-2, 36-3, and 36-4? instead of the usual route of 1-1, 1-2, 4-1, 4-2, 8-1, 8-2, 8-3, 8-4?
Vs. SMB and All Night Nippon are possible, Special is a totally different game. Instead, I propose exploring the European NES version, it has its own set of glitch levels. And there's a bunch of fanmade and bootleg ports.
when i was playing special as a kid, i got to a minus world level after a underground level (i think it was after 1-2). it was underwater, and at the end of the level there was a pipe...with no entrance! so no way to finish the level.
Hey, I have a question. I was looking into Donkey Kong’s and Mario Bros’s sprites and saw how they both had more than 3 colors each. While I do know that they aren’t NES hardware, I did think they would be similar since they came before the NES released. How long are the palette sizes for these old arcade games Nintendo made, and what limitations are there?
Question: on your website with all the maps of levels, every level with both invalid tile and sprite pointers' maps are just a ? block and a koopa. why?
Since I didn't emulate any RAM when creating the maps, the level data and sprite data is just interpreted as a bunch of zeros. Those are the objects and sprites that correspond to 00 00.
That FDS minus world segment was very interesting. You’re telling me that the any% world record for FDS super Mario bros could be drastically lower than the original NES one? 👀
all of ur videos have been awesome! I've been taught many things and as a brand new hobbysist developer it's helped me learn a thing or two about making games as a beginner with all these new concepts :D
Wonderful video, as writing my nrom engine pushing the nes to its limit, this gives me a lot of ideas, I decided to draw my levels in quarter pieces, and use chr data to generate everything else like tile attributes, sprite objects and collisions to save space, but the way super mario bros does now i wondering if I should do the same thing, ill try this in the next engine. I do love how the objects disappear when you don't take the right path, yes coding wise it may be ugly, but its great mysterious signal that shows the player they failed and something is wrong!
Downside is that it's harder to support scrolling backward. You might like the method that (I think) Super Mario Land uses: there are up to 256 premade tile-columns, and the level data is a list of column IDs.
@@renakunisaki your right! I'll stick with my peices, I had 2 way scrolling in mind the whole time. I have pre made columns that cover 25% of the screen.
I've wanted to know for a long time but never had the resources to check for myself. The _only_ differences between the FDS and Famicom versions of SMB1 are in absolute addresses, right? It seems like there might at least be some differences during initialization, but maybe those don't matter after you start the game? And there are no differences whatsoever between the Famicom and NES NTSC versions? Like, not even one byte out of place? I assume there would be no reason to not keep reusing a single ROM. And also, there is no known way to exploit the differences in the absolute addresses between versions except by warping to glitched levels? If there were, that would presumably have at least the possibility of relevance to TASing.
I didn't have time to check out all the differences between the two releases, but I think there may be at least some minor adjustments (which may also just do with interfacing with the FDS). The start of the memory mapped region for cartridge ROM on the Famicom starts at $8000, and the start of the memory mapped region for program RAM on the FDS starts at $6000, a difference of $2000. If you look at the pointers for the level data, you'll notice that they differ by $1FF8 instead, just 8 bytes off. This leads me to believe that there is something actually different between the two releases (at least in the ROM before the level data) that accounts for this difference, but again, I haven't looked into it. And you are correct that the Japanese Famicom release and the North American NES release of Super Mario Bros. are identical.
@@RGMechEx That's interesting. I noticed something similar when I did a diff myself. I find it odd that I can't find any discussions of version differences here. Maybe if I investigate a little, I'll realize that they just don't matter at all, but there is definitely _some_ ROM change.
To put it plainly, there's just nothing to tell the game to stop scrolling. You were never intended to ever get over the flagpole so it wasn't ever an issue. In Lost Levels, some of the levels do have scroll stop objects after the flagpole, since there are green springs (and well, Luigi in general) that let you jump much higher and can easily get over the flag. Also like I mentioned, there were often sublevels located after the flagpole and they wanted to make sure you could never get to those from the main level like that.
So when it comes to levels that loop, say 4-3 for example, would it be possible to make a jump right before the checkpoint loads and thus get the level to loop even though you took the correct path?
As funky as all of this is, it's kind of neat how easy it is to abuse all of it to get unreasonably fast times; new games and new technology are neat and all, but they'll never be as fun to break as older games
Regarding FDS version of 36-1, when you defeat Bowser with Fire Mario, the game seems to crash near the flagpole. Does that happen on real hardware? If so, what causes that crash to happen in the first place?
There is a Fireworks sprite in the glitch level's sprite data near the end of the level. Normally this sprite only spawns during the ending fanfare, so it has undefined behavior when it is included in the level data. It seems having Bowser in the level manipulates the enemies in such a way that all of the sprite slots are full at the end, so the Fireworks are skipped over and the game doesn't crash. Otherwise, they do load in and the game will likely crash (though not always!). You can also cause this to happen by dying half way through the level and starting at the midway point--the sprites don't line up properly and the Fireworks still spawn in.
That's just for the invisible 1-Up Mushrooms I think, and it's actually tied to coin collection in the third level of the previous world. There's a video from kosmic about them ("The Most Hidden Powerup in Super Mario Bros."). I guess the specific code for that block has the coin check flag. And loads it if the flag is set or not.
You mentioned in the FDS version of the Lost Levels that the game will reset if a level greater than World 9 is detected. How are the extra worlds loaded?
...So, how does World 2-Castle in New Super Mario Bros. Wii (a castle that clearly references World 4-4 and 7-4 of SMB1, and whose first Star Coin requires you to intentionally blow the sequence to obtain if you aren't in Propeller form) work, then? D:
I wonder why, when the game crashes while Mario is jumping, the sound of his jump begins to sound like a bomb dropping. Normally the sound of Mario's jump increases in pitch, but during a crash, the pitch of the sound effect goes down instead.
The pitch actually goes down very slightly before it rises for most of the sound effect. If the game crashes during that specific moment, it will continue to go down.
It took time to develop the design patterns we now take for granted. Previous consoles had their mode selection switches located directly on the console itself. Nintendo simply moved that functionality to the controller. If games didn't need mode selectors and start buttons, Nintendo wouldn't have added them to the controller.
@@MuffledSword but they used the d pad to move Mario,so why not also to move the cursor? I mean if I move with the D-pad in one context why can’t I do so in other contexts?
Because that is a completely different way of doing things, and cycling through options with the press of a button was familiar. You are familiar with D-pad menu navigation because it has been the standard for decades. In 1985 it was not.
The short version is basically that the PS1 has no built in floating point calculator so each vertex of every polygon will snap to the nearest available integer instead (basically the ps1 shaves off all the decimal points during the rendering process). I'd like to see how RGME represents it though!
2:10 I love that "you have to hope you run into a byte" was timed with Mario walking into the block
2:15
@@AlexA-fp9xj I'm giving some lead-in time
@@JouvaMoufette Lead is a chemical element
"And oops the video turned out to be 25 minutes long"
Joke's on you I'm into that shit.
Your visualisations really help me understand everything you explain! Keep up the great work!
YES
I'm old enough to remember Minus World being a rumor passed from kid to kid, like Lavender Town or specific cheat codes for SNES Mortal Kombat. Insane how it turned out to not be false.
Lavender town is real too! It's in the original Pokémon games
I can for sure say this is one of the best channels about older games.
Great content as always.
As a programmer, it is really interesting how people worked with the very little hardware they had at this time.
Nobody would make such a crazy level loading routine today, since its hard to find bugs.
Watched the whole video. Understood none of it. Absolutely worth it.
Question about Lost Levels: I know that some Hammer Bros in the game are coded to constantly chase you, a behavior that is otherwise triggered by waiting around on a screen they're on for too long. How is this handled?
I think it's simply that Hammer Bros. will always move towards you immediately if you're on world 7 or later. (Someone can correct me if I'm wrong, though.)
When the world number is between 1-1 to 4-3 then the Hammer Bro will wait 128 frame rules (one frame rule is 21 frames) which is about 45 seconds.
When the world number is between 4-4 to 6-4 or A-1 to D-4 then the Hammer Bros will wait 80 frame rules which is about 28 seconds.
In Worlds 7 to 9 they won't wait at all.
This works the same way in SMB1, except Hammer Bros always need to wait at least 80 frame rules as there is no special case for Worlds 7 to 9.
@@sugar_700
Oh, I didn't realize there were a couple different durations for the waiting periods for the Hammer Bros. that don't charge after you immediately. Interesting.
@@SomeGuy712x They even used the same logic for the Chain Chomps in Super Mario Bros. 3, except you have to wait 160 frames before they jump out to get you.
9-year-old me: "Why does the level look funny when you take this pipe?"
Today me: "Well ... " * plays Displaced and GME videos * " ... so you see, it's just a matter of default values, pointers to wrong data arrays, and dummy objects that have some effect on stage transitions."
9-year-old me: " .... Wanna play Duck Hunt?"
Since the height flag for the looping objects in World 8-4 is set to F0, it's clear what you need to do in order to bypass the level loop: hack Captain Falcon into the game and Falcon Punch your way past it.
22:43 - Now this raises an interesting question; what if this checkpoint for 8-4 is triggered? Say you moved that checkpoint to be accessible to the player. What happens then?
All of the rooms in 8-4 (aside from the water room) are located in the same level, the only thing separating them being those loop objects. If you could pass the checkpoints, you would move to the next "room" without needing to go in the pipes. In fact, if you play a glitch level version of 8-4, none of the looping objects work at all (since you aren't in world 8), so you can get all the way to Bowser without going in a single pipe. (This also happens for 4-4 and 7-4.)
The visualizations you've come up with for this are crazy. Keep it up!
Oh, one thing I don't think you mentioned about the minus world (36-1) in the original game is that the midpoint for that level is actually set inside the first pit, so if you die after that point, you'll immediately fall into that pit and die again on your next life unless you're rapidly tapping the A button to swim out immediately. So, what is it that causes the midpoint of the minus world to be on a different screen from the normal 2-2/7-2?
There is another comment that explains it in more detail, but essentially there is another table in ROM that assigns 4 bits to each level: the 4-bit screen number to act as the midway point (a value of 0 basically means no checkpoint, like in castles). This table is indexed by the current world number and level, so a glitch world would end up with junk midway point value.
@@RGMechEx
Ah, okay. Thanks.
Much like the pipe exit logic, since this is well past World 7, the halfway page bits do not apply so if you die at all here, you're back at the beginning of the stage.
@@ClassicTVMan1981X
Actually, in this case, you do indeed respawn in the first pit if you die past it in world -1 (36-1), and have to be rapidly mashing the A button as soon as you appear in order to avoid immediately dying again.
@@SomeGuy712x Thank you, I remember.
talented, brilliant, incredible, amazing, show stopping, spectacular, never the same, totally unique, completely not ever been done before, unafraid to reference or not reference
Seeing how different level loading is handled between SMB1 and Lost Levels makes me wonder how different it is in SMB special, and if things are handled differently between the PC-88 and Sharp X1 versions
me when retro game mechanics explained posts
This video is you when you see... this video?
@@ethohalfslab he merges with the video and becomes one with it
@@einootspork accurate
@@ethohalfslab Sorry if you weren't expecting an accurate logical response pal
real
Timestamps for each section:
3:24 - Why does the game crash sometimes?
5:25 - How can there be 5 tile objects in a single column?
9:56 - How does the Minus World work?
11:51 - What about the Famicom Disk System release?
14:06 - What about Lost Levels?
19:47 - What about Super Mario All-Stars?
20:48 - How does the 4-2 wrong warp work?
22:12 - How do looping levels work?
24:20 - Outro
6:23 I have made a hack of SMB1 PAL and in 4-1 there is a mushroom platform stem that overwrites a tile. (Sadly I managed to miss this before releasing it). I wonder why that happened. Maybe the PAL version is different? Or is it because it's near the bottom of the screen. Who knows...
he said "never overwrite _certain_ tiles", so i assume the tile you tried to place wasn't in that place. I'm guessing some of the tiles would be brick, question and leaf blocks (special platform top)
@@the_neto06 it was a mushroom platform leftmost tile
@@IrisGalaxis huh... maybe the edges are not in the tile list. I'm sure after some digging you may be able to find the table with the non-removable tiles
I really love your work! Keep it up!
Thank you so much! I'll do my best!
@@RGMechEx yt sadly takes one third of donos so you get 5.5 money
@@RGMechEx theres a scam bot
I have a future request for you regarding Super Mario Bros. 1: the scale lifts in World 4-3, why they go wrong and what to do to fix them. Thank you and I hope you had a happy New Year's weekend!
Really love your videos, can't describe my excitement every time you upload a new one. So very happy this "footnote" became another video - I'm not embarrassed to say i savour your vids with several rewatches so this new video was such a lovely surprise! Thank you!
TIL SMB had "space" world 24 years before Super Mario Galaxy.
you just singlehandedly answered so mamy questions ive had and didn't know i had in one video, thank you and happy new year!
i absolutely love these kinds of videos
it not only increases my respect for the almighty makers of the OG mario and other old games
it also sooths my "Listening to something while doing something else" need
14:00 I think it's really interesting that the game handles "Is it the princess in this post-Bowser room?" and "Is this the final level of the game?" differently - this Minus World acts like it's a normal Toad (though the sprite isn't there) but still kicks you back to the title screen aterwards. I guess the part that determines if it should use the princess instead of Toad is "if world number is eight exactly" while if it should clear the game is "if world number is greater than seven". Interesting that those are different checks in the game code.
15:30 Is this the reason why there is a long black screen after finishing 4-4 in Lost Levels? Because the game needs to load the second file first?
Correct!
After seeing how these levels were packed/compressed I'm wonder what methods level designers used to make them. This is a pretty complicated process with some arbitrary restrictions; do we think there was any tooling that made the map design process easier at this point?
Was thinking the same - without specific tools for the job, level design must have been really frustrating and slow.
I could imagine that given computer coding at the time, their “tooling” for level design might have been paper forms where a designer would draw out one screen at a time, and another person in development would work out the hex code (probably recorded on the second half of the form) based on factors, positions, and a cheat sheet of basically all the same info about sprites and object that this creator covered across this series. They would enter in the codes via hex and test run the game, make tweaks, rinse and repeat until it’s perfect.
@@cll1out Quite possibly the case, but this would make iterating on a level design pretty difficult.
@@cll1out I've seen a video where it was shown that the tiles were drawn this way using paper forms, so it is very likely that you're correct.
@@cll1out But I mean the hard part is _the designer_ having to keep in mind all the engine limitations and rules, otherwise the iterations take forever. So there must have been a tool (digital or not) that tells you whether the tiles you're drawing/inventing are possible to implement with the limited resources.
Always love the level crash deep dives. HNY!
I love deep dives...so no Oops 25min long videos for me. The longer the better!
Great explanations! It's fascinating to see how this game works in detail!
Something else I've been wondering about is lag frames. The game's rendering somehow appears to get messed up during those frames. Can you explain why that happens?
I've also seen some interesting things about sprites failing to spawn. I know Kosmic made a video about flag despawning and it can also lead to springboards malfunctioning. If you're planning on making another SMB video, I'd love to hear more details about that as well.
Before Bowser's Endless Staircase, we had 'looping' maps that just warp the player back.
Are you interested in ever working on cool glitches and mechanics in newer old games? One I’ve always found interesting is the Dorrie glitch in world 4 in NSMB
I am beyond intrigued by how you are rendering these graphics/info
When you explained the level end data and roll over. Is that how those castle levels repeat when you don't go the correct path?
I asked to soon about it lol
Awesome work here. Please keep these coming!
Absolutely insane quality of visualisations like wow
Best channel on UA-cam back again.
Games back then must have been a nightmare to port.
Thank you for showing the Glitch Levels loading! That answers my question I had in your unlisted video
Video suggestion: YEAAAA explained. I've investigated it a bit myself, and it seems like it's as follows: Every frame, it resets a location in a VRAM buffer to 0. YEAAAA makes it reset a different location instead. Not resetting the location leads to some effects (such as enemies starting to look like bowsers), and resetting a different location results in other effects. Also, it sometimes needs to reset a different location. Not resetting the needed value results in these effects, but resetting both locations (which takes less code) doesn't seem to result in much: all I've noticed is question mark and empty (used) blocks flashing underground dark cyan
But I can see that you try to follow an association chain with these videos. I'd like to see how you'll continue it
This is one game I can play with my eyes closed almost, and it's fascinating to see the breakdown of its mechanics like this!
What an epic series. Really amazing work on these Mario level format videos.
Heck ya! All these makes me want to see a behind the scenes of some famous game genie codes like IKAAAE and PIGPOG. what makes those tick
How much do you know about the Atari 7800? A video about that console is much needed by the retro community
Right, like the NES it had a 6502-based CPU.
I have a question
We know there are 256 world, but how many level?
Is there 1024 level (256×4=1024)?
Or is there 65.536 (256×256=65.536)?
And how does SMB1 handle that many level?
An interesting fact involving area pointers and glitch levels.
If the base level is force loaded in the world it originates from (for example, Underwater 1-1 in World 1), then area pointers from the base level will exist. In most cases they don't do anything. However with Underwater 1-2 loaded in World 1 specifically, the area pointers do lead to a new area (if the address is no longer frozen as the area ID for Underwater 1-2, otherwise the game just crashes). I have not tested every level, only just a few.
I was wondering why warps in World 9 of SMBLL work when the world number used by level transition object is 3 bits, and after checking the disassembly I noticed the regular check is skipped entirely for World 9 (this essentially means that if you are in glitch level within World 9 then all warp objects will work).
Looking forward to the explanation on everything going wrong in Pokemon Scarlet/Violet Tera Raid battles in 30 years.
Like, random thing, it seems there's something like a damage queue where occasionally your very first damage actually ends up stuck at the end, only applied at the end of battle. Also stuff like the Tera Pokemon doing damage with 0HP, killing player Pokemon, taking no further damage, yet thankfully still being able to be caught despite the time counter also falling to zero.
Several things scream... race condition, but with queues, rather than multiprocessing. And, yes... in single-player.
(I still love the game, but what the hell guys?)
Yeah, definitely sounds like a serious race condition. Work with async/await in JS enough and you figure out pretty quickly you don't actually need separate threads for those to happen.
Thanks for all the hard work on this! Really interesting
Amazing as always. If I understand 25 percent I consider it a success 🙌
Another request: the area change timer data. As originally coded, right after the offset for the initial value is loaded into Y (which corresponds to value $A0), a flag for the left page location is loaded into A. This was supposed to apply only to the pipe intro scene (Worlds 1-2, 2-2, 4-2 and 7-2), but due to the RAM address for the left page location, this check applies to the leftmost page for every area, which is why when you leave the first underground coin room (in Worlds 1-1, 2-1 and 7-1) there is a longer time delay before returning to the level proper.
In Super Mario All-Stars, it was changed to the second value in the area change timer data table ($34), which fixes the time delay for leaving the first underground coin room, but it also shortens the time delay for the transition between the pipe intro scene and the level proper (Worlds 1-2, 2-2, 4-2 and 7-2).
Yeah, but one more glitch level question. Why dont loops work in glitch levels?
20:33 Does the middle pipe take you to World 5 though? Just wondering.
In All-Stars the middle pipe will take you to World 3 like it normally would.
@@RGMechExhhh ok, I was wondering if Nintendo fixed it by changing the values of the left and right pipes in the World 4 warp zone that takes you to world 5, but I just realised that they were changed to be 1-1 lmao.
I wonder if through SMAS + SMW an Arbitrary Code Execution in Super Mario World could allow us to enter glitched worlds in SMB1 and potentially other glitched worlds in SMB2, 2J, SMB3 and SMW.
@@RGMechEx Good job on explaining literally everything about how SMB1 functions in your videos btw.
Displaced Gamers has a followup video that talks about the changes in the code between versions (Talkin' Code Episode 5). They fixed it in a really jank way.
Just wondering is the next video going to be on the SNES APU?
If not the next video, the one after that for sure.
A bit late and slightly off-topic but one thing what's IMO really interesting is that the SMAS remake has got a literal background detail with dynamic backgrounds for SMB1, SMBTLL and even SMB2. SMB3 is the only game with a static background for one reason or another (I put my money on space constraints since SMB3 uses a lot more memory for its levels compared to the other three games and not much space is left for the backgrounds).
What happens if you go into the 7-2 / 2-2 pipe in world 3?
Good question! It takes you to the ending of 1-1 just like it would in Worlds 2 and 7, nothing out of the ordinary.
@@RGMechEx Right, that pointer for World 3-2 was unnecessary; I suppose during the development of the game they were considering making 3-2 an underwater level as well, and forgot to remove it when they decided instead to make 7-2 the second underwater level. Lost Levels' 3-2 was an underwater stage, though.
does this mean that the speedrun for SMB1 could be faster than ~5m on FDS since you could do 1-1, 1-2, 36-1, 36-2, 36-3, and 36-4?
instead of the usual route of 1-1, 1-2, 4-1, 4-2, 8-1, 8-2, 8-3, 8-4?
That is a separate category called Minus World ending.
We need a part 5 with VS. Super Mario Bros., All Night Nippon: Super Mario Bros. and Super Mario Bros. Special.
Vs. SMB and All Night Nippon are possible, Special is a totally different game. Instead, I propose exploring the European NES version, it has its own set of glitch levels. And there's a bunch of fanmade and bootleg ports.
when i was playing special as a kid, i got to a minus world level after a underground level (i think it was after 1-2). it was underwater, and at the end of the level there was a pipe...with no entrance! so no way to finish the level.
Hey, I have a question.
I was looking into Donkey Kong’s and Mario Bros’s sprites and saw how they both had more than 3 colors each. While I do know that they aren’t NES hardware, I did think they would be similar since they came before the NES released. How long are the palette sizes for these old arcade games Nintendo made, and what limitations are there?
Btw, great vid!
I like your funny words, magic man
Question: on your website with all the maps of levels, every level with both invalid tile and sprite pointers' maps are just a ? block and a koopa. why?
Since I didn't emulate any RAM when creating the maps, the level data and sprite data is just interpreted as a bunch of zeros. Those are the objects and sprites that correspond to 00 00.
@@RGMechEx By the way, huge fan! I used to watch your videos as a kid and still do. Love learning about this kind of stuff!
That FDS minus world segment was very interesting. You’re telling me that the any% world record for FDS super Mario bros could be drastically lower than the original NES one? 👀
12:50 Wait, SMB had auto-scroll levels? Was that an FDS-only thing??
Probably the pipe screens. Yk, like 1-2
all of ur videos have been awesome! I've been taught many things and as a brand new hobbysist developer it's helped me learn a thing or two about making games as a beginner with all these new concepts :D
Me: *THERE'S MORE?!??!?!!?!?!?!?*
Happy new year RGME!
20:47 what wasn’t patched was… -QUAKER OATS ADVERTISEMENT
Wonderful video, as writing my nrom engine pushing the nes to its limit, this gives me a lot of ideas, I decided to draw my levels in quarter pieces, and use chr data to generate everything else like tile attributes, sprite objects and collisions to save space, but the way super mario bros does now i wondering if I should do the same thing, ill try this in the next engine.
I do love how the objects disappear when you don't take the right path, yes coding wise it may be ugly, but its great mysterious signal that shows the player they failed and something is wrong!
Downside is that it's harder to support scrolling backward.
You might like the method that (I think) Super Mario Land uses: there are up to 256 premade tile-columns, and the level data is a list of column IDs.
@@renakunisaki your right! I'll stick with my peices, I had 2 way scrolling in mind the whole time. I have pre made columns that cover 25% of the screen.
I've wanted to know for a long time but never had the resources to check for myself. The _only_ differences between the FDS and Famicom versions of SMB1 are in absolute addresses, right? It seems like there might at least be some differences during initialization, but maybe those don't matter after you start the game? And there are no differences whatsoever between the Famicom and NES NTSC versions? Like, not even one byte out of place? I assume there would be no reason to not keep reusing a single ROM.
And also, there is no known way to exploit the differences in the absolute addresses between versions except by warping to glitched levels? If there were, that would presumably have at least the possibility of relevance to TASing.
I didn't have time to check out all the differences between the two releases, but I think there may be at least some minor adjustments (which may also just do with interfacing with the FDS). The start of the memory mapped region for cartridge ROM on the Famicom starts at $8000, and the start of the memory mapped region for program RAM on the FDS starts at $6000, a difference of $2000. If you look at the pointers for the level data, you'll notice that they differ by $1FF8 instead, just 8 bytes off. This leads me to believe that there is something actually different between the two releases (at least in the ROM before the level data) that accounts for this difference, but again, I haven't looked into it.
And you are correct that the Japanese Famicom release and the North American NES release of Super Mario Bros. are identical.
@@RGMechEx That's interesting. I noticed something similar when I did a diff myself. I find it odd that I can't find any discussions of version differences here. Maybe if I investigate a little, I'll realize that they just don't matter at all, but there is definitely _some_ ROM change.
23:00 does this mean that if mario jumps inside the checkpoint, he won't clear it?
17:49 Would it be possible to use Game Genie - or a hex editor to glitch it? Thanks!
"Whoops, the video turned out to be 25 minutes long." (time spent editing notwithstanding) this is the opposite of a problem.
20:44 what wasn't patched?
I guess the wrong warp wasn't patched.
Im really excited when these hit the sub box! Woo!
Can you link the unlisted video with the other levels?
17:50 Nintendo being party poopers since 1986
Might have missed it in the other videos but why does the end of a level not stop if you jump over the flag pole?
To put it plainly, there's just nothing to tell the game to stop scrolling. You were never intended to ever get over the flagpole so it wasn't ever an issue.
In Lost Levels, some of the levels do have scroll stop objects after the flagpole, since there are green springs (and well, Luigi in general) that let you jump much higher and can easily get over the flag. Also like I mentioned, there were often sublevels located after the flagpole and they wanted to make sure you could never get to those from the main level like that.
Do you know how the arcade version of SMB stores it's levels? I'm guessing it uses one of Nintendo's MMC chips.
Dude. God I needed this so bad. Thank you so much!!!!
So when it comes to levels that loop, say 4-3 for example, would it be possible to make a jump right before the checkpoint loads and thus get the level to loop even though you took the correct path?
As funky as all of this is, it's kind of neat how easy it is to abuse all of it to get unreasonably fast times; new games and new technology are neat and all, but they'll never be as fun to break as older games
"Too bad it's an autoscrolling level"
...I don't remember SMB1 having autoscrollers...
Should have said "autowalking" instead, but autoscrolling technically isn't wrong either (it acts like the pipe cutscene in 1-2).
Is there still a way to see these uploaded maps? Links in description don't work for me
11:46 Why is the Minus World different in the Japanese version of the game?
Ah, I see, thanks!… Interesting! I thought that the tile and sprite tables were stored on the game, as part of the game itself!
12:40 site is down anyone got a backup?
So then does TLL has two theoretical sets of glitch worlds because of the file difference, or is it only 1-4 that is changed to A-D?
1:36 My brain when it tries to do algebra.
you ever do a gameshark video?
This man should teach computer science
Regarding FDS version of 36-1, when you defeat Bowser with Fire Mario, the game seems to crash near the flagpole. Does that happen on real hardware? If so, what causes that crash to happen in the first place?
There is a Fireworks sprite in the glitch level's sprite data near the end of the level. Normally this sprite only spawns during the ending fanfare, so it has undefined behavior when it is included in the level data. It seems having Bowser in the level manipulates the enemies in such a way that all of the sprite slots are full at the end, so the Fireworks are skipped over and the game doesn't crash. Otherwise, they do load in and the game will likely crash (though not always!). You can also cause this to happen by dying half way through the level and starting at the midway point--the sprites don't line up properly and the Fireworks still spawn in.
Question: what causes the invisible blocks to not have collision after a death in the level?
That's just for the invisible 1-Up Mushrooms I think, and it's actually tied to coin collection in the third level of the previous world. There's a video from kosmic about them ("The Most Hidden Powerup in Super Mario Bros."). I guess the specific code for that block has the coin check flag. And loads it if the flag is set or not.
You mentioned in the FDS version of the Lost Levels that the game will reset if a level greater than World 9 is detected. How are the extra worlds loaded?
He later stated that worlds a-d are actually just worlds 1-4 on different file.
@@janimutanen1465 Ah... I was afraid I missed it. Thank you!
Happy new year!
...So, how does World 2-Castle in New Super Mario Bros. Wii (a castle that clearly references World 4-4 and 7-4 of SMB1, and whose first Star Coin requires you to intentionally blow the sequence to obtain if you aren't in Propeller form) work, then? D:
I wonder why, when the game crashes while Mario is jumping, the sound of his jump begins to sound like a bomb dropping. Normally the sound of Mario's jump increases in pitch, but during a crash, the pitch of the sound effect goes down instead.
The pitch actually goes down very slightly before it rises for most of the sound effect. If the game crashes during that specific moment, it will continue to go down.
Great job! Loved it
This is absolutely amazing. Here's a comment to appease the algorithm gods!
Imagine sending this video to someone who loves playing Super Mario Bros. On NES but isn't tech savvy...
Honest question, why was it chosen that you navigate the menu with Select when the D pad exists?
That's what the Select button was created for. Using the D-pad to select a mode was a later development.
@@MuffledSword and why couldn’t you just navigate the menu with the d pad. I mean like, why didn’t they think of that?
It took time to develop the design patterns we now take for granted. Previous consoles had their mode selection switches located directly on the console itself. Nintendo simply moved that functionality to the controller. If games didn't need mode selectors and start buttons, Nintendo wouldn't have added them to the controller.
@@MuffledSword but they used the d pad to move Mario,so why not also to move the cursor? I mean if I move with the D-pad in one context why can’t I do so in other contexts?
Because that is a completely different way of doing things, and cycling through options with the press of a button was familiar. You are familiar with D-pad menu navigation because it has been the standard for decades. In 1985 it was not.
you deserve more subs
I'd love a video on PS1 texture warping
The short version is basically that the PS1 has no built in floating point calculator so each vertex of every polygon will snap to the nearest available integer instead (basically the ps1 shaves off all the decimal points during the rendering process). I'd like to see how RGME represents it though!