Nasina7 / puyodisasm

A work-in-progress disassembly of Puyo Puyo 1 for the Megadrive/Genesis
5 stars 0 forks source link

Add Uncompressed Graphics (Puyo compression) and Puyo Compressor #7

Closed radioshadow closed 1 month ago

radioshadow commented 1 month ago

Puyo Graphics.zip

I have included all the uncompressed graphics (4bpp format) that were in the Puyo compression format, and reorganized them. They can be found in the "uncompressed" folder, with the ".unc" file extension.

Note: I have removed the unused mapping from the Sega Logo. See this issue for more details. https://github.com/Nasina7/puyodisasm/issues/6

I have added a "Compress Graphics.bat" file which compresses all the uncompressed graphics (except the Sega Logo) into the Puyo format. This is done using AdolescentSeagull's "Puyo_Compressor.py" tool (you will need to install Python3 to use the tool: https://www.python.org/downloads/).

These are saved in the "Compressed" folder, with the ".puyo" file extension.

I have also included the original compressed graphics to use in the disassembly.

Nasina7 commented 1 month ago

To follow up from my response in the email, I've been planning something as well that might be more convenient than having a compressed and uncompressed copy of the graphics in the disassembly.

A while back, I actually fully implemented the graphics compression (bit-perfect compression and decompression for every file in the disassembly) and made a tool for it. I don't currently have an executable available, but I'll build one tonight and post it in the releases of that repo.

My plan is to store all the art data as uncompressed in the disassembly, and then compress it on build time, build the rom with the compressed data, then decompress it again to restore the disassembly to it's original state. This would also save external tools from needing to implement the compression which would make getting them up and running easier.

I'm probably also gonna take this opportunity to reorganize / rename a lot of the files in the disassembly too. The majority of the stuff in here was named before I more or less had a proper formatting style figured out for the disassembly, and the inconsistent naming schemes and casing for the files and folders has been bugging me lately :p. This also goes for some of the code labels and code formatting, but I'm planning to tackle that separately.

Let me know if you think I should handle this differently. It'll be a few days before I get around to doing this so no rush to respond.

Edit: Here's the built version of the compression / decompression tool. https://github.com/Nasina7/PuyoComp/releases/tag/v1.0

radioshadow commented 1 month ago

Compared to the Compression tool AdolescentSeagull has made https://www.romhacking.net/utilities/1813/ (which only compresses them), your one can compress and decompress them, and from my tests, the compressed data 100% matches the compressed graphics in the rom.

What you have suggested does sound like a good idea. My only concern is that this might take some time to compress all the graphics? Using AdolescentSeagull's tool, it can take around 3 mins to compress them. Maybe your tool compresses them faster?

Nasina7 commented 1 month ago

I did a test implementation of this last night, and from what I measured, the build only took around 6 seconds, with most of that time being used for compression. It's longer than without compression, but not enough for me to be concerned. The implementation itself worked fine, and I should have it pushed by the end of today, after I do some extra testing with it.

Nasina7 commented 1 month ago

Implemented in commit 60e8d7e. Let me know if you ever run into any issues with this set up, or if you want me to change anything with it.