Past Gen RNG Research

Bond697

Dies, died, will die.
I've just located the lookup table generated by the Mersenne Twister RNG. It starts at 022151D4 and ends at 02215B90 (in White).

The very first 32-bit value in that table is the seed used to generate IVs. Plug that seed into RNG Reporter's Researcher feature, set it to right-shift the result 27 bits, and the next six values are the IVs of the next Pokemon you catch.



Once I figure out a way to advance this RNG, we can catch flawless and\or shiny Pokemon that pass Wi-Fi and VGC hack checks - on an emulator. (Not sure about breeding yet, but it should be a lot easier.)

The big challenge is still figuring out how the initial seeds are generated. Without that info, it won't be possible to manipulate the RNG on a cartridge.

Turning the C-Gear on and immediately off seems to advance it by 1.

e: Maybe not. Having a bit of a hard time figuring out exactly how much the advancement is.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
Turning the C-Gear on and immediately off seems to advance it by 1.

e: Maybe not. Having a bit of a hard time figuring out exactly how much the advancement is.
Turning on the C-Gear does change the value, but I think it's actually just reseeding the RNG rather than advancing it.

Actually, as long as we can determine what seed we happen to have hit, with enough patience (especially if advancement is anything like 4th Gen) we'd be able to look down the list and abuse for acceptable IVs/nature on non-breedables. In my experience with FR/LG abuse, that's basically what we had to do. It's not as nice as being able to hit any seed you choose, but it's usable. Is there any way to figure out what seed you happen to have hit yet? Kind of like the Seed finder in Gen 4?
That's going to be computationally beyond most people's capabilities. FRLG uses only a 16-bit initial seed, so there's only a limited number of possible start locations to look at. B&W uses a 64-bit seed - that's more than 18 quintillion possible combinations! We can't possibly look at all those, so we have to narrow down the search space a lot first.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
A few other observations, none that lead to any more breakthroughs yet but could be important pieces of the puzzle:

The initial seed of the MTRNG briefly appears at 022160A8 (where the upper 32 bits of the LCRNG is usually stored) for a split-second when you first start the game. There's another 32-bit value that appears in 022160A4 at the same time. Could be that it was originally one big 64-bit number that was trimmed down to the upper 32 bits.

The Japanese blog that gave us some hints as to the initial seed said this:

Google Translation of said blog said:
At this time of the initial SEED value is used as a time-dependent (raw and initial SEED), the MAC Address Low 3byte (01-23-45-67-89-AB if 0x6789AB) as the sum.
Except testing under Desmume shows that all 6 bytes of the MAC address matter to the initial seed. The blog seems to have been right on every count so far except for that.

(Before anyone else points this out, yes we noticed it tells how ID\SID and natures are generated.)

The seed for the MTRNG changes during battle as well. However, it changes differently compared to how it changes with the C-Gear on:

Code:
	In Battle	C-Gear
Initial	B63AFEED	B63AFEED
	45BEC7A6	C72F1CE7
	6AE48D7A	7B814B92
	4229A3E5	
	4DEC2935	
	ABD93BFA
 

Kaphotics

Remodeling Kitchens
is a Top Researcher Alumnusis a Top Contributor Alumnus
------- Mystery Gift / Wondercard RNG Observations/Speculation

Some research has been done on the structure of Mystery Gift Pokemon, and here's a little theorymonning/observations on RNG related to them.

IV RNG
There is a place in the card that sets the IVs of the gift Pokemon before you even receive it. There's also one for nature and PID, but I never got around to testing that for a pattern.

When the first one was grabbed, the MTRNG advanced. All subsequent gifts did not advance the MTRNG, thus receiving the same IVs. They were all different gifts (not the same, just sayin)

When IVs were set (via the card), the MTRNG did the same thing.

I'm pretty sure Nintendo won't give set IV Wondercards, so RNG will be needed for IVs.


The Manaphy Egg will make a return as another Wondercard, with relation to the Ranger series.

Since the shiny check still exists, It'd be safe to assume that they will not be shiny for the receiving OT. It is unknown whether or not hatching it as another trainer will allow it to be shiny (who knows).

I can create a test card=specimen to see if it follows the same method of PID generation as other cards, or in a different way [like method 1]

It's not worth looking into at this time as there are no games giving a Manaphy card.


PID RNG
I assume the old Static PID card will make a return [shinies etc] (PID/Nature locked), in which the only RNG that changes data for the resulting Pokemon will be the MTRNG (IVs)

