Jump to content

Guides:Fast 0x1500 ACE: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 7:
If you encounter any issues when going through this guide or would like to provide feedback, please contact TimoVM on the [https://discord.gg/EA7jxJ6 Glitch City Research Institute Discord].
 
'''When playing on cartridge or emulator, it is requiredrecommended to have previously cleared an old save by pressing SELECT + UP + B simultaneously on the start screen at least once since obtaining the cart. Otherwise you willrisk not bebeing able to obtain a bad clone or an unterminated name pokémon.'''
 
The contents of this guide are demonstrated in the following video:
 
{{youtube|iJRb3PwUrkg|TimoVM}}
 
=Setting up initial ACE=
Line 76 ⟶ 80:
{| class="wikitable" style="margin-left: auto; margin-right: auto; border: none;"
|
[[File:JPEN Fast ACE PokeSen Location.png]]
||
[[File:JPEN Fast ACE Spearow menu.png]]
|}
 
Line 102 ⟶ 106:
# Sell TMs in specific quantities so that the amount of TMs in the TM/HM pocket spell out a small mail writer program.
 
==Step 4: settingSetting all TM quantities to x255<span id="{{anchorencode:Box name payload}}"></span>==
 
* Rename box names to form the following language dependent codes. '''Please mind the differences between uppercase X ([[File:Character UCX.png]]), lowercase x ([[File:Character lcx.png]]) and multiplication symbol ([[File:Character mul.png]]).'''
Line 336 ⟶ 340:
|-
! scope="row"| English
|| <pre>Box 1: 0 ♀ ♀ Pk ? ♂ E Pk
Box 2: Pk 5Pk 'd 'v z é B 5
Box 3: 'v 9 é [SPACE] 5 'v , F
Box 4: 's [SPACE] 5 ? E 's [SPACE] 5
Line 348 ⟶ 352:
Box 11: 'v 9 é E 5 Pk 0 9
Box 12: 's B 5 é C 5 Pk 'v
Box 13: 'v Pk é T 2 hp 'dF 51
Box 14: p 0 5 ♀ Pk 'v G 1</pre>
! scope="row" | Italian
|| <pre>Box 1: 0 ♀ ♀ Pk ? ¡ E Pk
Box 2: Pk 5Pk ì ° z é B 5
Box 3: ° 9 é [SPACE] 5 ° , F
Box 4: ó [SPACE] 5 ? E ó [SPACE] 5
Line 363 ⟶ 367:
Box 11: ° 9 é E 5 Pk 0 9
Box 12: ó B 5 é C 5 Pk °
Box 13: ° Pk é T 2 hp ìF 51
Box 14: p 0 5 ♀ Pk ° G 1</pre>
! scope="row"| Spanish
|| <pre>BBoxBox 1: 0 ♀ ♀ Pk ? ¡ E Pk
Box 2: Pk 5Pk ì ° z é B 5
Box 3: ° 9 é [SPACE] 5 ° , F
Box 4: ó [SPACE] 5 ? E ó [SPACE] 5
Line 378 ⟶ 382:
Box 11: ° 9 é E 5 Pk 0 9
Box 12: ó B 5 é C 5 Pk °
Box 13: ° Pk é T 2 hp ì 5F 1
Box 14: p 0 5 ♀ Pk ° G 1</pre>
|}
Line 395 ⟶ 399:
Box 5: 0 'm 's h 5 'v M F
Box 6: 's h 5 'v B A 'd Pk
Box 7: Pk hPk 'dp F 1
 
Box 14: p 0 5 ♀ Pk 'v G 1</pre>
! scope="row" | Italian
|| <pre>Box 1: p 0 Mn È 2 ♀ Pk 5
Box 2: ° y é fi 5 F ° ,
Box 3: Ù fi 5 È È Ù fi 5
Box 4: È Á Ù fi 5 5 È W
Box 5: Ù fi 5 È [SPACE] Ù fi 5
Box 6: Pk Pk ÍPk p F 1 Í Í
 
Box 14: p 0 5 ♀ Pk ° G 1 </pre>
! scope="row"| Spanish
|| <pre>Box 1: p 0 Mn È 2 ♀ Pk 5
Box 2: ° y é fi 5 F ° ,
Box 3: Ù fi 5 È È Ù fi 5
Box 4: È Á Ù fi 5 5 È W
Box 5: Ù fi 5 È [SPACE] Ù fi 5
Box 6: Pk Pk ÍPk p F 1 Í Í
 
Box 14: p 0 5 ♀ Pk ° G 1 </pre>
Line 430 ⟶ 434:
! Address !! Function
|-
| $C4A0 || Starting address of wTilemap
| $D002 || Address where the last read mail is stored.
|-
| $C4BE || Address of the tilemap where the name of the current active box will be printed when viewing the withdraw screen.
|-
| $CD70 || Starting address of wBGMapBufferPointers
|-
| $D073 || Address where the names of pokémon are buffered.
Line 439 ⟶ 447:
|-
| $D109 || Address where the current selected party pokémon’s party slot is buffered.
|-
| $D10C || Address where the amount of items tossed is buffered.
|-
| $D10D || Address where the amount of the last selected item is buffered.
|-
| $D10E || Address where the data of the last viewed pokémon is buffered.
|}
 
* AttemptingThe tospecific tossmovement 21pattern itemsused will buffer C2 9B C4 (jp nz $15C49B) at $D10CCD70.
* Selecting Spearow in the party screen will buffer 15 00 at $D108.
* For a list at the highest size it has ever been, the "Quantity" of the CANCEL button will be $00, which will be buffered at $D10D when the CANCEL button is used with A. This forms the required $1500 to start executing ACE.
* Viewing the unterminated name pokémon in the withdraw screen will cause the game to attempt to print its name. Since the name doesn't contain a terminator, the game will continue printing text until it find and executes the $15 control character at $D108.
* By opening the start menu and moving one step up at the specified location, the game will load in a $C0 (ret nz) at $CD70, allowing safe return from the effects of $1500. The game will resume executing from $D10E onward.
* The presence of the $00 at $D109 will erroneously cause the game to call $CD52. Due to the specific movement pattern and location used, the area between $CD52 and $CD70 is filled with $00 values, allowing safe passage.
* The last pokémon viewed is buffered from $D10E onward. Setting Tackle ($21) as its first move allows safe passage over Screech ($67).
* Thanks to the jump buffered at $CD70, the game will jump to $C49B. Since we're in the withdraw screen, the area between $C49B and $C4A0 is filled with $00 values, allowing safe passage. The jump will always pass, since both the carry and zero flags are reset when the game calls $CD52.
* Rocky’s trainer ID is fixed and will be $BF (cp a, which resets the carry flag) and $1E. Both values are safe to pass.
* Between $C4A0 and $C4BE are a bunch of screen tiles that are either blank ($7F) or edges of text boxes ($79, $7A, $7B and $7C). These opcodes are all harmless and simply load register values to other registers, allowing safe passage.
* Rocky’s XP total will end up between 326 and 350. This is always interpreted as $01 and $XX. since the high HP stat exp byte is always $00, the total is interpreted as ld bc, $00XX. This means that exp is always safe to pass.
* $C4BE holds the text characters of the current active box, allowing us to form arbitrary jumps to other locations in memory.
* Due to the specific pokémon defeated, the data in the stat experience fields will be read as $D2 $00 $F0. This is interpreted as jp nc $F000, due to echo ram this will redirect execution to $D000, which is where the last read mail was buffered. The nc condition is always fulfilled thanks to the previous $BF (cp a) in Onix’s Trainer ID.
* At this point, the mail will redirect execution to $FB75. Due to echo ram, this will effectively redirect execution to $DB75, the start of box name 1. Please note that $D003 and $D004 are overwritten by opening the withdraw screen to the values of the current box and slot of the currently selected stored pokémon. These values are taken care of by setting the first character of the mail to $FA, which is interpreted along with the next two values as ld a, (YYXX).
* Afterwards, the game will simply execute the box name code.
 
* For the alternative method, selecting Spearow to read its mail will buffer both its species and party slot to $D108 and $D109. By putting a Spearow in the topmost party slot, this will buffer a $15 and $00 respectively. One drawback of this approach is that these RAM values are more volatile and are immediately overwritten after executing ACE. Luckily, Onix’s species ID ($5F) acts as a text terminator, preventing users from accidentally crashing the game if they forget to reset these values.
 
