Go Back   Smogon Community > Pokémon > Wi-Fi
Register FAQ Social Groups Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old Sep 27th, 2010, 10:23:22 AM   #326
Kazo
 
Kazo's Avatar
 
Join Date: Dec 2006
Posts: 224
Default

Quote:
Originally Posted by Fat OmegaDonut View Post
Current information on the B&W RNG:

The state of the RNG is stored as a 64-bit number at memory location 022160A4.
I don't think that is correct, I was just working on trying to find the formula and I think they are 2 32-bit RNGs.

here is what i got so far.
Code:
OFFSETS BLACK (add 0x20 to offset for white)
02216084 = SEED1
02216088 = SEED2
0221608C = 0x6C078965
02216090 = 0x5D588B65
02216094 = 0x00269EC3

SEED1 = (0x6C078965 * SEED1) + 0x00269EC3;
SEED2 = ???
Variables and constants for SEED2 seem to include SEED2, SEED1, 0x6C078965, and 0x5D588B65.


RNG advancements when forcing SEEDs to certain values.
00000000 00000000
00269EC3 00000000
55AE9CB2 7188D00C
A0C3B2FD 0AF528D3
C910A194 0A8B4E34

00000001 00000000
6C2E2828 5D588B65
5AF1DE8B E3B543E4
0B78CE9A 3D7FCA1A
CB968B85 3FE714A2

00000000 00000001
00269EC3 6C078965
55AE9CB2 76CC11E5
A0C3B2FD 75AA4470
C910A194 0D113825


AR codes to modify RNG variables and constants to try to crack formula.
02216084 00000001
02216088 00000000
0221608C 00000001
02216090 00000001
02216094 00000000
Kazo is offline   Reply With Quote
Old Sep 27th, 2010, 10:33:00 AM   #327
mingot**
free agent
is a member of the Smogon Site Staffis a Battle Server Administratoris an Administrator
 
Administrator
Join Date: Jun 2008
Posts: 3,045
Default

Some things that might help:

Regarding seed 2 and the constant 0x5D588B65:

It looks like it's a hash function.

http://blogs.msdn.com/b/ricom/archiv...good-hash.aspx

Regarding seed 1:

0x6C078965 used to be part of the old ARNG.

It really looks like this is just another LCRNG with new constants. I used the researcher function in RNG Reporter and plugged in your new constants and got the same results that you did when you forced the seed.

Regarding something I found a few days ago:

Check out the routine at 02019B7A. It's the old LCRNG, but I didn't see where it actually stored the value. Everything came in and out through registers and without a debugger I could not get a handle on where / when it was called.
mingot is offline   Reply With Quote
Old Sep 27th, 2010, 11:50:52 AM   #328
Kazo
 
Kazo's Avatar
 
Join Date: Dec 2006
Posts: 224
Default

Quote:
Originally Posted by Fat mingot View Post
Check out the routine at 02019B7A. It's the old LCRNG, but I didn't see where it actually stored the value. Everything came in and out through registers and without a debugger I could not get a handle on where / when it was called.
I think it is used for the pkm data encryption, trying to modify either 0x41C64E6D or 0x6073 caused the game to display an error message when trying to get into a battle, access the storage box, or open the party. Starting a new game with the value modified before the game generates your starter does not display the error message. Haven't tested this part yet, but I am sure if you try to import a pkm from the save file with the modified encryption to a normal save file would result in the pkm being invalid.

The encryption routine: http://www.projectpokemon.org/wiki/P...ure#Encryption
Kazo is offline   Reply With Quote
Old Sep 27th, 2010, 12:08:58 PM   #329
mingot**
free agent
is a member of the Smogon Site Staffis a Battle Server Administratoris an Administrator
 
Administrator
Join Date: Jun 2008
Posts: 3,045
Default

Cool, that makes me feel like that code has a reason that doesn't necessarily have anything to do with pokemon generation. Oddly enough, that makes me feel better.

Do you think it might be worthwhile for me to quickly release an rng reporter with a method for "SEED1 = (0x6C078965 * SEED1) + 0x00269EC3" so that we can do a quick check to see if we can find a captured pokemon?
mingot is offline   Reply With Quote
Old Sep 28th, 2010, 8:05:01 AM   #330
Ω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,692
Default

