FIX94 / Nintendont

A Wii Homebrew Project to play GC Games on Wii and vWii on Wii U
1.95k stars 326 forks source link

Support for Compressed ISO(?) #1004

Closed JoseAaronLopezGarcia closed 1 year ago

JoseAaronLopezGarcia commented 2 years ago

So I've been checking the ISO reader for nintendont trying to figure out if it's possible to implement compressed ISOs. I checked that it already has some sort for CSO reader, but it doesn't seem to follow the standard CSO format and doesn't seem to support compression. Can anyone clarify how this works? I'm thinking it could easily support the ZSO format.

GerbilSoft commented 2 years ago

The CISO format supported by Nintendont is Hermes CISO, which is less of a "compressed" format and more of a "sparse" format, since it doesn't actually use any compression library.

It should be possible to implement the CISO format as used on PSP, but that'd require linking in zlib, LZ4, or some other compression library, which adds overhead.

JoseAaronLopezGarcia commented 2 years ago

Which is why I mentioned ZSO, it's the same as Booster's CSO format but uses LZ4 instead of deflate, which is extremely fast, doesn't need extra memory and the code is compact and portable enough to just copy paste the lz4.c and lz4.h files and just use them as is. Just a few weeks ago I've helped implement the ZSO format in Open PS2 Loader, which works perfectly fine given the fact that the reader function and decompression algorithm all work on the PS2 IOP, which is nothing more than the glorious PS1 CPU with its full 2MB of RAM. You only need a Minimum of about 3KB (+code) for the whole thing. My guess is Nintendont on a Wii or Wii U can support it without any issues just like OPL on PS2.

spudpiggy commented 2 years ago

Please change title - I first thought you were requesting a feature that Nintendont already has.

60fpshacksrock commented 2 years ago

I second this.

carnage702 commented 1 year ago

well zso support was done on a pull request and didnt change a thing any zso iso was much much bigger than a regular trimmed iso for instance a zso luigi mansion iso is 1.34gb while a trimmed luigi mansion is 277mb so this was a bust, gc games are built different, other formats need to be made zso just doesnt cut it at all.

JoseAaronLopezGarcia commented 1 year ago

I already have DAX format working and the results are very promising. But before I open a PR I'm going to test some ISOs and covert them to different formats (DAX, ZSO and Shrunken) so we can have a clear idea if it's worth it or not.