Pages: 1 2 3 [4] 5 6 ... 11
Author Topic: ASM based map locator platform  (Read 131003 times)
prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #45 on: November 20, 2012, 06:17:45 AM »

There is currently already support for adding multiple patterns to a single XML.
All that has be done is make sure that you do not get false positives.

You can add many <pattern> tags into one XML.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
masterj
Hero Member
*****

Karma: +61/-5
Offline Offline

Posts: 1049



WWW
« Reply #46 on: November 20, 2012, 11:06:57 AM »

There is currently already support for adding multiple patterns to a single XML.
All that has be done is make sure that you do not get false positives.

You can add many <pattern> tags into one XML.

ok, now another question is this:
for example CDHSH and CDHSHE both patterns are almost exactly same except for byte which shows address of actual map. Can the locator skip address that was previously assigned to some map buy definition?

Also CDHSVE vs CDKAT problem!
« Last Edit: November 20, 2012, 11:25:53 AM by masterj » Logged

phila_dot
Hero Member
*****

Karma: +170/-11
Offline Offline

Posts: 1709


« Reply #47 on: November 20, 2012, 12:09:19 PM »

This may be a little too much, but if it could find potential target in pattern then read RAM address from hex to x-ref for reverse lookup or further validation. If that makes sense.

B_cdhsh gets referenced in xxx1 pattern, read RAM address from pattern, x-ref other references to B_cdhsh in xxx2 pattern for further validation possibly, x-ref to B_cdhsh set by CDHSH in xxx3 pattern.

Just thinking out loud.
Logged
prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #48 on: November 20, 2012, 12:36:11 PM »

If you come up with a way to write this into XML, sure.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #49 on: November 20, 2012, 12:37:23 PM »

ok, now another question is this:
for example CDHSH and CDHSHE both patterns are almost exactly same except for byte which shows address of actual map. Can the locator skip address that was previously assigned to some map buy definition?
It does not skip right now, but this can be added, as it makes sense.
The problem is which comes first.

So I think you have to find some way to differentiate them in the code.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
masterj
Hero Member
*****

Karma: +61/-5
Offline Offline

Posts: 1049



WWW
« Reply #50 on: November 20, 2012, 12:47:21 PM »

It does not skip right now, but this can be added, as it makes sense.
The problem is which comes first.

So I think you have to find some way to differentiate them in the code.

today i've worked on bunch of prokonal maps (sent pull request on github). I absolutely had to update CDSLS because it gave me false address for map (read notes of commit).
« Last Edit: November 20, 2012, 12:49:57 PM by masterj » Logged

prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #51 on: November 20, 2012, 12:47:39 PM »

Saw the pull request, thank you.

I am happy to improve the pattern matcher and the XML format - but I need some exact ideas of how it could look in the XML.
After that I can update the XML plugin to parse the new format XML Smiley
Logged

PM's will not be answered, so don't even try.
Log your car properly.
prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #52 on: November 20, 2012, 12:49:31 PM »

One thing you can do about false positives is put the patterns in the same file.
If the first pattern is not found only then will the second be evaluated.

If the first (more exact) pattern matches then the second will not be evaluated and there will be no false positive.
Logged

PM's will not be answered, so don't even try.
Log your car properly.
masterj
Hero Member
*****

Karma: +61/-5
Offline Offline

Posts: 1049



WWW
« Reply #53 on: November 20, 2012, 03:57:26 PM »

I have one idea:
What if locator could work on unlimited ammount of "jump-levels", so we didn't have to search only one specific place for pattern but multiple that are connected to each other, like:
le'ts say we need to map address @ 18000
and we find xref to this address @ 25000 in some kind of pattern like: hh hh hh XX hh hh MM hh hh XX hh, where MM is reference to 18000. But let's say we have two similar looking addresses with same pattern
25000: hh hh hh XX hh hh MM hh hh XX hh
26000: hh hh hh XX hh hh MM hh hh XX hh

Now there's no way to make definitions for 18000 map, because we don't have unique pattern in this situation. But if we let's say have:
25000: R1R1 hh hh hh XX hh hh MM hh hh XX hh
26000: R2R2 hh hh hh XX hh hh MM hh hh XX hh

where R1R1 and R2R2 are two different refs to these address, then we could make our pattern to something like these:
55000: hh xx hh xx xx hh MM xx hh hh | R1R1 hh hh hh XX hh hh MM hh hh XX hh
56000: hh hh xx xx hh hh xx hh MM xx hh hh | R2R2 hh hh hh XX hh hh MM hh hh XX hh

