libWiiPy.nand package#
Submodules#
libWiiPy.nand.emunand module#
- class libWiiPy.nand.emunand.EmuNAND(emunand_root: str | Path, callback: callable = None)#
Bases:
object
An EmuNAND object that allows for creating and modifying Wii EmuNANDs. Requires the path to the root of the EmuNAND, and can optionally take in a callback function to send logs to.
- Parameters:
emunand_root (str, pathlib.Path) – The path to the EmuNAND root directory.
callback (function) – A callback function to send EmuNAND logs to.
- emunand_root#
The path to the EmuNAND root directory.
- Type:
pathlib.Path
- class InstalledTitles(type: str, titles: List[str])#
Bases:
object
An InstalledTitles object that is used to track a title type and any titles that belong to that type that are installed to an EmuNAND.
- type#
The type (Title ID high) of the installed titles.
- Type:
str
- titles#
The Title ID low of each installed title.
- Type:
List[str]
- titles: List[str]#
- type: str#
- install_title(title: Title, skip_hash=False) None #
Install the provided Title object to the EmuNAND. This mimics a real WAD installation done by ES.
This will create some system files required if they do not exist, but note that this alone is not enough for a working EmuNAND, other than for Dolphin which can fill in the gaps.
- Parameters:
title (libWiiPy.title.Title) – The loaded Title object to install.
skip_hash (bool, optional) – Skip the hash check and install the title regardless of its hashes. Defaults to false.
- query_titles() List[InstalledTitles] #
Scans for installed titles and returns a list of InstalledTitles objects, which each contain a title type (Title ID high) and a list of Title ID lows that are installed under it.
- Returns:
The titles installed to the EmuNAND.
- Return type:
List[InstalledTitles]
- uninstall_title(tid: str) None #
Uninstall the Title with the specified Title ID from the EmuNAND. This will leave shared contents unmodified.
- Parameters:
tid (str) – The Title ID of the Title to uninstall.
libWiiPy.nand.setting module#
- class libWiiPy.nand.setting.SettingTxt#
Bases:
object
A SettingTxt object that allows for decrypting and then parsing a setting.txt file from the Wii.
- area#
The region of the System Menu this file matches with.
- Type:
str
- model#
The model of the console, usually RVL-001 or RVL-101.
- Type:
str
- dvd#
Unknown, might have to do with indicating support for scrapped DVD playback capabilities.
- Type:
int
- mpch#
Unknown, generally accepted value is “0x7FFE”.
- Type:
str
- code#
Unknown code, may match with manufacturer code in serial number?
- Type:
str
- serial_number#
Serial number of the console.
- Type:
str
- video#
Video mode, either NTSC or PAL.
- Type:
str
- game#
Another region code, possibly set by the hidden region select channel.
- Type:
str
- dump() bytes #
Dumps the SettingTxt object back into an encrypted bytes that the Wii can load.
- Returns:
The setting.txt file as encrypted bytes.
- Return type:
bytes
- dump_decrypted() str #
Dumps the SettingTxt object into a decrypted string.
- Returns:
The setting.txt file as decrypted text.
- Return type:
str
- load(setting_txt: bytes) None #
Loads the raw data of an encrypted setting.txt file and decrypts it to parse its arguments
- Parameters:
setting_txt (bytes) – The data of an encrypted setting.txt file.
- load_decrypted(setting_txt: str) None #
Loads the raw data of a decrypted setting.txt file and parses its arguments
- Parameters:
setting_txt (str) – The data of a decrypted setting.txt file.
libWiiPy.nand.sys module#
- class libWiiPy.nand.sys.UidSys#
Bases:
object
A UidSys object to parse and edit the uid.sys file stored in /sys/ on the Wii’s NAND. This file is used to track all the titles that have been launched on a console.
- uid_entries#
The entries stored in the uid.sys file.
- Type:
List[_UidSysEntry]
- add(title_id: str | bytes) int #
Adds a new Title ID to the uid.sys file and returns the UID assigned to that title.
- Parameters:
title_id (str, bytes) – The Title ID to add.
- Returns:
The UID assigned to the new Title ID.
- Return type:
int
- create() None #
Creates a new uid.sys file and initializes it with the standard first entry of 1-2 with UID 4096. This allows for setting up a uid.sys file without having to load an existing one.
- dump() bytes #
Dumps the UidSys object back into a uid.sys file.
- Returns:
The raw data of the uid.sys file.
- Return type:
bytes
- load(uid_sys: bytes) None #
Loads the raw data of uid.sys and parses it into a list of entries.
- Parameters:
uid_sys (bytes) – The data of a uid.sys file.