EEC V file conversion

All hardware related, disassembly / programming and code discussions belong here.
BOOSTEDEVERYTHING
Posts: 413
Joined: 2023 Sep 06, 13:11
Location: Charlotte NC , USA
Vehicle Information: 1999 Ford Ranger with 2000 Explorer v8 swap, FLN0
2003 Ford F150 Harley Davidson, Built 5.4L SOHC with 3.4L Whipple and Built 4R100

Re: EEC V file conversion

Unread post by BOOSTEDEVERYTHING »

The hex addresses are not in order:
Thanks! I feel like an idiot, I didn't even see that. I corrected it in my CMT file. I appreciate you catching that.
looks like the subroutine could actually be called with 3 words and 1 byte.
That is kind of what I was thinking as well. I guess I will plug away at getting some of the other things defined and get some corrections made to the other things. I am trying to get everything to match up to the strategy document as best as I can. I have been making notes to the side when I rename something that was already defined differently. Also need to get to work on that database as well. DIR file is getting a bit cluttered up with data.
Thanks again for the help! I do appreciate it. Please point our if you see any mistakes if you are looking through what I have posted. I am not sure about some things, but have put question marks next to the ones I am very unsure of. I guess I could have it all way wrong as well....LOL!!! I have renamed several subroutines a couple times because I though they were something else at first. Same with some of my sym commands.
wwhite
Posts: 367
Joined: 2021 Feb 16, 15:53
Location: Victoria, BC, Canada
Vehicle Information: 1994 Flarside, XLT, 351w E4OD
SD48b, Quarter Horse, Burn2

Re: EEC V file conversion

Unread post by wwhite »

If I remember correctly, SAD806x windows gui program has some sort of database functionality. A couple years ago I was using it very thoroughly, and there were some 'tricks' to get it to work properly.

I'd suggest creating a new thread to do with the requirements for the database you are talking about. I can help design, that's one of my daily jobs so I can have car hobbies and be able to drink beer.
wwhite
Posts: 367
Joined: 2021 Feb 16, 15:53
Location: Victoria, BC, Canada
Vehicle Information: 1994 Flarside, XLT, 351w E4OD
SD48b, Quarter Horse, Burn2

Re: EEC V file conversion

Unread post by wwhite »

Here is the database from SAD806x windows gui:
SAD806x_db.sqlite.bin
This not a binary, this is an sqlite database file.
(356 KiB) Downloaded 61 times
jsa
Posts: 419
Joined: 2021 Feb 16, 15:46
Location: Australia
Vehicle Information: 95 Escort RS Cosworth
2.0 YBP
CARD / QUIK / COSY / ANTI
GHAJ0
SMD-190 / SMD-490 EEC-IV

Binary Editor
ForDiag

Re: EEC V file conversion

Unread post by jsa »

That database was born out of discussion aimed at getting the two SAD's to exchange data as well as BE and TP definitions.

From processing xdf data into the consolidated DIR's recently, it has become apparent that the TP xdf format is relatively loose regarding the content of some fields. So various authors are populating the fields differently. That makes it messy to convert to a common database.

XML is common to sadx, parts of BE and TP's xdf is xml like. SAD has no xml currently. Some of the engineering characters in xdf can make processing it with xml tools messy. Native XML seems to not have dec<<>>hex<<>>bin math processing tools.

I have minimal knowledge of sqlite other than it is a popular choice.

I've been checking out postgreSQL because it supports xml, is open source and has tools an end user can use to directly manipulate the data.

Excel is basic, has the processing tools needed, but not the relational capability to tie various data sources together.


Wwhite, what do you think of those options for tying the files from the SAD, SADx, BE and TP along with other data that helps the user through disassembly and definition build?
BOOSTEDEVERYTHING
Posts: 413
Joined: 2023 Sep 06, 13:11
Location: Charlotte NC , USA
Vehicle Information: 1999 Ford Ranger with 2000 Explorer v8 swap, FLN0
2003 Ford F150 Harley Davidson, Built 5.4L SOHC with 3.4L Whipple and Built 4R100

