Views: 837,775,499
29 users online: A-l-e-x-99,  Anorakun, Blizzard Buffalo, brickblock369, chickaDEE Magazine, CosmicTiff, Doug Walker, Epic_stuff, EvanEMV, Gabriel12102673, Green Jerry, Hatsune Blake, HD_DankBaron,  JamesD28, KiloMinimo,  Koopster, MarioriaM, MegaSonic1999, Nathrakus, NewPointless, Paithus, PlagueRatofDoom, RAFAEL_M_C_, sio-kedelic, ss2, StarHammer, Superdjsteve54, TheMorganah,  xHF01x - Guests: 73 - Bots: 60 Users: 45,802 (3,388 active)
Latest: celltrark
Summer C3 2020 Content Spotlight
Samantha's Systematic Destruction of SMW!
Not logged in.
Help understanding the level loading game modes
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Help understanding the level loading game modes
Pages: « 1 »
I'm having a little bit of trouble understanding the game modes that relate to the level loading routines, specifically about switching between levels and sublevels. From what I've gathered by looking through all.log, this is the process:
  1. Mario is in a level (GM 14).
  2. Mario enters a door or pipe, which freezes all sprites and triggers the Fade to Level game mode (GM 0F).
  3. The Fade to Level game mode triggers the mosaic effect and then increments the game mode counter to the so-called "Fade to Level (black)" mode (GM 10). I'm not exactly sure what that mode does, but then it transitions into Load Level (GM 11).
  4. I would assume that this actually loads the level data into RAM, though I'm not exactly sure about the specifics, but it seems relatively straightforward.
  5. The next mode is Prepare Level (GM 12), which I believe just sets things up and loads sprites, etc. Pretty obvious.
  6. Finally, there's Level: Fade In (GM 13) which actually fades into the level and starts it up.

Given this information, I wanted to see how quickly I could make a the level transition occur. Basically, which of these steps are required, and which are optional? The first thing I tried was cutting out the Fade to Level game mode and jumping straight to GM 10. This worked, but interestingly enough, it entered the level with the mosaic effect still in play. I assumed this occurs because the next mode was attempting to undo the effect that was no longer being applied, so I tried skipping Fade to Level (black) as well, just to see what would happen. Interestingly enough, I still saw no difference between skipping GM 0F and skipping GM 10. Still not sure what Fade to Level (black) actually does.

Obviously, skipping subsequent modes causes the game to glitch out a little bit, even if you're reloading the same level. However, I'm interested in that latter case, the case in which you're simply reloading the same level.

Why does Load Level need to be called again if the target level is the same as the one you're currently in? The game appears to fail to reset sprites' positions if Load Level is skipped, which means my earlier analysis was partially wrong, and the background graphics get garbled as well, which I don't really understand.

Any ideas? Are any of these at all documented?
Bump? I don't remember if bumps are condoned or not here, but since I've had no reply after nine days, I figured I'd ask once more before diving into this myself.

Is there really no documentation on how these work? Does anyone have any idea what the process is? Really, anyone willing to point me in the right direction would be appreciated.
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Help understanding the level loading game modes

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Super Mario Bros. X Community
  • Mario Fan Games Galaxy