User:Zeroman/Write to WRAM using the item pack: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with " == Functions == === Write to memory == === Reset the value and address === This is used to reset the address and value you wanna write (to). It resets the address and value to DFFF and FF, respectively. == The item bag == As items: item 1: 4F (0x59), x255 item 2: item 0x6B, x255 item 3: Carbos (0x26), x(first byte of address) item 4: X Accuracy (0x2E), x(second byte of address) item 5: Lemonade (0x3E), x(value) item 6: Item 0x77, x201 item 7: Carbos (0x26), x211 item...") |
No edit summary |
||
Line 10:
== The item bag ==
As items:
*item 1: 4F (0x59), x255
*item 2: item 0x6B, x255
*item 3: Carbos (0x26), x(first byte of address)
*item 4: X Accuracy (0x2E), x(second byte of address)
*item 5: Lemonade (0x3E), x(value)
*item 6: Item 0x77, x201
*item 7: Carbos (0x26), x211
*item 8: X Accuracy (0x2E), x255
*item 9: Lemonade (0x3E), x255
*item 10:
END OF LIST
Line 48:
* ld l, $23
* ld a, $FF
* ret
|
Revision as of 18:40, 8 January 2024
Functions
= Write to memory
Reset the value and address
This is used to reset the address and value you wanna write (to). It resets the address and value to DFFF and FF, respectively.
The item bag
As items:
- item 1: 4F (0x59), x255
- item 2: item 0x6B, x255
- item 3: Carbos (0x26), x(first byte of address)
- item 4: X Accuracy (0x2E), x(second byte of address)
- item 5: Lemonade (0x3E), x(value)
- item 6: Item 0x77, x201
- item 7: Carbos (0x26), x211
- item 8: X Accuracy (0x2E), x255
- item 9: Lemonade (0x3E), x255
- item 10: TM01 (0xC9), x(any, but preferably 99)
END OF LIST
As ASM instructions: At DA65: jp D322
At CD35: jp D32A
At D322:
- ld h, $DF
- ld l, $FF
- ld a, $FF
- ld (hl), a
- ret
At D32A:
- ld h, $D3
- ld l, $22
- ld a, $DF
- ld (hl), a
- ld h, $D3
- ld l, $23
- ld a, $FF
- ld (hl), a
- ld h, $D3
- ld l, $23
- ld a, $FF
- ret
As HEX bytes: