Last Ninja 2 Sprite/Frame/Animation Browser: sprite saving ready

After changing my LN2 sprite/frame/animation browser to remove duplicate sprites I added an option to save the resulting sprite catalogue:

LN2 sprite/frame/animation browser: save sprites

LN2 sprite/frame/animation browser: save sprites

The interesting bit of code here is the data packer, which is used to compress sprite bitmap to save RAM on the C64. Oddly enough by opening the original data and saving it, I noticed my file was 3 bytes shorter. I started comparing the original packed data and the one saved through my tool: it appears a few sprites were compressed in a non-optimal way when compared to the rest of the data. In my case all the data is compressed optimally with the escape range used in LN2.
At some point I might add the code to brute-force the optimal escape range too, which might save a few more bytes, assuming that the original escape range used in LN2 is not already optimal 🙂

About Luigi Di Fraia

I am a Senior DevOps Engineer so I get to work with the latest technologies and open-source software. However, in my private time I enjoy retro-computing.
This entry was posted in Retrocomputing, Technical and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s