Segment Swap utility

They go by many names, P01, P59, VPW, '0411 etc . Circa 1999 to 2006. All VPW OBD2 PCMs.
User avatar
Posts: 180
Joined: Tue Dec 17, 2019 3:27 am

Re: Segment Swap utility

Postby joukoy » Mon Feb 24, 2020 11:21 pm

0.6.4
Bugfixes.
Checksum address can be empty => CS is calculated but not compared or saved

User avatar
Posts: 180
Joined: Tue Dec 17, 2019 3:27 am

Re: Segment Swap utility

Postby joukoy » Tue Feb 25, 2020 2:02 am

0.7.0

Added segment config possibilities:
:2 2 Byte Address (word)
<X Offset -X bytes
>X Offset +X bytes
*X Read X pairs of Start - End

Example:
@103C:2*4>FF
Read 4 pairs of word addresses from 103C, add offset FF

Edit: 0.7.1, removed OK-button from segment settings-window, I think it was confusing.

Posts: 183
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Postby kur4o » Wed Feb 26, 2020 9:20 am

I tried the new cool features. It looks like the offset is doubled. When you put 1fff it is somehow translated to 4000 actual offset.
A nice addition will be NEW xml button, that clears all the fields.

Are you willing to add some hard built feature for the v6s bins. For example an xml that states exception: case 1 and a list with OS vs checksum location. The checksum is word sum stored as a dword. the sum is done for the whole bin except 4000-7FFF, Os location and checksum location.
The os can be taken from the end of bin -6 or -8 bytes. If the last 2 bytes of bin are FFFF than it is -8, if the last 2 bytes are a55a than it is -6.

It might be good idea to make the checksum byte swap, user configurable.

