User:TimoVM/Mail Writer GS
The Mail writer is an arbitrary code execution program that allows the user to quickly and accurately write and execute arbitrary code payloads of up to a maximum size of 428 bytes. Payloads are written from wOtPartyCount onward, where enemy trainer's parties are usually buffered.
This guide is applicable to the English, French , German, Italian and Spanish versions of Gold & Silver only.
Using the Mail writer requires an ACE setup that redirects execution to the start of box names. For the English version, you can use a Coin Case ACE setup. For French, German, Italian and Spanish versions, use a Wrong Pocket TM ACE setup instead.
If you encounter any issues when going through this guide or would like to provide feedback, please contact TimoVM on the Glitch City Discord.
How the mail writer works
Upon execution, the Mail writer will open the mail character entry screen where the player can write up to 32 different characters. After the player has confirmed the mail, the following actions take place:
- The Mail writer will take pairs of characters and convert them into a single combined value. These values are then sequentially written, converting the 32 letter mail into a 16 byte long line of code.
- Next, the Mail writer will display a checksum calculated from the combined value of all written bytes for the player to verify. Then the program enters a waiting state where they can either choose to write another mail, go back and correct previously written values or stop the mail writer and execute the newly written payload.
- If the player has chosen to write a new mail, the Mail writer will open a new mail entry screen. The new mail is then also converted into a block of 16 bytes and placed right after the code written by the previous mail(s), allowing the player to write arbitrarily long payloads.
Installation
The mail writer itself will be installed in the TM/HM pocket through the following two step process:
- Execute a box code using Coin Case ACE/Wrong Pocket TM ACE that sets the quantities of all 50 TMs to x255.
- Sell TMs in specific quantities so that the amount of TMs in the TM/HM pocket spell out a small mail writer program.
Afterwards, simply use TM15 to start up the mail writer whenever necessary.
Step 1: setting all TM quantities to x255
- rename box names to form the following language dependent codes:
Language | Box names | Language | Box names | Language | Box names |
---|---|---|---|---|---|
English | Box 1: A p 'v C é 2 2 5 Box 2: 'v j 'v u é 1 2 5 Box 3: 'v ♂ é 5 2 p 'v 9 Box 4: é 4 2 p é 6 2 5 Box 5: 'v u é 8 2 'v {space} 5 Box 6: é 7 2 'v : é 9 2 Box 7: 0 9 ♀ 5 ♀ 5 5 5 Box 8: 5 5 5 5 5 5 x 'd |
French | Box 1: A p é 3 2 u' 9 Box 2: é 1 2 u' c é 5 2 Box 3: H u' L é 6 2 ? b Box 4: é , 2 u' ♂ é 2 2 Box 5: u' t é ♀ 2 ] 5 Box 6: p' , 2 Box 7: A ♀ ♀ ♀ ♀ p' |
German | Box 1: , 2 ö 8 2 W 5 5 Box 2: ö 8 2 W ö 8 2 o Box 3: ö 8 2 w G ö 8 2 Box 4: G ö 8 2 G ö 8 2 Box 5: G ö 8 2 p ♀ Ö w Box 6: ä , 2 Box 7: d J 5 T R w y 9 Box 8: A Ä |
Italian | Box 1: A p é 3 2 ° 9 Box 2: é 1 2 ° D é ♀ 2 Box 3: È d é , 2 ° ♂ Box 4: é 2 2 È 9 é 6 2 Box 5: p ° P é 5 2 0 9 Box 6: ñ , 2 Box 7: A ♀ ♀ ♀ ♀ ñ |
Spanish | Box 1: A p é 3 2 ° 9 Box 2: é 1 2 ° D é ♀ 2 Box 3: È d é , 2 ° ♂ Box 4: é 2 2 È 9 é 6 2 Box 5: p ° Q é 5 2 0 9 Box 6: ñ , 2 Box 7: A ♀ ♀ ♀ ♀ ñ |
Note: "..." refers to one ellipsis character, “pk” refers to the one pk character, "$" refers to the pokédollar sign, "*" refers to the multiplication symbol. Make sure to pay careful attention to upper/lowercase letters.
- Then, execute ACE using the method suitable for your language. For the English version, use Coin Case ACE. For French, German, Italian and Spanish versions, use Wrong Pocket TM ACE.
- Use TM17 once. If the code was executed successfully, switch to the TM/HM pocket. It should now contain every TM at a quantity of x255.
NOTE: due to limitations, the German version of this box code can only be used once. If you need to use it again, set box name 1's name to (keep other box names the same:
, 2 p ♀ Ö 0 9 &
Step 2: Selling TMs to form a program in the TM/HM pocket
Now that we have obtained x255 of every TM, we'll be selling specific amounts of these in order to form a program. This program differs slightly depending on the specific language you're using. The following table displays how many TMs of each kind you need to end up with, along with the amount of money you gain by selling them.
Language independent TMs
TM | Final Quantity | Sell value |
---|---|---|
TM01 DYNAMICPUNCH | x17 | 357000 |
TM02 HEADBUTT | x85 | 170000 |
TM03 CURSE | x221 | 51000 |
TM04 ROLLOUT | x213 | 42000 |
TM05 ROAR | x213 | 21000 |
TM06 TOXIC | x213 | 63000 |
TM07 ZAP CANNON | x33 | 222000 |
TM08 ROCK SMASH | SEE NEXT TABLE | |
TM09 PSYCH UP | x98 | 78500 |
TM10 HIDDEN POWER | x207 | 72000 |
TM11 SUNNY DAY | x225 | 30000 |
TM12 SWEET SCENT | x209 | 23000 |
TM13 SNORE | x42 | 106500 |
TM14 BLIZZARD | x254 | 1500 |
TM15 HYPER BEAM | x80 | 262500 |
TM16 ICY WIND | x56 | 298500 |
TM17 PROTECT | x251 | 6000 |
TM18 RAIN DANCE | x40 | 215000 |
TM19 GIGA DRAIN | x10 | 367500 |
TM20 ENDURE | x135 | 180000 |
TM21 FRUSTRATION | x134 | 60500 |
TM22 SOLARBEAM | x18 | 355500 |
TM23 IRON TAIL | x19 | 354000 |
TM24 DRAGONBREATH | x35 | 330000 |
TM25 THUNDER | x129 | 126000 |
TM26 EARTHQUAKE | x79 | 264000 |
TM27 RETURN | x18 | 118500 |
TM28 DIG | x24 | 231000 |
TM29 PSYCHIC | x239 | 16000 |
TM30 SHADOW BALL | x33 | 333000 |
TM31 MUD-SLAP | x1 | 381000 |
TM32 DOUBLE TEAM | x196 | 59000 |
TM33 ICE PUNCH | x77 | 267000 |
TM34 SWAGGER | x205 | 25000 |
TM35 SLEEP TALK | SEE NEXT TABLE | |
TM36 SLUDGE BOMB | x58 | 98000 |
TM37 SANDSTORM | x27 | 228000 |
TM38 FIRE BLAST | x205 | 50000 |
TM39 SWIFT | SEE NEXT TABLE | |
TM40 DEFENSE CURL | x55 | 100000 |
TM41 THUNDERPUNCH | x189 | 99000 |
TM42 DREAM EATER | x40 | 322500 |
TM43 DETECT | x217 | 19000 |
TM44 REST | x56 | 298500 |
TM45 ATTRACT | x240 | 22500 |
TM46 THIEF | x254 | 1500 |
TM47 STEEL WING | x08 | 370500 |
TM48 FIRE PUNCH | x200 | 82500 |
TM49 FURY CUTTER | x24 | 346500 |
TM50 NIGHTMARE | x242 | 13000 |
Language dependent TMs
TM | English | French | German | Italian | Spanish | |||||
---|---|---|---|---|---|---|---|---|---|---|
Final amount | Amount sold for | Final amount | Amount sold for | Final amount | Amount sold for | Final amount | Amount sold for | Final amount | Amount sold for | |
TM08 ROCK SMASH | x66 | 94500 | x43 | 106000 | x34 | 110500 | x118 | 68500 | x153 | 51000 |
TM35 SLEEP TALK | x239 | 8000 | x144 | 55500 | x231 | 12000 | x222 | 16500 | x162 | 46500 |
TM39 SWIFT | x144 | 111000 | x59 | 196000 | x135 | 120000 | x127 | 128000 | x77 | 178000 |
Running the newly written program
- Adjust your box name codes according to the following table:
English | French | German | Italian | Spanish |
---|---|---|---|---|
Box 1: A p 'v C é 'd 2 5 Box 2: 5 5 5 p 'v 6 h 'm Box 3: ♀ |
Box 1: A p u' C é 0 2 p Box 2: u' 6 p' ♀ 2 Box 3-6: any Box 7: p' ♀ ♀ |
Box 1: , 2 ö 8 2 0 {space} 5 Box 2: ? 8 ö 8 2 ? E 5 Box 3: ä , 2 Box 4-6: any Box 7: ♀ ♀ & Box 8: A Ä |
Box 1: A p ° C é 0 2 5 Box 2: ? E ñ ♀ 2 Box 3-6: any Box 7: ñ ♀ ♀ |
Box 1: A p ° C é 0 2 5 Box 2: ? E ñ ♀ 2 Box 3-6: any Box 7: ñ ♀ ♀ |
- Save before continuing
- If your setup uses a Nidoran♂, make sure to re-read the mail you prepared as part of the setup before using TM17.
- Depending on your language, either use the Coin Case or TM17. This will start the mail writer and open a screen asking you to input text for a mail.
Using the mail writer
From now on, simply go through the necessary steps to use the Coin Case or TM17 to start up the RAM writer.
The mail writer will open a screen that asks you to write the contents of a mail. This is where you'll need to enter mail codes. Once done, use the "END" option to finish the mail.
This will cause the mail writer to convert the newly written code into assembly. It will also print a checksum (sum of all written values) on the screen just to the right of the lower row. This can be used to verify if a code was entered correctly.
Due to a lack of available memory in the TM/HM pocket, it is not possible to quit the RAM writer without executing the newly written code. If you ever accidentally activate the mail writer and would like to quit, simply write a mail containing "R h" then confirm and exit the RAM writer.
Controls
Between entering mail codes, the mail writer will ask for user input.
- Press SELECT to open a new mail and continue writing data.
- Press START to immediately jump to and start executing the newly written program. Only use this when you've finished every mail.
- Press any other button to go back one byte at a time to correct errors. If the printed checksum doesn't match the expected checksum, press DOWN 16 times to retry the last mail. This will also overwrite the printed checksum with the value at the currently selected address, giving you a method to check how far back you're going.
Enter your mail code, then press "END". | It prints the checksum and waits for input. |
What to do with the Mail writer
The Mail writer allows you to easily write and execute arbitrary payloads. Aside from writing your own codes, we recommend the following:
- Mail codes: this page contains a collection of assembly for mail codes that can be used for a variety of common purposes such as editing pokémon, obtaining items, etc..
- 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. It will also fix the side effects of the ACE setup when you first run it.