Segment Swap utility

They go by many names, P01, P59, VPW, '0411 etc. Also covering E38 and newer here.
Post Reply
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

https://github.com/joukoy/UniversalPatcher

Quick 'n dirty copy from PCMBinBuilder, all extra removed.
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

I found some bug in 1.8.1 that is missing in the 1.8
When you extract eeprom data with 181 it gets labelled with 0. All the files get this. In the 1.8 the label is correct with hardware id and bcc.
The manual OS selection is not needed. On extraction if the file have bad eeprom data just scrap the eeprom data and mark the OS with question mark. If you can make a database list with OS upon extraction and update it with every extraction. In the list you can mark the already identified OS with year model. Than on a bad eeprom bin extraction compare the OS with the list to make the selection. If still can`t identify the OS it will be better to skip the file. Anyway it will be some sort of modified bin or not read properly.

I tried the universal patcher and is very promising. Can you add some dialogs for skipping some addresses from comparison. For example skip 0-2000 and skip 3ffe-4000 and so on. The skip can be user configurable. Do you want to add to the universal patcher the ability of universal checksum utility that will work for other GM files. There are total of 2 or 3 different methods of checksum calculation and there can be made some config files for different pcms. And user can select the start end address, skip addresses and checksum location. The newer Gm files uses the same file structure and possible the same algorithm for checksum calcultion, only the cal segment info is stored at different address.

I will also try to find some more patterns in the eeprom data for other gm pcms for identification purposes. I think GM make it on purpose to easily identify pcms with checkword a5a0 at different locations.

I tried some of the patching functions. It might be good idea to print somewhere the segments p/n of both files[for visual identification] and if the segments are not of the same p/n automatically to disable the checkbox for comparison of the given segment.
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

kur4o wrote:I found some bug in 1.8.1 that is missing in the 1.8
When you extract eeprom data with 181 it gets labelled with 0. All the files get this. In the 1.8 the label is correct with hardware id and bcc.
The manual OS selection is not needed.
Fixed in 1.8.2

kur4o wrote: Can you add some dialogs for skipping some addresses from comparison. For example skip 0-2000 and skip 3ffe-4000 and so on. The skip can be user configurable. Do you want to add to the universal patcher the ability of universal checksum utility that will work for other GM files.
Yes, I can try to add these, but it may get some days - I try to get my ls swap to the point I can start the engine at weekend. :driving:
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

I am still getting ...eeprom_data-0-.calsegment names on bins extraction.

When you have the time take a look at it. I think it is something small than needs fixing. Everything else seems to work fine.
It may be good idea to add some more protections on bin comparing feature.
Now we need to get enough stock bins with the proper name stating, engine, trans, drivetrain and so on.

Looks like it is almost done and ready for release. Awesome work. I really like the end product.
Do you mind if I advertise the PCM bin builder at other places?
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

1.8.3

Bugfixes.
Disable comparison of incompatible segments in patcher
add choice skip/replace/rename in segment extraction

Edit: 1.8.4
Small fix: Don't show modify form if user cancel file selection
Last edited by joukoy on Fri Feb 14, 2020 10:05 pm, edited 1 time in total.
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

kur4o wrote: Do you mind if I advertise the PCM bin builder at other places?
Advertising is fine, when major bugs are fixed.
So please test again - as you have done so far.

Thank you for guidance & testing!
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

It turns out that I didn`t test the 1.8.2 at all. I retested 1.8.1. Sorry about that.

The new improvements on the patch side are sweet. It will be nice if you add comparing different segment just for the hack of it to see are they really that different or it is some bytes that are changed. Of course they must match in number and size. When comparing different segments a save to text file in hex can be done for later analysis.

Now when you find unknown file it can still be good, but missing eeprom part. If a good OS number can be get and compared against a list or Printing the OS p/n of the unknown file and some dialog to save as. Leaving the unknown files for the end of extraction can save time on big archives.


I finally figured that CVN stuff. Some other form of checksums used by GM to verify file integrity.

The whole segment including the checksum is CRC-16ed. If the crc16 result is AABB, the cvn is 0000BBAA. So the result is byte swapped.
I have some random segments from different years. Can you check them if the ls1 pattern for checksums is used there. And some files with confirmed CVNs to play with.
RANDOM segments.rar
(32.07 KiB) Downloaded 300 times
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

kur4o wrote: I finally figured that CVN stuff. Some other form of checksums used by GM to verify file integrity.

The whole segment including the checksum is CRC-16ed. If the crc16 result is AABB, the cvn is 0000BBAA. So the result is byte swapped.
I have some random segments from different years. Can you check them if the ls1 pattern for checksums is used there. And some files with confirmed CVNs to play with.
RANDOM segments.rar
Uploaded v 1.8.5
Added support for segment files in fileinfo, calculates CVN, too.
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

joukoy wrote:https://github.com/joukoy/UniversalPatcher

Quick 'n dirty copy from PCMBinBuilder, all extra removed.
Version 0.3.0 includes basic functionality for excluding blocks.
roughneck427
Posts: 49
Joined: Thu Feb 07, 2013 1:49 pm
cars: 2002 Camaro
2008 Pontiac G8

Re: Segment Swap utility

Post by roughneck427 »

Here’s a database of bins I’m working on. I’ll have various P01 P59 auto manual from 99-07. I’m up to 2004 it’s takes time to generate them as a good known stock file. There is one exception that I manually segment swapped. File in hex for a 4l80


https://www.dropbox.com/sh/p9jrdjbj6wz2 ... ZZEBa?dl=0
Post Reply