NinjaCheetah / libWiiPy

A modern Python library for handling files and formats used by the Wii.
https://docs.ninjacheetah.dev/
MIT License
10 stars 1 forks source link

Feat: WAD handling step 1: Reading the TMD #2

Closed NinjaCheetah closed 9 months ago

NinjaCheetah commented 9 months ago

The first step of being able to handle WAD files is to be able to get their TMD so that it's possible to read find the size of all of the contents in the WAD. This will require creating a new class for WADs with all of the offsets listed on Wiibrew to begin reading the file. I believe that the TMD would be the first piece of data following the header? Will look into this more.

WAD file reference: https://wiibrew.org/wiki/WAD_files

rvtr commented 9 months ago

Haven't tested yet because of fun outdated python things, but added a script in the breakdown_wad branch. Even if it doesn't work, it should give a clear idea of breaking down the header and calculating partition offsets.

Will try to fix my setup tonight.