Guides:Mail Writer GS (non-EN): Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
Line 260: | Line 260: | ||
* If the code executes succesfully, the "MAILWRITER" nicknamed pokémon has now been repaired. |
* If the code executes succesfully, the "MAILWRITER" nicknamed pokémon has now been repaired. |
||
= |
=Appendix: in-depth explanation of the setup= |
||
===Effect of the setup box name code=== |
|||
Converting the characters from box names to assembly results in the following code. Please note that the box name code overwrites part of itself, the translated assembly assumes the code was already used once. |
|||
The code overwrites part of itself to call the byteFill function. This will fill the area between $D57E and $D5AF with $FF values, setting all 50 TM quantities to 255. Separately, this code overwrites the latter half of party pokémon #5's stat experience data, allowing it to function as a TM25 bootstrap that redirects execution to the Mail Writer. |
|||
===Effect of the TM code=== |
|||
Converting the TM quantities to assembly results in the following code. Please note that this code requires a value of $04 in register a in order to properly work. |
|||
<pre> |
|||
French |
|||
11 55 DD ld de, $DD55 |
|||
D5 push de |
|||
D5 push de ; .nextMail |
|||
D5 push de |
|||
21 2B 62 ld hl, _ComposeMailMessage |
|||
CF rst08h, FarCall a:hl |
|||
E1 pop hl |
|||
D1 pop de |
|||
2A ldi a, (hl) ; .continue |
|||
FE 50 cp $50 |
|||
38 FB jr c, .continue |
|||
28 0A jr z, .terminator |
|||
87 add a, a |
|||
86 add a, (hl) |
|||
12 ld (de), a |
|||
13 inc de |
|||
23 inc hl |
|||
81 add a, c |
|||
4F ld c, a |
|||
12 ld (de), a |
|||
18 EF jr .continue |
|||
21 01 C4 ld hl, C401 ; .screenLoop |
|||
4D ld c, l |
|||
CD 90 3A call PrintBCDNumber.loop |
|||
1B dec de ; .goBack |
|||
CD 3B 37 call JoyTextDelay_ForcehJoyDown |
|||
BD cp a, l ; l = $04 |
|||
28 D9 jr z, .nextMail |
|||
38 F0 jr c, .displayLoop |
|||
FE 08 cp $08 |
|||
C8 ret z |
|||
18 F2 jr .goBack |
|||
</pre> |
|||
<pre> |
|||
German |
|||
11 55 DD ld de, $DD55 |
|||
D5 push de |
|||
D5 push de ; .nextMail |
|||
D5 push de |
|||
21 22 62 ld hl, _ComposeMailMessage |
|||
CF rst08h, FarCall a:hl |
|||
E1 pop hl |
|||
D1 pop de |
|||
2A ldi a, (hl) ; .continue |
|||
FE 50 cp $50 |
|||
38 FB jr c, .continue |
|||
28 0A jr z, .terminator |
|||
87 add a, a |
|||
86 add a, (hl) |
|||
12 ld (de), a |
|||
13 inc de |
|||
23 inc hl |
|||
81 add a, c |
|||
4F ld c, a |
|||
12 ld (de), a |
|||
18 EF jr .continue |
|||
21 01 C4 ld hl, C401 ; .screenLoop |
|||
4D ld c, l |
|||
CD E6 3A call PrintBCDNumber.loop - 1 |
|||
1B dec de ; .goBack |
|||
CD 87 37 call JoyTextDelay_ForcehJoyDown |
|||
BD cp a, l ; l = $04 |
|||
28 D9 jr z, .nextMail |
|||
38 F0 jr c, .displayLoop |
|||
FE 08 cp $08 |
|||
C8 ret z |
|||
18 F2 jr .goBack |
|||
</pre> |
|||
<pre> |
|||
Italian |
|||
11 55 DD ld de, $DD55 |
|||
D5 push de |
|||
D5 push de ; .nextMail |
|||
D5 push de |
|||
21 76 62 ld hl, _ComposeMailMessage |
|||
CF rst08h, FarCall a:hl |
|||
E1 pop hl |
|||
D1 pop de |
|||
2A ldi a, (hl) ; .continue |
|||
FE 50 cp $50 |
|||
38 FB jr c, .continue |
|||
28 0A jr z, .terminator |
|||
87 add a, a |
|||
86 add a, (hl) |
|||
12 ld (de), a |
|||
13 inc de |
|||
23 inc hl |
|||
81 add a, c |
|||
4F ld c, a |
|||
12 ld (de), a |
|||
18 EF jr .continue |
|||
21 01 C4 ld hl, C401 ; .screenLoop |
|||
4D ld c, l |
|||
CD DE 3A call PrintBCDNumber.loop |
|||
1B dec de ; .goBack |
|||
CD 7F 37 call JoyTextDelay_ForcehJoyDown |
|||
BD cp a, l ; l = $04 |
|||
28 D9 jr z, .nextMail |
|||
38 F0 jr c, .displayLoop |
|||
FE 08 cp $08 |
|||
C8 ret z |
|||
18 F2 jr .goBack |
|||
</pre> |
|||
<pre> |
|||
Spanish |
|||
11 55 DD ld de, $DD55 |
|||
D5 push de |
|||
D5 push de ; .nextMail |
|||
D5 push de |
|||
21 99 62 ld hl, _ComposeMailMessage |
|||
CF rst08h, FarCall a:hl |
|||
E1 pop hl |
|||
D1 pop de |
|||
2A ldi a, (hl) ; .continue |
|||
FE 50 cp $50 |
|||
38 FB jr c, .continue |
|||
28 0A jr z, .terminator |
|||
87 add a, a |
|||
86 add a, (hl) |
|||
12 ld (de), a |
|||
13 inc de |
|||
23 inc hl |
|||
81 add a, c |
|||
4F ld c, a |
|||
12 ld (de), a |
|||
18 EF jr .continue |
|||
21 01 C4 ld hl, C401 ; .screenLoop |
|||
4D ld c, l |
|||
CD A2 3A call PrintBCDNumber.loop - 1 |
|||
1B dec de ; .goBack |
|||
CD 4D 37 call JoyTextDelay_ForcehJoyDown |
|||
BD cp a, l ; l = $04 |
|||
28 D9 jr z, .nextMail |
|||
38 F0 jr c, .displayLoop |
|||
FE 08 cp $08 |
|||
C8 ret z |
|||
18 F2 jr .goBack |
|||
</pre> |
|||
===Effect of the reset box name code=== |
|||
Converting the characters from box names to assembly results in the following code. This code overwrites the latter half of party pokémon #3's stat experience data, allowing it to function as a TM25 bootstrap that redirects execution to the Mail Writer. |
|||
=Plain text transcripts of codes= |
|||
* Set all TM quantities to x255 and set up TM25 bootstrap |
* Set all TM quantities to x255 and set up TM25 bootstrap |