Both seeds are used to generated egg PIDs. I kept Seed1 constant and got changing PIDs, Seed2 constant and got changing PIDs, and when I kept both constant I got a static PID.

Code:
Seed1	Seed2	PID
0x0	0x0	C0AAEBC6
0x0	0x1	5878F4C3
0x1	0x0	5878F4C3
0x1	0x1	539702A7
The fact that we get the same PID when Seed1 and Seed2 are reversed is promising. It might not be so hard to figure out egg PID generation, even if we don't have a debugger.

Unfortunately, the egg IVs seem to be coming from some other RNG, one that's constantly changing in the background. I'll need some more testing to see if it advances "Emerald fast" or not.

A few notes:

- The game does not load if the time recorded at the last save matches the time when you reload the game. You'd have to re-save at a different time.
- The egg PIDs are loaded into memory location 02234BA4 (White) when generated. I've confirmed this several times, and it spares the trouble of checking the save files under PokeGen.
ΩDonut is offline   Reply With Quote
Old Sep 29th, 2010, 7:04:58 PM   #331
Kazo
 
Kazo's Avatar
 
Join Date: Dec 2006
Posts: 224
Default

Seems like i was wrong early, it is a 64bit seed, and the formula for advancing is.
Code:
OFFSETS BLACK (add 0x20 to offset for white)
02216084 = SEED
0221608C = 0x5D588B656C078965
02216094 = 0x0000000000269EC3

SEED = (0x5D588B656C078965 * SEED) + 0x0000000000269EC3;
Also what you said about the IVs being generated by another RNG, I believe that since I had matching PIDs but different IVs when I froze the RNG and captured a few Pokemon.

Also the PID was 0A8A4E34. I think I rember seeing somthing on that one site mingot linked earlyer about XORing something by 0x10000 I think it was the PID, cause the PID seems to be the 32bit high of the 4th RNG call (0A8B4E34C910A194) XOR'd to 0x10000.

0000000000000000
0000000000269EC3
7188D00C55AE9CB2
0AF528D3A0C3B2FD
0A8B4E34C910A194
Kazo is offline   Reply With Quote
Old Sep 30th, 2010, 9:56:36 AM   #332
Ω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,692
Default

Quote:
Originally Posted by Fat Kazo View Post
Also the PID was 0A8A4E34. I think I rember seeing somthing on that one site mingot linked earlyer about XORing something by 0x10000 I think it was the PID, cause the PID seems to be the 32bit high of the 4th RNG call (0A8B4E34C910A194) XOR'd to 0x10000.
Is that a PID generated from a stationary legendary? I did the same thing with a Pokemon I Sweet Scented in the grass, but didn't get a similar result (PID -- 86F3A159)

EDIT: Actually, I kinda did. 06F2A159, one of the upper 32 bits, when XOR'd with 0x10000 is 06F3A159. Add 80000000 and you get the PID result.

Code:
RNG calls with Sweet Scent:

00000000 00000000
00000000 00269ec3	
7188D00C 55AE9CB2	
0AF528D3 A0C3B2FD	
0A8B4E34 C910A194	
C83FB970 153A9227	
0C45453A 2B8A2726	
CC28FE89 36A566C1	
22967565 4EAC71E8	
38C7575F 507CB74B	
67795501 267F125A	
C0AAEBC7 A9910645	
06F2A159 CA9C04FC	<-- probably where the PID came from, with some modification
C9E3DDA4 E143722F	
08D1DD28 EB26D24E	<-- PID was definitely generated just before here
94CB488B 35255589	
9D847485 1566AED0	
36360093 ECE6E6D3	
8B8FEA14 5C8B9B02	
6493EA8F 4E3CD88D	
46DD090E D5E68364	<-- RNG value at the battle start
Additionally, I tested the PID outcomes of Pokemon Sweet Scented in grass, with fixed seed values:

Code:
U32	L32	PID
0x0	0x0	10000
0x1	0x0	EC068965
0x0	0x1	DD598B65
0x1	0x1	496114CA
0x10000	0x10000	94CB6C07
0x0	0x10000	8BCB6C07
0x10000	0x0	09640000
0x10000	0x1	E6BC8B65
0x1	0x10000	776DF56C
Will analyze these later, right now have to do some paying work. My girlfriend is trying to get a better translation of the Japanese RNG researcher's blog, but she hasn't had time to make much progress yet.

