Release: Introducing WiiPy!

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
<Imagine a really cool logo right here>
(It's a command line tool so it doesn't get one)

WiiPy
By NinjaCheetah
GitHub
Latest Release
Going hand-in-hand with my previous release, NUSGet, which you can read about here, if you haven't already seen it, I'd like to officially release another libWiiPy based program, WiiPy!

What is WiiPy?
WiiPy is a command line tool designed to allow you to use all of libWiiPy's functionality in a convenient fashion. It's always based off of libWiiPy's main branch, so it'll always offer the latest features as soon as they've been deemed fit for merging into main.

These features include:
  • Packing and unpacking WAD files
  • Packing and unpacking U8 archives
  • Downloading titles from the NUS via their Title ID (and optionally their version)
  • Decompressing ASH files (and eventually compressing, when that's ready in libWiiPy!)
This list will expand as more features are finalized in libWiiPy, which is under heavy active development right now.

While WiiPy is a Python program, it's compiled for macOS, Windows, and Linux via Nutika, meaning you can get a native executable with no dependencies required for your platform. All of these builds can be found on the releases page, linked at the top of this post, and also attached to every GitHub Actions run, as binaries are automatically built on every commit.


A note about ASH files:
WiiPy is the first tool available with support for both standard ASH files (these are the ones you'll find in the Wii Menu, and Animal Crossing: City Folk), as well as the other variant found in My Pokémon Ranch, thanks to the valiant efforts of @Garhoogin, who wrote some shiny new C code for ASH file decompression, and in the process discovered that the only difference between these two types is the width of the distance tree leaves. You can find the C code he wrote on GitHub, and both his code any my Python port of it, which you can find as part of libWiiPy support specifying the symbol and distance tree leaf widths. In simple terms, both of these tools use essentially the same code, just C flavored and Python flavored, and both allow for decompressing any type of ASH files.

As with NUSGet, questions and bug reports are very welcome, both here in this thread, and on the GitHub issues page. Happy WiiPying!
 

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
good job on this do you know when the ash compressor is gonna be ready or is there a problem
Not yet, but thanks to Garhoogin's work we've figured out a lot about what an ASH file actually is. Not a lot of progress has been made yet, but we know that ASH files' compression is based on deflate, and uses Huffman trees (according to Garhoogin, that's the "H" in "ASH") to store data. I've been a bit distracted with fixing a major bug in how libWiiPy handles some WADs, but then this is my next priority.
 

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
Major Bugfix Release!
WiiPy v1.1.0 has just been released, and it addresses some major issues found in v1.0.0 and v1.0.1.
This release and the changelog can be found on GitHub, but I've also included the same changlog below for easy reading. Please note that the release link in the original post always points to the latest release.


Changelog:
  • WAD files and U8 archives can now both be extracted to an existing empty directory (as opposed to requiring the specified directory to not already exist)
  • The NUS subcommand now uses the Wii U NUS endpoint by default (the old behavior can be restored by using `--wii`, however this change should only improve speeds and have no other impacts)
  • The NUS subcommand now offers verbose output for downloads using `--verbose` (however this option will be removed in v1.2.0 as verbose output is planned to become the default and only behavior)
  • The WAD subcommand now supports `--null-sigs` to nullify the TMD and Ticket signatures during packing
  • libWiiPy change: IOS WADs made using legacy tools (NUS Downloader, Sharpii, etc.) will now extract properly with the WAD subcommand
  • libWiiPy change: All WADs packed use adjusted calculations for the content region size in the WAD header, creating consistency with legacy tools
Thanks to everyone who helped me discover the bugs that I had missed. If anyone finds any more, or has any questions, feel free to let me know!
 

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
New Feature Release!
WiiPy v1.2.0 has just been released, and it has a handful of new features for downloading titles from the NUS. As usual, the changelog is available alongside the release on GitHub, but I'm also posting it here.

Changelog:
  • The NUS command now has two subcommands, title and content, for handling downloading either an entire title (this is the old behavior of just nus in v1.1.0) or just a specific content from a title.
  • The new nus title subcommand supports downloading a title to a directory using -o/--output, or, as long as a Ticket is available, can pack it directly into a WAD like in previous versions using -w/--wad. When downloading to a directory, contents are automatically decrypted if a Ticket is available.
  • The new nus content subcommand supports downloading a single content from a title to a file by specifying the Title ID and Content ID for the content you want to download. If a Ticket is available for that title, you can use -d/--decrypt to instead save the decrypted version of that content.
  • Verbose output is now the default and only option for NUS downloads.
  • --null-sigs has been removed from the WAD subcommand as it was added in a misunderstanding, because the behavior it was trying to replicate was actually fakesigning.
  • Added --fakesign to the WAD subcommand for packing, which fakesigns the TMD and Ticket of the WAD being packed.

Known Issues:
  • libWiiPy currently has some known issues with its `u8` module, which may cause some U8 archives to not extract properly. These are being looked into and should hopefully be fixed soon. It should be noted that this is not a regression and has been present in all libWiiPy/WiiPy versions, it just wasn't discovered until recently.

This released was based off of the main branch of libWiiPy as of 2024-07-17, and is using the release version of libWiiPy v0.4.1 as a result.


If you are uncertain about how to use any of WiiPy's features, try using `-h` or `--help`! Every WiiPy command has help built into it, and it'll show you the syntax and all possible arguments for that command.

For example, the output of `./wiipy nus title --help` would be:
Code:
usage: wiipy nus title [-h] [-v VERSION] (-o OUT | -w WAD) [--wii] TID

download a title from the NUS

positional arguments:
  TID                   Title ID to download

options:
  -h, --help            show this help message and exit
  -v VERSION, --version VERSION
                        version to download (optional)
  --wii                 use original Wii NUS instead of the Wii U servers

output types (required):
  -o OUT, --output OUT  download the title to a folder
  -w WAD, --wad WAD     pack a wad with the provided name

If you have any questions that aren't covered by the help, or any suggestions on how to improve it, I'm here!
 

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
New Feature Release!
WiiPy v1.3.0 has just been released, and it has a whole mess of new features and bugfixes! Full release notes can be found over on GitHub, but as per usual they'll also be below.

Changelog:

  • All U8 archives can now be extracted properly, and repacked U8 archives are now much closer to official Nintendo-made archives.
  • Hash checks can now be skipped when extracting a WAD by passing --skip-hash.
  • Many, many minor bugs have been squished behind the scenes thanks to fixes in libWiiPy.
  • New command, `emunand`, with the subcommand title, for installing and uninstalling titles to/from an existing EmuNAND. This supports single WAD files and bulk installs. More subcommands offering more EmuNAND features will be added in the future.
  • New command, `fakesign`, for directly fakesigning a TMD, Ticket, or WAD. This can be done in-place, or can be directed to output to a specific file.
  • New command, `iospatch`, for applying patches to IOS WADs. These include patching the fakesigning bug back in, patching in access to ES_Identify, patching in access to /dev/flash, and patching in support for downgrading titles. There is also an experimental patch for disabling the need for the DVD drive to initialize, which is useful on Wii Us where the drive has been removed. This patch is experimental, and may cause unintended side effects on some consoles.
  • New command, `info`, which can gather and then display info about a TMD, Ticket, or WAD file.

You can find out more about a particular command by passing `--help`.

This release should have a good deal of the bugs left over from v1.2.1 polished out by now, but new bug reports are always welcome.
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
14,186
Trophies
4
Age
39
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
10,547
Country
Cyprus
Depends how u define "normal" user. I'd argue normal users don't generally use command line or write scripts, so by definition this tool isn't directly for normal users.

Other tools like NUSGet would use WiiPy to support/ streamline their development. Those types of tools may be used by more "normal" users.

WiiPy is similar to sharpii or libwiisharp solutions but with cross platform support in mind. If no one developed back-end tools like those/this, then we wouldn't have other popular tools like show mii wads, customize mii or NusGet

The way you say "you don't really understand the use" sounds so belittling, like your criticizing someone for building something so pointless, and your other response in your nkit thread had a similar condescending tone... I'm gonna try to give u the benefit of the doubt and assume that was unintended like sometimes happens when communicating with just text. I got a bad feeling you might take this the wrong way, let's just all chill out and be cool with each other, yeah?
 

mrmagicm

Well-Known Member
Member
Joined
May 27, 2018
Messages
889
Trophies
0
Age
49
XP
1,373
Country
France
Sorry, when "I say don't really understand" the use of this tool, I really mean basically that, just like a pupil that don't understand maths, I'm not on the "scripting level" like you said, also, english is not my first langague so sorry if it means something else to you. I do use some tools like AnyTitleDeleter/Bluedump/DmpMiNNd/priiloader/Inspectmii/WiiModLite/yawm but this tool is by far behind those kind of tool level comprehension, so advanced that most people cannot understand the way you think, I would say around 95% of people reading this post wouldn't know the true purpose of this tool, I do admire people building a useful tool like this, so sorry for trying to improve my level of undestanding, but by doing so being bad...Just want to share and improve knowledge.
 
  • Like
Reactions: XFlak

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
Sorry, when "I say don't really understand" the use of this tool, I really mean basically that, just like a pupil that don't understand maths, I'm not on the "scripting level" like you said, also, english is not my first langague so sorry if it means something else to you. I do use some tools like AnyTitleDeleter/Bluedump/DmpMiNNd/priiloader/Inspectmii/WiiModLite/yawm but this tool is by far behind those kind of tool level comprehension, so advanced that most people cannot understand the way you think, I would say around 95% of people reading this post wouldn't know the true purpose of this tool, I do admire people building a useful tool like this, so sorry for trying to improve my level of undestanding, but by doing so being bad...Just want to share and improve knowledge.
It's alright! This is definitely not a tool I would expect the average user to ever have a use for. It's designed as an eventual Sharpii successor, so it's primarily aimed towards people who are trying to work with files on or relating to the Wii. If you're just a modded Wii user who isn't looking to tinker, then there's probably not much that you'd need here.

I plan to eventually get to making software aimed more towards regular end users, though NUSGet would probably already count as an example of that, but I just haven't gotten quite that far yet. I'm still focusing most of my development time on libWiiPy, and then as a result that means that WiiPy gets a lot of my focus as well because it offers a frontend to access most of libWiiPy's features.

Stay tuned, though, because I eventually should start working on more libWiiPy-based software! And hey, maybe someone else will decide to make some as well, especially since I plan to formally announce the whole library soon with the release of v0.5.1. (And following that, you can expect the release of WiiPy v1.4.0.)
 

mrmagicm

Well-Known Member
Member
Joined
May 27, 2018
Messages
889
Trophies
0
Age
49
XP
1,373
Country
France
You seemed to be a very talented dev, capable of modifying the system. I was wondering something....
Is it possible to make a patch to make the Starting home menu the same Screen on a WiiU Gamepad as on the TV?
Just like to make it just like the WII is, same screen on both all the time except then you go in parameters, you would have the parameters on both screens. As this ever been tried?? This would be userful for person having difficulties to read on the gamepad, having all always on screen.
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
14,186
Trophies
4
Age
39
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
10,547
Country
Cyprus
You seemed to be a very talented dev, capable of modifying the system. I was wondering something....
Is it possible to make a patch to make the Starting home menu the same Screen on a WiiU Gamepad as on the TV?
Just like to make it just like the WII is, same screen on both all the time except then you go in parameters, you would have the parameters on both screens. As this ever been tried?? This would be userful for person having difficulties to read on the gamepad, having all always on screen.
This already exists, see here https://github.com/wiiu-env/SwipSwapMe#screen-modes

Cheers!
 

mrmagicm

Well-Known Member
Member
Joined
May 27, 2018
Messages
889
Trophies
0
Age
49
XP
1,373
Country
France
This is not a permanent hack change at all, it's a Plugin.....It would be much better if it was an App, you launch it, make the change the parameter then it's forever like that. No plugin whatsoever.
 

NinjaCheetah

Member
OP
Newcomer
Joined
Aug 20, 2020
Messages
19
Trophies
0
Age
17
Location
Space
Website
ninjacheetah.dev
XP
328
Country
United States
New Major Feature Release!
WiiPy v1.4.0 is now out, and it has several new commands and a handful of new subcommands! These release notes are long, so the full release notes may be a bit more readable over on GitHub but I'll share them here as well.

Changelog:

General
  • The syntax of many commands has been updated to a new standard format, so you can expect most commands to not have syntax changes in the future. Specific changes to syntax will not be documented in this changelog, so if you're having trouble with a command that worked before please check the --help for that command.
  • Error messages have been entirely redesigned. This means that you should no longer see Python tracebacks during normal use, and instead should see proper error messages with a description of the problem and the solution.
  • WiiPy now has support for development encrypted WADs across the board, thanks to libWiiPy v0.5.2.
New Command: cios
  • The new cios command can be used to build a cIOS from a provided base, cIOS map, and cIOS modules directory. See "wiipy cios --help" for more information.
  • Supports building both Wii and vWii cIOSes.
EmuNAND
  • Fixed uninstalling titles from an EmuNAND.
Info
  • Info is now more verbose across the board.
  • 4 character ASCII Title IDs (ex. HAZA) are now shown for applicable titles.
  • Retail/development signing is now detected correctly (previously all titles would appear as retail signed).
  • Development signed titles will now be noted as using the development common key as opposed to the retail one (change in libWiiPy).
  • The index of the boot content is now shown when looking at TMD or WAD info.
  • The title type is now detected correctly, and will no longer always show System regardless of the actual type (change in libWiiPy).
  • The title region will now correctly display as "None" instead of "Japan" for system titles.
  • Title regions now use their three letter code (JPN, USA, EUR, KOR) to denote the region.
  • The installed size of a WAD is now shown, in both MB and blocks (change in libWiiPy).
New Command: setting
  • The new setting command can be used to encrypt, decrypt, or generate the Wii's setting.txt file. See "wiipy setting --help" for more information.
  • Setting generation generates a new and valid setting.txt file based on a provided serial number and console region.
New Command: tmd
  • The new tmd command can be used to edit the properties of a TMD and remove content from its content records. See "wiipy tmd --help" for more information.
  • The remove subcommand allows for removing content from the TMD's content records either by index or Content ID.
  • The edit subcommand allows for editing the TMD's Title ID, required IOS version, and title type.
NUS
  • Fixed a bug where using --version when downloading only a TMD wouldn't actually change the TMD version downloaded.
WAD
  • The wad command underwent a number of changes, enough that they will be put into their own sections.
  • General
    • Content ordering issues have been resolved, so you should no longer see unexpected results when packing or unpacking WADs.
  • New Subcommand: add
    • The new add subcommand allows for adding new content to a WAD file directly.
    • Defaults to generating a random Content ID and specifying the content as type "Normal", but a custom CID and type can be supplied instead.
  • New Subcommand: convert
    • The new convert subcommand allows for re-encrypting a WAD currently using any valid key to instead use a different key.
    • Accepts WADs using the retail common key, the development common key, and the vWii key, and supports re-encrypting to the same three options.
    • Re-encrypted WADs are fakesigned by default, and the certificate issuer information in the TMD and Ticket is changed when going between retail<->development, to ensure that the correct key can be used to decrypt it later.
  • New Subcommand: remove
    • The new remove subcommand allows for removing existing content from a WAD file directly.
    • Content can be removed by either its index or Content ID.
  • New Subcommand: set
    • The new set subcommand allows for replacing existing content in a WAD file with new content, without needing to unpack it.
    • The Content ID and type are kept the same as the previous content by default, but new values can be specified.

You can find out more about a particular command by checking its `--help`.

WiiPy v1.4.0 has been pretty rigorously tested, but bug reports and questions are always welcome!
 
  • Like
Reactions: XFlak

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @JadeTheCoffeeGirl, welcome x2 +1