Jump to content

OAM DMA hijacking: Difference between revisions

no edit summary
No edit summary
Line 3:
{{clr}}
 
'''OAM DMA hijacking''' ('''Object Allocation Map Direct Memory Access''') is a means of changing the OAM DMA routine at FF80-FF89 (though the actual end can be extended e.g. FF89 could use two bytes for a relative jump, in which case FF8A is occupied) in Game Boy games by glitching or hacking. In this case, this article will describe how to do it with glitches in the Pokémon games.
 
This glitch works by hijacking the "OAM DMA" routine associated with sprites. {{elaborate}}
 
An easy means to perform OAM DMA hijacking in both {{RB}} and {{GS}} is to write to the HRAM region FF80, however care must be taken as this region will be executed every frame. For this reason it is safe to place a ret (0xC9) opcode at the beginning of this region, write the code after it and replace the ret with a nop (0x00) byte afterwards. This exploit was documented by Crystal_.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.