Additional note: $D086 isn’t actually relevant to the setup. The reason it’s mentioned here is because using an item buffers the item’s name to this location, placing a $50 terminator just a bit after where the pokémon’s name is normally buffered. Having this terminator in place will allow you to safely view an unterminated pokémon’s name.
 
===Effect of the test box name===
 
BoxThe namecurrent dataactive startsbox is printed on the tilemap starting from $D8BFC4BE onward. Converting the provided mailbox name code to assembly results in the following:
 
====English====
 
<pre>
E1 pop hl
F6 FF or $FF ; a = $FF, reset carry flag
E1 pop hl ; popping hl twice then returning will cause the game to continue printing from de to hl. The second pop ensures hl will point to the $7000 region, allowing safe exit.
A7 and a ; reset carry flag
D0 ret nc ; Safely return to normal game operation
</pre>
 
====French====
 
<pre>
21 80 80 ld hl, $8080
C9 ret ; Safely return to normal game operation
</pre>
 
====German====
 
<pre>
21 80 80 ld hl, $8080
F6 FF or $FF ; a = $FF, reset carry & zero flag
C0 ret nz ; Safely return to normal game operation
</pre>
 
Line 490 ⟶ 473:
 
<pre>
E1 pop hl
E1 pop hl ; popping hl twice then returning will cause the game to continue printing from de to hl. The second pop ensures hl will point to the $7000 region, allowing safe exit.
C9 ret ; Safely return to normal game operation
</pre>
Line 503 ⟶ 488:
<pre>
Box 1: $DB75
AFF6 F5 xoror a$F5 ; a = $00F5
F5 push af
D6 FF sub $FF ; a = $01
E1 pop hl ; hl = $F500
EA D0 FB ld ($FBD0), a
D6E6 F1EF suband $F1EF ; a = $10E5
84 add a, h ; af = $DA10
50 ld d; b
E1 pop hl
50 ld d, b
 
Box 2: $DB7E
F5 push af
EA 87 FB ld ($FB87), a
E1 pop hl ; hl = $DA10, overwritten to $22, ldi (hl), a
D6 EF sub $EF ; a = $21
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called
EA 86 FB ld ($FB87), a
D6 B9 sub $B9 ; a = $21
21
EA 81 FB ld ($FB81), a
50 ld d, b
 
Box 3: $DB87
10 FA ld hl, $FA10 ; Execution pointer of wrong pocket TM15
EA AC FB ld ($F8AC), a
D6 FF sub $FF ; a = $22
EA 7F FB ld ($FB7F), a
FB ei
D6 F4 sub $F4 ; a = $2E
85 add a, l ; a = $3E, reset carry flag
50 ld d, b
 
Box 4: $DB90
EAD4 AA7F FB ldcall ($FBAA)nc, a$FB7F
85E6 84 addand a, l$84 ; a = $3204
EAD4 D17F FB ldcall ($FBD1)nc, a$FB7F
85 add a, l ; a = $42
50 ld d, b
 
Box 5: $DB99
F6D6 81D4 orsub $81D4 ; a = $C3, reset carry flag30
D4EA D689 FB callld nc($FB89), .setupBootStrapa
B4D6 FE orsub a, h$FE ; a = $FB32
FB ei
D6 A2 sub $A2 ; a = $59, reset carry flag
50 ld d, b
 
Box 6: $DBA2
EA AD85 FB ld ($FBADFB85), a
D6 F1 sub $F1 ; a = $41
D4 AA FB call nc, .writeBootstrap
EA 88 FB ld ($FB88), a
D6 81 sub $81 ; a = $D8, set carry flag
50 ld d, b
22 ldi (hl), a ; .writeBootstrap
 
Box 7: $DBAB
F6 82 or $82 ; a = $C3, reset carry flag
D0 ret nc
D4 7F FB call nc, $FB7F
21 59 F8 ld hl, $F859 ; $59 will later be overwritten to $41 to prevent crashing when viewing the newly written name
EA 87 FB ld ($FB87), a
AF xor a ; a = $00
EA D2 FB ld ($FBD2), a
50 ld d, b
 