However, there is still the shiny check. RNGing for a PID will only apply for Manaphy, with the IVs also playing a part. Manaphy will probably not be a set PID/Nature/other.


Other Locked Data Options
There exists the possibility for locked genders, locked natures, locked abilities, and random (including Dreamworld) abilities. These may follow different RNG patterns.

Since the shiny check exists, the only RNG that should matter is the MTRNG for IVs.

There are many possibilities for Mystery Gift PID/nature/IV/other generation, probably having somewhat distinct patterns. The only RNG that matters is the IV RNG via the MTRNG, and the PID RNG for Manaphy if there is no hatching shiny check implemented this generation for it. Wondercard RNG will be heavily reliant on the MTRNG, PID only for Manaphy.

------- MTRNG Related Observations

For advancing the MTRNG, I still have yet to find some way to advance it outside of battling. It advances during the battle with the game view, shifting at a predictable rate. I haven't pinned down the exact points in which it advances. This could be a way of advancing the MTRNG, kind of like Emerald.

There is no interactable key item that advances the MTRNG. I checked the Itemfinder, but without items nearby.

As I said above for IV RNG of Wondercards, when you soft reset and enter and grab a gift, the MTRNG will advance once. It won't advance for subsequent gifts, resulting in the same IVs.

Not sure if encountering a pokemon before will effectively seed the MTRNG so that it will not advance when receiving a gift. This may allow for predictable RNG of the Wondercard IVs, probably multiple cards for flawless IVs at a time (how fortunate).


--

other things, I've noticed researcher's .CSV output has all the seeds in decimal :(
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
Oh, by the way: the initial seed is only calculated using the date\time (down to the second) and the MAC address of the DS. There is no "delay" anymore; you can sit at the Continue screen as long as you want and get the same seed every time, as long as you start at the same date\time. (I still have to test if it's also based on a game's unique ID.)

Laundry list of things I want to test but can't at the moment:

- How Everstone affects the number of RNG calls for egg generation
- How using two international parents affects the number of RNG calls for egg generation (since it's supposed to increase the odds of getting a shiny)
- something else but I'm drawing a blank
 

mattj

blatant Nintendo fanboy
Just to clarify, is the seed still calculated at the moment you hit Continue on the blue screen, or are you saying it's calculated when you select your game on the DS startup screen, like pokewalker abuse?
 

Kaphotics

Remodeling Kitchens
is a Top Researcher Alumnusis a Top Contributor Alumnus
It's the moment you select the game / soft reset (for the main RNG), it doesn't rely on delay. The date is on (re)boot.

The MTRNG appears to be constant from boot to entering the game (it doesn't change at all). Probably calculated from the main RNG seed because it's "random" every time.
 

mattj

blatant Nintendo fanboy
Don't think this makes any new discoveries that anyone else hasn't already talked about, but I'll dump this here anyway. At OD's request I SR'd on a certain date. Found out it's pretty easy to hit the same seed and get the same mon just by turning your DS Date/Time (to the second) back. Oh, this was on my actual Pokemon Black Version (JPN) Cartridge too, not an emu.

Saved in the very last, top most cave in Victory Road (the one with two stairs going down and one exit? If you exit, you go north to the Pokemon League.) There are no NPCs at all there. I've got 5 mons in my party, one a Sweet Scenter, and am on my bike. I have no repels in use.

Listened to the clicks of the clock on the DS startup screen and started my game (on the DS startup screen) at exactly October 17, 2010, 18:00:30. Pressed A at random speeds because Delay doesn't matter anymore.

Whenever I started my game, it asked me if I wanted the CGear on, and I said No.

Sweet Scented after only a short pause.
Caught in a Dusk Ball:
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try again, same exact setup, and SS as quickly as possible this time:
Caught in a Dusk Ball:
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try pausing for 120 seconds before SSing this time just to see what happens:
ooooooh! got something different!! Weird?! My CGear was off?? I may have accidentally started at :29 or :31, we'll see...
Caught in a Dusk Ball:
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Gonna try SSing ASAP again just for verification:
Caught in a Dusk Ball:
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try waiting exactly 120 seconds (ingame) before SSing this time and see if I get that same Aianto again:
Again, this could be a fluke, from accidentally hitting :29
Caught in a Dusk Ball:
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

so... one more time, gonna try my very hardest to select the game AFTER :30, but BEFORE :31 and then wait 120 seconds ingame before SSing.
Masterball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Okay... gonna try... Waiting exactly 30 seconds from the time the music starts to SS...
...?? This was unexpected??
Masterball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Okeezy... gonna... Wait exactly 10 seconds from music to open my menu and quickly SS...
Weird AND unexpected... although this is leaning toward being some kind of slow frame advancement while just sitting there, this STILL could be just hitting :29 versus :30 or :31 even...
Masterball
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try my hardest to select my game on the DS Startup Screen AFTER :30 but BEFORE :31 (to "ensure" it's :30 as best I can) and then IMMEDIATELY open my menu and quickly Sweet Scent:
Duskball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Yeah, here's what I think is going on. The Gantoru was just the outcome of hitting :29, and the Aianto was the outcome of hitting :30 (I tried very hard to hit after :30, but before :31, while before I was doing my RNG habit of "firing off" and probably hit just a hair early). Notably, I waited 120 seconds and still got an Aianto, so I don't think anything was actually advancing my frame. Just gotta make sure to hit AFTER the target second, but BEFORE the next second, instead of "firing off on the mark" like I'm so used to.


Gonna go try it ...
1) on a stationary legendary with no NPCs around and my CGear off
2) In the tallgrass with no NPCs around and my CGear off
...this evening after work and see if it works the same. If so, this could be good news for SR'ers till the Reporter gets updated. Potentially, as long as you pay attention to the Date/Time (to the second) that you SR, if you just get lucky enough to get a mon with great IVs/Nature/shinyness/etc, just set your Date/Time back when you SR the next one and you "ought" to get the same outcome. We'll see I guess.

[edit]
Did some more testing today. Seeing what using a repel and walking/turning/biking, then sweet scenting in a cave with Wild Pokes does. Might have already been done, but meh. These were all done on my Pokemon Black Version (JPN) Cartridge.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

10-21-10 Thursday

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Immediate Sweet Scent

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

First I'm gonna re-create last nights results:
Startup Target Time: October 17, 2010, 18:00:30
Saved on Bike, in Cave, no Repel, No NPCs, CGear off before Startup, Immediate Sweet Scent
Masterball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 21 / 22 - 23 / 29 / 0 - 1 / 4 - 6 / 12)
As expected.

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, no Repel, No NPCs, CGear off before Startup, Immediate Sweet Scent
Masterball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 21 / 22 - 23 / 29 / 0 - 1 / 4 - 6 / 12)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, no Repel, No NPCs, CGear off before Startup, Immediate Sweet Scent
Masterball
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, no Repel, No NPCs, CGear off before Startup, Immediate Sweet Scent
Masterball
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, no Repel, No NPCs, CGear off before Startup, Immediate Sweet Scent
Masterball
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, no Repel, No NPCs, CGear off before Startup, Immediate Sweet Scent
Masterball

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

