Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

3DS: In-game RTC desyncs from system time #825

jpmac26 opened this Issue Jul 25, 2017 · 6 comments


None yet
2 participants

jpmac26 commented Jul 25, 2017 edited

This may technically be 2 issues, but I think they may both have a common cause. I am using the v0.6.0 release of mGBA, playing on a New 3DS XL with Luma3DS v8.1, and I have encountered this issue on both the CIA and 3DSX builds of mGBA. I have not encountered this problem with the PC versions of mGBA, but I have not done as much testing on those systems. I do not believe this is a regression introduced in v0.6.0, as I recall having this issue in version 0.5.2 as well.

First, I was playing Pokemon Prism, and at the start of the game I did my best to set the in-game clock to the same date/ time as my 3DS. However, after playing the game for a while, I saved the game (and also did a savestate) and closed mGBA, and when I reopened it and started playing the game again, I noticed that the in-game clock was behind my system time by roughly the amount of time I had stopped playing. However, I believe this is incorrect behavior, as the in-game clock should be kept in sync with the system time.

Furthermore, whenever I put the 3DS into sleep mode with the game open, the in-game time speeds up by a considerable amount. I started playing the game on Saturday July 22, and after leaving the system asleep for a day or two, my in-game clock said that the date was somewhere in the middle of October! And when I opened the game today, it now says it's December. Even if mGBA isn't supposed to manually change the RTC to the system time, I believe that the RTC still shouldn't run so fast when the system is in sleep mode.


endrift commented Jul 25, 2017

Can you confirm that this happens for GBA games too, e.g. Ruby? The GB RTC is kind of buggy and I haven't figured out why, despite having written tests.

jpmac26 commented Jul 25, 2017

Nope, Pokemon Emerald works fine, and stays in sync with the system time while the emulator is closed or the system is asleep.

@endrift endrift added this to the 0.6.1 milestone Jul 29, 2017


endrift commented Jul 30, 2017

I have a tentative fix for this, but it requires more time (quite literally) to test before it's ready.

@endrift endrift closed this in a330df2 Jul 30, 2017


endrift commented Jul 30, 2017

Note that this test is not hugely well tested yet, so I'd appreciate more testing. I can reopen the bug if it's not working still.

jpmac26 commented Jul 30, 2017

Awesome, I'll be sure to test tomorrow and let you know! Thanks again for all the hard work!


endrift commented Jul 30, 2017

Confirmed that letting it sleep overnight leads to the expected result. Will try leaving the emulator not running for a few hours next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment