WRAM clear oversight (Generation II): Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
>Torchickens
mNo edit summary
>Ryccardo
mNo edit summary
Line 1: Line 1:
The '''WRAM clear oversight''' occurs in [[bp:Generation II|Generation II]], and is confirmed to apply to {{Crystal}}. The internal function "ClearWRAM" does not function correctly, due to a [[Programming logic error|bug]] in the code, only clearing bank 1 of WRAM.<ref>[https://github.com/pret/pokecrystal/blob/master/docs/bugs_and_glitches.md#clearwram-only-clears-wram-bank-1 Pokémon Crystal disassembly]</ref> A similar glitch occurs in {{RBY}} (see [[WRAM clear oversight (Generation I)]]).
The '''WRAM clear oversight''' occurs in [[bp:Generation II|Generation II]], and is confirmed to apply to {{Crystal}}. The internal function "ClearWRAM" does not function correctly, due to a [[Programming logic error|bug]] in the code, only clearing bank 1 of WRAM.<ref>[https://github.com/pret/pokecrystal/blob/master/docs/bugs_and_glitches.md#clearwram-only-clears-wram-bank-1 Pokémon Crystal disassembly]</ref> A similar glitch occurs in {{RBY}} (see [[SRAM clear oversight (Generation I)]]).


==Relevant section in the Pokémon Crystal disassembly indicating patch to add with +==
==Relevant section in the Pokémon Crystal disassembly indicating patch to add with +==

Revision as of 16:38, 4 May 2020

The WRAM clear oversight occurs in Generation II, and is confirmed to apply to Pokémon Crystal. The internal function "ClearWRAM" does not function correctly, due to a bug in the code, only clearing bank 1 of WRAM.[1] A similar glitch occurs in Pokémon Red, Blue, and Yellow (see SRAM clear oversight (Generation I)).

Relevant section in the Pokémon Crystal disassembly indicating patch to add with +

ClearWRAM::
 ; Wipe swappable WRAM banks (1-7)
 ; Assumes CGB or AGB

 	ld a, 1
 .bank_loop
 	push af
 	ldh [rSVBK], a
 	xor a
 	ld hl, WRAM1_Begin
 	ld bc, WRAM1_End - WRAM1_Begin
 	call ByteFill
 	pop af
 	inc a
 	cp 8
-	jr nc, .bank_loop ; Should be jr c
+	jr c, .bank_loop
 	ret
Some parts of this article have not yet been fully reviewed by a member of this wiki's staff or QC team.

Data from the Internet can be inaccurate or false, and it is easy to misremember information. For this reason there is more likely to be incorrect information in this article. This template will be removed once the information is peer-reviewed and tested by a staff or QC member.


More research is needed for this article.

Reason given: What purpose is ClearWRAM used for?



References