(Repel) Bike 10 Steps

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Now, to try walking with repel.
Startup Target Time: October 17, 2010, 18:00:30
Re-save on Bike, in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 10 steps forward (1 away from rock/wall/end), Sweet Scent
Masterball
Koromori (527)
L39
Male
Unaware
Naive
99 / 48 / 49 / 47 / 36 / 71 (20 / 21 - 22 / 29 / 0 / 4 - 6 / 11 - 12)

Repeat.
Startup Target Time: October 17, 2010, 18:00:30
Saved on Bike, in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 10 steps forward (1 away from rock/wall/end), Sweet Scent
Masterball
Koromori (527)
L39
Male
Unaware
Naive
99 / 48 / 49 / 47 / 36 / 71 (20 / 21 - 22 / 29 / 0 / 4 - 6 / 11 - 12)

Repeat.
Startup Target Time: October 17, 2010, 18:00:30
Saved on Bike, in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 10 steps forward (1 away from rock/wall/end), Sweet Scent
Masterball
Koromori (527)
L39
Male
Unaware
Naive
99 / 48 / 49 / 47 / 36 / 71 (20 / 21 - 22 / 29 / 0 / 4 - 6 / 11 - 12)

Repeat.
Startup Target Time: October 17, 2010, 18:00:30
Not on bike, in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 10 steps forward (1 away from rock/wall/end), Sweet Scent
Masterball
Aianto
L40
Male
Hustle
Calm
100 / 92 / 98 / 46 / 52 / 94(4 - 5 / 22 / 3 - 4 / 4 - 6 / 9 - 11 / 0 - 1)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

