Wiithon
A Python library for reading, extracting, and rebuilding Nintendo Wii ISO files.
Features
- Parse and extract files from standard Wii ISOs.
- Read the Wii File System Table (FST) and reconstruct the directory tree.
- On-the-fly decryption and encryption of Wii data clusters.
- Rebuild and master new Wii ISOs from extracted or modified files.
- Hash calculation and Merkle tree generation for partition integrity. (doesn't work great atm)
Documentation
For comprehensive guides, internal architecture details, and references, please refer to the docs/ directory.
Examples
For some examples, you can refer to the examples/ directory.
Overview
The library is divided into two main components: reading existing ISOs and building new ones.
Reading and Extracting
To read an ISO, initialize the WiiIsoReader with a binary stream. You can iterate through the partitions and access the decrypted file data using the FST offsets.
(currently just copied/paste the examples in the above directory)
from wiithon.disc.WiiIsoReader import WiiIsoReader
# Opening the ISO
with WiiIsoReader("your_iso_file.iso") as reader:
print(f"Game: {reader.disc_header.game_title}")
data = reader.get_data_partition()
partition = reader.open_partition(data)
for path in partition.list_files():
print(path)
print(f"Number of files: {len(partition.list_files())}")
Building
To build an ISO, you can use some interfaces. Each interface has their specificities like copying an ISO, patching an ISO or building from a folder from your explorer. Currently, only the copy one exists.
from wiithon.builder.CopyBuilder import CopyBuilder
from wiithon.disc.WiiIsoReader import WiiIsoReader
from wiithon.builder.WiiDiscBuilder import WiiDiscBuilder
SOURCE_PATH = "your_iso_file.iso"
DEST_PATH = "output_iso.iso"
print(f"Source : {SOURCE_PATH}")
print(f"Dest : {DEST_PATH}")
# Open the original ISO
with WiiIsoReader(SOURCE_PATH) as reader:
print(f"Game : {reader.disc_header.game_title.strip()}")
print(f"ID : {reader.disc_header.game_id.decode()}")
# The main builder
builder = WiiDiscBuilder(reader.disc_header, reader.region)
with open(DEST_PATH, 'w+b') as dest:
# For each partition from the original ISO
for entry in reader.partitions:
# Copying and build into the new one
copy_builder = CopyBuilder(reader, entry, None)
builder.add_partition(dest, copy_builder, None)
# To write the header and partitions datas
builder.finish(dest)
TODO
Done
- Fixing the H3 table (Dolphin says that is not correct :( )
- Fixing a thing that dolphin says: some block are incorrect but unused
- Adding more WiiPartitionInterface from dir
- Some docs about building and so on
- Adding some tools like Yaz0, RARC
- Writing asm easily
- Patching DOL
- Adding, modifying, removing files
- Wrapper for modifying rarc file
Next to do
- Searching empty addresses in dol to add instructions and adding text/data sections
- Refactor/adding constants to avoid magic numbers
- Comment all functions (and inside of it)
- BCSV editor
- BMD - BDL editor
Next after next (not ordered)
- Patcher !! (will be available with tools maybe ?)
- Some refactorization (like big break big function into smaller ones)
- Add more unit tests (and change some)
- Improve exception handling for invalid or corrupted ISO headers
- Add a CLI for standard extraction and building
- Adding everything we need to proper have a PyPi page
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wiithon-0.1.0.tar.gz.
File metadata
- Download URL: wiithon-0.1.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32541d5dace34e9e82e328c469213a8e6341d41e88cb01bb322bd67ab8a4dcf4
|
|
| MD5 |
310125edab6dc651dd011d21f44ef8ad
|
|
| BLAKE2b-256 |
865dffac34d01d501c9a5eec8c6804cb3549fcebc78e3a1c705335f90298e7f4
|
Provenance
The following attestation bundles were made for wiithon-0.1.0.tar.gz:
Publisher:
python-publish.yml on Demorck/wiithon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wiithon-0.1.0.tar.gz -
Subject digest:
32541d5dace34e9e82e328c469213a8e6341d41e88cb01bb322bd67ab8a4dcf4 - Sigstore transparency entry: 2364457449
- Sigstore integration time:
-
Permalink:
Demorck/wiithon@02e31615da60b37eb163fbed32bb6dac46a68bc8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Demorck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@02e31615da60b37eb163fbed32bb6dac46a68bc8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file wiithon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wiithon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 77.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1384b94c10d804c216172ec83b2e40aa6fd90bae192b354ba4388cd028b95d73
|
|
| MD5 |
6165b07402f9c500780e77c44a3aeb2e
|
|
| BLAKE2b-256 |
9595fe3b6485991f5d2dc445636f97e8d64b212dba72de63ef23dc921aa2ad10
|
Provenance
The following attestation bundles were made for wiithon-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on Demorck/wiithon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wiithon-0.1.0-py3-none-any.whl -
Subject digest:
1384b94c10d804c216172ec83b2e40aa6fd90bae192b354ba4388cd028b95d73 - Sigstore transparency entry: 2364457539
- Sigstore integration time:
-
Permalink:
Demorck/wiithon@02e31615da60b37eb163fbed32bb6dac46a68bc8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Demorck
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@02e31615da60b37eb163fbed32bb6dac46a68bc8 -
Trigger Event:
release
-
Statement type: