Submission #5610: xy2_'s Genesis Super Mario World 64 in 07:17.51

Console Sega Genesis Emulator Bizhawk 2.0.0
Game Version unknown Frame Count 26217
ROM Filename Super Mario World 64(Unl).bin Frame Rate 59.922751013550524
Branch Rerecord Count 22250
Unknown Authors xy2_
Game Super Mario World 64
Submitted by xy2_ on 7/22/2017 4:58:09 PM

Submission Comments
Dear MasterJun, Ive seen your Arbitrary Code Injection videos, and I saw you last year on AGDQ. I love to mess around and see what I can make with the Code Injection, and Ive really wanted to create something, but I dont know what to start with. I was wondering if you could make Yoshi's Island via Arbitrary Code Injection. That would be awesome because I've tried, and I did ok, the only problem was that I couldnt implement the Flutter A.I and when yoshi is it, baby mario cries and floats in his bubble. So now Im trying to make Game Genie in SMW so we could Inject Game Genie codes.

Game objectives

  • Emulator used: Bizhawk 2.0.0
  • Heavy glitch abuse
  • Takes damage to save time

Improvement table

StageFrames (old run)Frames (new run)AbsoluteRelative
1 3565 3282 -283-283
2 3561 3375 -186-469
3 4827 4535 -292-761
4 3698 3496 -202-963
5 2751 2668 -83 -1046
6 6068 5471 -597-1643
7 3392 3300 -92-1735


After a really long time, this is a 1735 frame improvement over my old submission. Most improvements come from much better mastery and understanding of the game.
If you have not played this game, I suggest trying to play it casually, to get just how horrendous the controls are; then watch this run. Mario is slow and extremely annoying to control, and every step of the level design seems like a giant "piss off" to the player.

Mechanics, tricks and glitches


