OAM DMA hijacking: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
 
Line 52: Line 52:
At the desired RAM address (e.g. D34A), write:
At the desired RAM address (e.g. D34A), write:


ld a,(FFD3) ; a=random "D-sum" byte 1 number.
ld a,(FFD3) ; a=random "hRandomAdd" number.
ld (FFF8),a ; put a into FFF8, which controls what buttons are being pressed.
ld (FFF8),a ; put a into FFF8, which controls what buttons are being pressed.
ret ; Don't execute any code after D350.
ret ; Don't execute any code after D350.