Emulator Issues #9864
closedRTC (both using forced override mode and without) does not force the rightmost 5 bits of the generated seed to 0 for GC games
0%
Description
Game Name?
Pokemon Colosseum, Pokemon Channel, basically any GC game that calls dolphin's RTC function to generate a seed (games with the health & safety screen as 1st thing shown have the correct distance between seconds, but lack the forced 5 bits to 0 as well, so they also vary between computers, just to a lesser extent than those without it)
Game ID? (right click the game in the game list, properties, info tab)
GC6E01, GPAP01, others that use RTC seeding
MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)
pkmn colosseum: e3f389dc5662b9f941769e370195ec90, pkmn channel: b570d1f6ea59c66ceaf8497871b01e88, others
What's the problem? Describe what went wrong.
The RTC seed does not have the rightmost 5 bits forced to be 0. This means there can be variance between seconds in terms of how a game uses the RTC seeding (even for the same game on different seconds) -- it varies by up to 0x00 to 0x1F (5 bits max) from the standard adjustment of +0x40500000 per added second from 1/1/2000 @ 12:00 AM. This means that the RTC seeding function (at least without those 5 bits forced to 0) is inconsistent from any given second to the next, which is a problem for utilizing netplay, TASing, and comparing seeding between two or more computers in general, even when said computers are all using the same dolphin version.
What steps will reproduce the problem?
Boot a game that uses RTC seeding, check RTC seed RAM location once it first calls the RTC function. The seed will most likely have said 5 bits different between two different computers following these instructions. (colo's address for RTC seeding is 0x80478c90, for instance)
Which versions of Dolphin did you test on? Does using an older version of Dolphin solve your issue? If yes, which versions of Dolphin used to work?
5.0-1107, 5.0-1156, 5.0-266, 4.0.2
As far as I'm aware this has yet to be implemented in dolphin, though I could be wrong (it would certainly solve the discrepancies between different computers as far as I am aware, though!)
What are your PC specifications? (CPU, GPU, Operating System, more)
64bit Win 10, i5-2430 @ 2.4GHz
Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
See attached screenshots for a 1-second variance example of 0x4050001a -- one that would be solved by forcing the rightmost 5 bits to 0. those 5 bits seem to vary based upon how fast the user's internal computer clock is. Otherwise, the 0x40500000 advancement is consistent between 1 second and the next. (Tested this on both mine and 2 of my friends' computers -- those 5 bits varied but the rest of the advancing was the same, even when all of us were using the same dolphin version [5.0-1156])
Files