Guides:Mail Writer Codes: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
mNo edit summary
Line 37: Line 37:


=Simple codes=
=Simple codes=

==Miscellaneous codes==

===Write any value to any address===

This mail code allows you to target any address and write any value to it. Note that it can't be used to modify sram (address region $A000 - $BFFF).

The first two bytes marked in bold determine the address written to, in low-endian format. E.g. if you wish to target address $DA00, adjust the first two values in bold to '''00 DA'''.

The last byte marked in bold determine the value written. Adjust as needed.

{| class="wikitable"
|+ Codes to be used with [https://scotteh.me/ace/mail/ Scotteh's mail code tool]
|-
! All languages & all versions
|-
|
21 '''00 DA''' 36 '''FF''' C9 10 10 10 10 10 10 10 10 10 10
|}


==Improving the setup==
==Improving the setup==
Line 1,946: Line 1,927:
21 1F DB AF 77 21 5D DE C3 A5 27 47 2D '''85 05''' 00
21 1F DB AF 77 21 5D DE C3 A5 27 47 2D '''85 05''' 00
00 4A 91 01 01 01 01 01 01 01 01 01 01 01 01 01
00 4A 91 01 01 01 01 01 01 01 01 01 01 01 01 01
|}

==Miscellaneous codes==

===Write any value to any address===

This mail code allows you to target any address and write any value to it. Note that it can't be used to modify sram (address region $A000 - $BFFF).

The first two bytes marked in bold determine the address written to, in low-endian format. E.g. if you wish to target address $DA00, adjust the first two values in bold to '''00 DA'''.

The last byte marked in bold determine the value written. Adjust as needed.

{| class="wikitable"
|+ Codes to be used with [https://scotteh.me/ace/mail/ Scotteh's mail code tool]
|-
! All languages & all versions
|-
|
21 '''00 DA''' 36 '''FF''' C9 10 10 10 10 10 10 10 10 10 10
|}
|}