Control the whole channel
When you wish to control the console itself, you utilize
wiiShop. It is an important (and necessary) object to instanciate, as it controls the flow of the channel - rebooting, errors, options - alongside handling localization.
var wiiShop = new wiiShop();
Resets the system to the Wii System Update menu available in Settings.
Resets the system - i.e. restarting the channel. On a Wii U, this appears to go to the Wii U Menu.
Exits to the Wii System Menu.
Resets the system to the EULA agreement channel.
On a vWii, opens the Wii Menu Electronic Manual. As this channel is not available by default on normal Wiis, it fails to launch and goes to the Wii System Menu.
First, it checks the current error code, if any.
If the error is:
the channel simply goes to the previous page.
If not, the channel is reset.
Shows the spinner UI over the currently loaded page.
Hides the spinner UI for the currently loaded page.
Changes the image displayed in the borders of the loaded webpage. There are four types, specified by
Disables the HOME menu.
Enables the HOME menu.
Displays an error page with
TODO: Determine what types are available for this section.
Apparently available to close the shop's manual, it simply returns to the Wii System Menu.
Opens Data Management within the Wii System Menu.
Appears to adjust the color of Mario in the download screen? TODO: confirm
Returns a localized string for the current error message.
TODO: Determine how this is set, and why error code 209658 is handled differently.
Returns the current error code registered as a string.
Returns a localized string of the channel. In English, this is "Wii Shop Channel".
Returns a localized string for the retry button, such as "Try Again" in English.
If launched normally, returns a localized string for "Wii Menu".
If launched as a manual viewer, returns a localized string for "Back" .
Returns a localized string for "Wii U Menu".
Returns a localized string for "Proceed".
Returns a localized paragraph pleading for the user to agree to the Wii Network Services Agreement.
Returns a localized string for "Continue".
Returns a localized string for "Connecting. Please wait..."
This string is extremely important and must be accessed on each page load. Please see Connecting example for more information.
Appears to always return 0, as nothing accesses what it reads from at 0x803607f9.
Returns some variant of a launch code, which is also referenced to check if the channel was launched to be a manual viewer.
TODO: Determine possible codes
It is important that
wiiShop.connectingvariable is accessed once per page load, as it stops an internal timer. It is additionally important that its value is set to a variable and not cast away, as it being accessed is what cancels the timer.
If the timer is not cancelled, error 209601 is displayed after 100 seconds.
The following code block provides an example of the bare minimum required to prevent an error thrown:
var wiiShop = new wiiShop();
const unused = wiiShop.connecting;
Sets a log URL to the given string.
TODO: where and how is this used otherwise? It seemingly cannot be queried, and nothing accesses the URL throughout runtime.
Sets a color to fade to when exiting from the Mario downloading animation.
TODO: Is this correct?
It's unclear on what these are used for: the channel never utilizes set values throughout operation, nor does the Nintendo-provided Wii Shop Channel. Their values persist unmodified throughout the current channel's launch, making them the numerical equivalent to a cookie, at best. One can assume that they were most likely included for testing purposes with the C++ <-> JS runtime bindings for Opera. Nonetheless, they are included.