Credits Warp Run

From Super Mario World Speedrunning
Jump to: navigation, search

In Super Mario World, a “credits warp” is an exploit that runs all or some of the game’s credits without defeating Bowser. There are several TAS-only strategies for achieving a credits warp, this page is devoted to a real-time strategy for achieving it in Yoshi's Island 2.

The exploit works by transferring control to sprite X-position table via the chuck eating glitch so that the game executes the X-position of sprites as if it were code. Using koopa shells, the X-position table can be filled with values which switches the game from mode 0x14 (normal level execution) to 0x1C (midway through the credits). The details for the setup needed to perform this glitch are described below.


History of the glitch: [1]

bizhawk movie file of the glitch(outdated): link

Masterjun's Documentation: link

Youtube Encode of the Run:
Video Comments:

Technical Requirements

Memory Locations

Memory Address Description Desired Value (in hex) Set By
0x7E00EB Sprite slot #7 x-coordinate, low byte 0xB2 P-Switch Horizontal Position
0x7E14E7 Sprite slot #7 x-coordinate, high byte 0x0C P-Switch Horizontal Position
0x7E1805 Minor Extended Sprite slot #9 y-coordinate, low byte 0xD8-0xE4, except 0xDF Throw block top-right fragment
0x7E1806 Minor Extended Sprite slot #10 y-coordinate, low byte 0x00 Throw block bottom-left fragment
0x7E00E2 Sprite slot #10 y-coordinate, low byte 0x6F or 0x6A Yoshi Berry
0x7E00E3 Sprite slot #11 y-coordinate, low byte 0x6A Yoshi Berry
0x7E00D8 through 0x7E00DD Sprite slots #0 through #6 y-coordinate, low byte Special Red Shell vertical positions when destroyed
Red Shell X Positions
0x7E00E4 Sprite slot #0 x-coordinate, low byte 0xFA Red Shell horizontal position
0x7E00E5 Sprite slot #1 x-coordinate, low byte 0x68 Red Shell horizontal position
0x7E00E6 Sprite slot #2 x-coordinate, low byte 0xA9 Red Shell horizontal position
0x7E00E7 Sprite slot #3 x-coordinate, low byte 0x1C Red Shell horizontal position
0x7E00E8 Sprite slot #4 x-coordinate, low byte 0x92 Red Shell horizontal position
0x7E00E9 Sprite slot #5 x-coordinate, low byte 0x75 Red Shell horizontal position
0x7E00EA Sprite slot #6 x-coordinate, low byte 0x60 Red Shell horizontal position

Sprite Slots

While performing the glitch as in the video, enemies will spawn in the correct sprite slots to allow you to perform the glitch. These notes are in the strategy section, below is a table of the exact requirements. (to be created).

Red Koopas for sprite slots 0 to 6, the p-switch is in sprite slot 7, Yoshi should be in sprite slot 8, and the green shell used to do the chuck eating glitch should be in sprite slot 9. Eaten red berry (or any sprite that you can get the correct values in 0x7E00E3 & 0x7E00E3) in slot 10 and 11.


Obtaining the Throw Block and The P-Switch in Sprite Slot #7

