Network System Clock Abuse: Difference between revisions

m 17 revisions imported
Rearranged the entire page
Line 6: Line 6:


==Explanation==
==Explanation==
The Nintendo Switch keeps track of two separate system clocks.<ref>https://twitter.com/SciresM/status/1231373584112635905</ref> The one that the user directly interacts with is called the Local System Clock, or LSC. The user can edit the LSC directly in the system settings, and the LSC is also what Super Mario Odyssey uses to determine the time. When speedrunners set up [[Daylight Savings Time Abuse]], they are changing the value of the LSC.
The Nintendo Switch keeps track of two separate system clocks.<ref>https://twitter.com/SciresM/status/1231373584112635905</ref> The one that the user directly interacts with is called the '''Local System Clock''', or '''LSC'''. The user can edit the LSC directly in the system settings, and the LSC is also what Super Mario Odyssey uses to determine the time. When speedrunners set up [[Daylight Savings Time Abuse]], they are changing the value of the LSC.


However, the Switch also maintains a second system clock called the Network System Clock, or NSC. This clock serves to keep track of what the system essentially believes to be the actual real-world time, and it cannot normally be edited by the user. Upon connecting to the Internet, the Switch communicates with one of Nintendo's servers, which calibrates the Switch's NSC by sending it the current time. In the Switch's settings, there is an option called "Synchronize Clock via Internet" that will match the value of the LSC to that of the NSC, so that the LSC reflects the time in the real world. An Internet connection is not actually required to use this setting, since the NSC will keep ticking in the background even if Internet is disabled.
However, the Switch also maintains a second system clock called the '''Network System Clock''', or '''NSC'''. This clock serves to keep track of what the system essentially believes to be the actual real-world time, and it cannot normally be edited by the user. Upon connecting to the Internet, the Switch communicates with one of Nintendo's servers, which calibrates the Switch's NSC by sending it the current time via the [[wikipedia:Network_Time_Protocol|Network Time Protocol]]. In the Switch's settings, there is an option called "Synchronize Clock via Internet" that will match the value of the LSC to that of the NSC, so that the LSC reflects the time in the real world. An Internet connection is not actually required to use this setting, since the NSC will keep ticking in the background even if Internet is disabled.


However, if the Switch has never actually been connected to the Internet before (this can be accomplished by factory resetting the console), the system simply matches the NSC to the LSC as a fail-safe. This means that if the console has never been connected to Internet, the user can set the NSC to any desired value.
Network System Clock Abuse relies on having the NSC set to sometime in the past, and then reconnecting the Switch to the Internet mid-run to calibrate the NSC and cause it to catch up to the real-world time to grow one or more seeds. The console can be connected to the Internet mid-run without losing time by holding the home button to open the Switch's quick menu and disabling Airplane Mode; the game will keep running in the background while this menu is open.


This allows the user to set the NSC to some time in the past, then connect the console to the Internet mid-run to calibrate the NSC and cause it to catch up to the real-world time (which can be used to grow a seed). The console can be connected to the Internet mid-run without losing time by holding the home button to open the Switch's quick menu and disabling Airplane Mode; the game will keep running in the background while this menu is open. This is the idea behind NSCA.
== Methods ==
There are two primary ways to have the NSC set to a time in the past, which are covered in detail below.


However, in order to connect the Switch to the Internet simply by disabling Airplane Mode, an Internet connection must have been established earlier. Normally, establishing an Internet connection would calibrate the NSC, which would defeat the purpose of NSCA since it requires the clock to be calibrated for the first time in the middle of the speedrun. To prevent the NSC from being calibrated when first setting up the Internet connection, one must temporarily block the server that the Switch communicates with to calibrate the NSC in their router's settings. This block must then be reversed later after enabling Airplane Mode, so that disabling Airplane Mode during the speedrun calibrates the NSC.
=== Initialization method ===
If the Switch has been [https://en-americas-support.nintendo.com/app/answers/detail/a_id/22347/~/how-to-initialize-nintendo-switch-without-deleting-save-data initialized] and has not been connected to the Internet yet, the system simply matches the NSC to the LSC as a fail-safe. This means that if the console has never been connected to the Internet, the user can set the NSC to any desired value (in this case sometime in the past). The goal of this method is to calibrate the NSC for the first time in the middle of the speedrun.


==Execution ==
However, in order to connect the Switch to the Internet simply by disabling Airplane Mode, an Internet connection must have been established earlier, which would normally calibrate the NSC. To prevent it from being calibrated when setting up the Internet connection, one must temporarily block the server that the Switch communicates with to calibrate the NSC. There are two ways to achieve this.
The trick can be performed in a speedrun using the following steps:


*Factory reset the console. This is done to allow the NSC to match the value of the LSC set by the user.
==== 90DNS ====
*Block the hostname ''aauth-lp1.ndas.srv.nintendo.net'' in your router's settings.<ref>https://pastebin.com/bZ5MqEy3</ref> This can be accomplished by following this [https://mashtips.com/block-websites-google-wifi/ guide] (which should be adaptable to any router, not just Google Wifi).
The easiest way to block Nintendo's Network Time Protocol server is using [https://nh-server.github.io/switch-guide/extras/blocking_nintendo/ 90DNS]. After establishing the connection with 90DNS, the DNS settings can be reverted to normal, and the Switch will not attempt to calibrate the NSC until the Switch is put to sleep and reawakened (at which point it can be put into Airplane Mode).
 
* Initialize the console.
* Follow the instructions on [https://nh-server.github.io/switch-guide/extras/blocking_nintendo/ this page] to set up 90DNS and connect to the Internet.
* Change the DNS settings back to Automatic.
* If a digital copy of Super Mario Odyssey is desired (necessary for an optimal speedrun due to shorter load times), download it from the eShop.*
* Enable Airplane Mode, then sleep and reawaken the Switch.
* Set up [[Daylight Savings Time Abuse]] by setting the LSC to the desired value, then enable "Synchronize Clock via Internet".
* Start the speedrun. Use DSTA to grow the first seed, then disable Airplane Mode from the quick menu to perform NSCA later in the run.
 
''*Note that it is untested whether this will cause the NSC to synchronize with the server. If it does, then the method below must be used for an optimal run instead.''
 
==== Router settings ====
Another way to prevent the NSC from being calibrated when first setting up the Internet connection is to temporarily block Nintendo's Network Time Protocol server in the router's settings. This block must then be reversed later after enabling Airplane Mode, so that disabling Airplane Mode during the speedrun calibrates the NSC.
 
*Initialize the console.
*Block the hostname ''aauth-lp1.ndas.srv.nintendo.net'' in your router's settings.<ref>https://pastebin.com/bZ5MqEy3</ref> This can be accomplished by following [https://mashtips.com/block-websites-google-wifi/ this guide] (which should be adaptable to any router, not just Google Wifi).
*Set up an Internet connection on the Switch by connecting it to that router, then enable Airplane Mode.
*Set up an Internet connection on the Switch by connecting it to that router, then enable Airplane Mode.
*Unblock the hostname in the router's settings by following the same steps used to block it.
*Unblock the hostname in the router's settings by following the same steps used to block it.
*Set up [[Daylight Savings Time Abuse]] by setting the system clock to just before Daylight Savings Time strikes.
*Set up [[Daylight Savings Time Abuse]] by setting the LSC to the desired value, then enable "Synchronize Clock via Internet".
*Start the speedrun and play it as normal, using DSTA to grow the first seed.
*Start the speedrun. Use DSTA to grow the first seed, then disable Airplane Mode from the quick menu to perform NSCA later in the run.<ref name="grady-tweet"></ref>
*After planting a second seed later in the run, open the Switch's quick menu and disable Airplane Mode. This should cause the Switch to reconnect to the Internet, realize the NSC is behind, and fast-forward it accordingly.<ref name="grady-tweet"></ref>


==Speedrun usage ==
==Speedrun usage ==