TricksterGuy / nin10kit

(Formerly brandontools) A set of tools for doing homebrew game development, includes look up table generators and and image to C exporter for Nintendo's Gameboy Advance, DS, and 3DS systems. In addition the GUI version of the program allows you to see what the image would look like on real hardware before exporting. Coming soon the ability to edit the bitmap/palette/tilemaps before exporting to the GBA.
Apache License 2.0
48 stars 3 forks source link

Support for LZ77 for NDS (and maybe GBA?) #35

Open cotodevel opened 4 years ago

cotodevel commented 4 years ago

Hello, great tool there I am using it in ToolchainGenericDS and it works wonders, you will be credited of course. Except, every binary increases filesize by about 100K, thus, pretty sure it would be useful to compress the generated bitmap (Mode 3, GBA/NDS) under LZ77 (GBA/NDS format). I know I can do this by hand but, is it possible?

Thanks

TricksterGuy commented 4 years ago

Sure. The reason why it isn't an option now was because the tool is used mostly in college classes and they are just doing the most basic of stuff with the GBA so compression wasn't a high priority item.

cotodevel commented 4 years ago

Well, I ended up adding LZSS encode/decode in https://bitbucket.org/Coto88/toolchaingenericds-template/src (and NDS binaries got shaved off about 80K worth of NDS bitmap : Mode 3, GBA/NDS, being 256x192 @ RGB16) also the LZSS decoder can be used directly from NDS/GBA bios to save space.

TricksterGuy commented 4 years ago

Alright! I'll keep this issue open until I add support for compression here. I'd say the ETA would be over thanksgiving holiday when I'd have time to work on stuff.

cotodevel commented 4 years ago

Ok, I can guarantee the LZSS compressor/decompressor in the TGDS project I linked works very well (from audio files, bitmaps, even code), so it may be helpful to test against other LZSS compressor/decompressors out there for easier integration to your project.

Also the other software I used to test code was written in C#, being this one:

https://www.romhacking.net/utilities/511/

And DLLs can be easily de-compiled by jetbrains dotpeek C# DLL decompiler.

Thank you for your time.