There must a p-switch at X-position $0CB2 in sprite slot 7. This p-switch is what makes the code jump to the sprite X-position table (see Masterjun's documentation if you want to know the technical reasons why). In the setup, the p-switch that is double grabbed with the block is in sprite slot 8 and so it is no good to use. You can get a p-switch in sprite slot 7 by cycling through the underground room while double grabbing a block and p-switch like in the video. Once this is done, the p-switch to the right will spawn into sprite slot 7 permanently and the p-switch that is being carried will no longer be needed and should be destroyed by pressing it.

Breaking the Throw Block and Despawning Its Particles

When a throw block breaks, it creates four fragments and ejects them in four directions. These fragments are “minor extended sprites”. We must destroy a throw block, and despawn two of the fragments at precise locations in order to set memory locations 0x7E1805 and 0x7E1806 to the correct values. To accomplish this, we throw the purple block against a the wall at the end of the level so the throw block at a specific location, and screen scroll to despawn the fragments in mid-air. When the block is shattered, it will either produce a "small" explosion or a "big" explosion (it is believed to be a 1 in 4 chance). With the biggest explosion the lower left fragment will always despawn at Y-position 0x00 as required (assuming the screen is positioned correctly), however the smaller explosions will cause it to despawn at Y-position greater than 0x00 which is no good. See the GIF for visual cues.


It is very important that you do not go too far to the right because it will cause the goal tape to spawn. If the goal tape spawns, the glitch cannot be performed unless you cycle back through the pipe. The goal tape spawns in sprite slot #9 and will not despawn until the room reloads. After the block-breaking part you must not collect any coins or the midway point, or allow any moles to break out of the ground on screen. You must also run off the screen when Yoshi's egg cracks because the shell fragments can overwrite these values as well.

Placing the p-switch

Next we go back to the P-Switch (which we successfully spawned into slot #7) and place it at this pixel-perfect location, 0x0CB2: 0x7E00EB:0xB2 & 0x7E14E7: 0x0C

Destroying Enemies and Spawning Yoshi in the Correct Sprite Slot

Before we go to the final section we need to make sure we clear out all non-essential enemies. If these enemies are still present later, they will spawn into bad sprite slots and overwrite data that we needed. We’ll need Yoshi to manipulate the berries and perform the item swap. It’s important that the Yoshi egg does not break on-screen, or it will overwrite the memory values we manipulated by despawning the throw block fragments. Since we need Yoshi to spawn in sprite slot #8, make sure that the info block is on screen. The info block counts as a sprite, and will force Yoshi to spawn into a lower sprite slot.

Glitching Berry #1

We need to manipulate the memory values for the y-coordinates of sprite slots #10 and #11. In order to do that, we need to perform a persistent berry glitch to make a berry persist in sprite slot #11. It can be done by running through the berry from the right, and having Yoshi stick out his tongue just before he would eat it on his own. Make sure you don’t eat this berry after making it persistent. No matter what, making this berry persistent always sets it y-coordinate low byte to 0x6A. puts value 0x6A in address 0x7E00E3

Positioning and Destroying the Red Shells

Next, we must place shells in specific x-coordinates and destroy them. These x-coordinates will form the processor instructions that avoid the item swap crash and change the game to credits mode. Refer to the table above & video to see which shell goes where. Here are the pixel-perfect locations that the shells need to be placed and destroyed (to be added).

For the last two shells, you should run to the left, and make sure to kick the shell below the platform off-screen before re-spawning the koopas. When you respawn the 3 koopas, stomp the leftmost one (that one is in sprite slot #9, we don’t need it), then jump on the rightmost one and kill the naked koopa that jumps out. It’s very important that the naked koopa is completely off screen before jumping on the final koopa, otherwise when the naked koopa pops out of that shell, it will spawn into sprite slot #4 and overwrite the value we just wrote.

The last shell may be placed and destroyed as normal, but using Yoshi to destroy the shell is considered a safer strategy, due to the importance of the y-coordinates of the shells when they’re destroyed. Here’s where Yoshi should be standing to destroy the last shell via this method. Again, this is a pixel-perfect location for Yoshi, though the shell may be resting anywhere in reach of Yoshi.

The Importance of Shell Y-Coordinates

When you destroy the shells, the height at which they’re destroyed matters. The value of 0x7E1805 (the top-right block fragment) will determine where within the sprite y-coordinate table that the processor will start executing bytes as processor instructions. A value of 0xD8 will start executing instructions from the very beginning of that table with sprite #0, whereas 0xE0 will skip to sprite #8, Yoshi. Since the sprite x-coordinate table is immediately after the sprite y-coordinate table in memory, we must make sure that the data in the sprite y-coordinate table does not cause the system to crash before we reach the code that actually sets the game mode and prevents the item swap crash, stored in the sprite x-coordinate table. If any of the shells are destroyed while resting on the ground, and that shell’s y-coordinate is executed as a processor instruction, it will crash the game. Similarly, since the P-switch is resting on the ground, if its y-coordinate is executed as a processor instruction, it will crash the game. As a result, it’s important to make sure that shells are not resting on the ground when they’re destroyed, and their height above the ground when they’re destroyed will impact which values in the y-coordinate table are skipped. [JeffW’s explanation of shell y-coordinates|] To ensure that the instruction as encoded by the shell in sprite slot #6 forces the processor to skip the bad instruction encoded by the P-switch, you can use the Yoshi strategy to destroy that shell. Just make sure Yoshi is standing in that exact spot, then pick up and spit out the shell to destroy it. This will ensure that the P-switch’s y-coordinate cannot be executed as an instruction. However, it does have the downside that the value 0xDE for the upper-right fragment despawn will crash the game. Alternatively, you can make sure that the shell in sprite slot #5 or #6 encodes a 3-byte processor instruction, by stomping it with y-coordinate values 0x39, 0x3C, 0x3D, 0x3E or 0x3F. Basically, the shell should be very close to the ground. There’s a 3 frame window to hit the shell while it’s close enough to the ground, and missing it risks stomping the shell while it’s on the ground, which will cause the setup to crash.

The Item Swap

To perform the item swap, we take the last remaining red shell and spit it out to the right near the beginning of the level. It’s important that the red shell is spit out while there aren’t any other sprites (besides Yoshi) on screen. Remember the the info box counts as a sprite. We follow along with the fireball, making sure it doesn’t get too far ahead or too far behind. Along the way, we eat a berry, to record the value 0x6A as the y-coordinate for sprite #10. To execute the item swap, we push Yoshi up against the ledge, drop the shell on the ground, let the fireball hit it and turn it into a moving coin, then stick out Yoshi’s tongue and jump off of Yoshi to collect the coin before Yoshi finishes eating it. After we collect the coin, but before Yoshi has finished eating, we load the Chargin’ Chuck, and this completes the item swap. If everything has gone well, the credits will start playing.

Common mistakes with the Item Swap:

  • If you collect the coin too many frames before Yoshi finishes eating, it will spawn minor extended sprites and overwrite the data we manipulated by despawning the block fragments. For this reason, it’s important that Yoshi is pushed directly up against the ledge.
  • If you press the Right button before jumping off of Yoshi, it will cause Yoshi to bounce off the wall and turn around.
  • You need to be running right when the item swap is completed, so it’s important that you perform a very small jump, land on the ground and continue to run right.
  • Unlike with my butt strategy, you should not perform a screen scroll. The screen scroll prevents the crash that we’re trying to exploit.