Difference between revisions of "Anti Time-Travel"

From 3dbrew
Jump to navigation Jump to search
(Clock software stack documentation)
 
m
Line 9: Line 9:
 
:This also explains the apparently random setting of the date after removing the battery, and why adjusting the clock in [[NAND Redirection|multiboot scenarios]] often results in incorrect values in other OS instances.
 
:This also explains the apparently random setting of the date after removing the battery, and why adjusting the clock in [[NAND Redirection|multiboot scenarios]] often results in incorrect values in other OS instances.
  
Most likely, software disturbed by clock adjustments saves the raw RTC value and, on load, checks whether it has advanced. [[3DS Development Unit Software|CONFIG]] can directly adjust the ahrdware clock, thus avoiding associated problems.
+
Most likely, software disturbed by clock adjustments saves the raw RTC value and, on load, checks whether it has advanced. [[3DS Development Unit Software|CONFIG]] can directly adjust the hardware clock, thus avoiding associated problems.

Revision as of 12:22, 20 April 2016

Many commercial games, such as Tomodachi Life, all Pokèmon games, etc are capable of telling whether the clock was adjusted while they weren't running, even for realistic progress of time (new setting in the future from last save).

This is achieved through a peculiarity in the implementation of the real time clock.

The hardware RTC can count between (at least) 2001-1-1 and 2050-12-31.

When the time is normally set, the date in the RTC is set to the start of 2001 (and so is the time?), and the console saves to NAND (where?) the time and date difference between the programmed time and the hardware one.

This also explains the apparently random setting of the date after removing the battery, and why adjusting the clock in multiboot scenarios often results in incorrect values in other OS instances.

Most likely, software disturbed by clock adjustments saves the raw RTC value and, on load, checks whether it has advanced. CONFIG can directly adjust the hardware clock, thus avoiding associated problems.