A Link to the Past

Lag

A lag frame happens when the CPU had so much to do in the previous frame that it didn't finish all of its calculations. Even if the work needed to complete the calculations from the previous frame is minimal, the game still allocates a full frame to finish it off. This frame is essentially a wasted frame in the context of speedrunning since you spent two frames updating the game state only once.

Common Sources of Lag

Most lag frames in ALttP are unavoidable. It tends to come from things like decompressing graphics or text or updating huge arrays in the SNES memory when changing screens. But there are some things you can do to avoid lag in certain situations, some of which will be listed below.

HUD counter lag

The way the game draws the number of rupees on the screen is very inefficient. For each digit except the last one (the "ones"), it will have to do more calculations the higher the digit is. This means that having 100 rupees is better than having 90 rupees (1 + 0 is less than 0 + 9). And 90 and 99 would both be the same as the last digit doesn't matter.

An analysis of godtas5 showed that it saved 51 frames of lag by having 100 rupees after getting Tempered Sword versus having 90-99 rupees. To avoid rupee lag in Any% NMG, you want to have 114 rupees entering Castle Tower. This is mostly something you can't do anything about, since going out of your way to grab more rupees would probably waste more time than it saves.

This same concept applies to bomb and arrow counts too.

Shield lag

The game spends time figuring out where and how to draw Link's shield. This code is skipped when Link does not have a shield, which can potentially save lag frames.

By analyzing godtas5, it was shown that not having a shield after completing Ice Palace saved 139 frames of lag throughout the rest of the run. Another application of this is to grab a wall during boss explosions or similar events. While holding a wall, the shield is not drawn, which can save lag on certain screens (the beginning of Agahnim2, for example).

Heart lag

While there's not much you can do about it, having more HP will cause the game to lag more. Both the containers themselves and Link's current HP matter.

By analyzing godtas5, it was shown that grabbing the Sanctuary Heart adds an additional 65 frames of lag throughout the run. Another known application of this is "incroy" frames where the Sanctuary cutscene is faster if Link enters it with one heart or less.

Sprite lag

The more sprites (enemies, drops) there are on the screen, the higher chance there is for lag to occur. Killing sprites can sometimes save time over not killing them. One notable instance of this is in Swamp Palace, where killing extra enemies in the room below the crystal switch lever can save some time in the water-filling cutscene after the lever is pushed. Another instance is the firesnake in Thieves' Town just before the big key door. The player can sometimes move in a specific way to try getting if off-camera in order to save on lag frames.

Movement lag

When Link is moving in any direction, a lot of code is executed to figure out which coordinate to update to, whether Link has collided with a wall, and so on. Walking diagonally executes this code twice. For the most part, you do want to move in the optimal path for the current room, but there are some instances where avoiding an optimal diagonal path or delaying diagonal inputs can save time. One very notable example of this comes from the Mimic enemies, who tend to give a healthy dose of lag if Link moves them diagonally.

Transition lag

Most of the lag from a transition is unavoidable. But it has been shown that you can avoid some of the lag on overworld transitions that use the "mosaic" effect (enter/leaving Lost Woods or Zora's Domain for example) by not activating the transition while Link is dashing.

Another source of transition lag is when Link walks into a dark room in the underworld. These trigger an effect that adds about 40 frames to any transition. In many contexts, there's not really anything to be done about this. But if the player is EGing through the underworld, they may have the option to route around dark rooms without losing significant routing efficiency doing so, which can save the player some time.

Crystal switch lag

If the peg switches in a dungeon are set to blue (instead of the default red state), every supertile transition gets an extra 3 frames of lag.

Item lag

Using items (hookshot, boomerang, arrows, etc.) can cause lag frames due to giving the CPU more work to do. This can be very prominent on items that have more complicated behavior (a somaria block) or special graphical effects (silver arrows and magic boomerang).

Ganon's Tower opening cutscene lag

You can get fewer lag frames during the GT opening cutscene by:

  1. Not dashing into the cutscene
  2. Not being on the top-most coordinate (up against the south wall of the tower).

Optimally, players want to cancel their dash to the left with right before the cutscene trigger. This can save 20-25 frames of lag.

Other lag

There are certain addresses in memory that might add/remove lag depending on what it's set to. It is theoretically possible to manipulate which values these are set to by doing different actions.

One address, $0FB4, is a flag that tells the game to go through all garnish slots and execute them. Garnish can be stuff like a rock or bush being broken into many pieces when throw it or slash it. The variable is reset on every underworld supertile transition, and when Link travels between the underworld and the overworld. There's no known way to "exploit" this to save time—the closest in NMG is to not grab the first tree rupees (and also don't dash through any bushes), which would give less lag for the Lost Woods transition, but this isn't really feasible.

Another address is $7EC300[0x200]. This is a palette buffer (2 bytes = 1 palette) that is used for various things like the mosaic effect and fading in/out. It contains palette values that might not be used on the current screen ie. left-overs from previous screens. But the code that calculates what colors to display for each frame during a mosaic effect or fade in/out will do extra work for each non-zero value. By for example dying (even if you have a fairy), some of these values will be set to zero and give you less lag in these transitions. A Save & Quit is not sufficient for clearing these palette values, so a full reset might give you less lag if you're starting a new run.

100% TAS Analysis

This table represents an analysis of lag sources throughout the 100% TAS TAS Videos Icon 3874M

SourceText lineTextboxUW->OWOW->UWOW transitionSupertileSpiral stairsPit/TelepadItem loadBoss explosion*UW MirrorOW mirrorFlute
325100120341957604125987667
32310212235186190446987969
32497116331857474541017769
33012282**34185861446998268
532119128321857554509990--
124121135351861--439--77--
426120117511867--4223--78--
32199121301959--432--79--
319991213521----450--83--
336123943518----4148--83--
Average 3.126110.2115.638.918.559.6362.6481.39980.468.25

Notes
* Some include ~8 frames for obtaining heart
** Pit transition to underworld

Other Notes

  • Dark room transitions add about 40 frames of lag
  • TT lag room was 24 frames of lag
  • Boss order: Helmasaur, Blind, Moldorm, Mothula, Vitreous, Trinexx heads, Trinexx shell, Trinexx body, Trinexx head, Lanmo (all 3)

Last updated September 19, 2026 by joshRTA