Box 8: $DBB4
D6 D0AF subxor $D0a ; a = $3000
EA D586 FB ld ($FBD5FB86), a
F5 push af
D6 EF sub $EF ; a = $41
D6 A7 sub $A7 ; a = $59
FB ei
A7 and a ; Reset carry flag
50 ld d, b
 
Box 9: $DBBD
EA D4 7F FB ldcall ($FBD4)nc, a$FB7F
EA AD82 FB ld ($FBADFB82), a ; Overwrites part of box #7 to prevent a crash
B5D6 81 orsub a, l$81 ; a = $59D8
FB ei
50 ld d, b
 
Box 10: $DBC6
D6 8BA7 suband $8Ba ; aReset =carry $CEflag
D4 7F FB call nc, $FB7F
EA 93 F8 ld (wItems), a ; Main item pocket, item #1's ID
EA 83 FB ld ($FB83), a
F6 FF or $FF ; a = $FF, reset carry flag
F1 pop af ; a = $00
FB ei
50 ld d, b
 
Box 11: $DBCF
D6 FF sub $FF ; a = $01
FB ei
01EA 3284 00FB ld bc($FB84), 0032a
E1 pop hl
D2 41 30 jp nc, byteFill
F5F6 FF pushor af$FF ; .SetupBootStrapa = $FF
50 ld d, b
 
Box 12: $DBD8
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 41 30
D6 85 sub $85 ; a = 3E, reset carry flag
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
D4 AA FB call nc, .writeBootstrap
E1 pop hl
85 add a, l ; a = $4F
E6D6 8450 andsub $8450 ; a = $04, reset carry flagAF
50 ld d, b
 
Box 13: $DBE1
D6 E1 sub $E1 ; a = $CE
D4 AA FB call nc, .writeBootstrap
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15
F1 pop af ; a = $C3, reset carry flag
AF xor a ; a = $00
D2 AA FB jp nc, .writeBootstrap
85 add a, l
FB
F7 rst30h ; Resume text function, immediately hit terminator
50
50 ld d, b
 
Box 14: displayed as screen tiles at $C4BE
AF xor a ; a = $00
F6 FB or $FB ; a = $FB
F5 push af
E1 pop hl ; h = $FB
D6 86 sub $86 ; a = $75
F7 rst30h ; hl = $FB75, de = $C4C5, jump to hl
 
Bootstrap: $DA10
Line 600 ⟶ 595:
<pre>
Box 1: $DB75
EAF6 A3 FBF5 ld or ($FBA3), aF5 ; Due to mail, a = $00F5
F5 push af
D6 FF sub $FF ; a = $01
E1 pop hl ; hl = $F500
EA A1 FB ld ($FBA1), a
E6 E5 and $E5 ; a = $E5
84 add a, h ; af = $DA10
E1 pop hl
50 ld d, b
 
Box 2: $DB7E
F5 push af
D6 CF sub $CF ; a = $32
E1 pop hl ; hl = $DA10, overwritten to $22, ldi (hl), a
EA A2 FB ld ($FBA2), a
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called
C6 EF add $EF ; a = $21
D6 B9 sub $B9 ; a = $21
FB ei
EA 81 FB ld ($FB81), a
50 ld d, b
 
Box 3: $DB87
D6 FF sub $FF ; a = $22
EA 9E FB ld ($FB9E), a
EA 7F FB ld ($FB7F), a
D6 C8 sub $C8 ; a = $59
D6 F4 sub $F4 ; a = $2E
EA 9F FB ld ($FB9F), a
85 add a, l ; a = $3E, reset carry flag
50 ld d, b
 
Box 4: $DB90
C6D4 D6 add7F $D6FB ; acall =nc, $2FFB7F
E6 84 and $84 ; a = $04
EA A5 FB ld ($FBA5), a
D6D4 FF sub7F $FFFB ; acall =nc, $30FB7F
FB ei
50 ld d, b
 
Box 5: $DB99
D6 D5 sub $D5 ; a = $2F
EA A6 FB ld ($FBA6), a
EA 88 FB ld ($FB88), a
F6 FF or $FF
D6 FF sub $FF ; a = $30
21 59 F8 ld hl, wTMsHMs ; $59 gets overwritten to $D8 to prevent a crash upon viewing the newly written box name
FB ei
01
50 ld d, b
 
Box 6: $DBA2
EA 89 32 00FB ld bc($FB89), $0032a
D6 FE sub $FE ; a = $32
CD 2F 30 call byteFill
EA 85 FB ld ($FB85), a
AF xor a ; a = $00
F6 E2 or $E2 ; a = $E2
50 ld d, b
 
Box 7: $DBAB
84C6 91 add a, h$91 ; afa = $DA10C3, reset carry flag
D4 7F FB call nc, $FB7F
F5 push af
EA 87 FB ld ($FB87), a
E1 pop hl
D6 9C sub $9C ; a = $3E
CD C8 FB call .write
50 ld d, b
 
Box 8: $DBB4
E6 84AF andxor $84a ; a = $0400
CDEA C886 FB callld .write($FB86), a
F5 push af
C6 BF add $BF ; a = $C3
D6 A7 sub $A7 ; a = $59
BF cp a
A7 and a ; Reset carry flag
50 ld d, b
 
Box 9: $DBBD
CDD4 C87F FB call .writenc, $FB7F
EA 82 FB ld ($FB82), a
C6 96 add $96 ; a = $59
D6 81 sub $81 ; a = $D8
CD C8 FB call .write
50 ld d, b
 
Box 10: $DBC6
D6 81A7 suband $81a ; aReset =carry $D8flag
D4 7F FB call nc, $FB7F
22 ldi (hl), a ; .write
EA 83 FB ld ($FB83), a
C9 ret
F1 pop af ; a = $00
50 ld d, b
 
Box 11: $DBCF
D6 FF sub $FF ; a = $01
EA 84 FB ld ($FB84), a
E1 pop hl
F6 FF or $FF ; a = $FF
50 ld d, b
 
Box 12: $DBD8
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 2F 30
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
E1 pop hl
D6 50 sub $50 ; a = $AF
 
Box 13: $DBE1
D6 E1 sub $E1 ; a = $CE
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15
AF xor a ; a = $00
85 add a, l
F7 rst30h ; Resume text function, immediately hit terminator
50 ld d, b
 
Box 14: displayed as screen tiles at $C4BE
AF xor a ; a = $00
F6 FB or $FB ; a = $FB
F5 push af
E1 pop hl ; h = $FB
D6 86 sub $86 ; a = $75
F7 rst30h ; hl = $FB75, de = $C4C5, jump to hl
 
Bootstrap: $DA10
Line 673 ⟶ 702:
<pre>
Box 1: $DB75
EAF6 A3 FBF5 ld or ($FBA3), aF5 ; Due to mail, a = $00F5
F5 push af
D6 FF sub $FF ; a = $01
E1 pop hl ; hl = $F500
EA A1 FB ld ($FBA1), a
E6 E5 and $E5 ; a = $E5
84 add a, h ; af = $DA10
E1 pop hl
50 ld d, b
 
Box 2: $DB7E
F5 push af
D6 CF sub $CF ; a = $32
E1 pop hl ; hl = $DA10, overwritten to $22, ldi (hl), a
EA A2 FB ld ($FBA2), a
D0 ret nc ; On first pass, ignored. Taken whenever $DB7F is called
C6 EF add $EF ; a = $21
D6 B9 sub $B9 ; a = $21
FB ei
EA 81 FB ld ($FB81), a
50 ld d, b
 
Box 3: $DB87
D6 FF sub $FF ; a = $22
EA 9E FB ld ($FB9E), a
EA 7F FB ld ($FB7F), a
D6 C8 sub $C8 ; a = $59
D6 F4 sub $F4 ; a = $2E
EA 9F FB ld ($FB9F), a
85 add a, l ; a = $3E, reset carry flag
50 ld d, b
 
Box 4: $DB90
C6D4 D2 add7F $D2FB ; acall =nc, $2BFB7F
E6 84 and $84 ; a = $04
EA A5 FB ld ($FBA5), a
D6D4 7F FB sub $FF ; acall =nc, $30FB7F
FB ei
50 ld d, b
 
Box 5: $DB99
D6 D4 sub $D4 ; a = $30
EA A6 FB ld ($FBA6), a
EA 89 FB ld ($FB89), a
F6 FF or $FF
C6 FB add $FB ; a = $2B
21 59 F8 ld hl, wTMsHMs ; $59 gets overwritten to $D8 to prevent a crash upon viewing the newly written box name
FB ei
01
50 ld d, b
 
Box 6: $DBA2
EA 88 32 00FB ld bc($FB88), $0032a
D6 F9 sub $F9 ; a = $32
CD 2B 30 call byteFill
EA 85 FB ld ($FB85), a
AF xor a ; a = $00
F6 E2 or $E2 ; a = $E2
50 ld d, b
 
Box 7: $DBAB
84C6 91 add a, h$91 ; afa = $DA10C3, reset carry flag
D4 7F FB call nc, $FB7F
F5 push af
EA 87 FB ld ($FB87), a
E1 pop hl
D6 9C sub $9C ; a = $3E
CD C8 FB call .write
50 ld d, b
 
Box 8: $DBB4
E6 84AF andxor $84a ; a = $0400
CDEA C886 FB callld .write($FB86), a
F5 push af
C6 BF add $BF ; a = $C3
D6 A7 sub $A7 ; a = $59
BF cp a
A7 and a ; Reset carry flag
50 ld d, b
 
Box 9: $DBBD
CDD4 C87F FB call .writenc, $FB7F
EA 82 FB ld ($FB82), a
C6 96 add $96 ; a = $59
D6 81 sub $81 ; a = $D8
CD C8 FB call .write
50 ld d, b
 
Box 10: $DBC6
D6 81A7 suband $81a ; aReset =carry $D8flag
D4 7F FB call nc, $FB7F
22 ldi (hl), a ; .write
EA 83 FB ld ($FB83), a
C9 ret
F1 pop af ; a = $00
50 ld d, b
 
Box 11: $DBCF
D6 FF sub $FF ; a = $01
EA 84 FB ld ($FB84), a
E1 pop hl
F6 FF or $FF ; a = $FF
50 ld d, b
 
Box 12: $DBD8
D4 81 FB call nc, $FB81 ; $FB81 was rewritten to 21 59 D8 01 32 00 C3 2B 30
EA 82 FB ld ($FB82), a ; Replace $59 by $FF to prevent possible crash when viewing $59 as text
E1 pop hl
D6 50 sub $50 ; a = $AF
 
Box 13: $DBE1
D6 E1 sub $E1 ; a = $CE
EA 93 F8 ld (wItems), a ; Replace first item in item pocket with TM15
AF xor a ; a = $00
85 add a, l
F7 rst30h ; Resume text function, immediately hit terminator
50 ld d, b
 
Box 14: displayed as screen tiles at $C4BE
AF xor a ; a = $00
F6 FB or $FB ; a = $FB
F5 push af
E1 pop hl ; h = $FB
D6 86 sub $86 ; a = $75
F7 rst30h ; hl = $FB75, de = $C4C5, jump to hl
 
Bootstrap: $DA10
Line 859 ⟶ 922:
===Effect of the reset box name code===
 
Converting the characters from box names to assembly results in the following code. This code overwriteswrites the latterrequired halfbootstrap ofto party$DA10, pokémonthe #3'sentrance statpoint experienceof data,Wrong allowingPocket itTM15. toThis functionarea asof amemory TM25is bootstrapunused thatbut redirectsis execution to thepreserved Mailduring Writersaves.
 
====English====
Line 878 ⟶ 941:
E1 pop hl ; hl = $DA10
D6 B8 sub $B8 ; a = $22
EA A8A7 FB ld (.write), a
50 ld d, b
 
Box 3: $DB87
85 add a, l ; a = $33
D6 F4 sub $F4 ; a = $3E
A7 and a ; Reset carry flag
D4 A8A7 FB call nc, .write
AF xor a ; a = $00
50 ld d, b
Line 892 ⟶ 955:
D6 FC sub $FC ; a = $04
A7 and a ; Reset carry flag
D4 A8A7 FB call nc, .write
AF xor a ; a = $00
AF xor a
Line 899 ⟶ 962:
Box 5: $DB99
F6 D2 or $D2 ; a = $D2
D4 A8A7 FB call nc, .write
D6 8C sub $8C ; a = $46
85 add a, l ; a = $59
Line 905 ⟶ 968:
 
