User:Zeroman/Write to WRAM using the item pack: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
(reverted my mistake, added more information.)
 
Line 1: Line 1:
This setup requires two glitch items: 4F (0x59) for both {{RBY}} and item 0x6B for {{RB}} or (what better item for {{Y}})?

== Functions ==
== Functions ==


Line 29: Line 29:
jp D32A
jp D32A


At D322 (load the value of register a into register hl; "write value you want to write to address you want to write to."):
At D322:
* ld h, $DF
* ld h, $DF
* ld l, $FF
* ld l, $FF
Line 36: Line 36:
* ret
* ret


At D32A:
At D32A (reset function):
* ld h, $D3
* ld h, $D3
* ld l, $22
* ld l, $22
Line 46: Line 46:
* ld (hl), a
* ld (hl), a
* ld h, $D3
* ld h, $D3
* ld l, $23
* ld l, $24
* ld a, $FF
* ld a, $FF
* ret
* ret


As HEX bytes:
As HEX bytes:

At $DA65/$DA64:
* C3 22 D3

At $CD35 ({{RB}} only):
* C3 2A D3