Talk:Pokémon data substructures (Generation III)

From Bulbapedia, the community-driven Pokémon encyclopedia.
Revision as of 14:01, 29 October 2007 by Twigpi (talk | contribs)
Jump to navigationJump to search

The "Order" section must be wrong. When I calculed Personality 3935877326(in decimal) by 24(decimal too) I got "14" - which correspond to order EAGM - but something was wrong. After 4 hours intense counting and trying I realized the ordering was wrong. The correct ordering was GEAM . Game version: Ruby (US version) Pokemon: First in party Myself: ICQ: 343370964 . btw: Now I am stuck at recalculating data checksum. If somebody know... please...

Substruct encryption

If you play in an emulator like No$GBA or VBA, you can open a RAM viewer. Sometimes, if you look at a Pokémon data structure, you can see the encrypted substructs change values in a flash. This is because the game decrypts the whole thing for use and encrypts them again immediately afterwards. I always did wonder how it was supposed to use the data if it's encrypted... --Kyoufu Kawa 16:52, 31 July 2007 (UTC)

DVs

Investigation of Fire Red assembly code reveals that the DVs field is not exactly as described. More to follow. --Kyoufu Kawa 20:06, 10 August 2007 (UTC)

Little Endian

Using little endian. This means for every word (two bytes), you reverse the order of the byte. The encryption and decryption will work as long as you keep the order the same for the key and the data. Let's work on the first problem: 0xEA98B8CE (your pers value, 3935877326) If you had compensated for little endian, you would have 0x98EACEB8, which is 2565525176 in decimal. Mod that by 24 and the answer = 8. AEGM. Hmmm... now that just opens a new can of worms. Hehe. After I'm finished having my fun with Leaf Green, I'll check out Ruby.

Twigpi 14:01, 29 October 2007 (UTC)

Data Checksum

The checksum loops. Adding the unencrypted values should give you a value greater then 0xFFFF (max size), so it just loops. To find the correct value, MOD by 65536 (decimal) or 0x10000.

Twigpi 14:01, 29 October 2007 (UTC)