Some additional notes:

- The PID is stored at 02259DA0, 0225A410, 0226AB74, 0226B0D4, and 022A7BB4(White) when generated. Only the first two keep the PID stored immediately after the battle ends. At least for wild, Sweet Scented Pokemon. Don't know why it's stored in several locations, though.

- Nature is no longer linked to PID in 5th gen. I'll have to test to see if the nature comes off the same RNG as the PIDs.
ΩDonut is offline   Reply With Quote
Old Sep 30th, 2010, 9:53:27 PM   #333
Kazo
 
Kazo's Avatar
 
Join Date: Dec 2006
Posts: 224
Default

I know the nature is in the RNG at 02216084 cause it is always the same for a certain SEED. Still haven't figured out wall call its from though.

Also the Sweet Scent PID might just be XOR'd to 0x80010000

also I noticed
Code:
0x0    0x0    1000
Make sure you are setting the RNG and then disabling the code. The PID should be 0A8A4E34. I had the same issue when I was testing, I think it has to do with the rate the AR codes are refreshed, stuffing 0 back in to SEED as soon as the game reads it for the PID then XORing 0 with 0x10000 to get a PID of 0x10000
Kazo is offline   Reply With Quote
Old Oct 1st, 2010, 9:41:02 AM   #334
Ω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,692
Default

Quote:
Originally Posted by Fat Kazo View Post
Also the Sweet Scent PID might just be XOR'd to 0x80010000
Tested with an initial seed of 0x100000000 and got a PID of 28F7922A.

Code:
	RNG value
0	100000000
1	6C07896500269EC3
2	76CC11E555AE9CB2
3	75AA4470A0C3B2FD
4	D113825C910A194
5	82DDFE85153A9227
6	1F41C3832B8A2726
7	A95AE25636A566C1
8	D0C90A464EAC71E8
9	28F7D24507CB74B
10	4409A8BA267F125A
11	5878F4C4A9910645
12	28F6922ACA9C04FC
13	1308B919E143722F
14	FA010F51EB26D24E
So sometimes it's XORing with 0x80010000, other times with 0x10000.

