Super Mario Bros. 3: Glitch levels and level generation

Поділитися
Вставка
  • Опубліковано 21 лис 2024
  • "I have to go now. My planet needs me"
    Note: Mario died on the way back to his home planet
    In this video I showcase everything currently known about glitch levels. (Or at least everything I considered important enough to document.) It's worth noting that there aren't any known methods to enter any without ACE or hacks, but should one be discovered, glitch levels are a potential entry point for ACE.
    I also show levels being generated a single object at a time, as I found it incredibly satisfying. This includes the glitch levels that crash the game.
    I also biased this video towards glitch levels that don't crash the game, but it should be known that there are hundreds of levels that crash for every level that doesn't.
    The purpose of this video is documentation. You might've noticed I didn't do a full run from console boot to entering a glitch level. Most videos I've made where the topic is a new method of ACE, the full run TAS is the focal point, but I decided to shift the attention to how the glitch levels work and a myriad of ways one could potentially be entered as opposed to going all in and TASing a specific method. In fact, all of these recordings were set up using hex editing and I never created a full run. This shouldn't take anything away from the final product, but I thought I'd openly state that it was done this way.
    Despite this being a new entry point for ACE, I glossed over it in the video, but let's talk about it here! For that demonstration, address $0015 had a value of $A7 on the frame the level generation used it to generate an object. As mentioned in the video, we take the jump table at index $50, and execute code from address $008D. On top of that, the bumped block and Toad overwrite any bytes you would have written for address $95 and $97, so writing DEC $7955 and JSR $8FE3 becomes significantly more complicated.

