Closed AntonioND closed 3 weeks ago
The RTC offset works as follows: Every time the date/time is changed on the DS from A
to B
, the RTC offset has (epoch(B) - epoch(A))
added to it.
This should be enough: https://github.com/blocksds/libnds/commit/5d7d57023a88782f2139d87e2798ec58fafc3570
Some games can detect when the RTC has changed. They seem to use a flag that is most likely stored in the firmware user settings:
https://problemkaputt.de/gbatek.htm#dsfirmwareusersettings
The RTC Offset is probably the flag that is checked by games. It could be interesting to verify if this is the case and maybe add helpers to clear and set that value.
libnds
never sets the value of that offset currently.We should also document the behavior of the flag in the RTC changing functions.