Frame block copier

From Glitch City Wiki
Jump to navigation Jump to search

Frame block copier is an arbitrary RAM modification exploit in Pokémon Red, Blue, and Yellow. It allows the player to copy move OAM data to a big endian pointer at D09C/D09D (D09B/D09C in Yellow) by abusing the DrawFrameBlock routine (1E:4000 in both Red/Blue and Yellow). DrawFrameBlock is used during battle to process the animations.

The pointer is intended to default at C300 (the region for OAM entries from OAM DMA), but can be manipulated with glitches. However, currently it is necessary to lock the addresses with OAM DMA hijacking, because otherwise they will revert back to their intended value. An example use is to corrupt the contents of the Pokédex and player's bag by changing the pointer to D300.

The effects of this glitch will also vary based on the index number of the function at wFBDestAddr (D09E) (D09D in Yellow), so to get more animations to work the player can choose another value such as 04.

This glitch can also be combined with Tile Chaos.

    wFBMode:: ; d09e
    ; controls how the frame blocks are put together to form frames
    ; specifically, after finishing drawing the frame block, the frame block's mode determines what happens
    ; 00: clean OAM buffer and delay
    ; 02: move onto the next frame block with no delay and no cleaning OAM buffer
    ; 03: delay, but don't clean OAM buffer
    ; 04: delay, without cleaning OAM buffer, and do not advance [wFBDestAddr], so that the next frame block will overwrite this one
    ds 1

Credits

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