КОМЕНТАРІ • 53

  • @AndyNPC
    @AndyNPC 2 роки тому +47

    It's interesting how 2-1 draws a grid of pipes and then overwrites parts of it to create the level pattern.

    • @100thCoin
      @100thCoin  2 роки тому +19

      I definitely wanted to show 2-1 being generated. it caught me by surprise!

  • @Kosmicd12
    @Kosmicd12 2 роки тому +73

    Very high quality

  • @TweeterMan287
    @TweeterMan287 9 місяців тому +2

    Thank you algorithm for recommending me this channel! Instant sub.

  • @maxxbrick
    @maxxbrick 2 роки тому +16

    Let's be real, 100th coin is the Pannenkoek of SMB3

  • @shellsterdude
    @shellsterdude 10 місяців тому +9

    I really appreciate all the cool SMB3 glitches you show. One thought that keeps living rent-free in my brain is if there is a practical RTA glitch that would either break the extra rock or get runners an extra hammer so that there could be a true 100% SMB3 run. As most people know, it's impossible playing the game as intended to hit all mushroom houses because you need one more hammer than you can get. Might also be possible to just skip to the extra mushroom house (I don't know if the game would let you back out after that).

    • @100thCoin
      @100thCoin  10 місяців тому +4

      There actually is a glitch that lets you collect an extra hammer from hammer bros. It's unfortunately comically slow to perform, and RNG dependent, but here's a video showcasing that: ua-cam.com/video/uD6OPCN1KAc/v-deo.html

    • @shellsterdude
      @shellsterdude 10 місяців тому

      @@100thCoin Thanks for the link. I had somehow missed that video. Like you said, it's an RNG-fest though so still not quite ripe for this kind of run idea.

  • @KabAudio
    @KabAudio 2 роки тому +11

    My favourite of all your videos to date!!! I have always been intrigued as to why bowser's castle takes significantly more frames to generate compared to every other level in the game - I did my own research just a few months ago and read the level generation section, and was amazed how it always starts with the same pattern for "fortress" tilesets, wastes all that time drawing all those tiles and then removes them because barely any fortress used those tiles! (except for a few sections of checkerboard floor)
    The fixed and variable sized level generators was a really cool thing for the programmers to do! Makes sense though, such an efficient way to make each level, given only a handful of bytes are required to build a level. Even just watching Bowsers castle being generated frame by frame in the hex editor looked fascinating, but now you've made it completely visual too, so cool to watch!
    I've spent more time than I want to admit reading through all the disassembly, so I really enjoy it when you make videos like these.
    I was no joke thinking of a way to visualise Bowsers castle being generated only a few months ago, well, I guess you beat me! Although I had planned to put more emphasis on why this level in particular takes the most time to be generated.
    I also find it fascinating to note the difference between the level load function on the USA versions compared to the Japan version - the japanese version allows vblanks to occur throughout the level generation process, although all it runs is pretty much the sound engine... Whereas in the USA version, this little bit of code after the level entrance transition is completed is executed a few lines after PRG030_88AD -
    LDA #%00101000 ; use 8x16 sprites, sprites use Pattern Table 2 (NOTE: No VBlank trigger!)
    STA

  • @Patashu
    @Patashu 2 роки тому +10

    The visualizations are top notch. It's so interesting to see how the sausage is made. Anyone as a kid would think level data is just grids of tiles, but oh no.

    • @musaran2
      @musaran2 28 днів тому

      Yeah, I never suspected SM3 was *still* using scripted construction.
      I suppose arbitrary data compression would be too slow?

    • @Patashu
      @Patashu 28 днів тому +1

      @@musaran2 It can be done (see pokemon gen 1) but it has its own set of tradeoffs and clearly this was good enough for what they needed at the time.

  • @Titanic4
    @Titanic4 Рік тому +2

    5:52 - that's one majestic way to complete the game...

  • @lior_haddad
    @lior_haddad 2 роки тому +11

    Your videos are so consistently high quality, I love it. The visuals really help with understanding your explanations.

  • @metarotta
    @metarotta 2 роки тому +7

    all of the visualisations are very good and makes this infinitely easier to understand, great video

  • @TompaA
    @TompaA 2 роки тому +4

    Another great video! Love your visuals and explanations!

  • @ganondalf8090
    @ganondalf8090 2 роки тому +10

    love the level generating sections! it would probably take forever to make, since i assume you're doing those sections by hand, but i would love to see a video of all the levels generating

    • @emaaaaax
      @emaaaaax 2 роки тому +3

      he's probably using a script to read the level data and visualize it as a video but i could be wrong

    • @100thCoin
      @100thCoin  2 роки тому +11

      Nah- I wrote a program to draw that stuff for me, ha! There's no way I would've done all that by hand. I might make a follow up video of generating all the main levels if people are interested.

    • @Selicre
      @Selicre 2 роки тому +2

      @@100thCoin Did you use a standalone 6502 emulator to do this, or a whole nes emulator with lua scripts? I actually did the standalone emulator approach with the all-stars version with my editor, it's really fun to mess with.

    • @100thCoin
      @100thCoin  2 роки тому +5

      ​@@Selicre It's a custom made 6502 emulator written in visual studio .Net forms. I just plug in map coordinates and the world number and it generates the level while putting an image in an output folder for each step it took to generate the level. (though a lot of it was toggleable. I could set it up use the actual level's width, or force a full 15 screens, only draw the finished result, only draw the tiles that were newly added to the image, etc. At one point, just to find the cooler glitch levels, I made it loop over every tile on the map for worlds 1 through 8. I still have that folder. It has 65536 images in it, and it's about 1.33 gigabytes! There's a whole lot of poorly labeled checkboxes and toggleable options that I only ever used once, ha!) It also outputs the PPU character information, and a "tilemap" which I used for the visuals around the 13 minute mark.
      5-2 actually starts in a tiny room with a pipe, so to draw the second area, I take the information from $7DFE and the tileset that loading a level stores there, and I can use that to generate the second part of the level as well. Generating the level mario enters after ascending in the toad house was trickier. I set it up so I can just paste a series of bytes into RAM at a specific address, then plug in the tileset and address to begin interpreting level data. It was a really fun project, and I'm glad I got to use it for this video!

  • @kales901
    @kales901 3 місяці тому +1

    the fact that the game has 'tiles' that delete tiles is very intresting

  • @genblinko7801
    @genblinko7801 2 роки тому +2

    a 15 minute video from 100th coin? LETS GOOOOO

  • @JustDavesRetroGames
    @JustDavesRetroGames 2 роки тому +2

    hey there I came across youre super little channel here and wanted to show my support, great content keep it up ✌😎

  • @handlesareanunfortunatefeature
    @handlesareanunfortunatefeature 2 роки тому +4

    damn this guy has the visuals

  • @emaaaaax
    @emaaaaax 2 роки тому +8

    amazing what you can do with this game, great video

  • @SMARTBoardSBMInchInteractiveWh

    Very well made and easy to understand

  • @wagnerramosmidichannelabso514

    (0:33) - "One hop on the pink noteblock will send you to a far away land!"
    - Toad
    That's one way to enter a glitch level in Toad's house.

  • @Pascal-eu2oe
    @Pascal-eu2oe 2 роки тому +7

    0:01 - The pipe glitch is probably crying in the corner after hearing that pink note blocks are more exploitable.
    0:35 - Obviously Mario doesn't need the whistle to go to a far away land.
    2:17 - This flowchart is very nice to see. An excellent way to visualize it.
    4:30 - It's always a table that makes everything break, isn't it?
    8:52 - This is so sad.
    11:25 - I'm kind of surprised bouncing on the note blocks here doesn't crash the game at all.

    • @100thCoin
      @100thCoin  2 роки тому +2

      > It's always a table...
      With my videos, yeah. I'm actively seeking which jump tables could be exploited, as it is certainly an effective method to crashing the game or executing in RAM.
      > kind of surprised bouncing on the note blocks here doesn't crash the game...
      All of these are mapped to the level data in RAM, so nothing goes wrong when bumping them. The out of bounds noteblocks can crash the game if they are pointing to ROM, as writing to certain places in ROM can cause Memory Mapper functions to occur, such as swapping PRG banks. In the case of the 7-1 noteblock, it swaps the positions of the bank it was reading and bank 30, and after a series of RTS instructions the stack underflows, which leads to pulling off unrelated bytes from $100 and $101 as if they were a return address. Unless you manipulate the bytes wherever it "returned" to, it's most likely going to crash the game.

  • @warmCabin
    @warmCabin 2 роки тому +6

    This is awesome! So, why is the status bar scroll split always all screwy in these glitch levels?

    • @100thCoin
      @100thCoin  2 роки тому +5

      As a quick refresher, the IRQ happens 192 scanlines after the screen starts being drawn. It causes an interrupt, so the game will stop whatever code it was reading temporarily to execute a short routine used for updating graphics so the HUD can utilize different characters, and also update the position / scroll.
      The toad houses have a specific branch in the IRQ routine (Tileset $07 uses the branch, to be more specific. The map and roulette houses use this branch too.). It doesn't have the step where it adjusts vertical scroll, so scrolling the screen upwards will move the HUD off screen. This looks funky, since it swaps the graphics and horizontal scroll, but the vertical scroll remains unchanged.
      In summary, toad houses shouldn't scroll upwards, so the developers never bothered to make the HUD remain in one place vertically. But they needed to give the map / toad houses a specific branch in the IRQ since this is where the hud can flip around to the pink side to showcase items you've collected.
      That's also why the HUD isn't broken in the other glitch levels showcased.

    • @warmCabin
      @warmCabin 2 роки тому

      > Refresher
      Man, I've been skipping lecture :/
      Interesting stuff. Would that be the same branch as used by the map screens?
      Another question, if you don't mind: is the area data in its entirety decompressed to cartridge RAM? Is collision data part of that? I'm looking at an ASCII Toad House at $60F0 right now so it seems like it!

    • @100thCoin
      @100thCoin  2 роки тому +2

      @@warmCabin Correct, the level's tile data is from $6000 through $794F. The "collision data" is a bit of a vague wording... The tiles at $6000 aren't just visual. If you hex edit those then you can interact with any changes you make. The bytes at $7E94-$7E9B determine which tiles are solid or not.

  • @tjk113
    @tjk113 2 роки тому +3

    very nice video and explanations.

  • @NtQueryInformationProcess
    @NtQueryInformationProcess 2 роки тому +2

    highly underrated

  • @paulgoldstein5467
    @paulgoldstein5467 Рік тому +1

    This Definitely one of the most underrated video I have ever seen.

  • @ForYouPlays
    @ForYouPlays Рік тому +1

    Super Mario Bros but it's a mod where you can make your own level using your own tileset, then it will tas that LMAO

  • @02DooD
    @02DooD 2 роки тому +2

    I wish I could edit this cool

  • @JMFSpike
    @JMFSpike 5 місяців тому

    Glitch levels in SMB1 are sooooooooooo much more interesting due to the way that game works.

  • @AtKiba
    @AtKiba 2 роки тому +2

    Your videos are awesome! :D

  • @BooeythePatooie
    @BooeythePatooie 2 роки тому +1

    Sorry to be a bit Doo-Doo Brained, but is this possible without any code ejection? Ya know, like without doing any complex setups for your console and all that?

    • @100thCoin
      @100thCoin  2 роки тому

      Everything showcased in the video was demonstrated through hex editing, though it could be done without it. It would just require a bunch of arbitrary code execution in 7-1, and some other shenanigans to get the game in such a state where this can be done.

  • @clonefighter1996
    @clonefighter1996 2 роки тому +1

    YOOO YOU'RE BACK!?

  • @rodrigo1593_
    @rodrigo1593_ Рік тому

    I LOVE YOU SONIC!!

  • @tallreversd
    @tallreversd Рік тому

    Surely a faraway land

  • @TheNoSwearGuy
    @TheNoSwearGuy Рік тому

    What about for generating the subworld in levels?

  • @user-lv8lt8gu4g
    @user-lv8lt8gu4g 9 місяців тому

    Enjoyed

  • @AmateurSuperFan
    @AmateurSuperFan 2 роки тому

    1 minute in and i already don't understand

  • @mariocursed
    @mariocursed 11 місяців тому

    no entendi un carajo pero buen video