Guides:Coin Case ACE: Difference between revisions
Content deleted Content added
(6 intermediate revisions by the same user not shown) | |||
Line 18: | Line 18: | ||
# Give any pokémon a mail with specific content and set up a box name code |
# Give any pokémon a mail with specific content and set up a box name code |
||
# Set up a specific movement pattern in the Goldenrod Radio Tower to be able to execute ACE |
# Set up a specific movement pattern in the Goldenrod Radio Tower to be able to execute ACE |
||
# Execute a code that gives us 255 of every TM, along with a different, more convenient ACE method. |
|||
==Step 1: Obtaining everything needed for the setup== |
==Step 1: Obtaining everything needed for the setup== |
||
Line 227: | Line 228: | ||
# It is recommended to save before continuing. |
# It is recommended to save before continuing. |
||
# Use TM33. If everything went correctly, this will start the mail writer and open a screen asking you to input text for a mail. |
# Use TM33. If everything went correctly, this will start the mail writer and open a screen asking you to input text for a mail. |
||
# Due to limitations, there is no in-built option to safely exit the mail writer. Instead, you can safely exit by typing the below mail, selecting END on the mail screen, then pressing START to execute the mail. |
|||
# From now on, you can repeat this process at any time to start the mail writer. |
|||
{| class="wikitable" style="margin-left: auto; margin-right: auto; border: none;" |
|||
Since we aren't planning on using the Coin Case anymore, the mail that was previously give to a pokémon can be removed. It is no longer relevant for the remainder of the setup. |
|||
| |
|||
[[File:Mail_English_GS_Rh.png]] |
|||
|} |
|||
From now on, you can repeat this process at any time to start the mail writer. Since we aren't planning on using the Coin Case anymore, the mail that was previously give to a pokémon can be removed. It is no longer relevant for the remainder of the setup. |
|||
'''The next section will elaborate on the usage of the Mail Writer. Please read these instructions carefully before proceeding.''' |
|||
===Troubleshooting & repairing TM33=== |
===Troubleshooting & repairing TM33=== |
||
Line 290: | Line 298: | ||
* Click on the "Run" button to display the mails you need to enter |
* Click on the "Run" button to display the mails you need to enter |
||
{| class="wikitable" |
{| class="wikitable" style="margin-left: auto; margin-right: auto; border: none;" |
||
|+ Codes to be used with [https://timovm.github.io/MailConverter/ TimoVM's MailConverter] |
|+ Codes to be used with [https://timovm.github.io/MailConverter/ TimoVM's MailConverter] |
||
|- |
|- |
||
Line 297: | Line 305: | ||
! scope="row"| English |
! scope="row"| English |
||
|| |
|| |
||
11 F2 D6 21 1B D4 73 23 72 2E 18 2A 12 13 2A 12 |
|||
13 21 7E D5 E5 CD 23 12 3E 01 0E 32 E1 C3 4C 31 |
|||
|} |
|} |
||
Line 312: | Line 320: | ||
The Mail writer allows you to easily write and execute arbitrary payloads. Aside from writing your own codes, we recommend the following: |
The Mail writer allows you to easily write and execute arbitrary payloads. Aside from writing your own codes, we recommend the following: |
||
* [[User:TimoVM/Mail Writer Codes|Mail codes]]: this page contains a collection of assembly for mail codes that can be used for a variety of common purposes such as fixing the side effects of the ACE setup, editing pokémon and items, etc.. |
* [[User:TimoVM/Mail Writer Codes|Mail codes]]: this page contains a collection of assembly for mail codes that can be used for a variety of common purposes such as fixing the side effects of the ACE setup, editing pokémon and items, etc.. |
||
* [[User:TimoVM/RAM Writer|RAM writer]]: (recommended for more experienced users) this page contains the assembly for a large one-size-fits all program that allows you to edit any value in RAM with a user-friendly GUI |
* [[User:TimoVM/RAM Writer|RAM writer]]: (recommended for more experienced users) this page contains the assembly for a large one-size-fits all program that allows you to edit any value in RAM with a user-friendly GUI. |
||
=Appendix= |
=Appendix= |
||
Line 471: | Line 479: | ||
<pre> |
<pre> |
||
Box 1: $D8BF |
Box 1: $D8BF |
||
80 add a, b |
|||
AF xor a ; a = $00 |
AF xor a ; a = $00 |
||
D6 E8 sub $FF ; a = $18 |
|||
EA F9 F8 ld ($F8F9), a |
|||
EA D1 F8 ld ($F8D1), a |
|||
D6 FF sub $FF ; a = $01 |
|||
D6 F7 sub $F7 ; a = $21 |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Box 2: $D8C8 |
Box 2: $D8C8 |
||
EA |
EA D0 F8 ld ($F8D0), a |
||
D6 |
D6 FF sub $FF ; a = $22 |
||
EA |
EA D6 F8 ld ($F8D6), a |
||
21 |
|||
50 ld d; b |
|||
Box 3: $D8D1 |
Box 3: $D8D1 |
||
18 F4 ld hl, $F418 |
|||
E6 A1 and $A1 ; a = $21 |
|||
D6 83 sub $83 ; a = $9F |
|||
EA F4 F8 ld ($F8F4), a |
|||
87 add a, a ; a = $3E, carry flag set |
|||
.write |
|||
22 ldi (hl), a |
|||
D0 ret nc ; Ignore on first pass, taken when .write called |
|||
FB ei |
FB ei |
||
50 ld d, b |
50 ld d, b |
||
Box 4: D8DA |
Box 4: D8DA |
||
E6 84 and $84 ; a = $04 |
|||
EA F8 F8 ld ($F8F8), a |
|||
D4 D6 F8 call nc, .write |
|||
D6 E6 sub $E6 ; a = $4C |
|||
D6 87 sub $87 ; a = $7D |
|||
EA FB F8 ld ($F8FB), a |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Box 5: $D8E3 |
Box 5: $D8E3 |
||
.loop |
|||
E6 84 and $84 ; a = $04 |
|||
D6 FF sub $FF ; Increments a on each pass |
|||
EA 9B FA ld ($FA9B), a |
|||
EA EF F8 ld ($F8EF), a |
|||
D6 86 sub $86 ; a = $7E |
|||
F5 push af |
|||
FB ei |
|||
F6 FF or $FF ; a = $FF |
|||
50 ld d, b |
50 ld d, b |
||
Box 6: $D8EC |
Box 6: $D8EC |
||
FB ei |
|||
EA F5 F8 ld ($F8F5), a |
|||
FB ei |
|||
EA 9D FA ld ($FA9D), a |
|||
EA xx F5 ld ($F5xx), a ; Ranges from $F57E to $F5AF, all 50 TMs |
|||
F1 pop af |
|||
21 |
|||
FE AF cp $AF |
|||
50 ld d, b |
|||
Box 7: $D8F5 |
Box 7: $D8F5 |
||
D2 FC F8 jp nc, .continue |
|||
A7 and a, a ; Reset carry flag |
|||
01 32 00 ld bc, $0032 |
|||
D2 E3 F8 jp nc, .loop |
|||
.continue |
|||
AF xor a, a |
|||
50 ld d, b |
50 ld d, b |
||
Box 8: $D8FE |
Box 8: $D8FE |
||
F6 D2 and $D2 ; a = $D2, reset carry flag |
|||
D4 D6 F8 call nc, .write |
|||
D6 |
D6 93 sub $93 ; a = $3F |
||
87 add a, a ; a = $7E, reset carry flag |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Box 9: $D907 |
Box 9: $D907 |
||
D4 D6 F8 call nc, .write |
|||
D6 9D sub $9D ; a = $E1, TM33's item ID |
|||
EA B8 F5 ld (wItems), a ; Main item pocket, first item ID |
EA B8 F5 ld (wItems), a ; Main item pocket, first item ID |
||
D6 E3 sub $E3 ; a = $F5 |
|||
EA 9E FA ld ($FA9E), a |
|||
50 ld d, b |
50 ld d, b |
||
Box 10: $D910 |
Box 10: $D910 |
||
F6 F5 or $F5 ; a = $F5 |
|||
D2 D6 F8 jp nc, .write |
|||
D0 ret nc |
|||
50 ld d, b |
50 ld d, b |
||
TM33 bootstrap, starting from $D418 |
|||
3E 04 ld a, $04 |
3E 04 ld a, $04 |
||
D2 7E F5 jp nc, wTMsHMS ; Carry and zero flag are both reset when using TM25 |
D2 7E F5 jp nc, wTMsHMS ; Carry and zero flag are both reset when using TM25 |
||
</pre> |
|||
====Raw Assembly==== |
|||
<pre> |
|||
AF D6 E8 EA D1 F8 D6 F7 50 |
|||
EA D0 F8 D6 FF EA D6 F8 50 |
|||
F4 F4 D6 83 87 87 D0 FB 50 |
|||
E6 84 D4 D6 F8 D6 87 FB 50 |
|||
D6 FF EA EF F8 F5 F6 FF 50 |
|||
FB FB EA F5 F5 F1 FE AF 50 |
|||
D2 FC F8 A7 D2 E3 F8 AF 50 |
|||
F6 D2 D4 D6 F8 D6 93 87 50 |
|||
D4 D6 F8 D6 9D EA B8 F5 50 |
|||
F6 F5 D2 D6 F8 50 50 50 50 |
|||
</pre> |
</pre> |
||
Line 585: | Line 616: | ||
<pre> |
<pre> |
||
Box 1: $D8BF |
Box 1: $D8BF |
||
80 add a, b |
|||
AF xor a ; a = $00 |
AF xor a ; a = $00 |
||
D6 |
D6 E8 sub $FF ; a = $18 |
||
EA |
EA D1 F8 ld ($F8D1), a |
||
D6 F7 sub $F7 ; a = $21 |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Box 2: $D8C8 |
Box 2: $D8C8 |
||
EA D0 F8 ld ($F8D0), a |
|||
D6 86 sub $86 ; a = $7E |
|||
D6 FF sub $FF ; a = $22 |
|||
EA 9D FA ld ($FA9B), a |
|||
D6 |
EA D6 F8 ld ($F8D6), a |
||
21 |
|||
FB ei |
|||
50 ld d; b |
|||
Box 3: $D8D1 |
Box 3: $D8D1 |
||
18 F4 ld hl, $F418 |
|||
D6 |
D6 83 sub $83 ; a = $9F |
||
.doubleAndWrite |
|||
EA 9A FA ld ($FA9A), a |
|||
87 add a, a ; a = $3E, carry flag set |
|||
.write |
|||
22 ldi (hl), a |
|||
D0 ret nc ; Ignore on first pass, taken when .write/.doubleAndWrite called |
|||
FB ei |
|||
50 ld d, b |
50 ld d, b |
||
Box 4: D8DA |
Box 4: D8DA |
||
E6 84 and $84 ; a = $04 |
|||
87 add a, a |
|||
D4 D6 F8 call nc, .write |
|||
D6 B9 sub $B9 ; a = $C3 |
|||
AF xor a ; a = $00 |
|||
EA 9C FA ld ($FA9C), a |
|||
F6 D2 or $D2 ; a = $D2 |
|||
D0 ret nc |
|||
50 ld d, b |
50 ld d, b |
||
Box 5: $D8E3 |
|||
Party pokémon #3's stat experience, starting from $DA9A |
|||
D4 D6 F8 call nc, .write |
|||
D6 93 sub $93 ; a = $3F |
|||
D4 D5 F8 call nc, .doubleAndWrite |
|||
50 ld d, b |
|||
Box 6: $D8EC |
|||
AF xor a ; a = $00 |
|||
F6 F5 or $F5 ; a = $F5 |
|||
D2 D6 F8 jp nc, .write |
|||
50 ld d, b |
|||
TM33 bootstrap, starting from $D418 |
|||
3E 04 ld a, $04 |
3E 04 ld a, $04 |
||
D2 7E F5 jp nc, wTMsHMS ; Carry and zero flag are both reset when using TM25 |
|||
</pre> |
</pre> |
||
====Raw Assembly==== |
|||
<pre> |
|||
AF D6 E8 EA D1 F8 D6 F7 50 |
|||
EA D0 F8 D6 FF EA D6 F8 50 |
|||
F4 F4 D6 83 87 87 D0 FB 50 |
|||
E6 84 D4 D6 F8 AF F6 D2 50 |
|||
D4 D6 F8 D6 93 D4 D5 F8 50 |
|||
AF F6 E1 D2 D6 F8 50 50 50 |
|||
</pre> |
|||
[[Category:Guides]] |
[[Category:Guides]] |