HackerN64 / HackerSM64

A Super Mario 64 decompilation repo based on CrashOveride95/ultrasm64 that aims to provide a flexible, easy-to-use base for creating romhacks.
328 stars 146 forks source link

Use libdragon compression scheme #817

Open mountainflaw opened 1 month ago

mountainflaw commented 1 month ago

Uses devwizard's assembly decompressor and Wiseguy's compressor tool. This would replace yay0 with yaz0 with zero downsides.

mountainflaw commented 1 month ago

As posted in Discord, the performance improvement seems to be around 9.61% faster level loads with a slightly smaller ROM size.

image

The left is YAZ0 and the right is YAY0.

mountainflaw commented 1 month ago

Replacing LOAD_YAY0 with LOAD_YAZ0 only serves to introduce merge conflicts and break fast64 compatibility. If we're replacing yay0, then changing the level script command doesn't matter other than to not be misleading (which is already the case with MIO0; maybe add a comment explaining the reality to the macro definitions or something idk).

or fix fast64?

gheskett commented 1 month ago

Not worth it tbh; that's its own logistical headache even with a HackerSM64 checkbox (that still isn't implemented).

mountainflaw commented 1 month ago

Not worth it tbh; that's its own logistical headache even with a HackerSM64 checkbox (that still isn't implemented).

how is it a logistical headache when you can make it equivalent to the current macro?

gheskett commented 1 month ago

By being incompatible with HackerSM64 2.3; this alone means destroying HackerSM64 backwards compatibility (on fast64's end).

mountainflaw commented 1 month ago

By being incompatible with HackerSM64 2.3; this alone means destroying HackerSM64 backwards compatibility (on fast64's end).

Don't most people auto update fast64?

gheskett commented 1 month ago

No probably, but that doesn't matter; HackerSM64 is not the source of truth for exporting defaults, nor should it attempt to be wherever possible

gheskett commented 1 month ago

Regardless, adding level script merge conflicts here would also put this PR well outside of 2.4 scope

mountainflaw commented 1 month ago

I undid all of the renames.

mountainflaw commented 1 month ago

As per usual with my pull requests, this will be experiencing some scope creep. I've decided it's probably best to just ditch the current compression options entirely, and replace them with their libdragon equivalents rather than just add aPLib and YAZ0.

I plan to actually ditch YAZ0 and move forward with importing LZ4 as its replacement, and replace deflate with shrinkler.

By the end, we should just have uncomp, lz4, aplib, and shrinkler as the four options ("levels" of compression in libdragon) to use, and as stated in Discord, only with upsides over the current choices in the repository.