Commit Graph

3 Commits

Author SHA1 Message Date
Philippe Symons
0f8236575a Fix a couple of compile errors on latest-release branch
- Fix make clean by adding -f flag when removing output.json

- Fix broken compress_lz10.sh script: it had a check to avoid compressing when the
  input bin file hasn't changed. But the -nt operator also returns false if the output
  file doesn't exist.

- Fix compilation error on conflicting u32 typedef: libtonc defines one and so does data-generator.
  We shouldn't redefine it if the one from libtonc exists. The one in data-generator exists for compiling
  the tool for pc.

- Fix Dockerfile. For some reason the Dockerfile was now failing because Ubuntu manages the python pip
  packages. I fixed it with the --break-system-packages shortcut. It should be fine.
2025-11-27 20:27:35 +01:00
The Gears of Progress
4a612713ee Modifying build process to ignore unmodified files 2025-08-06 23:08:14 -04:00
Philippe Symons
47cd143de6 Replace ZX0 by the builtin LZ10 compression.
LZ10 decompression is builtin to the GBA's bios, so we don't need ZX0. It's also significantly faster
(618 usec instead of 2311 usec in my personal benchmark code for decompression of the same data)

And it seems like by doing so, we saved 1 KB as well!

So, seems like replacing ZX0 is the right move.

The reason I didn't initially is because I misunderstood the documentation. I assumed LZ77UnCompWram could only uncompress into EWRAM, not IWRAM.
But it turns out it can do both.

And using standardized tools is usually better than using a custom implementation.

The only downside of this right now, is that we can no longer stream text tables through a smaller buffer than the entire decompressed size.

Anyway, things seem to work fine, so bye bye ZX0. It's been fun.
2025-07-18 16:19:34 +02:00