To monitor a variety of adresses regarding movement, I made a very simple lua script that you can find here.
The game has a "P-meter" that goes up for every frame walked, in the air (while not windup-ing), and while holding right while capeing. There are three speeds: Mario walks at 1px/f; he runs at 2px/f when the P-meter reaches 64, and 3px/f when it reaches 112. There are no subpixels in this game. The P-meter can only exceed 64 when A, the run button, is held.)
Note that normal jumps cannot reach P-speed (instead limited to 2 speed.)
There are two types of normal jumps (I will describe the cape later on): normal jumps, done with B, and spin jumps, done with C. Each of these has a certain 'gravity', which dictates at what speed Mario will rise, then fall. For a normal jump, it's 2 (the adress goes 2 > 0 > 2) and for spinjumps it is 3, which means Mario will rise faster and fall faster; this is useful in a variety of situations. If the gravity is equal to 0, Mario will float (his x pos will remain the same.
In terms of movement, a jump goes like this (I'll take the normal jump here): Windup (10f, 2 gravity) - Jump (depends on how long B is held, max 32f, 2 gravity) - Float (4f, 0 gravity) - Fall (until Mario hits the ground, 2 gravity). Each of these portions of a jump can be watched precisely by observing the animation frame counter, at C41F. If Mario hits an enemy, then the jump "starts over" again, but without windup.
Every jump in the game has a "windup" state wherein the jump cannot be interrupted. During windup, the P-meter will not be increased, and the current "gravity" will be kept for the duration of the windup. A normal jump has a 10 frame windup, while a spinjump has a 3 frame windup. This means if the P-meter is under 64, it's (if possible) faster to use a spinjump for movement (and reach 2 speed in mid-air.).
When landing; the P-meter is set to 32 if greater than 32, or keeps its current value otherwhise. If Mario turns to the left from the right, the P-meter is kept; but if he turns to the left from the right, the P-meter is reset to 0. This means that when I need to slow down during a jump, I do it by turning to the left while in the air, then turning right as soon as I hit the ground. The only exception is floating platforms, which make Mario retain the current P-meter value.

Double windup glitch

The spinjump lasts 24 frames, and the normal jump lasts 32 frames (after windup.) If B is released on the exact last frame a jump could last, then Mario will be in the windup state again, but this time with 0 gravity; the jump goes: Windup (2g) - Jump (2g) - Windup (0g!!) - Fall. Here, the second windup takes the place of the fall, but it lasts much longer than the float does (10 frames instead of 4.) A double windup jump can stay in the air much longer, which is very useful in a variety of situations.


Hitboxes are equivalent to their sprite: imagine a box exactly around the sprite, and you have its hitbox. This is important, because it means that Mario's x and y position is determined by his sprite, and as such the animation he is in. For example, when falling from a spinjump, Mario's hitbox will be very taller (because of the cape falling with him. In many situations, I can use certain animations that make Mario wider or taller in order to either get pushed by a celling, hit the ground sooner, or hit a goalpoint or enemy sooner.

P-meter ground carry

Normally, Mario loses the P-meter (and as such his speed) if he hits the ground. However, the game is very bad at checking if Mario is actually on the ground or not; to jump again, the game only checks if Mario's x pos is at the right position, and the check for if he is on the ground is dealt with separately.
With a bit of clever tricks, we can carry the P-meter. There are two ways to do this: the first is to use the "float" part of a jump while being perfectly aligned with the ground you want to use for the trick. Mario will float a bit at the correct X position; as soon as he approaches the ground, then he will be able to jump again, without having been on ground. This is possible because since Mario is at 0 gravity, he will not go downwards, even if considered by position on the ground.
The second way to do this is using the cape. Falling with the cape has the lowest gravity in the game, 1. If done with 3/7 gliding, then Mario can hit the ground, but is actually registered as on ground on the next frame. Jumping during this frame allows to carry the P-meter.

Cape mechanics

When in posession on the game, Mario gets several more options: - the normal jump is replaced with the cape jump, which is the same as the normal jump, except gravity is 1 instead of 2. - the spinjump is replaced with the capespin, which can damage enemies from the side; useful when it's needed to clear enemies while staying in the air as little as possible. - if at P-speed, when Mario jumps, he will do a super jump, then start flying.

Infinite windup glitch

For some reason, while doing the cape jump, Mario is able to trigger the windup state infinitely, as long as he is in the air. This is very useful, because it allows to stay in the air much longer, and also to do P-speed carryover.

L+R flying P-speed gain

When Mario is not at top P-meter and is currently flying, then his speed will increase for every frame he holds right; but holding right causes Mario to dash towards the ground. However, holding left will make Mario pump his cape, gaining height. We can combine the two; start pumping by pressing left, then holding right will make Mario keep pumping while increasing the P-meter.

Dash jumping

Dashing down while flying will boost Mario 4 pixels to the right ( 3 of P-speed + 1 pixel.) In conjunction with floating platforms, Mario can dash down repetadly on floating platforms to gain some extra pixels.

Stage by stage comments

Stage 1

Main time same here is using double windup to make a jump that lasts half the stage. Not much changed otherwhise.

Stage 2

General optimisation, lag, and a jump in the middle of the stage that skips a cycle of waiting.

Stage 3

Use spinjumps at the start to reach 64 P-meter faster. Going under the turtle saves a lot of time. Precise jump under the podoboo that saves another cycle of waiting. Boss optimisation.

Stage 4

Much more precise jumps, use of P-meter ground carry up to getting the feather.

Stage 5

Super jump directly at the start, then flying until we gain P-speed.

Stage 6

General movement optimisation, use of flying when possible to keep P-speed. Near the end of the level, super jump from the very bottom area with the mini-thwomp, then fly with L+R to get P-speed.

Stage 7

Suggested screenshot


Noxxa: Judging.
Noxxa: This game, with its peculiar music choices, and its final boss, is like a quirky form of abstract art. It's slow and not exactly entertaining, but it's still...interesting in its own way. Accepting for the Vault.
feos: Pub.

Last Edited by on 1/1/2022 6:14 PM
Page History Latest diff