(Repel) Walk 10 steps

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Re-save off the bike this time.
Startup Target Time: October 17, 2010, 18:00:30
Re-saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 10 steps forward (1 away from rock/wall/end), Sweet Scent
Masterball
Koromori (527)
L39
Male
Unaware
Naive
99 / 48 / 49 / 47 / 36 / 71 (20 / 21 - 22 / 29 / 0 / 4 - 6 / 11 - 12)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

(Repel) Turn in Place 10 times

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Carefully turn in place (L Button, then R Button... repeat) 10 times
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Turn in place 10 times, Sweet Scent
Masterball
Koromori (527)
L39
Male
Unaware
Naive
99 / 48 / 49 / 47 / 36 / 71 (20 / 21 - 22 / 29 / 0 / 4 - 6 / 11 - 12)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

(Repel) 1 Step

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Only walk 1 step this time
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 1 step, Sweet Scent
Masterball
Gantoru (525)
L39
Male
Sturdy
Bashful
111 / 95 / 98 / 44 / 38 / 25 (20 - 21 / 21 - 22 / 29 / 0 - 2 / 5 - 7 / 12)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 1 step, Sweet Scent
Masterball
Gantoru (525)
L39
Male
Sturdy
Bashful
111 / 95 / 98 / 44 / 38 / 25 (20 - 21 / 21 - 22 / 29 / 0 - 2 / 5 - 7 / 12)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 1 step, Sweet Scent
Masterball
Gantoru (525)
L39
Male
Sturdy
Quiet
108 / 98 / 89 / 59 / 38 / 28 (13 / 30 - 31 / 6 - 7 / 26 - 27 / 5 - 7 / 30 - 31)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 1 step, Sweet Scent
Masterball
Gantoru (525)
L39
Male
Sturdy
Quiet
108 / 98 / 89 / 59 / 38 / 28 (13 / 30 - 31 / 6 - 7 / 26 - 27 / 5 - 7 / 30 - 31)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 1 step, Sweet Scent
Masterball

Gantoru (525)
L39
Male
Sturdy
Quiet
108 / 98 / 89 / 59 / 38 / 28 (13 / 30 - 31 / 6 - 7 / 26 - 27 / 5 - 7 / 30 - 31)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

(Repel) 2 Steps

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

2 Steps
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 2 steps, Sweet Scent
Masterball
Koromori (527)
L40
Male
Unaware
Serious
95 / 45 / 51 / 54 / 48 / 66 (3 - 4 / 10 - 12 / 29 - 31 / 13 - 14 / 22 - 23 / 9)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 2 steps, Sweet Scent
Masterball
Ainto (632)
L42
Female
Hustle
Mild
106 / 109 / 90 / 61 / 48 / 109 (13 - 14 / 30 / 4 - 6 / 26 - 27 / 7 - 8 / 30)

Repeat (conflicting results due to selecting the game at the DS Startup Menu at the wrong second probably)
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 2 steps, Sweet Scent
Masterball
Gantoru (525)
L39
Male
Sturdy
Gentle
111 / 95 / 88 / 44 / 41 / 25 (20 - 21 / 21 - 22 / 29 - 31 / 0 - 2 / 5 - 7 / 12)
Judging by the solid pattern of IVs I've gotten so far, it seems that this one is on :30, and the others were :29 and :31 (or vice versa). Will test again.

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 2 steps, Sweet Scent
Masterball
Ainto (632)
L40
Male
Hustle
Hardy
105 / 102 / 95 / 51 / 55 / 101 (22 - 23 / 26 / 1 - 2 / 19 - 21 / 29 - 30 / 22 - 23)
a;sdlkfajsd;fa again >_? probably a hair off when selecting the game

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 2 steps, Sweet Scent
Masterball
Ainto (632)
L42
Female
Hustle
Mild
106 / 109 / 90 / 61 / 48 / 109 (13 - 14 / 30 / 4 - 6 / 26 - 27 / 7 - 8 / 30)

Repeat
Startup Target Time: October 17, 2010, 18:00:30
Saved (not on bike), in Cave, Fresh Repel, No NPCs, CGear off before Startup, Walk 2 steps, Sweet Scent
Masterball
Kojofu (619)
L41
Female
Inner Focus
Impish
89 / 83 / 51 / 46 / 49 / 58 (3 - 5 / 21 - 22 / 3 - 4 / 5 - 6 / 8 - 9 / 0)

Wow... getting some really inconsistent results here... gonna go back and do 0 and 1 and 10 steps a few more times to make sure I didn't screw THEM up too...

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

