Dolphin-Lua-Core
Dolphin-Lua-Core copied to clipboard
[Feature request] Force GameCube RTC to specific value on game startup
When trying to create or playback a TAS, one of the most important aspects in assuring deterministic input is the ability to control and predict the game's random number generator, or RNG. For many games, this is relatively simple, as the game would simply initialize the RNG seed as the same value every time on startup.
However, some games, such as Pikmin 2, initialize the seed based on something else - In this case, the game looks at the system's RTC. Newer versions of Dolphin (since this PR was merged) include this as a configurable option, however Dolphin Lua Core seems to have branched before that merge happened.
So, my proposed solution is to either port that PR to Lua Core, or alternatively implement a similar thing your own way.
If you want to take the latter solution, all I can help you with is this. According to Ghidra, getting the value of the system clock seems to be as simple as moving the value from the Time Base Lower register, or TBLr.
As that PR still seems to use wxWidgets, it should be possible to add it. i have no idea if this affects DTMs or anything but considering this is a useful feature i'll probably add it
Was that pr ever pulled, and if so what version of dolphin was it merged into? Since currently I have been working on a 7002 build of lua core
Looks like this was merged in 2016, and version 5.0-7002 was released in 2018, so it's very likely included in that version. Not sure how to check exactly which version number it was merged into though.
So If I can get 7002 working you'll be able to have that functionality. That update is a major thing I've been working on.