I'm trying to write a prog to parse .89* programs on the PC. Verifying the checksum on variable files is working as expected. Verifying the checksum on flash files (.89k, .89u) is not working as expected.

Anybody got any experience with this that would be willing to help me understand what I am doing wrong?
lxman wrote:
I'm trying to write a prog to parse .89* programs on the PC. Verifying the checksum on variable files is working as expected. Verifying the checksum on flash files (.89k, .89u) is not working as expected.

Anybody got any experience with this that would be willing to help me understand what I am doing wrong?
Well, from documentation on the TI-89 file format:
Quote:
2 bytes Checksum. This is the lower 16 bits of the sum of all bytes in the first four bytes and the variable data.
However, simplifying for a single variable, it says:
Quote:
2 bytes Checksum. This is the lower 16 bits of the sum of all bytes in the variable data.
There's a different format for Flash files, but the checksum is still the lower 16 bits of the sum of the variable data. Is there anywhere else where your bug could be coming from?
Thank you for the reply. The docs I have are

' TI-73...V200 Link Protocol Guide v1.4 by Tim Singer and Romain LiƩvin.'

As far as I can determine, these are the most recent docs in circulation. If there is anything more recent I would love to know.

Here's where I am having difficulty. The docs say that the checksum is calculated as a sum of all the bytes in the data section. Then take the lower 16 bits of that result and it should match up with the 2 bytes (in little endian format) at the end of the variable.

Working this for variable files (89p, 89y, 89z, etc. it works fine - no problem). But working it for a flash file (89k or 89u) does not calculate correctly for me.

I have made certain of the following:

The "data section" of a flash file starts at offset 0x4E - this is where I am starting
The last two bytes of the flash file should not be included in the checksum calculation.

So when I do this for a flash file, it does not add up. When I do it for a variable file - even one with multiple variables (89g) it works fine. I am trying to figure out what I am doing wrong here.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement