Guides:Mail Writer GS (non-EN): Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
Line 268: Line 268:
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.
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.


====French====
<pre>
French


<pre>
Box 1: $D8BF
Box 1: $D8BF
80 add a, b
80 add a, b
Line 292: Line 292:
50 ld d, b
50 ld d, b


Box 4: D8DA
Box 4: $D8DA
EA F4 F8 ld ($F8F4), a
EA F4 F8 ld ($F8F4), a
DE EF sbc $EF ; a = $32, carry flag set
DE EF sbc $EF ; a = $32, carry flag set
Line 343: Line 343:
</pre>
</pre>


====German====
<pre>
German


<pre>
Lead-up to wBoxNames: $D8BE
Lead-up to wBoxNames: $D8BE
22 ldi (hl), a
22 ldi (hl), a
Line 351: Line 351:
Box 1: $D8BF
Box 1: $D8BF
C0
C0
21 F4 F8 ld hl, $F8F4 ; corresponds to terminator of box #9's name
21 F4 F8 ld hl, $F8F4 ; corresponds to terminator of box #9's name
C4 BE F8 call nz, $F8BE ; due to mail, a = $21
C4 BE F8 call nz, $F8BE ; due to mail, a = $21
96 sub (hl) ; a = $7E
96 sub (hl) ; a = $7E
50 ld d, b
50 ld d, b


Box 2: $D8C8
Box 2: $D8C8
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
96 sub (hl) ; a = $F5
96 sub (hl) ; a = $F5
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
AE xor (hl) ; a = $0E
AE xor (hl) ; a = $0E
50 ld d; b
50 ld d; b


Line 366: Line 366:
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
B6 or (hl) ; a = $9F
B6 or (hl) ; a = $9F
86 add (hl) ; a = $32
86 add (hl) ; a = $32
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
50 ld d, b
50 ld d, b


Box 4: D8DA
Box 4: $D8DA
86 add (hl) ; a = $C3
86 add (hl) ; a = $C3
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
86 add (hl) ; a = $79
86 add (hl) ; a = $79
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
50 ld d, b
50 ld d, b


Box 5: $D8E3
Box 5: $D8E3
86 add (hl) ; a = $31
86 add (hl) ; a = $31
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
A6 and (hl) ; a = $21
A6 and (hl) ; a = $21
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
50 ld d, b
50 ld d, b
Line 414: Line 414:
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE
87 add a ; a = $84
87 add a ; a = $84
84 add a, h ; a = $7E
84 add a, h ; a = $7E
C4 BE F8 call nz, $F8BE
C4 BE F8 call nz, $F8BE


Line 425: Line 425:
3E 04 ld a, $04
3E 04 ld a, $04
C2 7E F5 jp nz, $F57E ; carry and zero flag are both reset when using TM25
C2 7E F5 jp nz, $F57E ; carry and zero flag are both reset when using TM25
</pre>

====Italian====

<pre>
Box 1: $D8BF
80 add a, b
AF xor a ; a = $00
EA F9 F8 ld ($F8F9), a
D6 FF sub $FF ; a = $01
FB ei
50 ld d, b

Box 2: $D8C8
EA F7 F8 ld ($F8F7), a
D6 FD sub $FD ; a = $04
EA 9B FA ld ($FA 9B), a
50 ld d; b

Box 3: $D8D1
D6 86 sub $86 ; a = $7E
EA F5 F8 ld ($F8F5), a
EA 9D FA ld ($FA9D), a
50 ld d, b

Box 4: $D8DA
C6 A3 add $A3 ; a = $21
EA F4 F8 ld ($F8F4), a
D6 EF sub $EF ; a = $32
FB ei
50 ld d, b

Box 5: $D8E3
EA F8 F8 ld ($F8F8), a
C6 FF add $FF ; a = $31
EA FC F8 ld ($F8FC), a
50 ld d, b

Box 6: $D8EC
AF xor a ; a = $00
D6 8F suc $8F ; a = $71
EA FB F8 ld ($F8FB), a
F6 FF or $FF ; a = $FF
21

Box 7: $D8F5
7E F5 ld hl, $F57E
01 32 00 ld bc, $0032
D4 71 31 call nc, byteFill
50 ld d, b

Box 8: $D907
AF xor a ; a = $00
F6 F5 or $F5 ; a = $F5
EA 9E FA ld ($FA9E)
D6 B7 sub $B7 ; a = $3E
50 ld d, b

Box 9: $D910
EA 9A FA ld ($FA9A), a
C6 85 add $85 ; a = $C3, reset carry flag
EA 9A FA ld ($FA9C), a
50 ld d, b

Box 10: $D919
D0 ret c
50 ld d, b

Party pokémon #3's stat experience, starting from $DA9A
3E 04 ld a, $04
C3 7E F5 jp $F57E
</pre>

====Spanish====

<pre>
Box 1: $D8BF
80 add a, b
AF xor a ; a = $00
EA F9 F8 ld ($F8F9), a
D6 FF sub $FF ; a = $01
FB ei
50 ld d, b

Box 2: $D8C8
EA F7 F8 ld ($F8F7), a
D6 FD sub $FD ; a = $04
EA 9B FA ld ($FA 9B), a
50 ld d; b

Box 3: $D8D1
D6 86 sub $86 ; a = $7E
EA F5 F8 ld ($F8F5), a
EA 9D FA ld ($FA9D), a
50 ld d, b