Box 6: $D8A2
D4 A8A7 FB call nc, .write
D6 81 sub $81 ; a = $D8, carry flag set
A7 and a ; Reset carry flag
22 ldi (hl), a ; .write
D0 callret nc ; Skip on last pass
E1 pop hl
50 ld d, b
 
Box 7: $D8AC
Party pokémon #3's stat experience, starting from $DA9A
E1 pop hl
3E 04 ld a, $04
E1 pop hl
D2 59 D8 jp nc, wTMsHMs
AF xor a ; a = $00
85 add a, l
F7 rst30h ; Resume text function, immediately hit terminator
 
Box 14: displayed as screen tiles at $C4BE
AF xor a ; a = $00
F6 FB or $FB ; a = $FB
F5 push af
E1 pop hl ; h = $FB
D6 86 sub $86 ; a = $75
F7 rst30h ; hl = $FB75, de = $C4C5, jump to hl
</pre>
 
Line 930 ⟶ 1,005:
Box 2: $DB7E
D6 B8 sub $B8 ; a = $22
EA 9FA8 FB ld (.write), a
85 add a, l ; a = $32
D6 F4 sub $F4 ; a = $3E
50 ld d, b
 
Box 3: $DB87
CD 9FA8 FB call .write
C6 C6 add $C6 ; a = $04
CD 9FA8 FB call .write
50 ld d, b
 
Box 4: $DB90
C6 BF add $BF ; a = $C3
CD 9FA8 FB call .write
FB ei
C6 96 add $96 ; a = $59
Line 949 ⟶ 1,024:
 
Box 5: $DB99
CD 9FA8 FB call .write
C6 7F add $7F ; a = $D8
CD A8 FB call .write
7F ld a, a
50 ld d, b
 
Box 6: $DBA2
E1 pop hl
E1 pop hl ; Prevent side effects when returning to text printer
E1 pop hl
AF xor a ; a = $00
85 add a, l
F7 rst30h ; Resume text function, immediately hit terminator
22 ldi (hl), a ; .write
C9 ret
 
Box 14: displayed as screen tiles at $C4BE
Party pokémon #3's stat experience, starting from $DA9A
3EAF xor 04a ld; a, = $0400
F6 FB or $FB ; a = $FB
C3 59 D8 jp wTMsHMs
F5 push af
E1 pop hl ; h = $FB
D6 86 sub $86 ; a = $75
F7 rst30h ; hl = $FB75, de = $C4C5, jump to hl
</pre>
 
[[Category:Guides]]
=Plain text transcript for codes=
 
* Mail
 
{| class="wikitable" style="margin-left: auto; margin-right: auto; border: none;"
! Language !! Mail content
|-
! scope="row"| English
| <pre>4 4 4 h ‘s … 5 h Pk ‘d </pre>
|-
! scope="row"| French
| <pre>4 4 4 j' ♀ é T 2 j' / é G 5 é & 5
j' à é ... 5 j' 9 é x 5 p î ... s' Pk ô </pre>
|-
! scope="row"| German
| <pre>4 4 4 H ë : é j 5 ë 9 é ... 5 p 0
0 A é T 2 $ $ ö ... 5 Pk Ä</pre>
|-
! scope="row"| Italian
| <pre>4 4 4 ° b é Ì 5 p Ù ... 5 é ] 5 0
È $ é T 2 Pk Í</pre>
|-
! scope="row"| Spanish
| <pre>4 4 4 ° b é Ì 5 p Ù ... 5 é ] 5 0
È $ é T 2 Pk Í</pre>
|-
| colspan = "2"| "..." refers to a single ellipsis character, “pk” refers to a single pk symbol.
|}
 
* Test box code
 
{| class="wikitable" style="margin-left: auto; margin-right: auto; border: none;"
! English !! French !! German !! Italian !! Spanish
|-
| <pre>0 9 'd</pre> || <pre>A A A ô</pre> || <pre>A A A 0 9 Ä</pre> || <pre>Í</pre> || <pre>Í</pre>
|}
1,540

edits

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