Trash Bytes: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
(Added all of the trash byte strings for DP. Added Mystery Gift. Added Hatched Pokemon. Added an Introduction.)
(Credits to Poryhack)
Line 133: Line 133:


Mystery Gift Trash Bytes: Just fill in the trash byte areas (0x48 to 0x5D and 0x68 to 0x77) after the terminators with FF
Mystery Gift Trash Bytes: Just fill in the trash byte areas (0x48 to 0x5D and 0x68 to 0x77) after the terminators with FF
== Credits ==
Poryhack - Discovering the Diamond and Pearl trash strings, and finding how to fix the Trash Bytes of a pokemon.

Revision as of 00:41, 16 May 2009

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, that don't do anything, their only use is for Hack Checking.

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.

Other information about correcting trash bytes you will need to know, is 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.


Three types of pokemon have trash bytes. These are: Hatched pokemon Mystery Gift pokemon and Pal-Park pokemon.

These pokemon all have different types of trash bytes, and different ways to fix them.


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 any trash bytes, and it will not have a nickname. But 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.

Transferred to Diamond and Pearl Trash Strings

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.

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


Credits

Poryhack - Discovering the Diamond and Pearl trash strings, and finding how to fix the Trash Bytes of a pokemon.