mirror of
https://github.com/NinjaCheetah/libWiiPy.git
synced 2025-04-25 12:51:01 -04:00
Entirely restructured API documentation, now much easier to navigate
This commit is contained in:
parent
04d17a58d2
commit
c2f6225500
21
docs/source/api.md
Normal file
21
docs/source/api.md
Normal file
@ -0,0 +1,21 @@
|
||||
# API Documentation
|
||||
|
||||
libWiiPy is divided up into a few subpackages to organize related features.
|
||||
|
||||
| Package | Description |
|
||||
|--------------------------------------|-----------------------------------------------------------------|
|
||||
| [libWiiPy.archive](/archive/archive) | Used to pack and extract archive formats used on the Wii |
|
||||
| [libWiiPy.media](/media/media) | Used for parsing and manipulating media formats used on the Wii |
|
||||
| [libWiiPy.nand](/nand/nand) | Used for working with EmuNANDs and core system files on the Wii |
|
||||
| [libWiiPy.title](/title/title) | Used for parsing and manipulating Wii titles |
|
||||
|
||||
## Full Package Contents
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
/archive/archive
|
||||
/media/media
|
||||
/nand/nand
|
||||
/title/title
|
||||
```
|
18
docs/source/archive/archive.md
Normal file
18
docs/source/archive/archive.md
Normal file
@ -0,0 +1,18 @@
|
||||
# libWiiPy.archive Package
|
||||
|
||||
## Modules
|
||||
The `libWiiPy.archive` package contains modules for packing and extracting archive formats used by the Wii. This currently includes packing and unpacking support for U8 archives and decompression support for ASH archives.
|
||||
|
||||
| Module | Description |
|
||||
|--------------------------------------|---------------------------------------------------------|
|
||||
| [libWiiPy.archive.ash](/archive/ash) | Provides support for decompressing ASH archives |
|
||||
| [libWiiPy.archive.u8](/archive/u8) | Provides support for packing and extracting U8 archives |
|
||||
|
||||
### libWiiPy.archive Package Contents
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
/archive/ash
|
||||
/archive/u8
|
||||
```
|
10
docs/source/archive/ash.md
Normal file
10
docs/source/archive/ash.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.archive.ash Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.archive.ash
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/archive/u8.md
Normal file
10
docs/source/archive/u8.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.archive.u8 Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.archive.u8
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
@ -11,6 +11,7 @@ from datetime import date
|
||||
project = 'libWiiPy'
|
||||
copyright = f'{date.today().year}, NinjaCheetah & Contributors'
|
||||
author = 'NinjaCheetah & Contributors'
|
||||
version = 'main'
|
||||
release = 'main'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
@ -4,9 +4,11 @@ sd_hide_title: true
|
||||
|
||||
# Overview
|
||||
|
||||
# libWiiPy API Docs
|
||||
# libWiiPy Documentation
|
||||
|
||||
Welcome to the API documentation website for libWiiPy! libWiiPy is a modern Python 3 library for handling the various files and formats found on the Wii.
|
||||
Welcome to the documentation website for libWiiPy! libWiiPy is a modern Python 3 library for handling the various files and formats found on the Wii.
|
||||
|
||||
Just need to see the API? [libWiiPy API Documentation](/api)
|
||||
|
||||
```{toctree}
|
||||
:hidden:
|
||||
@ -34,13 +36,12 @@ titles/nus-downloading.md
|
||||
|
||||
```{toctree}
|
||||
:hidden:
|
||||
:caption: Other Useful Pages
|
||||
:caption: More
|
||||
|
||||
modules.md
|
||||
api.md
|
||||
```
|
||||
|
||||
## Indices and tables
|
||||
|
||||
* [Full Index](<project:#genindex>)
|
||||
* [Module Index](<project:#modules>)
|
||||
* <project:#search>
|
||||
|
@ -1,28 +0,0 @@
|
||||
# libWiiPy.archive package
|
||||
|
||||
## Submodules
|
||||
|
||||
### libWiiPy.archive.ash module
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.archive.ash
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
### libWiiPy.archive.u8 module
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.archive.u8
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
## Module contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.archive
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
@ -1,36 +0,0 @@
|
||||
# libWiiPy package
|
||||
|
||||
## Subpackages
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
libWiiPy.archive
|
||||
libWiiPy.media
|
||||
libWiiPy.nand
|
||||
libWiiPy.title
|
||||
```
|
||||
|
||||
## Submodules
|
||||
|
||||
### libWiiPy.shared module
|
||||
|
||||
libWiiPy's ``shared`` module is private and contains only private functions used by other modules.
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.shared
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.types module
|
||||
|
||||
libWiiPy's ``types`` module is private and contains only private classes used by other modules.
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.types
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
@ -1,27 +0,0 @@
|
||||
# libWiiPy.nand package
|
||||
|
||||
## Submodules
|
||||
|
||||
### libWiiPy.nand.emunand module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.nand.emunand
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.nand.setting module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.nand.setting
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.nand.sys module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.nand.sys
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
@ -1,99 +0,0 @@
|
||||
# libWiiPy.title package
|
||||
|
||||
## Submodules
|
||||
|
||||
### libWiiPy.title.cert module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.cert
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.commonkeys module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.commonkeys
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.content module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.content
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.crypto module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.crypto
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiipy.title.iospatcher module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.iospatcher
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.nus module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.nus
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.ticket module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.ticket
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.title module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.title
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.tmd module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.tmd
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.util module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.util
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
### libWiiPy.title.wad module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.wad
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
||||
|
||||
## Module contents
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
@ -1,8 +1,7 @@
|
||||
# libWiiPy.media package
|
||||
# libWiiPy.media.banner Module
|
||||
|
||||
## Submodules
|
||||
## Module Contents
|
||||
|
||||
### libWiiPy.media.banner module
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.media.banner
|
||||
:members:
|
16
docs/source/media/media.md
Normal file
16
docs/source/media/media.md
Normal file
@ -0,0 +1,16 @@
|
||||
# libWiiPy.media Package
|
||||
|
||||
## Modules
|
||||
The `libWiiPy.media` package contains modules used for parsing and editing media formats used by the Wii. This currently only includes limited support for parsing channel banners.
|
||||
|
||||
| Module | Description |
|
||||
|----------------------------------------|---------------------------------------------------|
|
||||
| [libWiiPy.media.banner](/media/banner) | Provides support for basic channel banner parsing |
|
||||
|
||||
### libWiiPy.media Package Contents
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
/media/banner
|
||||
```
|
@ -1,7 +0,0 @@
|
||||
# Modules Overview
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
libWiiPy
|
||||
```
|
10
docs/source/nand/emunand.md
Normal file
10
docs/source/nand/emunand.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.nand.emunand Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.nand.emunand
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
20
docs/source/nand/nand.md
Normal file
20
docs/source/nand/nand.md
Normal file
@ -0,0 +1,20 @@
|
||||
# libWiiPy.nand Package
|
||||
|
||||
## Modules
|
||||
The `libWiiPy.nand` package contains modules for parsing and manipulating EmuNANDs as well as modules for parsing and editing core system files found on the Wii's NAND.
|
||||
|
||||
| Module | Description |
|
||||
|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [libWiiPy.nand.emunand](/nand/emunand) | Provides support for parsing, creating, and editing EmuNANDs |
|
||||
| [libWiiPy.nand.setting](/nand/setting) | Provides support for parsing, creating, and editing `setting.txt`, which is used to store the console's region and serial number |
|
||||
| [libWiiPy.nand.sys](/nand/sys) | Provides support for parsing, creating, and editing `uid.sys`, which is used to store a log of all titles run on a console |
|
||||
|
||||
### libWiiPy.nand Package Contents
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
/nand/emunand
|
||||
/nand/setting
|
||||
/nand/sys
|
||||
```
|
10
docs/source/nand/setting.md
Normal file
10
docs/source/nand/setting.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.nand.setting Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.nand.setting
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/nand/sys.md
Normal file
10
docs/source/nand/sys.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.nand.sys Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.nand.sys
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/cert.md
Normal file
10
docs/source/title/cert.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.cert Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.cert
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/commonkeys.md
Normal file
10
docs/source/title/commonkeys.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.commonkeys Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.commonkeys
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/content.md
Normal file
10
docs/source/title/content.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.content Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.content
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/crypto.md
Normal file
10
docs/source/title/crypto.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.crypto Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.crypto
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/iospatcher.md
Normal file
10
docs/source/title/iospatcher.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.iospatcher Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.iospatcher
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/nus.md
Normal file
10
docs/source/title/nus.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.nus Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.nus
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/ticket.md
Normal file
10
docs/source/title/ticket.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.ticket Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.ticket
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
36
docs/source/title/title.md
Normal file
36
docs/source/title/title.md
Normal file
@ -0,0 +1,36 @@
|
||||
# libWiiPy.title Package
|
||||
|
||||
## Modules
|
||||
The `libWiiPy.title` package contains modules for interacting with Wii titles. This is the most complete package in libWiiPy, and therefore offers the most functionality.
|
||||
|
||||
| Module | Description |
|
||||
|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [libWiiPy.title.cert](/title/cert) | Provides support for parsing and validating the certificates used for title verification |
|
||||
| [libWiiPy.title.commonkeys](/title/commonkeys) | Provides easy access to all common encryption keys |
|
||||
| [libWiiPy.title.content](/title/content) | Provides support for parsing and editing content included as part of digital titles |
|
||||
| [libWiiPy.title.crypto](/title/crypto) | Provides low-level cryptography functions used to handle encryption in other modules |
|
||||
| [libWiiPy.title.iospatcher](/title/iospatcher) | Provides an easy interface to apply patches to IOSes |
|
||||
| [libWiiPy.title.nus](/title/nus) | Provides support for downloading TMDs, Tickets, encrypted content, and the certificate chain from the Nintendo Update Servers |
|
||||
| [libWiiPy.title.ticket](/title/ticket) | Provides support for parsing and editing Tickets used for content decryption |
|
||||
| [libWiiPy.title.title](/title/title.title) | Provides high-level support for parsing and editing an entire title with the context of each component |
|
||||
| [libWiiPy.title.tmd](/title/tmd) | Provides support for parsing and editing TMDs (Title Metadata) |
|
||||
| [libWiiPy.title.util](/title/util) | Provides some simple utility functions relating to titles |
|
||||
| [libWiiPy.title.wad](/title/wad) | Provides support for parsing and editing WAD files, allowing you to load each component into the other available classes |
|
||||
|
||||
### libWiiPy.title Package Contents
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 4
|
||||
|
||||
/title/cert
|
||||
/title/commonkeys
|
||||
/title/content
|
||||
/title/crypto
|
||||
/title/iospatcher
|
||||
/title/nus
|
||||
/title/ticket
|
||||
/title/title.title
|
||||
/title/tmd
|
||||
/title/util
|
||||
/title/wad
|
||||
```
|
10
docs/source/title/title.title.md
Normal file
10
docs/source/title/title.title.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.title Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.title
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/tmd.md
Normal file
10
docs/source/title/tmd.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.tmd Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.tmd
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/util.md
Normal file
10
docs/source/title/util.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.util Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.util
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
10
docs/source/title/wad.md
Normal file
10
docs/source/title/wad.md
Normal file
@ -0,0 +1,10 @@
|
||||
# libWiiPy.title.wad Module
|
||||
|
||||
## Module Contents
|
||||
|
||||
```{eval-rst}
|
||||
.. automodule:: libWiiPy.title.wad
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
```
|
@ -34,7 +34,7 @@ And viola! We have a WAD object that we can use to get each separate part of our
|
||||
|
||||
## Picking the WAD Apart
|
||||
|
||||
Now that we have our WAD loaded, we need to separate it out into its components. On top of the parts we already established, a WAD also contains a certificate, checked by IOS during official title installations to ensure that a title was signed by Nintendo, and potentially two more areas called the footer and the CRL. Footers aren't a necessary part of a WAD, and when they do exist, they typically only contain the build timestamp and the machine it was built on. CRLs are even less common, and have never actually been found inside any WAD, but we know they exist because of things we've seen that Nintendo would really rather we hadn't. Because these three components don't have data we can edit, they're only ever represented as bytes, and do not have their own classes.
|
||||
Now that we have our WAD loaded, we need to separate it out into its components. On top of the parts we already established, a WAD also contains a certificate chain, which is used by IOS during official title installations to ensure that a title was signed by Nintendo, and potentially two more areas called the footer and the CRL. Footers aren't a necessary part of a WAD, and when they do exist, they typically only contain the build timestamp and the machine it was built on. CRLs are even less common, and have never actually been found inside any WAD, but we know they exist because of things we've seen that Nintendo would really rather we hadn't. Certificate chains also have a class that we'll cover after the main three components, but the latter two components don't have data we can edit, so they're only ever represented as bytes and do not have their own classes.
|
||||
|
||||
### The TMD
|
||||
|
||||
@ -110,11 +110,19 @@ Now that we know things are working, why don't we speed things up a little by us
|
||||
|
||||
And just like that, we have our TMD, Ticket, and decrypted content all extracted! From here, what you do with them is up to you and whatever program you're working on. For example, to make a simple WAD extractor, you may want to write all these files to an output directory.
|
||||
|
||||
### The Certificate Chain
|
||||
|
||||
As mentioned at the start of this guide, WADs also contain a certificate chain. We don't necessarily need this data right now, but getting it is very similar to the other components:
|
||||
```pycon
|
||||
>>> certificate_chain = libWiiPy.title.CertificateChain()
|
||||
>>> certificate_chain.load(wad.get_cert_data())
|
||||
>>>
|
||||
```
|
||||
|
||||
### The Other Data
|
||||
|
||||
As mentioned earlier in this guide, WADs also contain up to three extra regions of data: the certificate, the footer, and the CRL. The procedure for extracting all of these is pretty simple, and follows the same formula as any other data in a WAD:
|
||||
Also mentioned earlier in this guide, WADs may contain two additional regions of data know as the footer (or "meta"), and the CRL. The procedure for extracting all of these is pretty simple, and follows the same formula as any other data in a WAD:
|
||||
```pycon
|
||||
>>> certificate = wad.get_cert_data()
|
||||
>>> footer = wad.get_meta_data()
|
||||
>>> crl = wad.get_crl_data()
|
||||
>>>
|
||||
@ -123,7 +131,7 @@ As mentioned earlier in this guide, WADs also contain up to three extra regions
|
||||
Beyond getting their raw data, there isn't anything you can directly do with these components with libWiiPy. If one of these components doesn't exist, libWiiPy will simply return an empty bytes object.
|
||||
|
||||
:::{note}
|
||||
Managed to find a WAD somewhere with CRL data? I'd love to here more, so feel free to email me at [ninjacheetah@ncxprogramming.com](mailto:ninjacheetah@ncxprogramming.com).
|
||||
Managed to find a WAD somewhere with CRL data? I'd love to hear more, so feel free to email me at [ninjacheetah@ncxprogramming.com](mailto:ninjacheetah@ncxprogramming.com).
|
||||
:::
|
||||
|
||||
<hr>
|
||||
|
@ -4,11 +4,11 @@
|
||||
# See https://wiibrew.org/wiki/Title for details about how titles are formatted
|
||||
|
||||
import math
|
||||
from .cert import CertificateChain
|
||||
from .content import ContentRegion
|
||||
from .ticket import Ticket
|
||||
from .tmd import TMD
|
||||
from .wad import WAD
|
||||
from .cert import CertificateChain as _CertificateChain
|
||||
from .content import ContentRegion as _ContentRegion
|
||||
from .ticket import Ticket as _Ticket
|
||||
from .tmd import TMD as _TMD
|
||||
from .wad import WAD as _WAD
|
||||
from .crypto import encrypt_title_key
|
||||
|
||||
|
||||
@ -32,11 +32,11 @@ class Title:
|
||||
A ContentRegion object containing the title's contents.
|
||||
"""
|
||||
def __init__(self):
|
||||
self.wad: WAD = WAD()
|
||||
self.cert_chain: CertificateChain = CertificateChain()
|
||||
self.tmd: TMD = TMD()
|
||||
self.ticket: Ticket = Ticket()
|
||||
self.content: ContentRegion = ContentRegion()
|
||||
self.wad: _WAD = _WAD()
|
||||
self.cert_chain: _CertificateChain = _CertificateChain()
|
||||
self.tmd: _TMD = _TMD()
|
||||
self.ticket: _Ticket = _Ticket()
|
||||
self.content: _ContentRegion = _ContentRegion()
|
||||
|
||||
def load_wad(self, wad: bytes) -> None:
|
||||
"""
|
||||
@ -49,19 +49,19 @@ class Title:
|
||||
The data for the WAD you wish to load.
|
||||
"""
|
||||
# Create a new WAD object based on the WAD data provided.
|
||||
self.wad = WAD()
|
||||
self.wad = _WAD()
|
||||
self.wad.load(wad)
|
||||
# Load the certificate chain.
|
||||
self.cert_chain = CertificateChain()
|
||||
self.cert_chain = _CertificateChain()
|
||||
self.cert_chain.load(self.wad.get_cert_data())
|
||||
# Load the TMD.
|
||||
self.tmd = TMD()
|
||||
self.tmd = _TMD()
|
||||
self.tmd.load(self.wad.get_tmd_data())
|
||||
# Load the ticket.
|
||||
self.ticket = Ticket()
|
||||
self.ticket = _Ticket()
|
||||
self.ticket.load(self.wad.get_ticket_data())
|
||||
# Load the content.
|
||||
self.content = ContentRegion()
|
||||
self.content = _ContentRegion()
|
||||
self.content.load(self.wad.get_content_data(), self.tmd.content_records)
|
||||
# Ensure that the Title IDs of the TMD and Ticket match before doing anything else. If they don't, throw an
|
||||
# error because clearly something strange has gone on with the WAD and editing it probably won't work.
|
||||
|
Loading…
x
Reference in New Issue
Block a user