Box 4: $D8DA
C6 A3 add $A3 ; a = $21
EA F4 F8 ld ($F8F4), a
D6 EF sub $EF ; a = $32
FB ei
50 ld d, b

Box 5: $D8E3
EA F8 F8 ld ($F8F8), a
C6 FF add $FF ; a = $31
EA FC F8 ld ($F8FC), a
50 ld d, b

Box 6: $D8EC
AF xor a ; a = $00
D6 90 suc $90 ; a = $70
EA FB F8 ld ($F8FB), a
F6 FF or $FF ; a = $FF
21

Box 7: $D8F5
7E F5 ld hl, $F57E
01 32 00 ld bc, $0032
D4 70 31 call nc, byteFill
50 ld d, b

Box 8: $D907
AF xor a ; a = $00
F6 F5 or $F5 ; a = $F5
EA 9E FA ld ($FA9E)
D6 B7 sub $B7 ; a = $3E
50 ld d, b

Box 9: $D910
EA 9A FA ld ($FA9A), a
C6 85 add $85 ; a = $C3, reset carry flag
EA 9A FA ld ($FA9C), a
50 ld d, b

Box 10: $D919
D0 ret c
50 ld d, b

Party pokémon #3's stat experience, starting from $DA9A
3E 04 ld a, $04
C3 7E F5 jp $F57E
</pre>
</pre>


Line 431: Line 573:
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.
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.


====French====
<pre>
French


<pre>
11 55 DD ld de, $DD55
11 55 DD ld de, $DD55
D5 push de
D5 push de
Line 468: Line 610:
</pre>
</pre>


====German====
<pre>
German


<pre>
11 55 DD ld de, $DD55
11 55 DD ld de, $DD55
D5 push de
D5 push de
Line 505: Line 647:
</pre>
</pre>


====Italian====
<pre>
Italian


<pre>
11 55 DD ld de, $DD55
11 55 DD ld de, $DD55
D5 push de
D5 push de
Line 542: Line 684:
</pre>
</pre>


====Spanish====
<pre>
Spanish


<pre>
11 55 DD ld de, $DD55
11 55 DD ld de, $DD55
D5 push de
D5 push de
Line 582: Line 724:


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.
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.

====French====

<pre>
Box 1: $D8BF
AF xor a ; a = $00, reset carry flag
DE FC sbc $FC ; a = $04, set carry flag
EA 9B FA ld ($FA9B), a
D6 85 sbc $85 ; a = $7E, set carry flag
50 ld d, b

Box 2: $D8C8

EA 9D FA ld ($FA9B), a
DE 88 sbc $88 ; a = $F5, set carry flag
EA 9E FA ld ($FA9E), a
50 ld d; b

Box 3: $D8D1

DE B6 sub $D6 ; a = $3E, reset carry flag
EA 9A FA ld ($FA9A), a
87 add a, a ; a = $7C, reset carry flag
DE B9 sbc $B9 ; a = $C3, set carry flag
50 ld d, b

Box 4: $D8DA

EA 9C FA ld ($FA9C), a
D9 reti
50 ld d, b

Party pokémon #3's stat experience, starting from $DA9A
3E 04 ld a, $04
C3 7E F5 jp $F57E
</pre>

====German====

<pre>
Lead-up to wBoxNames: $D8BE
22 ldi (hl), a

Box 1: $D8BF
C0 ret nz
21 9A FA hl hl, FA9A
AF xor a ; a = $00
F6 9F or $9F ; a = $9F
87 add a ; a = $3E
50 ld d, b

Box 2: $D8C8
C4 BE F8 call nz, $F8BE
E6 84 or $84 ; a = $04
C4 BE F8 call nz, $F8BE
50 ld d, b

Box 3: $D8D1
AF xor a ; a = $00
F6 C2 or $C2 ; a = $C2
C4 BE F8 call nz, $F8BE
87 add a ; a = $84
84 add a, h ; a = $7E
50 ld d, b

Box 4: $D8DA
C4 BE F8 call nz, $F8BE
AF xor a ; a = $00
F6 F5 or $F5 ; a = $F5
FB ei
FB ei
50 ld d, b

Box 5: $D8E3
C3 BE F8 call nz, $F8BE

Party pokémon #3's stat experience, starting from $DA9A
3E 04 ld a, $04
C2 7E F5 jp $F57E ; carry and zero flag are both reset when using TM25
</pre>

====Italian & Spanish====

<pre>
Box 1: $D8BF
AF xor a ; a = $00
D6 FC sub $FC ; a = $04
EA 9B FA ld ($FA9B), a
D6 86 sub $86 ; a = $7E
50 ld d, b

Box 2: $D8C8
EA 9D FA ld ($FA9B), a
D6 89 sub $89 ; a = $F5
EA 9E FA ld ($FA9E), a
50 ld d; b

Box 3: $D8D1
D6 B7 sub $D7 ; a = $3E
EA 9A FA ld ($FA9A), a
87 add a, a ; a = $7C
D6 B9 sub $B9 ; a = $C3
50 ld d, b

Box 4: $D8DA

EA 9C FA ld ($FA9C), a
C9 ret
50 ld d, b

Party pokémon #3's stat experience, starting from $DA9A
3E 04 ld a, $04
C3 7E F5 jp $F57E
</pre>


=Plain text transcripts of codes=
=Plain text transcripts of codes=