RNG issues

Ask questions about DraStic or discuss compatibility issues here.
Roku
Posts: 6
Joined: Sun May 01, 2016 9:02 pm

Re: RNG issues

Post by Roku » Mon May 02, 2016 11:47 am

Thanks to everybody for your responses :D

User avatar
Kyousuke753
Posts: 846
Joined: Sun Apr 10, 2016 10:30 am
Location: ???

Re: RNG issues

Post by Kyousuke753 » Mon May 02, 2016 12:11 pm

Well as long as you're satisfied then it's all goods, Have fun with Dradtic. :D :ds:
Image

Exophase
Posts: 1715
Joined: Mon Aug 05, 2013 9:08 pm

Re: RNG issues

Post by Exophase » Mon May 02, 2016 1:36 pm

TkSilver wrote:Sorry for the double post. Exo do you know if resetting ing the rom vs exiting the whole emulator and then reopening the emulator and rom offer any appreciable differences as far as resetting values a physical DS would generate upon turning on with a cartridge in the slot?
Resetting the emulator doesn't retain any state. Or at least it's not supposed to, if it does that's a bug. But I doubt it does. So it should be like a hard power cycle on hardware.

The RTC is the only thing that the emulator has any control over that would affect the RNG. Other than that the game's code dictates how the RNG works.

Roku
Posts: 6
Joined: Sun May 01, 2016 9:02 pm

Re: RNG issues

Post by Roku » Mon May 02, 2016 2:58 pm

I've noticed something interesting about the custom clock and it most likely seems to be the root of the problem (I've been using watch.nds and see what would happen if I did this or that) When I select the "custom clock" option, the time starts running normally but when I reset the game or the entire emulator, the time I set for the clock turns back to its original state. This may be the main reason I'm always getting the same RNG value. I don't know whether the custom clock is meant to work like that, but if it's not, how can I fix it?

Exophase
Posts: 1715
Joined: Mon Aug 05, 2013 9:08 pm

Re: RNG issues

Post by Exophase » Mon May 02, 2016 3:33 pm

Roku wrote:I've noticed something interesting about the custom clock and it most likely seems to be the root of the problem (I've been using watch.nds and see what would happen if I did this or that) When I select the "custom clock" option, the time starts running normally but when I reset the game or the entire emulator, the time I set for the clock turns back to its original state. This may be the main reason I'm always getting the same RNG value. I don't know whether the custom clock is meant to work like that, but if it's not, how can I fix it?
I'm not really sure what the question is, are you saying you're setting the clock in watch.nds and then losing the settings when you reset? If so then yes, that's intentional, the clock is derived from one of these sources:

1) Synced with device time always
2) Synced with device time at reset, then progresses at emulation speed
3) Synced with custom time at reset, then progresses at emulation speed

Conceptually you can think of 2 and 3 as if you turned on a DS, set the time, then started the game. Note that a savestate load doesn't count as a reset.

If you use 1 or 2 you shouldn't be getting the same RNG results in the game if the RNG is seeded with the time (and the time looks different between successive runs) But I have no idea how the RNG actually works in this game so it's impossible for me to say.

Post Reply