The config for the patch addresses somewhere disappeared. Can we set the patch to be linked with the xml config file when done.
I also noticed that the protection for comparing different segments also is broken (Greying out the fields if p/n don`t match).

A separate folder creation for the xml checksum config files and the patch files will make testing much easier.

Can we re-arrange the segments in the segment settings window. Now they are fixed and if you want to add new segment you are stucked at the last position and can`t re-arange the order of them.

The read *x consecutive addresses works awesome. Really saves time with the config.

User avatar
Posts: 180
Joined: Tue Dec 17, 2019 3:27 am

Re: Segment Swap utility

Postby joukoy » Thu Feb 27, 2020 1:09 am

kur4o wrote:I tried the new cool features. It looks like the offset is doubled. When you put 1fff it is somehow translated to 4000 actual offset.
A nice addition will be NEW xml button, that clears all the fields.

Are you willing to add some hard built feature for the v6s bins. For example an xml that states exception: case 1 and a list with OS vs checksum location. The checksum is word sum stored as a dword. the sum is done for the whole bin except 4000-7FFF, Os location and checksum location.
The os can be taken from the end of bin -6 or -8 bytes. If the last 2 bytes of bin are FFFF than it is -8, if the last 2 bytes are a55a than it is -6.

It might be good idea to make the checksum byte swap, user configurable.

The config for the patch addresses somewhere disappeared. Can we set the patch to be linked with the xml config file when done.
I also noticed that the protection for comparing different segments also is broken (Greying out the fields if p/n don`t match).

A separate folder creation for the xml checksum config files and the patch files will make testing much easier.

Can we re-arrange the segments in the segment settings window. Now they are fixed and if you want to add new segment you are stucked at the last position and can`t re-arange the order of them.

The read *x consecutive addresses works awesome. Really saves time with the config.


This I don't understand:
kur4o wrote:The config for the patch addresses somewhere disappeared. Can we set the patch to be linked with the xml config file when done.


Fixed bug in segment offset calc.
Added segment reordering, and "New XML"
Copied logic to disable incompatible segments from PCMBinBuilder

Added support for V6bin:
If you put "GM-V6" in Checksum address, it will be handled as filename.
For example, put: GM-V6longfilenamehere.txt
And create file: "GM-V6longfilenamehere.txt" in program startup folder with "OS:Checksum-address" rows, example:
12587799:710C8
9352809:7231A
... ok?

Posts: 183
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Postby kur4o » Thu Feb 27, 2020 5:40 am

Added support for V6bin:
If you put "GM-V6" in Checksum address, it will be handled as filename.
For example, put: GM-V6longfilenamehere.txt
And create file: "GM-V6longfilenamehere.txt" in program startup folder with "OS:Checksum-address" rows, example:
12587799:710C8
9352809:7231A
... ok?


That seems good. I tried it but guess it is not fully implemented yet.


In the earlier version there was a settings button in the patcher window. There you can make a .ini file how to create patch. Now it is missing.
The other thing will be when the patch is created, can we specify in the patch file which checksum algorithm to be used with that patch. Some automation.

When an xml config file is open for editing or loaded can we see which file is selected. Some print of the file selected somewhere in the bar??

I will try the offset fix and report back.

User avatar
Posts: 180
Joined: Tue Dec 17, 2019 3:27 am

Re: Segment Swap utility

Postby joukoy » Thu Feb 27, 2020 5:51 am

kur4o wrote:
Added support for V6bin:
If you put "GM-V6" in Checksum address, it will be handled as filename.
For example, put: GM-V6longfilenamehere.txt
And create file: "GM-V6longfilenamehere.txt" in program startup folder with "OS:Checksum-address" rows, example:
12587799:710C8
9352809:7231A
... ok?


That seems good. I tried it but guess it is not fully implemented yet.


In the earlier version there was a settings button in the patcher window. There you can make a .ini file how to create patch. Now it is missing.
The other thing will be when the patch is created, can we specify in the patch file which checksum algorithm to be used with that patch. Some automation.

When an xml config file is open for editing or loaded can we see which file is selected. Some print of the file selected somewhere in the bar??

I will try the offset fix and report back.


V6 handling should be fully implemented, but not really tested.
I try to test tomorrow.

Settings -button was only for exclusions.
You can do the same with segments, ie:
Previously: exclude 100-1000.
Now: Segment1: 0-99, segment2: 1001 - <end of file>

I will add some info about xml-file. And planning about patch - xml linking. Maybe first line of patch should be xml-file name ? Automatically load it if available?

Posts: 183
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Postby kur4o » Thu Feb 27, 2020 9:33 am

The offset works as expected. I am still having trouble to make the v6 run.

User avatar
Posts: 180
Joined: Tue Dec 17, 2019 3:27 am

Re: Segment Swap utility

Postby joukoy » Thu Feb 27, 2020 9:59 pm

kur4o wrote:The offset works as expected. I am still having trouble to make the v6 run.

True, it was not fully implemented.
Now I have fixed it, but can't get correct checksum results, or I don't have correct cheksum address?
I need some examples for testing, can you send?
- Bin file
- Checksum addess
(- Cheksum )

Posts: 183
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Postby kur4o » Thu Feb 27, 2020 10:43 pm

Here is an example.
testBINwithxml.rar
(204.59 KiB) Downloaded 66 times


It have def file that works only with this OS number bin.
The checksum is at 70f4c ;4bytes long
OS is at 7fffa 4 bytes long

User avatar
Posts: 180
Joined: Tue Dec 17, 2019 3:27 am

Re: Segment Swap utility

Postby joukoy » Thu Feb 27, 2020 10:50 pm

kur4o wrote:Here is an example.
testBINwithxml.rar


It have def file that works only with this OS number bin.
The checksum is at 70f4c ;4bytes long
OS is at 7fffa 4 bytes long


:wall:
4 bytes... should read correctly what you said previously (dword), I was trying with 2 bytes. Now it works ok.
New version coming soon.

PreviousNext

Return to GM LS1 512Kbyte and 1Mbyte

Who is online

Users browsing this forum: No registered users and 4 guests