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 » Thu May 07, 2020 5:14 pm

joukoy wrote:
Extract with "replace" creates duplicates to extractedsegments.xml, will be fixed in next version.


Fixed in version 0.11.2
Added support for "Segment Swap address". If defined, address is used for segment extract & swap. Useful with segment search functionality. (eeprom segment)

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

Re: Segment Swap utility

Postby joukoy » Fri May 08, 2020 1:08 am

0.11.3

previously saving information [stock]/[modded]/[n/a] when extracting segments.
But if you later add CVN to stockcvn-list, information is not updated to extractedsegments.xml
Now saving CVN too, and if it's saved, comparing latest stockcvn list when listing segments.

I think there was some problems with extract/updating extractedsegments.xml, should be fixed now.

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

Re: Segment Swap utility

Postby kur4o » Thu May 21, 2020 6:10 pm

I finally figured a way how to find the v6s checksum in the bin.

First we need to find the store address of the OS. It is usually 3fffa, 7fffa[7fff8], ffffa.

Than a search can be done. For 256kb and some 512kb[7fff8] the search is 20 39 xx xx xx xx, for 512kb[7fffa] and 1mb 26 39 xx xx xx xx [xx= 4 byte OS address]
If a match is found next 20 39 or 26 39 hit will give you the checksum address. Usually in the next 16-32 bytes.


To give it an example for 512kb.
The OS is at 0007fffa

perform a search for 26 39 00 07 ff fa. If a match is found perform another search to confirm there is only one hit in the full bin.
If a single match is found than the next hit of 26 39 will give you the checksum address

it will look something like this

Code: Select all
52 41 64 04 32 3C FF FF 31 C1 A9 08 [26 39 00 07 FF FA] 24 03 E0 8A E0 8A 28 38 A9 00 98 82 24 3C 00 00 FF FF C6 82 98 83 [26 39 00 07 06 D6] 2E 03


We can use this function to generate the OS:checksum list in a separate tab. It can be a good foundation for the table search for ls1 bins I am thinking of.

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

Re: Segment Swap utility

Postby joukoy » Fri May 22, 2020 10:33 pm

kur4o wrote:I finally figured a way how to find the v6s checksum in the bin.

First we need to find the store address of the OS. It is usually 3fffa, 7fffa[7fff8], ffffa.

Than a search can be done. For 256kb and some 512kb[7fff8] the search is 20 39 xx xx xx xx, for 512kb[7fffa] and 1mb 26 39 xx xx xx xx [xx= 4 byte OS address]
If a match is found next 20 39 or 26 39 hit will give you the checksum address. Usually in the next 16-32 bytes.


To give it an example for 512kb.
The OS is at 0007fffa

perform a search for 26 39 00 07 ff fa. If a match is found perform another search to confirm there is only one hit in the full bin.
If a single match is found than the next hit of 26 39 will give you the checksum address

it will look something like this

Code: Select all
52 41 64 04 32 3C FF FF 31 C1 A9 08 [26 39 00 07 FF FA] 24 03 E0 8A E0 8A 28 38 A9 00 98 82 24 3C 00 00 FF FF C6 82 98 83 [26 39 00 07 06 D6] 2E 03


We can use this function to generate the OS:checksum list in a separate tab. It can be a good foundation for the table search for ls1 bins I am thinking of.


Implemented in 0.11.4 (Source not in github yet, some problems)
First it is searching checksum address using above method, if not found will try old file-method.
Currently you can see only from debug, what method is used.
OS:Checksum tab not added yet.

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

Re: Segment Swap utility

Postby joukoy » Sat May 23, 2020 12:40 am

0.11.5

Added "CS Address" tab for V6 binaries, hope it is ok.

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

Re: Segment Swap utility

Postby kur4o » Sat May 23, 2020 6:28 am

Just brilliant work. I run it through a bin library and not a single issue with checksum identification.

I found some very limited exception on some 96-97 files that are 512kb in size. These use 20 39 opcode and the program can`t find the checksum address on those. I am sure it will be an easy fix.

Here is some list with Os:checksum I managed to gather.
Attachments
GM-V6.csv
(18.5 KiB) Downloaded 17 times

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

Re: Segment Swap utility

Postby joukoy » Sun May 24, 2020 3:18 pm

kur4o wrote:Just brilliant work. I run it through a bin library and not a single issue with checksum identification.

I found some very limited exception on some 96-97 files that are 512kb in size. These use 20 39 opcode and the program can`t find the checksum address on those. I am sure it will be an easy fix.

Here is some list with Os:checksum I managed to gather.

Please send one file, which checksum it can't find.

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

Re: Segment Swap utility

Postby kur4o » Sun May 24, 2020 4:42 pm

Here is one of the examples. $22fb4 is the search for 20 39 00 07 FF FA
Attachments
1997 Buick 9365041.bin
(512 KiB) Downloaded 20 times

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

Re: Segment Swap utility

Postby joukoy » Sun May 24, 2020 7:17 pm

kur4o wrote:Here is one of the examples. $22fb4 is the search for 20 39 00 07 FF FA

Fixed in 0.11.6

Now it searches all combinations for 512kb files in order:
20 39 00 07 FF F8
20 39 00 07 FF FA
26 39 00 07 FF FA
26 39 00 07 FF F8

Not sure if last one is needed?

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

Re: Segment Swap utility

Postby kur4o » Mon May 25, 2020 7:48 am

I did a full test on the v6 and now is working flawless with anything I throw in. Great work.

For the search order we might use the most common to less common combo, to optimize the search engine,
it will be something something like this

26 39 00 07 FF FA
20 39 00 07 FF FA
20 39 00 07 FF F8
26 39 00 07 FF F8

Can we also add in the CS address tab 1 more field with the start address of the first search hit.
For example the address of 26 39 00 07 FF FA code. This will make chart of identical OS since the code will be at the same location and cross reference of similar OS can be obtained.

I have some other suggestion for improvement and some requests.

1. Rename in settings tab [segments] to [edit xml]
2. on unchecking "autodetect config" to pop up a dialog to xml folder for xml select
3. making visible a select xml button when "autodetect config" is unchecked.
4. adding save only button to the xml edit dialog, useful for editing multiple xmls. Now you have to close the dialog to save.

5. Adding another tab like [file info] that will list only the files with bad checksum. I need it for debugging.
6. Opening file location in windows explorer from [file info] tab or the [bad chk file] tab. Something like right click with a menu or something like that. I am not sure if this will be possible.
7. Not really needed but if it is an easy add. Adding search in the log tab.


I also pinpoint some of the problems with autoconfig settings dialog. It happens to throw an error when you are deleting multiple entries in specific order. Usually up-down order. Deleting in down-up order is almost working. I also noticed that deleting doesn`t need save. The entry is deleted immediately.

PreviousNext

Return to GM LS1 512Kbyte and 1Mbyte

Who is online

Users browsing this forum: No registered users and 4 guests