Difference between revisions of "Quadrant Glitch"

From ALttP Speedrunning Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
== Mechanics ==
 
== Mechanics ==
This glitch is caused by a conflict between 2 movement functions attempting to update Link's position at the same time. All but 1 of the methods involve releasing a sword spin. With sword spins, the quadrant glitch becomes armed and active when Link releases a spin attack on the same frame that he crosses a quadrant boundary line. As such, the glitch is frame-perfect and usually pixel-perfect as well.
+
Depending on the direction of the quadrant glitch (North-South or East-West), all future transitions in those directions will be broken. While technically possible to fix with other major glitches, it is usually too late to tell. The best course of action for an unintended quadrant glitch is always to mirror immediately after it is noticed. Having the glitch armed is very apparent after the first transition, which will wrap the screen multiple times.
 +
 
 +
Quadrant glitch is caused by either a conflict between 2 functions attempting to update Link's position on the same frame, or from 2 functions disagreeing on where Link should end up.
  
In Desert Palace and Desert Palace only, the glitch can also be performed in the first room or the section of it right above. Taking damage that pushes Link across the horizontal boundary line while at the edge of the screen transition will stop his movement. Taking the screen transition as this happens will cause a conflict, resulting in the glitch being armed. This room is the only place in the game where a quadrant boundary and a supertile transition intersect on a walkable tile.
+
Quadrant boundary lines exist every 256 pixels on both axes. Rooms are 512 square pixels in area. When viewing coordinates, the quadrant line is cross when the last two digits of your coordinates go from {{HEX|00}} to {{HEX|FF}}, or vice versa. Link's quadrant is split into two variables, in the v14 practice hack, the RAM watch named "Quadrant" will show the current quadrant the game thinks you are in as well as the correct quadrant you are in, based on your coordinates.
  
Depending on the direction of the quadrant glitch (North-South or East-West), all future transitions in those directions will be broken. While technically possible to fix with other major glitches, it is usually too late to tell. The best course of action for an unintended quadrant glitch is always to mirror immediately after it is noticed. Having the glitch armed is very apparent after the first transition, which will wrap the screen multiple times.
+
Your current quadrant also controls the camera scroll boundaries at {{WRAM|0x600}}. These can be viewed with the "UW Camera X" and "UW Camera Y" line watches. In short, these control the maximum and minimum positions the camera can scroll to on each axis. These boundaries are controlled by the current quadrant variables and the room layout variables. These also get out of sync when quadrant glitches occur, and they can be noticed by the obvious fact that the camera scrolls too far at screen edges.
  
From a technical standpoint, the main tell is in a camera array beginning at {{WRAM|600}}. As an example, here is the memory watch for the quadrant glitch in the Desert Palace cannonball room. Take note of the behavior of the highlighted addresses:
+
2 functions conflicting and updating Link's quadrant twice happens when a sword spin is released on the same frame as another action that moves Link across a quadrant boundary, such as:
 +
* Recoiling off a sprite (e.g. Moldorm, beetles, bumpers)
 +
* Moving with a conveyor
 +
* Moving with a somaria platform
  
{| class="wikitable"
+
It is also possible for one function to believe Link should cross a boundary line and another function to disagree. This can be done by attempting to move diagonally across a boundary line at the same time a transition is triggered while taking damage or using a medallion. For practical purposes, this can only be done in Desert Palace, in the caged off leever area just north of the lobby. This is the only normally accessible location where a quadrant boundary and a non-door transition intersect. Technically though, this version of quadrant glitch can be done in EG as well.
|+ Desert cannonball room quadrant glitch RAM
 
! Condition
 
! Address
 
! _0 !! _1 !! _2 !! _3 !! _4 !! _5 !! _6 !! _7 !! _8 !! _9 !! _A !! _B !! _C !! _D !! _E !! _F
 
|- style="font-family: consolas;"
 
! rowspan="2" style="vertical-align:middle;" | Pre-glitch
 
! style="font-family: consolas;" | 7E060_
 
| 00 || '''<u>0E</u>''' || 00 || 0E || 10 || '''<u>0E</u>''' || 10 || 0F || 00 || 0B || 00 || 0A || 00 || 0B || 00 || 0B
 
|- style="font-family: consolas;"
 
! 7E061_
 
| 00 || 00 || 10 || 01 || 00 || 01 || 00 || 00 || '''<u>0A</u>''' || 01 || '''<u>0C</u>''' || 01 || 7F || 01 || 81 || 01
 
|-
 
| colspan="18" |
 
|- style="font-family: consolas;"
 
! rowspan="2" style="vertical-align:middle;" | Unglitched 1 pixel down
 
! style="font-family: consolas;" | 7E060_
 
| 00 || '''<u>0F</u>''' || 00 || 0E || 10 || '''<u>0F</u>''' || 10 || 0F || 00 || 0B || 00 || 0A || 00 || 0B || 00 || 0B
 
|- style="font-family: consolas;"
 
! 7E061_
 
| 00 || 00 || 10 || 01 || 00 || 01 || 00 || 00 || '''<u>0B</u>''' || 01 || '''<u>0D</u>''' || 01 || 7F || 01 || 81 || 01
 
|-
 
| colspan="18" |
 
|- style="font-family: consolas;"
 
! rowspan="2" style="vertical-align:middle;" | Post-glitch
 
! style="font-family: consolas;" | 7E060_
 
| 00 || '''<u>10</u>''' || 00 || 0E || 10 || '''<u>10</u>''' || 10 || 0F || 00 || 0B || 00 || 0A || 00 || 0B || 00 || 0B
 
|- style="font-family: consolas;"
 
! 7E061_
 
| 00 || 00 || 10 || 01 || 00 || 01 || 00 || 00 || '''<u>0A</u>''' || 01 || '''<u>0C</u>''' || 01 || 7F || 01 || 81 || 01
 
|}
 
  
 
== NMG ==
 
== NMG ==
Line 54: Line 29:
 
* Ganon's tower end of teleport maze (don't kill beetles; head straight to the next room)
 
* Ganon's tower end of teleport maze (don't kill beetles; head straight to the next room)
 
* Ganon's tower after wizzrobes 2 (don't even kill the guards, just head straight to torches)
 
* Ganon's tower after wizzrobes 2 (don't even kill the guards, just head straight to torches)
 +
 +
[[Category:Major Glitches]]

Latest revision as of 11:51, 27 August 2021

The Quadrant Glitch is a camera-related glitch that confuses future transitions.

Mechanics

Depending on the direction of the quadrant glitch (North-South or East-West), all future transitions in those directions will be broken. While technically possible to fix with other major glitches, it is usually too late to tell. The best course of action for an unintended quadrant glitch is always to mirror immediately after it is noticed. Having the glitch armed is very apparent after the first transition, which will wrap the screen multiple times.

Quadrant glitch is caused by either a conflict between 2 functions attempting to update Link's position on the same frame, or from 2 functions disagreeing on where Link should end up.

Quadrant boundary lines exist every 256 pixels on both axes. Rooms are 512 square pixels in area. When viewing coordinates, the quadrant line is cross when the last two digits of your coordinates go from 0x00 to 0xFF, or vice versa. Link's quadrant is split into two variables, in the v14 practice hack, the RAM watch named "Quadrant" will show the current quadrant the game thinks you are in as well as the correct quadrant you are in, based on your coordinates.

Your current quadrant also controls the camera scroll boundaries at $0600. These can be viewed with the "UW Camera X" and "UW Camera Y" line watches. In short, these control the maximum and minimum positions the camera can scroll to on each axis. These boundaries are controlled by the current quadrant variables and the room layout variables. These also get out of sync when quadrant glitches occur, and they can be noticed by the obvious fact that the camera scrolls too far at screen edges.

2 functions conflicting and updating Link's quadrant twice happens when a sword spin is released on the same frame as another action that moves Link across a quadrant boundary, such as:

  • Recoiling off a sprite (e.g. Moldorm, beetles, bumpers)
  • Moving with a conveyor
  • Moving with a somaria platform

It is also possible for one function to believe Link should cross a boundary line and another function to disagree. This can be done by attempting to move diagonally across a boundary line at the same time a transition is triggered while taking damage or using a medallion. For practical purposes, this can only be done in Desert Palace, in the caged off leever area just north of the lobby. This is the only normally accessible location where a quadrant boundary and a non-door transition intersect. Technically though, this version of quadrant glitch can be done in EG as well.

NMG

In Any% (NMG, No S+Q), there are a few places where the quadrant glitch can reasonably happen to a player following the proper route with normal behavior:

  • Thieves' Town Hellway (in general, you should be heading straight to the next room; however, to understand where the boundary line is: if you let the conveyor push you to the top of the second statue, you are on the top-most pixel of the lower quadrant)
  • Moldorm 2 (using the bottom concave hole as a guide, boundaries are in its exact vertical center, and right below the wedge graphics)

For a player using less-familiar tech, it is also reasonably possible to glitch in other rooms:

  • Escape (with very bad movement and early detection, it is technically possible to clink and spin across the boundary at the first key guard -- situated exactly between the statue and the chest)
  • Ice palace conveyor room (don't attempt to spin attack)
  • Turtle rock (only the first big room has enemies to kill while on a somaria platform; however, they should be killed with beam attacks, if at all)
  • Ganon's tower end of teleport maze (don't kill beetles; head straight to the next room)
  • Ganon's tower after wizzrobes 2 (don't even kill the guards, just head straight to torches)