Quote:
Originally Posted by Fat Kazo View Post
Make sure you are setting the RNG and then disabling the code. The PID should be 0A8A4E34. I had the same issue when I was testing, I think it has to do with the rate the AR codes are refreshed, stuffing 0 back in to SEED as soon as the game reads it for the PID then XORing 0 with 0x10000 to get a PID of 0x10000
It works for some short tests. The PID result is generally the next RNG result XOR'd with 0x10000, or 0x80010000, or some other number. It's a quicker way of getting results, at least until RNG Reporter is updated to handle the 64-bit seeds. (Hey, don't I have access to the source code? Yes. Yes, I do.)

Code:
U32	L32	PID		Next RNG #	XOR'd with
0x0	0x0	10000		0		   10000
0x1	0x0	EC068965	6C078965	80010000
0x0	0x1	DD598B65	5D588B65	80010000
0x1	0x1	496114CA	C96014CA	80010000
0x10000	0x10000	94CB6C07	14CA6C07	80010000
0x0	0x10000	8BCB6C07	8B656C07	  AE0000
0x10000	0x0	O9640000	89650000	80010000
0x10000	0x1	E6BC8B65	E6BD8B65	   10000
0x1	0x10000	776DF56C	F76CF56C	80010000
So remember when I said that IVs and nature\PID were no longer linked, that IVs were generated by a different RNG? I've been sitting in a quiet NPC-less area in Victory Road and using Sweet Scent. I keep getting the same Gantoru every time - same stats, same nature, same PID. So they're linked after all, at least in some cases.

The fluctuating IVs just might've been a side effect of not disabling the codes I used, like Kazo said.

Also: the C-Gear advances the RNG at a slow and steady rate, probably once every 1 to 1.5 seconds, but needs further confirmation on an actual cart.
ΩDonut is offline   Reply With Quote
Old Oct 4th, 2010, 11:23:51 AM   #335
Valkart
 
Join Date: Oct 2009
Posts: 190
Default

I'm in front of Victini right now, can I help you guys on something? I didn't know that it respawns everytime I defeat it and I enter the room again.
Valkart is offline   Reply With Quote
Old Oct 4th, 2010, 6:09:28 PM   #336
mattj
blatant Nintendo fanboy
 
mattj's Avatar
 
Join Date: Mar 2009
Posts: 4,328
your mom sucked at e3
Default

Quote:
Originally Posted by Fat OmegaDonut View Post
Also: the C-Gear advances the RNG at a slow and steady rate, probably once every 1 to 1.5 seconds, but needs further confirmation on an actual cart.
Yeah, echoing the guy above. I got my cart in. What could I do to help you guys? What do you mean by confirmation on an actual cart?
__________________
pork and beans cover for smogon karaoke contest

#smogonwifi #skarmbliss
Quote:
Originally Posted by Fat M_Liesik View Post
I love you too, mattj.
mattj is offline   Reply With Quote
Old Oct 4th, 2010, 6:22:34 PM   #337
Riski
 
Riski's Avatar
 
Join Date: Nov 2009
Posts: 1,254
in the beehive
Default

Echoing the previous two posters. I also have my retail game in (Black) so if you need any testing done, let me know.
__________________
Visit my thread to read my RNG Noob Guides.
Riski is offline   Reply With Quote
Old Oct 4th, 2010, 8:09:59 PM   #338
Ω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,692
Default

Quote:
Originally Posted by Fat mattj View Post
Yeah, echoing the guy above. I got my cart in. What could I do to help you guys? What do you mean by confirmation on an actual cart?
Right now, nobody can help with an actual cart until we figure out a way for people to find out their initial seed. We don't even know how it's being calculated; all we about it is from a Japanese blog, and all the author knows is that it somehow involves date\time and the MAC address unique to that DS.
ΩDonut is offline   Reply With Quote
Old Oct 6th, 2010, 1:03:16 AM   #339
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

If you are looking for the MAC address of the DS, you can check it while in game via the C-Gear.

...



some other RNG observations (on White) to look over, I can't analyze this to the depth you guys can ;). Don't take it as 100% true, I could have messed up writing something down (did this 2 weeks ago)

...
Kaphotics is offline   Reply With Quote
Old Oct 6th, 2010, 5:52:49 PM   #340
Riski
 
Riski's Avatar
 
Join Date: Nov 2009
Posts: 1,254
in the beehive
Default

Something I've noticed about breeding in B/W: Saving in front of the Day Care Man when he has an egg does not guarantee the same nature or gender. I have tested multiple times with the same save position while standing in front of the Day Care Man while he's holding an egg. I've gotten different natures and different genders on the supposedly same egg. Perhaps this is already known or has been discussed elsewhere on the forum, but I'm making a note of it here for anyone looking at the research thread with breeding min mind.
__________________
Visit my thread to read my RNG Noob Guides.
Riski is offline   Reply With Quote
Old Oct 8th, 2010, 3:08:44 PM   #341
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Pieced it all together now. Go ahead and read!
-----

Did some testing for memory locations of egg PIDs. White, C-Gear off. Frame @022160A4(8) advances fairly fast at the daycare man.
lolresearch


Summary: [WHITE]
Code:
Egg PIDs are based off of a 022160A8 Value, exactly the same -1.
Thus they are based off of the frame, and are not set upon "generation".

0223EBFC stores the PID generated for eggs after you confirm yes. 
It changes after certain in game interactions.
There is another place that has the PID stored... but it's not related at all to RNG:
edit: the other place
Kaphotics is offline   Reply With Quote
Old Oct 10th, 2010, 4:47:16 AM   #342
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Did a little bit of observational research using a memory analysis with cheat engine to get some opcodes and memory locations.

observations + opcodes Using the new Cheat Engine 5.6.1


other things I have noticed about PID locations:

dumped PID locations to check PID on encounter


When the game freezes you and starts the battle scene (after any encounter text), the PID for the Pokemon is already set (as in gen 4)
Kaphotics is offline   Reply With Quote
Old Oct 10th, 2010, 11:31:06 AM   #343
Ω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,692
Default

Zoroark's PID is stored in 0225DE74 and 0225D804 when you encounter it.

At this point we can manipulate the RNG for shininess on most Pokemon, though IVs are off the table. The PID is derived directly from the upper 32 bits of one of the main RNG results, but in most cases it is modified as follows:

...


IVs are generated by a separate RNG, the same Mersenne Twister used for generating egg PIDs last gen. (Or so says one Japanese blog on RNG research.) We don't know how it's seeded, so we don't have much control at this time. We've found through trial and error that advancing the main RNG by walking in an area with wild Pokemon does not advance the RNG for IVs.

However the C-Gear does, at a steady rate. So with LOTS of trial and error I could get the IVs I wanted, turn off the C-Gear to lock them in, and then advance the main RNG to the point I got a shiny Pokemon. The Pokemon would then have the IVs I wanted.

But for all of this, I would need an emulator to watch the RNG, and to use save states to see which IVs were locked in.

tl;dr: We can control shininess on an emulator, but getting good IVs is still just a lot of trial and error. However, at least we can get decent and\or shiny Pokemon that should pass the Wi-Fi and VGC hack checks.

NOTE: I'd like to remind readers that any Pokemon generated through an emulator must be VERY clearly labeled if you plan on trading them here on the Wi-Fi boards. This label must stick even if you receive the Pokemon in a trade and are allowed to redistribute them, no Pokélaundering.
ΩDonut is offline   Reply With Quote
Old Oct 10th, 2010, 12:13:37 PM   #344
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Egg PIDs are based off of a 022160A8 Value, exactly the same, but -1. I tested with a female parent having a dream world ability flagged. This might influence it just like international Dittos did in gen 4.

They aren't based off of the 022160A8 value at the point the egg is received, it's based off of another value from that place further down the line.

ctrl F in my egg Hide: Start [39FA5BBB] / Rapid [F888399E]

The pattern I noticed:
...


other stationary legends to test for PID locations that you can get to after the elite four:
Birijion Kobaruon Terakion (the trio) [I'll be finding these and updating this post later today]
Randorosu
Kaphotics is offline   Reply With Quote
Old Oct 10th, 2010, 12:38:22 PM   #345
Ω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,692
Default

Quote:
Originally Posted by Fat Kaphotics View Post
They aren't based off of the 022160A8 value at the point the egg is received, it's based off of another value from that place further down the line.
True. Later today I'll document which RNG value down the line the PID comes from for each type of encounter. This what I have for now:

Zekrom\Reshiram - 2 advances
Sweet Scent in cave - 4 advances
Sweet Scent in (normal) grass - 12 advances
ΩDonut is offline   Reply With Quote
Old Oct 10th, 2010, 4:41:51 PM   #346
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Quote:
Originally Posted by Fat DjGopher View Post
Probably not the most sophisticated thought out there.. but after a little testing (not confirmed) it seems that breeding is different based on season, as well as the month, hour and minute.
To take it a little further, every 30 days is a season, suggesting that it has a somewhat irregular pattern when compared to the month/date.
Therefore, if what I said above is correct, one would need to determine the month, season and time to hit the wanted seed (for breeds)
The testing was done on an emulator, but it is very possible that I am wrong.
Egg PIDs aren't saved when you save the game, nor are they saved when the man yells that you have an egg. They are entirely seed dependent and get their PIDs from the upper seed. (if that clears anything up)


----------

Looked for more PID locations upon encountering the Pokemon, did some seed freezing as well

long code wrapped


The memory locations for Party PIDs are insanely useful with RAM Watch or with Cheat Engine to get a PID to find other locations.

Going to test freezing of the upper seed (022160A8) and its effects on the egg PID.

---

Tested Seed relationships to the PID
Stated at the man with Yes/No, no C-Gear, stable seeds.
Code:
Pressed yes, Received egg. Froze the 2 seeds, and rewound to the previous state.
Pressed yes, Received egg. Froze the 2 seeds, and rewound the previous state.

Basically I just set my own values for the RNG. Got different PIDs every time.

Did it again but only froze the 2nd seed. Different PIDs every time.

Setting the rapid location [02234BA4 (White)] to 01010101 for lols
resulted in blue screen errors rarely when I reloaded the state fast enough
so the game could not update other locations related to it.
It's related to both of the 2 seeds for sure, and relies on 02234BA4 (White) for setting the PID.
Kaphotics is offline   Reply With Quote
Old Oct 11th, 2010, 4:13:47 PM   #347
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Did some memory location lookings with the new Mystery Gift Wondercards from the 10/10/2010 Event.

PIDs generated for Mystery Gift/Wondercards are stored at: (White)


--------------

Also, recapping Party/PC Box PID locations (other data is encrypted) for those who want to check without saving.
Party PID Locations (White)
Box PID Locations (White)


Other data is still encrypted, so you can't view the IVs in a specific location.

--------------

Mystery Gift IVPID/Nature Generation Patterns
lolresearch


Summary of Mystery Gift IVNPID Patterns:
oh lawd legality issues
Kaphotics is offline   Reply With Quote
Old Oct 11th, 2010, 9:09:05 PM   #348
Kaphotics
Remodeling Kitchens
is a Pokémon Researcheris a Contributor to Smogon
 
Kaphotics's Avatar
 
Join Date: Apr 2009
Posts: 758
Berkeley, CA
Default

Looked back at my Egg PID generation notes, and remembered that SEED1's advancement was already known. I added in the missing frames that the game didn't show me, and I arrived at this pattern for every egg I generated:

Mind you this was with a female parent with a Dream World ability, if that possibly had any influence. I can check to see without.

Code:
Frame 0  -- Starting SEED1/SEED2 (Frame)
Frame 1  -- Not Displayed (SEED2's would be value appears in 0223EBFC)
Frame 2  -- Shown in SEED1 and SEED2
Frame 3  -- Never Displayed
Frame 4  -- Shown in SEED1 and SEED2
Frame 5  -- Never Displayed
Frame 6  -- Never Displayed
Frame 7  -- Never Displayed
Frame 8  -- Never Displayed
Frame 9  -- Never Displayed
Frame 10 -- Never Displayed
Frame 11 -- Shown in SEED1 SEED1 and (SEED2)------------\
Frame 12 -- Shown in SEED1 and SEED2 			|
	 -- ^^^Ending Frame -> Egg has been generated!	|
		    .-----------------------------------/
PID = Frame 11's [SEED2-00000001]
PID Generation for Normal Dream World Egg Offspring is the same for Normal Egg PID Generation, except the Normal generation PID is stored at 0233EFBC instead of 0233EBFC.

International Breeding follows a different generation pattern. Still testing. Taken from a different frame, same XOR (0x1).
PID is stored at 0233EFBC, like DW Breeding. So far the pattern is not constant.

International Breeding relies on some other value that is separate from the RNG but is not the IRNG(IV). Freezing to different values from one seed to another produces one pattern, while starting at the same one without codes produces a different pattern. The patterns contradicted eachother, so it's not exclusively calculated from the RNG/IRNG only.

---

Wondercards still have a shiny check. I found the SID location of the new Wondercard file standard and changed the SID to make it shiny based off of a seed spread I already knew (the one I tested with).

Since the PID is Initial Frame 0's Frame 32 upper half XOR'd with 0x10000, if it comes out shiny it is then XOR'd with 0x10000000 to become nonshiny.

The only available gift wondercards are of random non-Dream World Abilities. In the data for the card there are flags for what the ability should be. Since there are restrictions on ability based on PID, there must be some limit on the results for the PID if it is a set ability.

-----

Passive Seed Advancement while Breeding:
Other than the set path Moving Pokemon, there are 5 moving NPCs with a non-set path in the area that advance the frame.

(one in top left corner, one girl in the play area, 1 man in grass, 1 girl in the lower half of the route, girl on the bridge)
Kaphotics is offline   Reply With Quote
Old Oct 12th, 2010, 3:41:17 PM   #349
Ω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,692
Default

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.
ΩDonut is offline   Reply With Quote
Old Oct 12th, 2010, 7:36:58 PM   #350
mattj
blatant Nintendo fanboy
 
mattj's Avatar
 
Join Date: Mar 2009
Posts: 4,328
your mom sucked at e3
Default

Quote:
Originally Posted by Fat OmegaDonut View Post
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.
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?
__________________
pork and beans cover for smogon karaoke contest

#smogonwifi #skarmbliss
Quote:
Originally Posted by Fat M_Liesik View Post
I love you too, mattj.
mattj is offline   Reply With Quote
Reply Smogon Community > Pokémon > Wi-Fi

Tags
NULL

« Previous Thread | Next Thread »
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 11:58:21 AM.