2 Things I think I see. Call me out if I'm wrong:
1) It seems that biking/walking/turning in place all seem to advance your PID (nature/gender/ability/shinyness) Frame the same amount when Sweet Scenting on the same seed. IIRC it was different in HG/SS, but I guess that was because you had a mon following you when you were off the bike.
2) Biking/walking/turning don't seem to advance your IV Frame at all on the same seed. I walked 0, 1, 2, 10 steps, and got (with variation probably due to different seeds) the same IVs, but different PIDs.

This almost reminds me of eggs in Gen 4?!?!!

There are a few things obfuscating my two conclusions. Firstly, I was listening to and watching my DS Clock in order to select my game at :30, but I noticed it skipping quite often (I'm a musician and stuff like that sticks out to me). I think that's why the IVs varied from time to time. I think I might try good ol Pikatimer next time I try this. Even with varying IVs, I still think the pattern shows up. Secondly, I only have 1 Rare Candy and USARs are not compatable with Carts yet (A;LSDKHGA;SLGKA DATEL!!!!). Even with that one RC, I was able to get a "good enough" picture of the IVs that I could tell when 2 mons shared the same IVs (the chances of this many mons having IVs within 1 of each other in all 6 is rediculously impossible). I think the pattern I spoke of can be seen through the haze of the poor IV calculation too. Thirdly, imanobsackandican'tplanthesekindsofthingsoutsoi'vegotresultsjumbledallovertheplaceinnoorder
P_p

I realize this is speculative, but I can see this being useful. You can choose your IVs with the seed (CGear off), and then choose your nature with walking X steps with a Repel in tall grass. Situational? Maybe. Useful? Probably.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
It's true you can start at the same time (but only on the same DS) and get the same initial seed, without worrying about delay.

However, the seed you get when you turn on the C-Gear is apparently still dependent on delay - the time between the moment you start the game and the moment you turn on the C-Gear. I still don't know how this seed is used, but allegedly it's calculated the same way as seeds in the last generation, except you add the last 3 bytes of your DS's MAC address to it.

As for mattj's results -- I changed the MAC address in Desmume to be an exact match of his, but even then none of my results match. Apparently having the same date\time and MAC address isn't enough to get you the same non-C-Gear seed.

Code:
Time	Seed		HP	Attack	Defense	SpAttk	SpDef	Speed
:28	AA9C58A5	28	6	0	7	30	17
:29	C0B1388E	25	12	10	5	9	18
:30	16D92FFB	14	26	24	20	12	3
:31	2E3110DF	4	0	23	24	18	27
:32	F5AE44EF	12	9	31	28	12	7
:33	CC3F0B68	12	22	28	17	20	11
:34	90B6AB6F	10	20	20	11	31	2
:35	24AE8904	13	26	26	21	1	31
:36	6C960542	15	6	23	9	20	8
:37	379A3655	13	17	21	10	24	6
:38	8A8FA6FF	27	22	9	1	29	10
I listed other times after :30 because even if mattj turns on the game at :30, it takes a while to warm up so it might use something like :32 for the seed instead.

At some point in the future I may write an RNG check code for the AR so even cart users can help out more with the nitty-gritty research. Unfortunately, as mattj has so often pointed out, they won't be updating the AR firmware to be compatible with Black\White until it comes out in the US.

EDIT: More info on the very initial seed when starting the game.

As I mentioned earlier, this seed's upper 32-bits is taken and becomes the seed for the IV RNG. Apparently, it is then advanced a few times (the number of times varies), and this is the value of the PID\nature RNG when you select Continue.
 

mattj

blatant Nintendo fanboy
Any chance I could have hit :29 or heck even :28. I'm really not at all satisfied with the consistency of the clock on the DS startup screen. I'm going to try using pikatimer or emloop tonightset it to 30 seconds and see if that helps consistency wise. I've rarely ever had noticeable consistency issues with either of those, but the DS clock regularly trips.
 
HI !!! I'd like to help in RNG Research but I have a big problem. I play pokemon white with desmume and i don't find the line for the inital seed !!!

I already tested with the technic of OmegaDonut : RNG Reporter's Researcher + pokésav + lines 022151D4 and 02215B90 !!! But i never have the same IV's in researcher and pokésav !!! where is my error please ???
 

Kaphotics

Remodeling Kitchens
is a Top Researcher Alumnusis a Top Contributor Alumnus
HI !!! I'd like to help in RNG Research but I have a big problem. I play pokemon white with desmume and i don't find the line for the inital seed !!!

I already tested with the technic of OmegaDonut : RNG Reporter's Researcher + pokésav + lines 022151D4 and 02215B90 !!! But i never have the same IV's in researcher and pokésav !!! where is my error please ???
022160A4, 022160A8 are the RNG Seeds
0223EBFC is the egg PID dump location.
022151D4 is the IV MTRNG. Just be sure you are using the correct seed the moment the IVs are generated (and right shift by 27). There's other memory locations throughout this thread as well.

I'm gonna test to see if static PID wondercards follow the same IV generation, just to be sure they are the same as last gen.
 
Is it at all possible that the rng accelerates in advancement?
This would explain Mattj's results and would explain why it can be difficult to advance the rng with stability.
If this is the case, we would need to find the amount of acceleration per second, right?
(If I am entirely wrong, feel free to edit/remove this post.)
 

mattj

blatant Nintendo fanboy
Is it at all possible that the rng accelerates in advancement?
This would explain Mattj's results and would explain why it can be difficult to advance the rng with stability.
If this is the case, we would need to find the amount of acceleration per second, right?
(If I am entirely wrong, feel free to edit/remove this post.)
Not sure what you mean by "accelerates in advancement... per second". I've tried Sweet Scenting at different times and got the same mons. If you're talking about the quote below from the very first test I did, I was just checking for NPCs and other steady frame advancement. Never found any. I actually got that Aianto that I got from SSing after 120 seconds from SSing ASAP at other times. I "think" it has more to do with the inconsistencies of the DSLite clock than anything else. Using pikatimer I've gotten MUCH more consistent results (though still swapping back and forth between those two sets of IVs about 95% of the time). I'll post that in a bit. Gonna go try that ARDSi fix now. Gawd I've missed IVcheck. Metalkids is nice but...

Sweet Scented after only a short pause.
Caught in a Dusk Ball:
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try again, same exact setup, and SS as quickly as possible this time:
Caught in a Dusk Ball:
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try pausing for 120 seconds before SSing this time just to see what happens:
ooooooh! got something different!! Weird?! My CGear was off?? I may have accidentally started at :29 or :31, we'll see...
Caught in a Dusk Ball:
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Gonna try SSing ASAP again just for verification:
Caught in a Dusk Ball:
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try waiting exactly 120 seconds (ingame) before SSing this time and see if I get that same Aianto again:
Again, this could be a fluke, from accidentally hitting :29
Caught in a Dusk Ball:
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

so... one more time, gonna try my very hardest to select the game AFTER :30, but BEFORE :31 and then wait 120 seconds ingame before SSing.
Masterball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Okay... gonna try... Waiting exactly 30 seconds from the time the music starts to SS...
...?? This was unexpected??
Masterball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)

