WRAM clear oversight (Generation II): Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
>Torchickens m (Torchickens moved page WRAM clear oversight to WRAM clear oversight (Generation II)) |
>Torchickens No edit summary |
||
Line 23: | Line 23: | ||
</pre> |
</pre> |
||
{{Verify}} |
{{Verify}} |
||
{{Researchneeded| |
{{Researchneeded|What purpose is ClearWRAM used for?}} |
||
{{clr}} |
{{clr}} |
||
Revision as of 20:48, 17 December 2019
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 WRAM 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
More research is needed for this article.
| |
Reason given: What purpose is ClearWRAM used for? |