Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
CaptainSwag101 opened this issue Jul 25, 2017 · 6 comments
Closed

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

CaptainSwag101 opened this issue Jul 25, 2017 · 6 comments
Labels
platform:GB/GBC Game Boy/Game Boy Color-related issues severity:minor bug Issues that only have a minor impact on the library system:3DS Affects running on the 3DS
Milestone

Comments

@CaptainSwag101
Copy link

CaptainSwag101 commented Jul 25, 2017

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
Copy link
Member

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.

@endrift endrift added system:3DS Affects running on the 3DS platform:GB/GBC Game Boy/Game Boy Color-related issues severity:minor bug Issues that only have a minor impact on the library labels Jul 25, 2017
@CaptainSwag101
Copy link
Author

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
Copy link
Member

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
Copy link
Member

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.

@CaptainSwag101
Copy link
Author

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

@endrift
Copy link
Member

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
Labels
platform:GB/GBC Game Boy/Game Boy Color-related issues severity:minor bug Issues that only have a minor impact on the library system:3DS Affects running on the 3DS
Projects
None yet
Development

No branches or pull requests

2 participants