Game freeze: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
m (→‎Bar freeze: Fixed the link to the forum archives.)
(Added technical details for the bar freeze, and moved the external link to references. Some further research on what exactly may happen (because of the VBlank interrupt) is welcome.)
Line 1: Line 1:
[[File:Bar freeze.png|frame|right|A bar freeze in Pokémon Red/Blue, caused by stepping into the 'grass' right of Pallet Town.]]
[[File:Bar freeze.png|frame|right|A bar freeze in Pokémon Red/Blue, caused by stepping into the 'grass' right of Pallet Town.]]
A '''game freeze''' refers to the instance of where a game's controls lock up disallowing the player to play the game normally. Through different [[glitch|glitches]], different varieties of game freezes have been found. Sometimes music may be frozen on the current note but sometimes the music will stop completely. On rare occassions, the music will still be playing.
A '''game freeze''' refers to the instance of where a game's controls lock up disallowing the player to play the game normally. Through different [[glitch|glitches]], different varieties of game freezes have been found. Sometimes music may be frozen on the current note but sometimes the music will stop completely. On rare occasions, the music will still be playing.


==Types of game freezes==
==Types of game freezes==
Line 11: Line 11:


===Bar freeze===
===Bar freeze===
This is a kind of game freeze often encountered when using a [[walk through walls]] glitch. It fills the screen up with mostly full vertical bars, some interrupted with seemingly random letters and numbers.
A '''bar freeze''', also known as a '''rst $38''' freeze, is a common kind of game freeze in Game Boy games (with Pokémon games, best known in Generation I but also happening in Generation II). It fills the screen up with mostly full vertical bars, some interrupted with seemingly random letters and numbers.


Example: In Generation I, a bar freeze is often encountered when using a [[walk through walls]] glitch to [[Freeze tile|step out of the bounds of the map]], e.g. when stepping into the first column of "grass" tiles east of Pallet Town.
When this freeze happens, many memory addresses are replaced with '00 39'. (More information can be found [https://archives.glitchcity.info/forums/board-107/thread-6855/page-0.html#msg194169 here])


==== Technical details ====
Example: Stepping into the first column of 'grass' tiles east of Pallet Town.
A bar freeze happens when the game tries executes a 0xFF byte, which is interpreted as a <code>rst $38</code> instruction (a shorter and faster equivalent of <code>call $0038</code>), but the content of the ROM address $0038 is also a 0xFF byte (which is the case for all Generation I and II games). This will cause the game to repeatedly call $0038, i.e. jump to $0038 and push $0039 onto the stack as the return address. This results in a stack overflow quickly, and the pattern "00 39" ends up being written to other accessible regions of the memory, causing memory corruption.<ref>[https://archives.glitchcity.info/forums/board-107/thread-6855/page-0.html#msg194169 Re: PokéWTrainer freeze] by TheZZAZZGlitch, the Glitch City Laboratories forum</ref>

In most games, the stack begins at the top of the WRAM ($DFFF) and grows downwards (i.e. the address decreases), so the entire WRAM is corrupted first, followed by the SRAM (which may be locked, and is also subject to banking) and the VRAM (which is subject to [[VRAM inaccessibility]]). To complicate matters, the VBlank interrupt works normally in this process, which may copy some of the corrupted WRAM data to the VRAM, or otherwise use the corrupted WRAM data (e.g. try to play sound from a [[glitch sound bank]]). Sometimes, the screen will show a bar freeze pattern for a split second before turning blank<ref>For an example, see the video [https://www.youtube.com/watch?v=xuEsiyyYwVk&t=522s Pokémon R/B/Y: What's "out of bounds"? (at 8:42)] by TheZZAZZGlitch.</ref>.


===Black screen freeze===
===Black screen freeze===
Line 27: Line 30:
Example: When the player uses the [[dokokashira door glitch]] in Pokémon Red/Green to enter a location which does not exist.
Example: When the player uses the [[dokokashira door glitch]] in Pokémon Red/Green to enter a location which does not exist.


== References ==
<references />


[[Category:Terminology]]
[[Category:Terminology]]

Revision as of 03:39, 17 June 2022

A bar freeze in Pokémon Red/Blue, caused by stepping into the 'grass' right of Pallet Town.

A game freeze refers to the instance of where a game's controls lock up disallowing the player to play the game normally. Through different glitches, different varieties of game freezes have been found. Sometimes music may be frozen on the current note but sometimes the music will stop completely. On rare occasions, the music will still be playing.

Types of game freezes

Softlock (Lock-up)

A softlock, or lock-up, simply refers to when the player is stuck in a loop, either with the controls not responding or, for example, being infinitely forced to do an action. Music may still be playing.

Examples:

Bar freeze

A bar freeze, also known as a rst $38 freeze, is a common kind of game freeze in Game Boy games (with Pokémon games, best known in Generation I but also happening in Generation II). It fills the screen up with mostly full vertical bars, some interrupted with seemingly random letters and numbers.

Example: In Generation I, a bar freeze is often encountered when using a walk through walls glitch to step out of the bounds of the map, e.g. when stepping into the first column of "grass" tiles east of Pallet Town.

Technical details

A bar freeze happens when the game tries executes a 0xFF byte, which is interpreted as a rst $38 instruction (a shorter and faster equivalent of call $0038), but the content of the ROM address $0038 is also a 0xFF byte (which is the case for all Generation I and II games). This will cause the game to repeatedly call $0038, i.e. jump to $0038 and push $0039 onto the stack as the return address. This results in a stack overflow quickly, and the pattern "00 39" ends up being written to other accessible regions of the memory, causing memory corruption.[1]

In most games, the stack begins at the top of the WRAM ($DFFF) and grows downwards (i.e. the address decreases), so the entire WRAM is corrupted first, followed by the SRAM (which may be locked, and is also subject to banking) and the VRAM (which is subject to VRAM inaccessibility). To complicate matters, the VBlank interrupt works normally in this process, which may copy some of the corrupted WRAM data to the VRAM, or otherwise use the corrupted WRAM data (e.g. try to play sound from a glitch sound bank). Sometimes, the screen will show a bar freeze pattern for a split second before turning blank[2].

Black screen freeze

When the game freezes this way, it will switch to a black screen. Music often freezes on the note it was playing when this freeze happens.

Example: Can appear when the player uses returns to the overworld after using the Explorer Kit in an invalid area through accessing a 'void' in Generation IV. This phenomenon is also referred to as a 'BSoD' (Black Screen of Death) in the Hall of Origin community.

White screen freeze

When the game freezes this way, it will switch to a white screen. Music often stops completely when this freeze happens.

Example: When the player uses the dokokashira door glitch in Pokémon Red/Green to enter a location which does not exist.

References

  1. Re: PokéWTrainer freeze by TheZZAZZGlitch, the Glitch City Laboratories forum
  2. For an example, see the video Pokémon R/B/Y: What's "out of bounds"? (at 8:42) by TheZZAZZGlitch.