Language…
18 users online: Alex No, ben15420, DanMario24YT, GiraffeKiller, Gmario37, Gorry, Green, Hidincuzimsmokin, JudithPrietht, Metal-Yoshi94, MorrieTheMagpie, rafaelfutbal, Ray Hamilton, Sniwott, VoidCrypt, wayht, WhenUnique, xhsdf - Guests: 298 - Bots: 476
Users: 64,795 (2,371 active)
Latest user: mathew

Help understanding the level loading game modes

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.