Back here, for some more RNG analyzing.
- As you know, the same formula is for advancing the RNG:
value <- value*[0x41C64E6D] + [0x6073]
- The battle system hasn't changed much. This time, the RNG cycles once every two frames, rather than twice a frame. This makes expected delays twice as long. If the RNG cycles more than once on a frame, it is determining something. A series of four calls (each two frames apart) determines the following:
1:
........
...x.... x=0 critical hit
2:
........
...y.... y damage variation 0=max
3:
........
4:
........
aaaa.... aaaa accuracy
This is done right after the move is selected.
- Something new: the game appears to set initial seeds very often throughout the run, mostly right before battle.
Any time the game sets an initial seed, it is as follows:
xxyy00zz+dddddddd
xx=month*day+minute+second mod 256
yy=hour
zz=last two digits of year
dddddddd=framecount=value at address 21c4834
And that's it! Pretty simple.
Edit: It was on smogon.com too:
http://www.smogon.com/forums/showthread.php?t=52180
- I initially had trouble trying to find the starter's Pokemon data in RAM, as the developers encrypted the values well. Of course, I had the idea of dumping RAM after the starter data was determined, then going back, poking another value for the RNG, and then dumping in the same spot again. Then I compare the two files with a difference reporter. Very simple; I wish I had thought of that sooner.
Anyway, the PID for the starter Pokemon is the first two RNG values thrown after selecting the starter. PID is:
yyyyxxxx, first value (top half) xxxx, second value (top half) yyyy
That's all for now, but I plan to find some more stuff.