Lua to TNS converter – A little bit further

I finally could find a couple of hours to go further on the converter.

As you remember the OS 3.x TNS file format has 4 layers: 1) XML compression, 2) zlib compression, 3) triple-DES encryption and 4) zip wrapper. 4) and 3) are now supported by the converter, but it fails miserably on the inflate() call for 2) with a Z_DATA_ERROR… The deflated 512-byte block to inflate seems OK, and can be inflated on the computer side without problem.

What could be wrong?

[edit 2011/08/01] 2) (zlib compression) now passes! the zlib stream needs to be produced with a negative windowBits parameter, to avoid emitting a zlib header.

And now probably the last step: 1) (the XML compression) fails at the 13th 512-byte block of the Lua sample program I use, in the TNS decryption loop…

Advertisements

5 thoughts on “Lua to TNS converter – A little bit further

  1. This is great!
    I’m so glad to see someone trying to make the new Nspires do more than calculating and playing simple games!
    I could never do something like this myself, even if I can program in Lua ;)

  2. Hope Ndless 3 will be available on my new Nspire, thank you for your absolutely incredible job !!

    We are all in it together!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s