Jump to content

OAM DMA hijacking: Difference between revisions

→‎Setup (OAM sprite manipulation): mistake and confusion with cursor tile's corruption
(→‎Setup (OAM sprite manipulation): mistake and confusion with cursor tile's corruption)
Line 35:
 
==Setup (OAM sprite manipulation)==
By simply changing the value at FF81 (normally the C3 in ld a,C3); the player can change the source of OAM sprites from C300 to XX00. In particular, this is useful for [[Party scrolling memory corruption#HRAM manipulation|party scrolling memory corruption]]; a glitch where scrolling beyond slot 6 in the party menu will attempt to animate those sprites and corrupt the memory. OAM sprite manipulation increases the range of corruptible memory addresses that would otherwise be possible.
 
This method can also be used for a creative purpose; for the player to add their own sprites to the screen; for example changing it to D300 will touch the start of the inventory items; D31C (the last Pokédex seen flag controls the y-coordinate of the eighth entry, D31D (the number of items) controls the x-coordinate of the entry, D31E (the first item) controls the sprite, D31F (the first item quantity) controls the attribute of that sprite). More control however starts at item 2 (D320) (or the ninth entry) and onward; two item pairs consisting of the item and its quantity will control one OAM entry (four bytes), so by adding specific items the player can display their own sprites on the screen. Note memory addresses are -1 in Yellow, so the same D31C is the number of items and so on.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.