Segment Swap utility

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

Re: Segment Swap utility

Post by joukoy »

0.6.4
Bugfixes.
Checksum address can be empty => CS is calculated but not compared or saved
User avatar
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

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.
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

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
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 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?
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

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
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

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?
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

The offset works as expected. I am still having trouble to make the v6 run.
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: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 )
kur4o
Posts: 948
Joined: Sun Apr 10, 2016 9:20 pm

Re: Segment Swap utility

Post by kur4o »

Here is an example.
testBINwithxml.rar
(204.59 KiB) Downloaded 234 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
joukoy
Posts: 392
Joined: Tue Dec 17, 2019 3:27 am
cars: Pontiac Firebird 1978

Re: Segment Swap utility

Post by joukoy »

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.
Post Reply