Alright! Major progress!antus wrote:Ok. The CVN is a CRC16, and the sum is a 16 bit 2s compliment. When calculating the data you need to update the CVN first, as it IS included in the sum. The CVN is not a derivative of the sum (or directly vice versa).
Makes sense really as the scan tools (or PCs) can verify the CVN after reading the bin for warranty test purposes (that's why its in there), but the PCM only needs to do the sum which is quicker in an embedded system like a pcm. CRC can be accellerated with a lookup table, but they are probably looking at it from a space savings angle in the pcm, and its not really needed anyway.
Next steps, figure out how to ID each segment type, handle disabled sums and segments, handle differing numbers of segments, and add partnumber/ID strings.
Also, put this login in to a TP checksum plugin. Probably merge the delco checksum plugin, ls1 checksum plugin, and e38 checksumtool in to one TP5 checksum plugin.
Whos keen to help work on XDFs?
how to ID each segment type
I assume we simply do this via the part number in each section? Always appear between the two checksums.
handle disabled sums and segments
Again, same as above? If the ID number doesnt appear/ no checksums/ all 00's or FF's.. then that segment must not be supported?
partnumber/ID strings
I think this is something we need to get rolling. Need as many partnumbers/IDs for each segment and the OS number to find how eveything differs.
Iv got no experience in XDF's, will probably be more of a pain than help but Ill try!