Okeezy... gonna... Wait exactly 10 seconds from music to open my menu and quickly SS...
Weird AND unexpected... although this is leaning toward being some kind of slow frame advancement while just sitting there, this STILL could be just hitting :29 versus :30 or :31 even...
Masterball
Gantoru (525)
L41
Male
Sturdy
Jolly
110 / 100 / 92 / 43 / 41 / 23 (4 - 6 / 22 - 24 / 3 - 4 / 5 - 7 / 8 - 10 / 0 - 1)

Gonna try my hardest to select my game on the DS Startup Screen AFTER :30 but BEFORE :31 (to "ensure" it's :30 as best I can) and then IMMEDIATELY open my menu and quickly Sweet Scent:
Duskball
Aianto (632)
L39
Female
Swarm
Gentle
102 / 98 / 92 / 42 / 48 / 94 (20 - 22 / 21 - 23 / 28 - 29 / 0 - 1 / 4 - 6 / 11 - 12)
 

Bond697

Dies, died, will die.
Not sure what you mean by "accelerates in advancement... per second". I've tried Sweet Scenting at different times and got the same mons. If you're talking about the quote below from the very first test I did, I was just checking for NPCs and other steady frame advancement. Never found any. I actually got that Aianto that I got from SSing after 120 seconds from SSing ASAP at other times. I "think" it has more to do with the inconsistencies of the DSLite clock than anything else. Using pikatimer I've gotten MUCH more consistent results (though still swapping back and forth between those two sets of IVs about 95% of the time). I'll post that in a bit. Gonna go try that ARDSi fix now. Gawd I've missed IVcheck. Metalkids is nice but...
i think he means it advances at a quicker rate the more time passes. ex. 1 call after 1 sec, 2 calls after 2 seconds from game start, etc.

e: it's not right, but i'm pretty sure that's what he means.

e2: i really should refresh before i edit.
 
Maybe not that precise but yes, something like that.. explaining why you would receive different results on the same seed with nothing else advancing the rng.
Also explaining why it would be difficult to abuse ivs on pokemon without knowing the equation of acceleration.
I would assume that if any, it would be in frame advancement, yes?

Edit:
Sorry, then..
Hurray for speculation.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
The RNG does not advance like that at all. I know, I've been looking at it under a debugger.

Any inconsistencies with mattj's results are due to his timing being off.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
Earlier today I found that the timer for the delay (with the C-Gear seed, of course) is located at 023FFC3C (White). By fixing it to a constant number, I was able to get the same consistent results.

According to the Japanese blog referenced earlier, this is how that seed is calculated:

0xABCDEFGH + last 3 bytes of the DS MAC address

where AB = month * day + minute + second
where CD = hour, in 24 hour format
and EFGH = year + delay

It's basically the same as last gen, except for the MAC address part. Unfortunately, things aren't that simple.

Code:
Last 3 bytes of MAC Address - 00:00:00
October 17, 2010, 18:00:30, delay 0 to 2
August 27, 2009, 18:00:38, delay 1 to 3
both dates give the same results, confirming the above formula

Calculated Seed		IV MTRNG Result
C812000A		017A5460
C812000B		E5FA930D
C812000C		74E92BDF
Apparently it's doing something to the initial seed, and the result becomes the new seed for the IV MTRNG. Once we figure out exactly what it's doing with that, we can start RNGing for wild Pokemon IVs on a cartridge.

Also, the procedure would be mostly the same as last gen, except instead of selecting Continue, people will have to turn on their C-Gear at the right moment in-game (not just after selecting Continue, that does not reseed the IV MTRNG).
 

mattj

blatant Nintendo fanboy
This could be old news, but I looked at what Random NPC movement did to your PID or IVs. Looks like it just changes/advances/whatever your PID. Didn't touch the IVs.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

10-24-10 Sunday

NPCs: What dew they dew?

Pikatimer:
CD: 600 WD: 2370 CS: 1 WS: 1 FT: 30:50 ST: 30:50

Synch Date/Time: 10-17-10 18:00:00

Saved at the beginning of Rt1. I walked all of the route from the first town to the second,
and then the surfed over to Rt 17, and only found ONE RANDOMLY MOVING NPC (he's in sight too).
All the rest were stationary. There are petals falling in the air, which might screw with frames
like the sand in D/P/Pt.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Immediately Sweet Scent

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reset #1)
Yooterii (506)
L3
Female
Jolly
Pickup
8 / 30 / 5 / 25 / 13 / 1

Reset #2)
Minezumi (504)
L2 Female
Serious
Run Away
15 / 9 / 30 / 9 / 30 / 25

Reset #3)
Minezumi (504)
L4 Male
Calm
Run Away
16 / 20 / 0 / 22 / 14 / 15

Reset #4)
Yooterii (506)
L3
Female
Jolly
Pickup
8 / 30 / 5 / 25 / 13 / 1

Reset #5)
Yooterii (506)
L3
Female
Jolly
Pickup
8 / 30 / 5 / 25 / 13 / 1

Reset #6)
Yooterii (506)
L3
Female
Jolly
Pickup
8 / 30 / 5 / 25 / 13 / 1

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Wait 30.5 seconds from last "Yes" after Continue to open your menu with X to Sweet Scent

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reset #1)
Minezumi (504)
L2 Male
Docile
Keen Eye
8 / 30 / 5 / 25 / 13 / 1
(screwup getting used to this odd timer juggling)

Reset #2)
Yooterii (506)
L3
Male
Calm
Pickup
8 / 30 / 5 / 25 / 13 / 1

Reset #3)
Yooterii (506)
L3
Male
Calm
Pickup
8 / 30 / 5 / 25 / 13 / 1

Also, noteworthy, It was pretty easy to get the same mon even with this particular solo RMNPC. That's a good sign for egg abuse (gonna look at that soon too).

Also, seems like aiming for XX:XX:30 (using a timer) really boosts your consistency. The only times I hit a different seed now are pretty obvious timing screw ups on my part.

Oh, and also ALSO of note, I finally got my ARDSi, updated it and got it working with B/W *thankyousweetjesusforIVcheck* (no offence metalkid). I did some calibration in the cave where I did all my last Resets, and got these IVs:
AR (30.33)
aianto L39 M, 97 / 97 / 101 / 90 / 57 / 94 (8 / 30 / 5 / 25 / 13 / 1)
batpig L39 F, 97 / 97 /38 / 70 / 51 / 50 (15 / 9 / 30 / 9 / 30 / 25)
batpig L39 M, 98 / 98 /51 / 67 /56 / 34 (16 / 20 / 0 / 22 / 14 / 15)
8 / 30 / 5 / 25 / 13 / 1
15 / 9 / 30 / 9 / 30 / 25
8 / 30 / 5 / 25 / 13 / 1
8 / 30 / 5 / 25 / 13 / 1
8 / 30 / 5 / 25 / 13 / 1
8 / 30 / 5 / 25 / 13 / 1
8 / 30 / 5 / 25 / 13 / 1

15 / 9 / 30 / 9 / 30 / 25
15 / 9 / 30 / 9 / 30 / 25
15 / 9 / 30 / 9 / 30 / 25
16 / 20 / 0 / 22 / 14 / 15
8 / 30 / 5 / 25 / 13 / 1

I then changed locations to Rt1 and was still able to get the same IVs with a very very close time (:33 compared to :50). I guess this means this works pretty much anywhere (getting IVs based on time without the CGear involved).


Is there something else I could try (aside of CGear) that might manually advance your IVs? Some item or action or menu choice?
 

Kaphotics

Remodeling Kitchens
is a Top Researcher Alumnusis a Top Contributor Alumnus
Is there something else I could try (aside of CGear) that might manually advance your IVs? Some item or action or menu choice?
Other than IV generation and the battle sequence and (when the viewing perspective shifts all around, the IV MTRNG advances), nothing Bond and I have seen advanced it.

You could try cart confirming the "Saving advances the regular RNG by 1"

Still looking for something that can confirm seeds like calling elm or coin flips :(
 

mattj

blatant Nintendo fanboy
Other than IV generation and the battle sequence and (when the viewing perspective shifts all around, the IV MTRNG advances), nothing Bond and I have seen advanced it.

You could try cart confirming the "Saving advances the regular RNG by 1"

Still looking for something that can confirm seeds like calling elm or coin flips :(
Ha, well I suppose catching a mon could verify your seed (we did it in D/P/Pt). Even still though, it's rediculously easy to hit a seed over and over again just by setting the date, so I don't know if we even need that (I could be missing something).

Oh, and what do you mean by "Saving advances the regular RNG by 1". Just saving your game in general? And which RNG? IV, PID, other?
 

Kaphotics

Remodeling Kitchens
is a Top Researcher Alumnusis a Top Contributor Alumnus
Ha, well I suppose catching a mon could verify your seed (we did it in D/P/Pt). Even still though, it's ridiculously easy to hit a seed over and over again just by setting the date, so I don't know if we even need that (I could be missing something).

Oh, and what do you mean by "Saving advances the regular RNG by 1". Just saving your game in general? And which RNG? IV, PID, other?
Yeah as it appears, the only hard part about seed hitting was delay, and its easy to forgo that with not using the C-Gear at all. Guess this would be for shiny RNG, shiny egg IV would be interesting...

Just saving the game advances the PID rng (022160A4, 022160A8) once. Since we know at what frame the PID is taken from, it would just be 1 frame after the one without saving.



Some other observations: I can second OD's finding of the delay counter being at 023FFC3C, on both White and Black. There's another one in the 02150000 region that advances 8 times a second, which is for the /played timer (added to last played amount).

The games are still a 60FPS (or whatever delay advances at, because the UI Memory areas [02FE3000] change at the same rate depending on if that UI region is used.
 

ΩDonut

don't glaze me bro
is a Programmer Alumnusis a Forum Moderator Alumnusis a Top Researcher Alumnusis a Top Contributor Alumnus
The IV MTRNG does look like it's "advancing" in battle, as it's not affected by me fixing the delay timer. Or maybe it's reseeding with something else. Probably not worth it to try and control, though.

Anyway, I would've written the RNG check code by now, but I don't have a place to stick the RNG result so it's visible to the user. I thought of storing it wherever the user's friend code is stored since it's 12 digits long, easily big enough to handle the 32-bit IV RNG. But I haven't been able to figure out where it's stored. Got any ideas, Kaphotics?
 

Users Who Are Viewing This Thread (Users: 1, Guests: 4)

Top