The context of the Reznor glitch is straight-up bonkers. Imagine being a trout swimming in a small pond and all of a sudden a dinosaur ridden by a plumber teleports you into its mouth and spits you out and while you're dazed, you shit out a fire-breathing rhinocerous which teleports away
One of the things programmers had to learn back in the day, because of limited RAM due to its high price, is the extreme efficiency of compacting code. I heard David Crane, the programmer of the Atari classic game "Pitfall!", talk about how it took him about a month to free up just a dozen or so BYTES from his game. The story went like this: David had finished his game ("Pitfall!") and showed it to his fellow programmers. It was exactly as you see it now except that you only got ONE Pitfall Harry and no more. But his fellow programmers convinced him to give the player at least 3 to start with. The problem was, he had used basically every single byte of available ROM storage as it was and couldn't add that feature. But, being the genius legend he is, he found ways to compact his code even more, but it took many weeks. Keep in mind that these guys were essentially using calculators and graph paper to design their games, so doing even a simple game - especially on the super limited Atari 2600* - was quite a challenge. * The 2600 had only 128 bytes - yes BYTES - of RAM and only supported a maximum of 8192 bytes of address space (ROM space). The 2600's 6507 microprocessor, which was a derivative of the 6502 but with fewer address lines to save money, could only "see" 8K instead of the usual 64k for 8 bit machines. It also had no video memory to speak of: the programmer's code controlled the video directly for the most part. There are channels here on RU-vid that teach you how to program on the 2600 if you're interested. The tools available today for programming the Atari 2600 are FAR more advanced than what was available back then.
@@JustWasted3HoursHere truly this level of efficiency is a lost art. It really makes me think if how much more efficient a lot of today's games could be if micro optimized to hell like you had to do back then. Bet a game like cyberpunk 2077 could use up 1/4 it's resources... Cheap memory and fast processor's allowing for high level code I feel has truly contributed to coding laziness instead of well optimized code.
@@pauls4522 Agreed, but I imagine that programmers of today would tell you that it's not worth it anymore. Back then, optimizing code to make it fast and small was almost entirely out of necessity because of slower processors, extremely limited RAM and so on. But systems today have all of those things in abundance so why spend extra time making your code "scrape the metal" as they used to say, unless your code is extremely time critical, like if you're writing graphics drivers or things like that where speed is everything. Games today are using HUGE libraries of code that were developed to make game creation faster because if these guys had to create every game from scratch it would take 3 to 5 years for every single game release.
Does anyone know of an SNES emulator where I can view/debug memory on the fly like in FCEUX? Or ideally, with the same sort of debugging tools as FCEUX. I would be SO happy if I could find an SNES emulator with just a fraction of the debugging capabilities of FCEUX. Sure, I can use the cheat console to change memory values, which helps if I have a RAM map. But otherwise it's pretty limited in that regard. Even though it's served me almost flawlessly emulating SNES games since 1998. Also I just noticed, ZNES was released October 14th 1997. Which means it turns 25 years old this year. Can you believe that?
I think the emulator he used allows viewing entire layers, so that we can see parts of the sprite layer that are not normally visible. Reminds me of how I once got widescreen in Super Mario World...
@@gammaboost Actually I just modified the game to allow the camera to move higher than normal. The game detects if objects are too far off screen and just doesn't display them at all if that is the case.
@RGMechEx So basically if the sprites are off the screen, and the camera wasn't meant to move higher, there wouldn't be any background above, and the sprites would have a transparency like pdf images?
Awesome explanation and data presentation. A small correction at 9:13: the sum of those addresses must be exactly 4, not equal or greater than 4. The reason it's usually possible to finish the level with Yoshi's tongue alone, as you observed in 10:22, is that the Reznor that is spawned via stun glitch starts with its own value set to 1 (you can actually see him dying if he is on-screen). So in the first frame of Yoshi's tongue we get 3+1 = 4 and the level finishes.
I somehow botched this because I just went back to check the code--I knew exactly where it was and what it looked like, but I must have mistaken a BNE for a BCC. What you've mentioned is correct.
This man meticulously and thoroughly pointing out all the errors made by a dozen sleep deprived Japanese programmers who had no chance to push out any updates.
Still ended up being better than a lot of games today. Went to a game stop today, and got pissed off that there was, like, no games that were worthwhile. There was around 3 games and the rest are garbage.
Errors? A series of 1s and 0s arranged by a small team that controls an electron beam through a microcomputer that shoots out the tapestry of SMW onto a screen contains no errors, not in the sense that someone programmed something wrong, they are just unintended nuances of a very complex and proprietary system.
For that unused "normal exit, and teleport to submap" function, I wonder if that was a plan for how Star Road was going to work, or they were going to have pipe transitions like SMB3--you go into a transition stage and then take the exit to go where you want. After all, Super Mario World is the odd one out just having the teleport happen entirely on the map--in SMB3, pipes all had transitions, and there was that tower in world 5 that acted as a bigger transition to the sky. Then in NSMB, the cannons just dump you in a transition stage where you jump in the canon (and later entries made them courses in their own right)
That's particularly interesting because stars (but *not* pipes) actually are levels. Each star has to have a stage number assigned to it; this is used by the game to keep track of what directions Mario can move on when exiting the tile. At the end of the video, we see an example of entering the stage level assigned to the star because the star tile is not yet in the proper state to activate an overworld transition. So it is possible that, at one point, stars were intended to be stages you could enter.
The gigaleak actually included old map data for SMW that shows how originally the world map was going to include a sub-map layer with tunnels that you could navigate through, though the idea was scrapped later on. It's possible they tried using this functionality with those submaps, probably for a brief period before the mechanic was dropped entirely.
@@GeneralBolas To me, that sounds more like that it's easier to use existing technologies (kind of like inheritance of object oriented programming) since, as you mentioned, star warps in SMW can have multiple directions assigned and thus have to know in which directions the player can go and where not. Plus, they also have got a level name assigned (and could have unique names as well) while pipes don't (and would all share the same name). Interestingly, SMW features two sets of pipes, one of which always defaults to level 0 and the other which has got level data assigned to it much like the stars but is never used in the game.
@@MarioFanGamer659 The latter case IIRC is for the Chocolate Island 2 pipe, since the path there isn't actually part of the overworld's Layer 1 data, but rather from a script if the player presses down on Level 0x24 or either down or right (I don't remember) at the specific coordinates of that one pipe.
16:00 - "But getting both a Yoshi and a sprite that he can eat without swallowing into this room is basically impossible" - I look forward to your future video showing how you did it.
There is actually a way to set the goal tape's extra bits to 10, and trigger the code for the 3rd exit (submap warp). You have to make Yoshi fall super far below the level without despawning, and then trigger a remote item swap on the frame the goal tape is loading. Remote item swapping can be done using two Yoshi's, with the 1st one turning invisible while his tongue is still out and linked to a slot. Then the tongue will freeze and become inactive until the other (visible) Yoshi despawns, allowing you to delay the item swap until you position the invisible Yoshi just where you want. The invisible Yoshi won't despawn below the level while you're riding the real one. If you do this in Cookie Mountain (which luckily has a Yoshi block), you can warp to Larry's Castle. It's a rather complicated setup, but it has been done in real time competitively.
I remember when someone did a no starworld run for the first time using this glitch a few years ago, and i never understood why it warped you. I told my partner about it a few weeks ago but lol I had no idea how it works. This is incredibly cool to know, so thanks for the explanation:)
"The answer lies in the fish." This is so well-animated, so deeply researched, and portrayed in such a thorough yet simple manner, and all I can do is giggle at that! Thank you for this deep-dive into Super Mario World!! (Pun 100% intended!)
Fun Fact: Newer versions of Lunar Magic (the SMW hacking tool) make exit events 3 and 4 usable! I suspect there's some hack used to shuffle event 4's direction to Z0 so it won't overlap with 3, but it's cool to see this was pretty much vanilla behaviour.
@@CarbonRollerCaco This method would afford a little more flexibility in terms of level design. The level itself just has to mark which exit a goal tape corresponds to (the normal or the secret exit), then the world map data for the level tells the "level complete" animation which direction that exit moves Mario in. That way the world map and the level data can be changed independently without being tightly coupled. It makes sense from a software design perspective.
@@CarbonRollerCaco The SMBx fan game has this, but if you forget to reassign it properly after a copy paste, you can get errors like this and have you exit the same direction for all exits or some of the stuff described here. I even had my self exit into nothing and got soft locked on my worlds during testing.
OMG this video has possibly solved a mystery I've wondered about almost my entire life! Back in about 1993 I bought my first SNES. It was a used console because that was cheaper and we didn't have a lot of money. One of the games we bought for it was of course super Mario world. I was 6 at the time. When we first loaded it up it had the last owner's save files on it, but my brother made me delete them so as to not spoil the game. I remember the number being 3 digits though but thought nothing of it at the time. I loved this game, I hammered it and looked for every secret I could. I remember my first venture through the star world and being frustrated by "Funky" for the longest time but I did it, I beat it all..... except I didn't. I could only get 96 exits. I knew there was more but I just couldn't find them. Many years later when we got internet access and I could finally figure it out, imagine my surprise when everyone was adamant that there were only 96 exits. I didn't believe it but I had zero evidence that there were more. I remember even downloading a level editor (hyrule magic I think?) To see if I could find those hidden levels but nothing was obvious. I've spent the last 30 years feeling like I was gaslighting myself, but this video shows it IS possible to get more than 100 exits! I feel so vindicated! Now I'd love to know how someone discovered all this back in the early 90's. Maybe they used an action replay or something to mess with the game, I have no idea, but I think I can finally put this chapter of my life to rest. Thank you.
Sorry, your memory can't be explained by anything here. On a US or PAL SMW cartridge if the overworld event counter on the title screen would display anything greater than 95, it instead shows a special graphic indicating 96 (PAL revision 1 displays a blue "96" while PAL revision 2 and US carts display "*96"). On the Japanese version, the event counter can be raised above 96, but does not show 3 digits. Instead the binary-to-decimal conversion will result in A0 being displayed for 100, A8 for 108 (the maximum without using Arbitrary Code Execution and a couple other completely game-breaking glitches), and P5 for 255 (if you use Arbitrary Code Execution to write the maximum value possible for the event count). There is no way, even with Arbitrary Code Execution (or Action Replay), to get the counter to show 3 digits when starting the game. It is also worth mentioning that the glitches needed to get extra exits were not really known until long after 1993. We only figured out how to get to 97 a decade ago.
@@neoKushan I think the game was either modified/hacked in some way or perhaps you didn't remember the real number correctly and you thought you saw 3 digits
During the Outro when the supporter icons are rolling across the screen, two icons seem to glitch out and teleport to the bottom-right for just a frame each, and then back to their intended positions, around 27:22. Would be a fun meta video to debug what is happening here :)
I had this pointed out to me earlier but the only thing I could blame it on is a rendering bug (it shows up fine after a rerender, but it wasn't worth reuploading for).
The stuff about the goal tape. Is this why the goal tape is broken in vertical levels? SMW never uses them there. The Sunken Ship uses the special sphere object, and all other vertical levels have a pipe to go to a horizontal level which contains the actual exit. If you use Lunar Magic to put a goal tape in a vertical level, it will act like that exit sphere object (it won't move, and it ends the stage without the usual mechanism).
The goal tape and orb both use the same level ending animation. It's just the horizontal/vertical level setting that determines whether the screen freezes or Mario does the parade march. An orb in a horizontal level will trigger the march too. Why they did it that way, I do not know.
@@RGMechEx That's why you have to find a way to stop Mario during his march to get the exit from Yoshi's House, otherwise he'll just waltz right off the screen and the exit won't be counted.
To me, it's more because the goal tape is inherintly build for horizontal rooms and not for vertical rooms. More specifically, the goal tape stands upwards and will trigger the goal sequence even if you're high above it (the only exception is if you're completely outside the level, above the screen). With vertical level, it looks rather weird compared to a simple item which you can collect. Plus, an alternative exit for a major sequence adds more drama to it than as if the exit were just another goal tape. There is in fact a reason why the goal music is the same as the boss music with an orb.
The effect of Mario being on top of the screen instead of in a normal capture (like 4:09 and 26:05) are honestly really cool, what do you use to achieve that effect?
Disabling background layers and color keying! For getting above the screen, I wrote a small hack that let the camera move above the top of the level and used a script to align the two videos so it appears seamless.
"I suggest you go back and watch the previous level end glitches video if you haven't seen it yet . . ." . . . or if you've completely forgotten all about it because it was four years ago . . .
14:38 The method for determining the message display is bizarre. Was that extremely early in development, because a message occurs at the start, and a message block exists in the very first area, so they coded something and didn't revisit it later? It's difficult to understand this design.
It's more likely that they'd already had much of the work done on how levels were designed when they added message boxes. At that point, the logic for spawning sprites was probably fixed. This meant that there may not have been any extra bits in the sprite object to store data for which message box to use. So it was probably easier to just make a quick table mapping from the stage level to the message box index. When someone decided that some levels needed two messages, they decided to use the last bit of the X position to decide which message to use. Because it was easier than trying to add more data to an existing system. And using the message box ID to test to see if a stage is a switch palace sounds very much like a quick hack they threw in when someone said, "hey, we need a visual effect when you beat switch palaces." So they had to find a way to detect whether a stage was a switch palace. Using the message box ID probably seemed reasonable under the circumstances.
It feels like a bug that 4th exit direction is defined by bits 2 and 1, overlapping with 3rd exit's bits 3 and 2, but I suppose once it was decided not to design levels with more than 2 exits it became moot.
Whether I'm watching these at 3am or at 3pm, I find myself dozing off so easily to these videos. I think these videos are hitting the exact location in my brain to trigger sleep, say, $A01 for example. This can be exploited, since when I have insomnia or want a nap, I just watch one of these videos. The problem occurs when I forget and try watching these while eating lunch, the act of eating should be in slot $E07, but the exploit rewrites to memory and sets me back to $A01, thus, drowning in my own soup. I love these videos so much though, jokes aside. They keep me juiced up about programming and my daydreams are filled wondering what kind of games would I have made if I was old enough to make games during these 8 and 16-bit days using these methods of making games.
I am baffled at how they released one of the most fun, well-remembered games, that happens to be so full of such amazing game breakage. TASes can rearrange the RAM to turn SMW into a version of SNAKE.
About 2 years ago I tried going for VoB4 unintended exit without really knowing what was going on, and I gotta say this video was absolutely amazing! Everything was explained so clearly, and the visuals made is really easy to follow along. Can't wait for the next part 👀
Absolutely amazing stuff! (And excellent video-documentary work on these videos.) Do you think we will ever see a 102-exit TAS? Or would that just be too irritating to actually attempt lol
I'm confused about which behavior you mean when you say "but what is interesting about *this behavior* is that it is the default behavior of most sprites". it seemed like you were talking about Koopas, but don't Buzzy Beatles also have a stun timer? They just "wake up" when they stop being stunned...
if you try to collect an orb in there, the mingame just resets and reloads the room. interestingly, if you manage to die in the bonus game, it sets the midpoint flag for the level you triggered the bonus game from (when you go back in, you'll have the checkpoint, even if you never grabbed it). the level also wont get completed, as if you died in the level itself.
9:12, 10:22 Is that part actually correct? Maybe a regional difference? It didn't match what I remembered at least so I looked into it again and at least for the US version it seems to check for exactly 4, not above. The reason the tongue still works is because the routine for spawning a sprite from a stunned sprites also sets $1564 for the newly spawned sprite to #$10 and Reznor uses that to check if he should be kicked off his platform. This results in the Reznor that spawns to always be killed making 1 of the 4 slots always 1. Then the tongue length of 3 sums up to exactly 4 and the level ends. However, in case a sprite that uses $151C like the gray p-switch is also in one of those slots, Yoshi's tongue adds up to 5 and doesn't actually end the level, unless the other values sum up to 3 (like another gray p-switch in the last open slot), in which case it will end the level when the tongue length reaches 1 while retracting instead of ending it during the expanding animation.
I wonder why the exit is determined by 2 bits at all, if there are at most 2 real exits per level and the high Extra Bit should always be 0. You'd think the code would only check the lower Extra Bit, and ignore the high Extra Bit. My only guess is that at one point they had planned for some levels to have more than two exits, but this was scrapped and they just never bothered to change that bit of code (since the high bit "should never" be 1 anyway). This would be consistent with the existence of the "Test" level, which is glitchy but clearly meant to be there.
My initial thought on a lot of the weirdness is "why did they do that?" Then I think about it some and I start to realize why they may have done it that way.
Mario had mounted an invisible Yoshi earlier in the level which causes him to warp to it's Y position when he dismounts any Yoshi. This is done in the real-time viable strategy for this glitch, since the trigger for the item swapped goal tape stays inside the level bounds.
One thing you said made me very confused: "There is no logic to handle if the game reaches end of the list" (14:35). From that I expected that the loop will continue checking earlier and earlier addresses. When I'm thinking about low-level programming and memory adresses the condition that the loop breaks at 0 already counts as logic handling reaching the end of the list. I had to watch that fragment a couple of times to understand how the loop ends at 0 when there's "no logic to handle (...) the end of the list". Other than that: thanks for your great work! You're doing an amazing job explaining tese games' mechanics, and I'm always happy to watch your next video.
@@Dave-rd6sp yeah, I guess JNZ is one basic loop construct in assembly which would handle exiting the loop after reaching zero and it wouldn't really count as "loop end handling logic". I probably got more confused than I had the reason to.
This is it. I suppose "no logic" isn't exactly correct, as it does exit the loop after the index hits zero. But it does not check for anything after this happens.
Huh. I wonder what kind of ideas they were planning that would use a third or fourth level exit. Some sort of super-secret exit? Or perhaps some unique situation designed to trigger special events that was never implemented? Or maybe it was something boring, like in earlier builds they used this to signify clearing special stages like switch palaces, and then later that code was revised to operate like a normal exit with different code to respond to the changes that made.
So, what I got out of this is that Yoshi is the god of creation and destruction. He can bend reality and do whatever the heck he pleases. He probably only asked Mario for help for his own entertainment.
Ironically this video was so fascinating I kept forgetting to tab back over and finish programming my work lmao if there's a weird exit glitch in my company's product you know why ;P
Yoshi committin' dat tax fraud... For what it's worth, I've made a ROM hack with some levels that have three exits. It's possible with Lunar Magic, although I don't know which version they started doing it with.
Yo dude, I loved your video on the Gen 1 Cries mechanics. Have you any plans on doing a similar video on the in-game music? I feel as though the production/sound design is a huge component as to what makes the music so memorable. The timbre of synthetic melodies feels so dynamic and important to the composition (the fade in and fade outs, high end vs low end etc.)
I think the most impressive part of this was when I realized Reznor's sprite is actually probably the worst sprite design-wise. The platform it stands on has more detail than it!
Sure, blame everything on Yoshi... People throw him inti the pit and go blame him for everything wrong with the game in youtube videos. Go touch grass stop discriminating against dinosaurs.
0:39 "Yoshi is usually the underlying cause behind most of the glitches in Super Mario World, so it's no surprise that hed'd be at fault here." No, he's causing these glitches because he's a bad person; remember when he committed tax fraud LMAO
Can the rotating-chain-link-fence sprite itself be put into an item box or spawned from a stun timer in order to chain your way to the message box glitch?
So at some point I must have watched the previous video since it says I hit the like button on it, but after watching through the review section I have to say none of it's ringing a bell, so I think I should go watch the first one again. BRB.
Could the 3rd exist be related to anything from the Gigaleak, I remember there being world maps for both the normal island and an underground, whoch might be the submap