CFC4 freeze: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
>Torchickens
No edit summary
(added details for why this glitch occurs.)
Line 1: Line 1:
{{incomplete|Why this occurs and why Diglett's Cave works as a solution}}
{{incomplete|Why Diglett's Cave works as a solution}}


The '''CFC4 freeze''' occurs in {{RB}}. It does not occur in {{Yellow}}. If the value of memory address CFC4 is an odd value, it can cause the game to freeze after the conclusion of a battle.
The '''CFC4 freeze''' occurs in {{RB}}. It does not occur in {{Yellow}}. If the value of memory address CFC4 is an odd value, it can cause the game to freeze after the conclusion of a battle.


Specifically, the value CFC4 stores a check to see if a font is loaded, and is thus known as wFontLoaded. If the first bit is set, thus being an odd value, then when the game needs to load a new tileset into VRAM, the game copies tileset data during VBlank. If the value is an even value, then data is copied while the LCD is disabled. Because this value is set to 1 during battle, the game goes through a code path that results in waiting for VBlank interrupt that will never arrive, due to the LCD being turned off during the battle transition to overworld.
The freeze curiously, can be avoided by performing a glitch that would normally cause it to occur in Diglett's Cave.

The freeze can be avoided by performing a glitch that would normally cause it to occur in Diglett's Cave.


The following [[glitch]]es are known for corrupting CFC4.
The following [[glitch]]es are known for corrupting CFC4.
Line 11: Line 13:
*Other [[buffer overflow]] techniques such as [[Super Glitch (Generation I)|Super Glitch]]
*Other [[buffer overflow]] techniques such as [[Super Glitch (Generation I)|Super Glitch]]
*During [[instant encounter infinite chain glitch]]
*During [[instant encounter infinite chain glitch]]

==Source==
[https://youtu.be/vJfjYeFlj-g?t=376 ZZAZZGlitch's video on Overanalysing Glitch Items(paraphrased)]


{{stub}}
{{stub}}

Revision as of 02:48, 28 February 2021

This article is incomplete. Please feel free to add any missing information about the subject. It is missing: Why Diglett's Cave works as a solution.

The CFC4 freeze occurs in Pokémon Red and Blue. It does not occur in Pokémon Yellow. If the value of memory address CFC4 is an odd value, it can cause the game to freeze after the conclusion of a battle.

Specifically, the value CFC4 stores a check to see if a font is loaded, and is thus known as wFontLoaded. If the first bit is set, thus being an odd value, then when the game needs to load a new tileset into VRAM, the game copies tileset data during VBlank. If the value is an even value, then data is copied while the LCD is disabled. Because this value is set to 1 during battle, the game goes through a code path that results in waiting for VBlank interrupt that will never arrive, due to the LCD being turned off during the battle transition to overworld.

The freeze can be avoided by performing a glitch that would normally cause it to occur in Diglett's Cave.

The following glitches are known for corrupting CFC4.

Source

ZZAZZGlitch's video on Overanalysing Glitch Items(paraphrased)

This article or section is a stub. You can help Glitch City Wiki by expanding it.