CRC's..Checksums.. Reverse Engineering!

Disassembly, Reassembly, Tools and devleopment. Going deep with Hardware and Software.
Post Reply
User avatar
antus
Site Admin
Posts: 8253
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by antus »

The checksums are the first 2 bytes of the segments. the segment maps are in the index. The index is static.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3431
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by Tazzi »

antus wrote:The checksums are the first 2 bytes of the segments. the segment maps are in the index. The index is static.
Man where have I been.. Thats only just all clicked! :roll:

Alright... time to put that into the app now.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
antus
Site Admin
Posts: 8253
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by antus »

Hehe, heres what I implemented tonight. Back to figuring out the checksum calculations next. :comp:
Attachments
e38 segments.png
e38 segments.png (21.54 KiB) Viewed 7160 times
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3431
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by Tazzi »

Good thinking, Ill do something like that as well.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
charlay86
Posts: 584
Joined: Thu Sep 17, 2009 2:00 pm
cars: VT S1 SS (L67)
Location: Perth, WA

Re: CRC's..Checksums.. Reverse Engineering!

Post by charlay86 »

This looks fun, too bad I have to renovate the bathroom and kitchen after I finish uni exams this week :study:
User avatar
Tazzi
Posts: 3431
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by Tazzi »

charlay86 wrote:This looks fun, too bad I have to renovate the bathroom and kitchen after I finish uni exams this week :study:
Uni exams.. bloody waste of time they are.. they make students cram an entire semesters work into a single week, it doesnt stay with them for life, it just proves they can memorize stuff! In Engineering, we were expected to pretty much rope learn 2000+ lecture slides as we could be tested on any one slide, and thats for just the single unit!.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
Tazzi
Posts: 3431
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by Tazzi »

antus wrote:Hehe, heres what I implemented tonight. Back to figuring out the checksum calculations next. :comp:
Just put something similar together.. looking much better now :thumbup:

The backwards iteration crashed at some point last night.. *sigh*, I dont know at what point it crashed so Ill be starting around the 1/3 mark again.

I think I should do the same as you Ant and focus on the smallest section possible, will cut down processing time by a tonne.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
yoda69
Posts: 1215
Joined: Sun Mar 15, 2009 10:20 am
cars: 2004 VYII Acclaim Wagon V6 Auto LPG/Petrol
2004 VYII Berlina sedan V6 Auto
2005 VZ Monaro CV8 manual
Location: Geelong, VIC

Re: CRC's..Checksums.. Reverse Engineering!

Post by yoda69 »

Tazzi wrote: Uni exams.. bloody waste of time they are.. they make students cram an entire semesters work into a single week, it doesnt stay with them for life, it just proves they can memorize stuff! In Engineering, we were expected to pretty much rope learn 2000+ lecture slides as we could be tested on any one slide, and thats for just the single unit!.
Been there, done that, remember the time doing it well but not the content.
Worst was 1st year Chemical Engineering, having to remember all these chemical equations, where the electrons went, which bits were positively charged and God knows what else as it was too long ago now, definitely put me off doing Chem Eng as a discipline.
User avatar
antus
Site Admin
Posts: 8253
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by antus »

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?
Attachments
e38sums.png
e38sums.png (15.09 KiB) Viewed 7096 times
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
VX L67 Getrag
Posts: 2883
Joined: Sun Aug 02, 2009 9:16 pm
Location: Bayside, Melbourne, Victoria
Contact:

Re: CRC's..Checksums.. Reverse Engineering!

Post by VX L67 Getrag »

I can always do xdf's but need some sort of reference & then also a previously defined xdf of similar code to get started!
Post Reply