Closed TheMiningTeamYT closed 4 weeks ago
Okay, I figured out what's going on. The TI 84 Plus CE toolchain compiler doesn't like this macro: https://github.com/kikuchan/pngle/blob/8bf3862f84a4643e75a7d92e046d7c07f934cead/src/miniz.c#L1382 It was incrementing the pointer more than it should, which was causing the ZLIB header to get read incorrectly. I changed it to this: https://github.com/TheMiningTeamYT/Bitmap84CE/blob/74a767bcd400b4a32cf7cbd153d931b57e1abf44/src/pngle/miniz.c#L1393 and it started working. (This is also easier to read IMO.)
Thank you for using pngle! And congrats for your code working now. I'm happy to hear that.
Yeah, the miniz
is too dense, and maybe it's too old.
I think it should be updated to the latest version, or use another library, in time.
I'm attempting to use PNGLE to add PNG support to my USB image viewer for the TI 84 Plus CE, BMP84CE. However, after calling
pngle_feed
I'm getting the errorFailed to decompress the IDAT stream
. From debug_printf, I'm also getting the message[pngle] tinfl_decompress() failed with status -1!
The code of tinfl_decompress is too dense for me to read, so I was hoping I could get some help. You can see my code here. (in particular, I'm invoking PNGLE here.) FYI, the TI 84 Plus CE uses a 24 bit (yes, 24 bit!) eZ80, meaningint
andunsigned int
are 24 bits wide, not 32 bits wide. I already had to fix themz_uint32
types in miniz, and theread_uint32
function in PNGLE because of this. Hope this helps you figure out what's going wrong. If you have any questions, please ask.