Talk:Pokémon data structure (Generation IV): Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
No edit summary
(usefulnes of reverse prng?)
Line 1: Line 1:
== inverse PRNG? ==
* TCCPhreak> As this is the only page on which the PRNG is explained, would it be useful to write some information about inverting the PRNG? I did some calculations yesterday so I can write about it, but I'm not sure whether such information (only useful for "rolling back" the PRNG) is in the scope of this page.
== TO DO ==
== TO DO ==



Revision as of 08:51, 3 April 2009

inverse PRNG?

  • TCCPhreak> As this is the only page on which the PRNG is explained, would it be useful to write some information about inverting the PRNG? I did some calculations yesterday so I can write about it, but I'm not sure whether such information (only useful for "rolling back" the PRNG) is in the scope of this page.

TO DO

  • 0x08-0x09: List species IDs
  • 0x0A-0x0B: List held items
  • 0x14: Explain dual purpose of offset
  • 0x15: List abilities
  • 0x17: List countries
  • 0x1E-0x23: Split into individual contest stats (1 byte/stat)
  • 0x28-0x2F: List moves
  • 0x30-0x33: Split into PP/moveslot
  • 0x34-0x37: Split into PPUp/moveslot, describe effects out of range [0..3]
  • 0x38-0x3B: Describe bitfield packing of IVs, significance and use of highest two bits
  • 0x40-0x41: Describe spot encoding
  • 0x48-0x5D: Describe limitations on nickname
  • 0x5E-0x5F: List hometowns
  • 0x60-0x63: Describe bitfield packing for contests
  • 0x68-0x77: Describe limitations on OT name
  • 0x78-0x7A: Describe date format
  • 0x7B-0x7D: Describe date format
  • 0x7E-0x7F: List locations
  • 0x80-0x81: List locations
  • 0x82: Describe bitfield packing for Pokérus status (contagious/immune)
  • 0x83: List Poké Balls
  • 0x84-0x85: Describe coding

Checksum

  • I found another way to calculate checksum. I analyzed a software, Legal.exe and it use another algorithm. It divides the 80 bytes that describe the pokemon in groups of two bytes (words). The groups are added to each other. You take the last word's bytes. Note: you must adjust the bytes of words (from little endian to big endian), sum it, adjust it again and then divide the result. XX YY ZZ AA BB CC (the 80 bytes) -> YY XX AA ZZ CC BB (adjusted words) -> YY XX + AA ZZ + CC BB (sum) -> MODULE 0x100 (take the last word) -> MM NN (checksum) -Whivel 16:14, 9 July 2008 (UTC)
  • I have a Python implementation of the pkm encryption code up here. -Tsanth 06:41, 12 July 2008 (UTC)
  • The method used for Legal.exe & PokeSav have already been explained in the article. -Sabresite 11:17, 9 January 2009 (UTC)


Updates