Baronhaynes

MM5 - Crystal Warp Explanation

Aug 10th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. ------------------------
  2. > The Crystal Warp takes a death as early as possible and warps to the boss corridor by manipulating some values in memory.
  3. ------------------------
  4. + The Pukapucker (bobblehead enemies) in Crystal Man's stage are unique in that they're composed of two sprites. The body spawns first and the head is generated by the game creating a copy of the body and storing it in the first unused object ID slot in memory. There are 18 available object IDs for things that can appear onscreen (e.g. enemies, health, projectiles). We need a way to fill all of those object IDs just as the game is trying to do this 2-sprite enemy spawn....like, say, generating a bunch of orb sprites from taking a death.
  5.  
  6. + Usually, if all those slots are filled from having a ton of stuff onscreen, any new object attempting to appear will be skipped. This is how you can despawn enemies or bullets sometimes during laggy sections. However, because of the way this 2-sprite enemy is created, the game wants to store the copy of the body to create the head somewhere even if all the object slots are full. So it puts it in the next section in memory, which is data about Mega Man's location. This means the body object's pixel position is written to Mega Man's current screen ID. Now the game thinks you're on screen 160 or so. That screen doesn't actually exist, but since you've just taken a death, the game goes "oh, where's the nearest checkpoint", which is the boss corridor.
  7.  
  8. + A side effect from doing this trick is that the game reads some of our stored enemy information when it's writing the respawn timer into memory, so it puts the enemy's object ID (09) into that address, which is ordinarily given 01. This address is controlled by a second timer that takes 256 frames to count down, and it will do this until the first address reaches 00. So we're doing that 8 extra times, which means we're waiting ~38 seconds instead of ~4 for the screen to fade to black.
  9.  
  10. + Long story short: We're stuffing this poor enemy's head into the machinery of the game, and the game eventually spits it back out at us, propelling us to the boss corridor. This is a highly scientific description of the process and I encourage everyone to propagate it as much as possible.
  11.  
  12. Thanks to Polari for figuring most of this stuff out. You can find his detailed explanation here:
  13. https://pastebin.com/t7Zqf5HX
Add Comment
Please, Sign In to add comment