Re: EEC V file conversion

Unread post by BOOSTEDEVERYTHING »

Yes. Would be nice if we could use an open source software. I am very budget limited when it comes to buying more software. LOL What software would you recommend for opening and manipulating the database file?
My concern with adding and removing data from it would be that I would hope it could stay easily searchable in the available strategy documents and the actual naming of all of the data would stay consistent as well. Some things can get confusing because of all the different names people have labeled everything with. I am very very new at all of this. So maybe it is more of a my problem thing. But I do not mind helping with adding data to it. I was thinking resolution, min/max values, units-in and out, size of table or function as stated in the strategy document and a short description of exactly what it does. We may need to add several different values for each as we discover them in different strategies??? Not sure if that is of any concern for the database. I will follow anyone else's lead on that part. I have found that some functions and tables are different sizes and/or are signed or unsigned differently. I have been copying it right out of the strategy document so it can be copied and pasted in notepad and searched easily. Not sure if it is the best way to do it, but it is a start.
tvrfan
Posts: 119
Joined: 2023 Oct 22, 22:13
Location: New Zealand
Vehicle Information: Several Kit cars, Ford (Europe), EEC-IV, TVR Vixen, Tasmin (a.k.a Wedge),
Engine - Cologne 2.8 V6 (Europe) catch code 'AA'.

EEC_Disassembler https://github.com/tvrfan/EEC-IV-disassembler

Re: EEC V file conversion

Unread post by tvrfan »

Been away for a while trying to sort out version 5 of SAD. Still working on it.

Databases (etc.)

One of the things I looked at for SAD was SQLite. That's what SAD806x uses. It's not a standalone database as such, more of a library, but does come with lots of tools where you can examine structure and contents of its databases. Also tools to help with actually making the database itself. Each database is stored as a portable file. It's widely used. Firefox uses it for example. SQLite is available for a wide range of languages and operating systems, Windows, Linux, Mac, etc. And it's FREE. It's highly portable as a database is just a file which can be copied/shared etc. Look it up on web. So seems a good choice.

I think a difficult issue is how to actually combine/merge the data itself, as SAD is primarily focused on disassembly of code, but BE and TP are primarily focused on tuning and modification, and so on. So the final database design must allow for all the different requirements of the tools, but have to try to avoid 'bloat' or repetition. Then at more detailed levels, as you say, things like naming, strategies, even ordinary comments will also have to follow agreed rules, but still remain useful for everyone. Not easy, can be surprisingly tricky to do.

Common data formats and their relationships are often a PITA to sort out because of these different aims and targets. I don't want to put anyone off, it's a good target, it's just it may be harder to achieve than you realise.

NB. I did database design in my IT career as well as software. 'correct' design of linkages between tables, how tables hold their data, how they are accessed is not easy, especially if you need good access speed. I have split out all the 'database like' data parts in SAD V5 into a single module to make it easier to transition to SQlite or another method in future. SAD currently uses ordered lists and binary chop searching, all in memory.

Then there's actually getting people to share. I posted all my code on Github, but for someone who makes money off their product, I can see why they do not want to share...
jsa
Posts: 419
Joined: 2021 Feb 16, 15:46
Location: Australia
Vehicle Information: 95 Escort RS Cosworth
2.0 YBP
CARD / QUIK / COSY / ANTI
GHAJ0
SMD-190 / SMD-490 EEC-IV

Binary Editor
ForDiag

Re: EEC V file conversion

Unread post by jsa »

Boosted you can update your CRAI8 DIR with;

Code: Select all

