TP Checksum plugin

Discuss anything TunerPro related.

Moderators: Mangus, robertisaar, dex

Post Reply
Tmod
Posts: 5
Joined: Mon Jan 25, 2021 9:08 pm

TP Checksum plugin

Post by Tmod »

Hi,
I have used the TP Checksum plugin to calculate 3 different checksums in a bin file. However they are swapped from a correct checksum.

Example: Correct bootloader checksum is 50 7F but when TP calculates it is shown as 7F 50, Correct cal tables is F6 28 but is shown as 28 F6 after TP, Correct software is 34 11 but is shown as 11 34

I am not sure how one would perform a swap bytes automatically when performing the checksum calculation routine.

Thanks!!
User avatar
dex
The Ford Guy
Posts: 612
Joined: Thu Oct 07, 2004 6:38 am

Re: TP Checksum plugin

Post by dex »

Use the 'LSB First' check box to select the order of the low and high bytes.
Tmod
Posts: 5
Joined: Mon Jan 25, 2021 9:08 pm

Re: TP Checksum plugin

Post by Tmod »

Hey Dex, I tried that and it ended up giving me some other hex bytes that were not even close to what the checksum is. That stumped me as it should have reversed the two that I had to begin with and not calculate two new ones.

I just saved another bin and with LSB First checked I got the following,
Correct = 50 7F, LSB Checked I get 23 07
Correct = AD 54,LSB Checked I get 84 ED
Correct = AE 58,LSB Checked I get D5 54

So instead of flipping the bytes it recalculates them.
User avatar
dex
The Ford Guy
Posts: 612
Joined: Thu Oct 07, 2004 6:38 am

Re: TP Checksum plugin

Post by dex »

I am guessing that the 'Data Size' is not 1 byte as otherwise using the 'LSB First' check box would have worked. It sounds like you may need a custom checksum plugin.

A work around solution would be to use an unused part of memory outside of the checksum 'Data Start' and 'Data End' address range as a temporary store for the calculated checksum. Then add two further checksums that each only store one byte of the temporary checksum into the correct address of the checksum thus 'flipping' the calculated checksum. Fussy, but it works.
Tmod
Posts: 5
Joined: Mon Jan 25, 2021 9:08 pm

Re: TP Checksum plugin

Post by Tmod »

Yeah this is a bit of a oddity on calculating the checksum, I would like to have a custom checksum plugin for this but I know nothing about coding so that leaves that one out.

But can't argue with success as now after your suggestion I went back and made a few more checksums and even made one to clear the area back to 00 00 that I used for the temp so in the end the file I used and the file I saved as are identical. Messy as you say but it works.

Thanks for the suggestion!!
Tmod
Posts: 5
Joined: Mon Jan 25, 2021 9:08 pm

Re: TP Checksum plugin

Post by Tmod »

Ok I may be missing something here but trying to slim down my mess of a code I used to arrive at a correct checksum.

Ashampoo_Snap_2021.02.05_20h52m29s_001_.png
Ashampoo_Snap_2021.02.05_20h52m29s_001_.png (1.51 KiB) Viewed 5055 times

So looking at the first 2 bytes (50 7F) the checksum of those two using 'sum' is 7F 50 using little endian 16 byte, 50 7F using big endian 16 byte.

Now what stumps me is regardless of whether I check LSB first or not the output does not change and always stays 50 7F, Should clicking LSB first reverse the 50 7F and write it as 7F 50?

Ashampoo_Snap_2021.02.05_21h17m04s_001_.png
Ashampoo_Snap_2021.02.05_21h17m04s_001_.png (2.53 KiB) Viewed 5053 times
krav84
Posts: 10
Joined: Fri May 28, 2021 8:39 am

Re: TP Checksum plugin

Post by krav84 »

im having a problem with checksums.
i admit im clueless what they are or do.

im using the Tunerpro [free] to remove Vats and enable both fans.

it saved as a modified bin alright but at time of saving it gave me an error saying;
"some checksum files may be missing, please check checksum, etc "

what does this mean and how do i fix it?
Post Reply