Trash Bytes

From ProjectPokemon Wiki
Revision as of 09:38, 24 November 2010 by Atofeqoly (talk | contribs)
Jump to navigation Jump to search

Under Construction! Please Visit Reserve Page. Page Will Be Available Shortly

This article is incomplete.
Please feel free to add missing information and complete the article.

An Introduction to Trash Bytes

You will need a basic understanding of the hexadecimal number system and hexadecimal data of files before reading this article

Trash bytes are data stored in a .pkm file. They serve no purpose at all ingame or for storing information. Their only use is for hack checking. Three types of pokemon have trash bytes. These are: Hatched Pokemon; Mystery Gift Pokemon; and Pal Park Pokemon. Each has different types of Trash Bytes and different methods for fixing them.

The Pokemon Name trash bytes are stored between the offsets 0x48 and 0x5D. The Original Trainer trash bytes are stored between the offsets 0x68 and 0x77.

You will also need to know about Terminators (not a movie reference). These terminators are two bytes in a pkm file within the Trash Byte areas. These bytes tell the game when the Pokemon Name or Original Trainer ends, and the Trash Bytes begin. The terminators are simply "FF FF" within the offsets previously mentioned.

Hatched Pokemon

The easiest of all trash bytes to correct. If you nickname a hatched pokemon and nickname it back to it's original species name, it will not have a nickname and the trash bytes will be corrected.

Mystery Gift Pokemon

For Reference: The Pokemon Name trash bytes are stored between the offsets 0x48 and 0x5D. The Original Trainer trash bytes are stored between the offsets 0x68 and 0x77.

After the terminator, these Trash Bytes are solid "FF"s.

Migrated via Pal Park

Migrated to English DP

18 20 0D 02 42 00 00 00 00 00 00 00 48 A1 0C 02 E0 FF

05 00 00 00 <random> <8E - 96> 27 02 <random> <D1 or D2> 26 02 E9 9A 06 02 00 00


Migrated to Italian DP

54 20 0D 02 42 00 00 00 00 00 00 00 84 A1 0C 02 E0 FF

05 00 00 00 <random> <8E - 96> 27 02 <random> <D3 or D4> 26 02 25 9B 06 02 00 00


Migrated to German DP

74 20 0D 02 42 00 00 00 00 00 00 00 A4 A1 0C 02 E0 FF

05 00 00 00 <random> <8E - 96> 27 02 <random> D4 26 02 45 9B 06 02 00 00


Migrated to French DP

74 20 0D 02 42 00 00 00 00 00 00 00 A4 A1 0C 02 E0 FF

05 00 00 00 <random> <8E - 96> 27 02 <random> D5 26 02 45 9B 06 02 00 00


Migrated to Spanish DP

74 20 0D 02 42 00 00 00 00 00 00 00 A4 A1 0C 02 E0 FF

05 00 00 00 <random> <8E - 96> 27 02 <random> <D5 or D6> 26 02 45 9B 06 02 00 00


Migrated to Korean DP

00 00 00 00 42 00 00 00 00 00 00 00 18 77 0C 02 E0 FF

05 00 00 00 <random> <07 - 0B> 28 02 <random> 4B 27 02 B1 9F 06 02 00 00


Migrated to Japanese DP

00 00 00 00 B4 C5 0C 02 E0 FF 7F 02 42 00 00 00 00 00

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00*

  • Yes. Solid 00s.

How To Fix Trash Bytes

Option 1: Download this zip file, extract it, and drag and drop a pkm file over it. This will automatically correct the Trash Bytes.

Option 2: Use the guide below.

A Guide To Trash Bytes For Diamond and Pearl

1. Download the latest versions of: Pokesav, HxD (or any other hex editor) and Legal.exe

2. Create a pokémon that needs to be fixed with pokesav (for this tutorial use a Pal-Parked pokémon) into storage. Or download the pokémon I used for this tutorial http://www.mediafire.com/?mgzjjtyttn0

3. Make sure all aspects of the pokémon are legal (excluding trash bytes)

4. Once you have made the pokémon, save it and close pokesav

5. Check it with legal.exe. it should look like http://i335.photobucket.com/albums/m443/damio91/Aron_no_TB.jpg

6. Now, open the pokémon in a hex editor and find the bytes 0x48 through to 0x5D

7. Find the terminator (FF FF) and count how many bytes are after that until you reach 0x5D. If you are using my pokémon there should be 12 bytes

8. Now we will actually do some trash byte fixing. We will make it seem as if it got transferred to an English game. http://db.pokesav.org/main/?q=Trash-Bytes-Guide (other language strings here)

Migrated to English DP

18 20 0D 02 42 00 00 00 00 00 00 00 48 A1 0C 02 E0 FF

05 00 00 00 <8E - 96> 27 02 26 02 E9 9A 06 02 00 00

The first string is if it was transferred into slot 1 of Pal-Park The second string is if it was transferred to any of slots 2-6 of Pal-Park We will use the first string to make it seem like we Pal-Parked it to slot 1

9. Count from the end of the first string, back however many bytes we counted before (in my case 12)

10. Now type over the bytes after the terminator with the bytes counted out (the last 12)

11. We have finished with the pokémon name trash bytes and will now move on to OT trash bytes.

12. Look through the bytes 0x68 to 0x77 and find the terminator again (FF FF).

13. Type over the bytes after the terminator with the bytes from 2 rows up (the corresponding bytes are 0x48 to 0x57)

14. Save the changes and check with legal.exe it should look like http://i335.photobucket.com/albums/m443/damio91/Aron_TB_fixed.jpg but don’t close legal.exe. We have to fix the checksum

15. Type over the bytes 0x06 and 0x07 with what legal.exe says for the checksum. Save and close HxD check with legal.exe. It should look like http://i335.photobucket.com/albums/m443/damio91/Aron_Legal.jpg

16. Congratulations! You have made a legal pal-parked pokémon from scratch!


Mystery Gift Trash Bytes: Just fill in the trash byte areas (0x48 to 0x5D and 0x68 to 0x77) after the terminators with FF