Thread: RNG Research
View Single Post
Old Nov 30th, 2010, 4:00:11 AM   #582
ΩDonut
sometimes experimentation begins with "let's multi battle strip pokémon"
is a Forum Moderatoris a Programmeris a Pokémon Researcheris a Contributor to Smogon
 
ΩDonut's Avatar
 
Moderator
Join Date: Aug 2006
Posts: 3,691
Default

Game Freak went to a lot of trouble to encrypt the date\time\MAC Address for the non-C-Gear seeds. But no amount of encryption can stop someone with a debugger. :)

tl;dr We can now predict non-C-Gear seeds, given a date\time\DS MAC address. This will be incorporated into RNG Reporter within the next day or two, and there will be a short beta period to make sure this works perfectly for real carts. EDIT: Apparently not quite yet, there are still some issues.

Non-C-Gear seeds are MUCH easier to work with than the C-Gear; you don't have to get millisecond-precision timing, all you need is to hit the right time down to the second. What's more, the same seed is used for both RNGs, so both IVs and nature\shininess\etc. can be predicted.

Encrypting the Date\Time\MAC Address, SHA-1 Preprocessing


Encrypting the Encryption with SHA-1


Jumbling up the SHA-1 Hash


Generating the Final Seed


Relevant Assembly Code


To-Do List:
  • Find out how far the *very* initial seed is advanced to become the seed for the nature\PID RNG
  • Determine encounter slots
  • Determine when a wild Pokemon PID is XOR'd with 0x10000 and when it's XOR'd with 0x80010000
  • Find the "shiny check" assembly code for Reshiram\Zekrom
  • Finish RNG Reporter

Debugging this was a lot easier than I thought it would be. :D

p.s. Kaphotics, date is stored at 0x23FFDE8 and time at 0x23FFDEC.
ΩDonut is offline   Reply With Quote