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 Jun 01, 2020 1:44 am

Better search configs for V6.
Basic search config for P01-P59
Attachments
SearchTables.zip
(928 Bytes) Downloaded 20 times

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

Re: Segment Swap utility

Postby kur4o » Mon Jun 01, 2020 5:38 am

I tried to configure the variables but still have no luck. The var address is identified good but that instead of a search objects it is used as a print object. You can take a look at the xml and run it through some random ls1 file.

The segment print is also not good. It needs to take the address of the table being searched and match it through the segment. For example if the table address is at 8FFe on ls1 bin it needs to be marked as Engine segment. I guess it is still work in progress. I am still trying to make my way through the syntax but so far looks pretty good. It will cover all 3d table and most of the 2d, no idea what will be needed for scalars.

I still think we might need to add some hardcoded search for ls1 and v6s, but it will be done when all is cleaned out for the config search part.


Edit:

The var prints the address Where it is instead of being searched for.

Can we add address:found data in the found field.

The ls1 xml I attached also works for v6 you can just rename it.
Attachments
SearchTables-P01-P59.zip
(562 Bytes) Downloaded 18 times

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

Re: Segment Swap utility

Postby kur4o » Mon Jun 01, 2020 8:11 am

I am trying to do this search but can`t make it to work

30 38 val1:2:HEX 32 38 val2:2:hex 1-40 74 row:1:int 20 7C addr:4:HEX 4E B9

val2:2:hex 1-40 74 That part is giving some problem

I suppose it works something like that

Find and print
30 38 val1:2:HEX 32 38 val2:2:hex

Than search for 74 in next 1-40

If found print

row:1:int

And address

20 7C addr:4:HEX 4E B9

When I run it it only finds a table that is exactly 40 bytes before 74, It doesn`t check for range from 1 to 40

I am not sure if it supposed to work like that.

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

Re: Segment Swap utility

Postby kur4o » Mon Jun 01, 2020 8:53 am

30 38 val1:2:HEX 1-19 32 38 val2:2:HEX 74 row:1:int 20 7C addr:4:HEX 4E B9

Some bug here. It prints twice val1.

This time search 1-19 works but it If you put 0-19 it misses cases where the gap is 0 bytes.

You can run it on ls1 bin.

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

Re: Segment Swap utility

Postby joukoy » Mon Jun 01, 2020 4:04 pm

You can define variables 2 ways:
- Inside of search-string => read variable address from found position
- in "items" => use found position as variable address

You can USE variable as "start" (starting point for seach)

When you define variable in search-string, you need only variable name + bytes (myvariable:4)
When you define varible in items, you need name:position:b/e (b=beginning, e=end of search string)


items can be defined 2 ways:
- Inside of search-string => read item data/address from found position: item:bytes:int/hex
- In "Items" => read item data/address from found position: item:position:bytes:int/hex (position is +/- from found address)


But yes, it is still work in progress and found some bugs. New version coming...

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

Re: Segment Swap utility

Postby joukoy » Mon Jun 01, 2020 11:51 pm

0.12.2
Bug fixes
Doubleclick => Explorer support to searched tables

Attached again examples for search config
Attachments
SearchTables.zip
(928 Bytes) Downloaded 16 times

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

Re: Segment Swap utility

Postby kur4o » Tue Jun 02, 2020 3:21 am

I did some extreme debug test and found some bugs related to search string.

If you put ** 1-15 than range works as expected

Instead of ** you put something like this RAM1:2:HEX 1-15

Than range works only as 15. It will find something if the range is exactly 15.

There are also different search results based on ** vs RAM1:2:HEX.

If you exchange the 2 you will get slightly different results.

Worst case is if you put 2 range and more than 1 items in the string. It works only with ** than item:2:hex

Again amazing work it will need some more polishing on the search engine and it will become awesome tool.

How hard will be to make variables for data searching instead of address start. It will reduce the search errors alot if you can add the 3d table address in the search field.

We need to specify the table address as a special field. Than a range check on the table address can be added. If the table address is at 8011 is good since the range will be 8000-20000 if the table address is at 30016 than it is definitely out of range and can be filtered.

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

Re: Segment Swap utility

Postby joukoy » Tue Jun 02, 2020 7:45 pm

0.12.3

Next try.
- If item starts with @, it is handled as address.
- Now you can add variable to searchstring, for example:
Code: Select all
74 rows:1:int 20 7C @addr:4:HEX 4E B9 $var1

- Removed searching by variable as starting point.
- bug fixes

- TableSearch -XML files have new format, not compatible with old version.

Edit:
- Filtered out search results which are outside of any segment address

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

Re: Segment Swap utility

Postby kur4o » Tue Jun 02, 2020 11:22 pm

I am still getting weird results
If I put

30 38 * * 0-36 32 38 * * 0-20 74 row:1:int 20 7C @addr:4:HEX 4E B9

and this

30 38 val1:2:HEX 0-36 32 38 val2:2:HEX 0-20 74 row:1:int 20 7C @addr:4:HEX 4E B9

I should get the same result from both searches.
However I get completely different results.

Even the previous version found more hits with the same lines.

I still think it is some small bug that handles the val:x:x in the search.

Can we add the filter range in the xml config with all the usual stuff fixed range, mixed range, end of file and so on.

We can add 2 filters, one will filter the search area, 0-fffff will search in all of that or 0-4000,20000-fffff or 0-2@ and so on

The other filter will be for the address being found for example 8000-20000 will print only tables within that area, if a table is found outside that area it will be filtered.

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

Re: Segment Swap utility

Postby joukoy » Wed Jun 03, 2020 2:29 am

kur4o wrote:I am still getting weird results
If I put

30 38 * * 0-36 32 38 * * 0-20 74 row:1:int 20 7C @addr:4:HEX 4E B9

and this

30 38 val1:2:HEX 0-36 32 38 val2:2:HEX 0-20 74 row:1:int 20 7C @addr:4:HEX 4E B9

I should get the same result from both searches.
However I get completely different results.

Even the previous version found more hits with the same lines.

I still think it is some small bug that handles the val:x:x in the search.

Can we add the filter range in the xml config with all the usual stuff fixed range, mixed range, end of file and so on.

We can add 2 filters, one will filter the search area, 0-fffff will search in all of that or 0-4000,20000-fffff or 0-2@ and so on

The other filter will be for the address being found for example 8000-20000 will print only tables within that area, if a table is found outside that area it will be filtered.

:wall:
Looks like current search method doesn't work AND is too slow (create all combinations of ranges and start search again)
=> I will rewrite this part.
Filters implemented, will be included in next version where search is fixed.

PreviousNext

Return to GM LS1 512Kbyte and 1Mbyte

Who is online

Users browsing this forum: No registered users and 3 guests