And that would mean:
we search 55000 by pattern: hh xx hh xx xx hh MM xx hh hh, where MM are the part with the ref to diff address. symbol "|" would mean secondary pattern that was referenced from first to address 25000 and here we search again R1R1 hh hh hh XX hh hh MM hh hh XX hh for MM which finally helps us define our map. Of course for this to work we might need not two but few different levels of refs. I think that would be possible in the current stage of locator, no?

PS> I think Philla suggested same thing?
Logged

prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #54 on: November 21, 2012, 06:36:07 AM »

You mean that the | symbol would mean that it first finds the first pattern and then searches for the second pattern right after the first?
Yes, this is possible, I can add this.

I am not sure I quite understand this whole ref stuff you are trying to get at though.
« Last Edit: November 21, 2012, 06:46:48 AM by prj » Logged

PM's will not be answered, so don't even try.
Log your car properly.
masterj
Hero Member
*****

Karma: +61/-5
Offline Offline

Posts: 1049



WWW
« Reply #55 on: November 21, 2012, 01:07:25 PM »

Could you accept my pull request? Im ready to pull more maps but can't until my previous pull request is accepted Wink

P.S> I meant multi pattern at different address locations that are connected to each other by CODE XREF or DATA XREF...
« Last Edit: November 21, 2012, 01:09:26 PM by masterj » Logged

prj
Hero Member
*****

Karma: +905/-420
Offline Offline

Posts: 5790


« Reply #56 on: November 21, 2012, 04:03:02 PM »

Could you accept my pull request? Im ready to pull more maps but can't until my previous pull request is accepted Wink
I can't accept your pull request because that would blow up CDSLS.
Can you modify CDSLS.xml so that you have both patterns in there? Perhaps your pattern as the first one?
You can see the problem here:
https://github.com/masterjguscius/me7-tools/commit/ac319f942b85c753c553686ddd2596e3d95e4581

Quote
P.S> I meant multi pattern at different address locations that are connected to each other by CODE XREF or DATA XREF...
I think this is a little too complex. Are you sure this is needed?
You can easily skip large chunks with XX{number}.

As for references - this is just a binary matcher. It does not understand *code* per se.
Do you want to be able to refer to a location that has been already found in the pattern matcher ?
Logged

PM's will not be answered, so don't even try.
Log your car properly.
masterj
Hero Member
*****

Karma: +61/-5
Offline Offline

Posts: 1049



WWW
« Reply #57 on: November 21, 2012, 04:46:51 PM »

I can't accept your pull request because that would blow up CDSLS.
Can you modify CDSLS.xml so that you have both patterns in there? Perhaps your pattern as the first one?
You can see the problem here:
https://github.com/masterjguscius/me7-tools/commit/ac319f942b85c753c553686ddd2596e3d95e4581
I think this is a little too complex. Are you sure this is needed?
You can easily skip large chunks with XX{number}.

As for references - this is just a binary matcher. It does not understand *code* per se.
Do you want to be able to refer to a location that has been already found in the pattern matcher ?

i have repared a new commit with fixed SLS, but I do not know how to edit pull request :/ can you just discard it and then i will make a new one with everything packed
Logged

phila_dot
Hero Member
*****

Karma: +170/-11
Offline Offline

Posts: 1709


« Reply #58 on: November 21, 2012, 05:13:12 PM »

I can't accept your pull request because that would blow up CDSLS.
Can you modify CDSLS.xml so that you have both patterns in there? Perhaps your pattern as the first one?
You can see the problem here:
https://github.com/masterjguscius/me7-tools/commit/ac319f942b85c753c553686ddd2596e3d95e4581
I think this is a little too complex. Are you sure this is needed?
You can easily skip large chunks with XX{number}.

As for references - this is just a binary matcher. It does not understand *code* per se.
Do you want to be able to refer to a location that has been already found in the pattern matcher ?

The only thing unique for the PROKON codewords is the word variable and the bit value, generally.

My suggestion was to use a pattern to locate the bit (B_cdxxx), then search for the codeword pattern and match RAM address/ bit value to confirm codeword. Or something along those lines. I haven't gotten the chance to play with your utility yet, so I don't really know if this is feasible.
Logged
nyet
Administrator
Hero Member
*****

Karma: +604/-166
Offline Offline

Posts: 12232


WWW
« Reply #59 on: November 21, 2012, 06:32:12 PM »

i have repared a new commit with fixed SLS, but I do not know how to edit pull request :/ can you just discard it and then i will make a new one with everything packed

you can cancel the pull request and issue another one

If possible, since nobody else is using your git tree, you might consider a rebase as well to hide whatever thrashing you did in the commit history.
Logged

ME7.1 tuning guide (READ FIRST)
ECUx Plot
ME7Sum checksum checker/corrrector for ME7.x

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your experience.
Pages: 1 2 3 [4] 5 6 ... 11
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.024 seconds with 17 queries. (Pretty URLs adds 0.001s, 0q)