RBA  CE 195EA                                                     # Loaded L8243B {0}
RBA  d2   280                                                     # {7}
RBA  d4   380                                                     # {7}
RBA  d6   480                                                     # {7}
RBA  d8   680                                                     # {7}
RBA  da   880                                                     # {7}
RBA  dc   980                                                     # {7}
RBA  de   a80                                                     # {7}
RBA  e0  1080                                                     # {7}
RBA  e2  1180                                                     # {7}
RBA  e4  1280                                                     # {7}
RBA  e6  1380                                                     # {7}
RBA  e8  1480                                                     # {7}
RBA  ea  1580                                                     # {7}
RBA  ec  1680                                                     # {7}

RBA  f0 12060                                                     # {7} 
RBA  f2 1242e                                                     # {7}
RBA  f4 12712                                                     # {7}
RBA  f6 139b8                                                     # {7}
RBA  f8 1448c                                                     # {7}
RBA  fa 15748                                                     # {7}
RBA  fc 15d32                                                     # {7}
RBA  fe 1723e                                                     # {7}

Code: Select all

STR 18908 18944 $Q1 :Y :WN                                        # L832BD ATOD Conversion Structure {0}
STR 18945 1895A $Q1 :Y :WN                                        # L832BD ATOD Conversion Structure {0}
STR 1895B 18961 $Q1 :Y :WN                                        # L832BD ATOD Conversion Structure {0}
STR 18962 18965 $Q1 :Y :WN                                        # L832BD ATOD Conversion Structure {0}

VEC 19162 1919B :K0                                               # L0B333 {0}

VEC 193B2 19575 :K8                                               # L824E5 {0}
WOR 19576 19577                                                   # {0}
VEC 19578 19583 :K8                                               # L087B9 {0}

VEC 197A4 197C1 :K0                                               # L0562B {0}

WOR 8F6FC 8F70B                                                   # {0}
I've converted all my SCA commands to Sub command and added some others;

Code: Select all

Sub 02000 "Sub02000_Fail_Loop"                                             # {0}
Sub 02C17 "Sub02C17"                                                       # {0}

Sub 12000 "Sub12000_Fail_Loop"                                             # {0}

Sub 82000 "Sub82000_Boot_Reset"                                            # {0}

Sub 825C2 "Sub825C2"                                                       # {0}

Sub 92000 "Sub92000_Fail_Loop"                                             # {0}

In you CMT, watch out for typo's such as using letter O instead of zero 0.

Code: Select all

OEDBD # 0x1F = SAIR_ER_DONE
OEDC8 # 0x1F = SAIR_ER_DONE
This is the jump comments file for CRAI8. It includes your CMT file from 20241116.
I see you have added sub commands to your DIR for CRAI8 code segments that are really segments of a subroutine. I've added sample comments for 5 of those to this CMT as an alternative to using Sub commands for segments. You will note the jump comment source sub references the overall sub name not your segment sub names for all jump comments. See the end of the CMT file for branch comments that require user review.
AOL1_256k_CMT.zip
(117.82 KiB) Downloaded 40 times
jsa
Posts: 419
Joined: 2021 Feb 16, 15:46
Location: Australia
Vehicle Information: 95 Escort RS Cosworth
2.0 YBP
CARD / QUIK / COSY / ANTI
GHAJ0
SMD-190 / SMD-490 EEC-IV

Binary Editor
ForDiag

Re: EEC V file conversion

Unread post by jsa »

These are revised branch comment files, they supersede previous CMT files posted in this thread.
Incorrect source Sub references have been removed from Vect branches.
Register and Indirect Push branches that require further user review are at the end of the CMT files.
Loops are identified in the branch comment.
Additional information for interrupt branch comments.
eqe3_ml2_8a1a_stock read burn1fnb_cmt.zip
(89.74 KiB) Downloaded 45 times
RZASAMY_CMT.zip
(134.71 KiB) Downloaded 46 times
Stock_EKO2_256k_CMT.zip
(119.84 KiB) Downloaded 42 times
BOOSTEDEVERYTHING
Posts: 413
Joined: 2023 Sep 06, 13:11
Location: Charlotte NC , USA
Vehicle Information: 1999 Ford Ranger with 2000 Explorer v8 swap, FLN0
2003 Ford F150 Harley Davidson, Built 5.4L SOHC with 3.4L Whipple and Built 4R100

