Jump to content

Guides:Glitch Pokédex Mode ACE setup: Difference between revisions

Line 550:
 
The last read mail is buffered from $CEED onward. Converting the characters from the mail to assembly results in the following:
 
====English====
 
<pre>
Mail
 
93 sub e ; a starts out as $EB, e starts out as $9F. a = $4C
D6 8D sub $8D ; a = $BF
EA FB FA ld ($FAFB), a
D6 FD sub $FD ; a = $C2
EA FA FA ld ($FAFA), a
D6 EA sub $EA ; a = $D8
EA FC FA ld ($FAFC), a
4E ld c, (hl)
D6 96 sub $96 ; a = $42
F5 push af
A7 and a ; Reset carry flag
D4 B9 F8 call nc, wBoxNames - 6h
E1 AF popxor hla ; ha = $4200
AFF6 A1 xoror a$A1 ; a = $00A1
F6 E3 87 oradd $E3a, a ; a = $E342
F5 push af
F7 rst30h ; Jump to $10:42E3, final bytes of Pokedex_ReinitDexEntryScreen. This will set $CE63 to $FF, causing immediate exit of Pokédex after return
E1 pop af ; h = $42
 
F6 A1 or $E3 ; a = $E3
Bootstrap ($FAFA, 5th party pokémon's stat experience)
F7 rst30h ; Jump to $10:42E3, final bytes of Pokedex_ReinitDexEntryScreen. This will set $CE63 to $FF, causing immediate exit of Pokédex after return
 
C2 BF D8 jr nz, wBoxNames
</pre>
 
====Italian & Spanish====
 
<pre>
Mail
 
93 sub e ; a starts out as $EB, e starts out as $9F. a = $4C
D6 8D sub $8D ; a = $BF
EA FB FA ld ($FAFB), a
D6 FD sub $FD ; a = $C2
EA FA FA ld ($FAFA), a
D6 EA sub $EA ; a = $D8
EA FC FA ld ($FAFC), a
4E ld c, (hl)
EA E2 D5 ld (wKeyItems), a ; Change first item in key item pocket to TM25
D6 96 sub $96 ; a = $42
F5 push af
CD BF F8 call wBoxNames
E1 pop hl ; h = $42
AF xor a ; a = $00
F6 E3 or $E3 ; a = $E3
F7 rst30h ; Jump to $10:42E3, final bytes of Pokedex_ReinitDexEntryScreen. This will set $CE63 to $FF, causing immediate exit of Pokédex after return
 
Bootstrap ($FAFA, 5th party pokémon's stat experience)
 
C2 BF D8 jr nz, wBoxNames
</pre>
 
Line 609 ⟶ 568:
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.
 
Separately, 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.
====English====
 
Lastly, the value of the first item ID in the main item pocket is overwritten so that it becomes a TM25.
 
<pre>
Box 1: $D8BF
80 add a, b
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
 
Box 2: $D8C8
EA F7D0 F8 ld ($F8F7F8D0), a
D6 D0FF sub $D0FF ; a = $3122
EA FCD6 F8 ld ($F8FCF8D6), a
21
50 ld d; b
 
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
D6 EF87 subadd $EF a, a ; a = $323E, carry flag set
.write
22 ldi (hl), a
D0 ret nc ; Ignore on first pass, taken when .write called
FB ei
50 ld d, b
 
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
 
Box 5: $D8E3
.loop
E6 84 and $84 ; a = $04
D6 FF sub $FF ; Increments a on each pass
EA FB FA ld ($FAFB), 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
 
Box 6: $D8EC
EA F5 F8 ld ($F8F5), a
EA FD FA ld ($FAFD), a
F6 FF or $FF ; a = $FF, reset carry flag
21
 
Box 7: $D8F5
7E F5 ld hl, wTMsHMs
01 32 00 ld bc, $0032
D4 4C 31 call nc, byteFill
50 ld d, b
 
Box 8: $D8FE
E6 D2 and $D2 ; a = $D2
EA FC FA ld ($FAFC), a
D6 FA sub $FA ; a = $D8, TM25's item ID
FB ei
50 ld d, b
 
Box 9: $D907
EA E2 F5 ld (wKeyItems), a ; Key item pocket, first item ID
D6 E3 sub $E3 ; a = $F5
EA FE FA ld ($FAFE), a
50 ld d, b
 
Box 10: $D910
D6 B7 sub $B7 ; a = 3E, reset carry flag
EA FA FA ld ($FAFA), a
D0 ret nc
50 ld d, b
 
Party pokémon #5's stat experience, starting from $DAFA
3E 04 ld a, $04
D2 7E F5 jp nc, wTMsHMS ; 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
EA xx F5 ld ($F5xx), a ; Ranges from $F57E to $F5AF, all 50 TMs
F1 pop af
FE AF cp $AF
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
D2 FC 7E F5F8 ldjp hlnc, wTMsHMs.continue
A7 and a, a ; Reset carry flag
01 32 00 ld bc, $0032
D4D2 71E3 31F8 calljp nc, byteFill.loop
.continue
AF xor a, a
50 ld d, b
 
Box 8: $D8FE
AFF6 D2 xorand a$D2 ; a = $00D2, reset carry flag
D4 D6 F8 call nc, .write
F6 F5 or $F5 ; a = $F5
D6 93 sub $93 ; a = $3F
EA 9E FA ld ($FA9E)
D6 B787 subadd $B7 a, a ; a = $3E7E, reset carry flag
50 ld d, b
 
Box 9: $D907
EAD4 9AD6 FAF8 ldcall ($FA9A)nc, a.write
C6D6 859D addsub $859D ; a = $C3E1, resetTM33's carryitem flagID
EA 9AB8 FAF5 ld ($FA9CwItems), a ; Main item pocket, first item ID
50 ld d, b
 
Box 10: $D910
F6 F5 or $F5 ; a = $F5
D0 ret c
D2 D6 F8 jp nc, .write
50 ld d, b
 
PartyTM33 pokémon #3's stat experiencebootstrap, starting from $DA9AD418
3E 04 ld a, $04
D2 7E F5 jp nc, wTMsHMS ; Carry and zero flag are both reset when using TM25
C3 7E F5 jp wTMsHMs
</pre>
 
====SpanishRaw Assembly====
 
<pre>
AF D6 E8 EA D1 F8 D6 F7 50
Box 1: $D8BF
EA D0 F8 D6 FF EA D6 F8 50
80 add a, b
F4 F4 D6 83 87 87 D0 FB 50
AF xor a ; a = $00
E6 84 D4 D6 F8 D6 87 FB 50
EA F9 F8 ld ($F8F9), a
D6 FF sub $FF ;EA aEF =F8 F5 F6 FF $0150
FB FB EA F5 F5 F1 FE AF 50
FB ei
D2 FC F8 A7 D2 E3 F8 AF 50
50 ld d, b
F6 D2 D4 D6 F8 D6 93 87 50
 
D4 D6 F8 D6 9D EA B8 F5 50
Box 2: $D8C8
F6 F5 D2 D6 F8 50 50 50 50
EA F7 F8 ld ($F8F7), a
D6 FD sub $FD ; a = $04
EA 9B FA ld ($FA9B), 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, wTMsHms
01 32 00 ld bc, $0032
D4 70 31 call nc, byteFill
50 ld d, b
 
Box 8: $D8FE
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: $D907
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: $D910
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 wTMsHMs
</pre>
 
Line 985 ⟶ 827:
 
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.
 
====English====
 
<pre>
Box 1: $D8BF
80 add a, b
AF xor a ; a = $00
D6 FCE8 sub $FCFF ; a = $0418
EA 9BD1 FAF8 ld ($FA9BF8D1), a
D6 F7 sub $F7 ; a = $21
FB ei
50 ld d, b
 
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
EA D6 89F8 subld ($89 ;F8D6), a = $F5
21
FB ei
50 ld d; b
 
Box 3: $D8D1
EA 9E FA 18 F4 ld ($FA9E)hl, a$F418
D6 B783 sub $D783 ; a = $3E9F
.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
 
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
A7F6 D2 andor a$D2 ; Reseta carry= flag$D2
D0 ret nc
50 ld d, b
 
Box 5: $D8E3
Party pokémon #3's stat experience, starting from $DA9A
3ED4 04 D6 F8 ldcall anc, $04.write
D6 93 sub $93 ; a = $3F
C3 7E F5 jp wTMsHMs ; Carry and zero flag are both reset when using TM25
D4 D5 F8 call nc, .doubleAndWrite
</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 26: $D8C8D8EC
AF xor a ; a = $00
EA 9D FA ld ($FA9B), a
D6F6 89F5 subor $89F5 ; a = $F5
EAD2 9ED6 FAF8 ldjp ($FA9E)nc, a.write
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
 
TM33 bootstrap, starting from $D418
Box 4: $D8DA
3E 04 ld a, $04
D2 7E F5 jp nc, wTMsHMS ; Carry and zero flag are both reset when using TM25
</pre>
 
====Raw Assembly====
EA 9C FA ld ($FA9C), a
C9 ret
50 ld d, b
 
<pre>
Party pokémon #3's stat experience, starting from $DA9A
AF D6 E8 EA D1 F8 D6 F7 50
3E 04 ld a, $04
EA D0 F8 D6 FF EA D6 F8 50
C3 7E F5 jp wTMsHMs
F4 F4 D6 83 87 87 D0 FB 50
</pre>
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]]
1,625

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.