Re: EEC V file conversion

Unread post by BOOSTEDEVERYTHING »

Thank you both. I will add all of that to my dir file and compare the cmt files and combine what I have with what you have posted.
The database is going to be a bit more involved than I was thinking, I guess. I will maybe just make a spreadsheet with all of the data for the functions and scalers, etc for crai8 so maybe we can make something out of it at a later date. I am not trying to make more work, just attempting to streamline the learning process for people in the future. I wish sad would work on newer binary files dumped from newer vehicles, is there a way to make that work in the future, or would I be limited to expensive software for attempting to make definition files for those? Thanks again for all the assistance with this. I will try and move all of my code segments sub commands and add them to my cmt file accordingly.
In you CMT, watch out for typo's such as using letter O instead of zero 0.
I have been struggling with this for some reason, LOL. I will try and get better.

I do have a question about identifying the bit used in some of the flag references....
see arrows below for a quick example. I am not sure about what this is actually referring to(or pointing to), any pointers would be appreciated. there are some other examples but I am having issues finding them right now...LOL. I will see if I can find them in a bit.

Code: Select all

04b20: a3,ff,cc,14,3c     ldw   R3c,[Rfe+14cc]   TMP5L = IDBLOCK_ADR;
04b25: 65,1d,00,3c        ad2w  R3c,1d           TMP5L += 1d;
04b29: b3,ff,ca,14,36     ldb   R36,[Rfe+14ca]   TMP2L = IDBLOCKH_ADR;
04b2e: a1,1d,15,3e        ldw   R3e,151d         TMP6L = PATS_ACC;
04b32: b0,11,3a           ldb   R3a,R11          TMP4L = ROM_BANK_CTL;
04b35: 51,f0,11,3b        an3b  R3b,R11,f0       TMP4H = ROM_BANK_CTL & f0;    <-----------
04b39: 90,3b,36           orb   R36,R3b          TMP2L |= TMP4H;                            <--------------
04b3c: c4,11,36           stb   R36,R11          ROM_BANK_CTL = TMP2L;
04b3f: b1,0e,36           ldb   R36,e            TMP2L = e;
04b42: b2,3d,38           ldb   R38,[R3c++]      TMP3L = [TMP5L];
04b45: c6,3f,38           stb   R38,[R3e++]      [TMP6L] = TMP3L;
04b48: e0,36,f7           djnz  R36,04b42        TMP2L--;
                                                 if (TMP2L != 0) goto 04b42;
04b4b: c4,11,3a           stb   R3a,R11          ROM_BANK_CTL = TMP4L;
BOOSTEDEVERYTHING
Posts: 413
Joined: 2023 Sep 06, 13:11
Location: Charlotte NC , USA
Vehicle Information: 1999 Ford Ranger with 2000 Explorer v8 swap, FLN0
2003 Ford F150 Harley Davidson, Built 5.4L SOHC with 3.4L Whipple and Built 4R100

Re: EEC V file conversion

Unread post by BOOSTEDEVERYTHING »

I added those entries to my DIR file and now get the following errors. I will attempt to sort them out, but if you know off the top of your head that would be even better....LOL

Code: Select all

## VEC 19162 1919B :K0                                               # L0B333 {0}
 Error - Bank Number Invalid 
## VEC 193B2 19575 :K8                                               # L824E5 {0}
 Error - Bank Number Invalid 
## WOR 19576 19577                                                   # {0}
 Error - Commands Overlap

## VEC 19578 19583 :K8                                               # L087B9 {0}
 Error - Bank Number Invalid 
## VEC 197A4 197C1 :K0                                               # L0562B {0}
Post Reply