EEC V file conversion

All hardware related, disassembly / programming and code discussions belong here.
BOOSTEDEVERYTHING
Posts: 235
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 »

Ok, No problem at all. I understand completely. Just wanting to get too fancy for my own skillset, LOL.
BOOSTEDEVERYTHING
Posts: 235
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 do have another question that I can not figure out. In RZASAMY.dir I have below...

Code: Select all

#SYM  12280 "RATCH_MIN"                 #W via SADx
#SYM 12280 "RATCH_MIN"                 #W via SADx
SYM  144C0 "RATIV"
#SYM 144C0 "RATIV"                     #UW Via SADx

SYM 188C2 "V_EGRDC_MAX"               #W via sadx

SYM 18D5C "VEC"
That puts RATCH_MIN

Code: Select all

9439b: a0,37,36           ldw   R36,R136         TMP2L = RATCH;
9439e: a0,23,38           ldw   R38,R122         TMP3L = TP;
943a1: a1,00,3c,3a        ldw   R3a,3c00         TMP4L = 3c00;
943a5: ef,04,e9           call  92cac            Sub_92cac ();
943a8: 89,80,22,42        cmpw  R42,2280         
943ac: db,06              jc    943b4            if (TMP8L < 2280)  {
943ae: a1,80,22,42        ldw   R42,2280         TMP8L = Func_12280;
943b2: 20,0a              sjmp  943be            goto 943be; }
Here as a function at line 943AE, I commented it out to see if it helped to figure it out... It did not. LOL
In OMAE2 I think I have found the match for it, but it puts it right inside the MAF Transfer Function

Code: Select all

94a74: a0,fb,36           ldw   R36,R1fa         TMP2L = RATCH;
94a77: a0,99,38           ldw   R38,R198         TMP3L = TP;
94a7a: a1,00,28,3a        ldw   R3a,2800         TMP4L = 2800;
94a7e: 10,08              rombk 8
94a80: ef,a8,de           call  8292b            Sub_8292b ();
94a83: 89,00,23,42        cmpw  R42,2300         
94a87: db,06              jc    94a8f            if (TMP8L < 2300)  {
94a89: a1,00,23,42        ldw   R42,2300         TMP8L = 2300;
94a8d: 20,0a              sjmp  94a99            goto 94a99; }
The rest of the subroutine also matches up pretty well. But the 12300 address puts it

Code: Select all

   uuwFn036_MAF_Transfer:
12290: ff,ff,ff,ff        func          5.12 ,      1741.75 
12294: 40,fb,f0,ff        func          5.03 ,      1741.35 
12298: 80,ed,c7,d8        func          4.75 ,      1474.91 
1229c: 80,e3,5e,bf        func          4.55 ,      1302.03 
122a0: 80,d9,4b,a8        func          4.35 ,      1145.03 
122a4: 80,cf,5c,93        func          4.15 ,      1002.6  
122a8: 80,c5,61,80        func          3.95 ,       873.47 
122ac: 80,bb,32,6f        func          3.75 ,       756.55 
122b0: 80,b1,a7,5f        func          3.55 ,       650.8  
122b4: 80,a7,9e,51        func          3.35 ,       555.31 
122b8: 80,9d,f8,44        func          3.15 ,       469.25 
122bc: 80,93,9a,39        func          2.95 ,       391.91 
122c0: 00,8c,dc,31        func          2.8  ,       339.23 
122c4: 80,84,c1,2a        func          2.65 ,       290.89 
122c8: 00,7d,55,24        func          2.5  ,       247.2  
122cc: 80,75,cf,1e        func          2.35 ,       209.62 
122d0: 00,6e,05,1a        func          2.2  ,       177.03 
122d4: 80,66,dc,15        func          2.05 ,       148.73 
122d8: 00,5f,3e,12        func          1.9  ,       124.12 
122dc: 80,57,19,0f        func          1.75 ,       102.72 
122e0: 00,50,5a,0c        func          1.6  ,        84.04 
122e4: 80,48,f7,09        func          1.45 ,        67.8  
122e8: 00,41,e2,07        func          1.3  ,        53.63 
122ec: 80,39,16,06        func          1.15 ,        41.41 
122f0: 00,32,88,04        func          1    ,        30.83 
122f4: c0,2b,6a,03        func          0.88 ,        23.23 
122f8: 80,25,73,02        func          0.75 ,        16.66 
122fc: 80,20,e7,01        func          0.65 ,        12.94 
12300: c0,1c,a1,01        func          0.57 ,        11.08 
12304: 00,00,00,00        func          0    ,         0    

   Func_12308:
12308: ff,ff,00,07        func  65535,         7    
1230c: 00,0e,00,07        func   3584,         7    
12310: 00,08,00,06        func   2048,         6    
So...am I doing something incorrectly or do I need to define it specifically to the addresses where it looks to be RATCH_MIN? Or is it not correct in RZASA as well? Thanks again
jsa
Posts: 274
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 »

You have via SADx as comments, what was the process that involved SADX?
BOOSTEDEVERYTHING
Posts: 235
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 »

That is the DIR file I got from you, so I am not positive about that to be honest. The duplicates were there already and were commented out. I only commented out the first RATCH_MIN entry to see if I could make it clear, but it did not help.
jsa
Posts: 274
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 »

BOOSTEDEVERYTHING wrote: 2024 Apr 09, 16:03 I do have another question that I can not figure out. In RZASAMY.dir I have below...

Code: Select all

#SYM  12280 "RATCH_MIN"                 #W via SADx
#SYM 12280 "RATCH_MIN"                 #W via SADx
SYM  144C0 "RATIV"
#SYM 144C0 "RATIV"                     #UW Via SADx
Ah yes, sorry, it is commented out because it's not giving desired results. Out of order too. Something I've been testing with. It needs to have a range applied before un-commenting.

That puts RATCH_MIN

Code: Select all

9439b: a0,37,36           ldw   R36,R136         TMP2L = RATCH;
9439e: a0,23,38           ldw   R38,R122         TMP3L = TP;
943a1: a1,00,3c,3a        ldw   R3a,3c00         TMP4L = 3c00;
943a5: ef,04,e9           call  92cac            Sub_92cac ();
943a8: 89,80,22,42        cmpw  R42,2280         
943ac: db,06              jc    943b4            if (TMP8L < 2280)  {
943ae: a1,80,22,42        ldw   R42,2280         TMP8L = Func_12280;
943b2: 20,0a              sjmp  943be            goto 943be; }
Opcodes a1 and 89 are immediate address modes, they could be addresses or inline scalars, in this case they are inline scalars. SAD is unable to distinguish where to apply SYM's when a scalar value coincides with an 2address. The catch 22 previously discussed. It is something on the fix wish list with @TVRfan
For the purpose of converting DIR to DEF, value 2280 at both addresses 943a9 & 943af need to be captured.

Try

Code: Select all

SYM   2280 943a8 943b1 "RATCH_MIN"                 #W via SADx
Put in the correct address order.
Depending on which version of SAD is used, SAD may complain about a bank number.

You can apply range/s to the function so that it does not name the scalar value 2280 at L943ae.
BOOSTEDEVERYTHING
Posts: 235
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, I get a bank error message with the above on sad v 4.012. Should all 4 of those entries be commented out, The first instance of both were not commented out and the second was. So wasn't exactly sure why there was a duplicate of each, just commented out.
jsa
Posts: 274
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 »

Originally 2280 was for V4.07.16B and 12280 was for 4.012.
The repeats can be deleted.

Put a bank prefix in, though it is technically incorrect it will name the scalars with V4.012.

Code: Select all

SYM  12280 943A8 943B1 "RATCH_MIN"     #W via SADx
BOOSTEDEVERYTHING
Posts: 235
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. That worked. So Ratch_min is an inline scalar, and it should point to a function, or it should not? Sorry if that’s a stupid question. And if it does point to a function, is there a way to define it as an inline scalar instead of a generic function? I am also having issues finding some of the names in the strategy docs of some of the syms, is there another document somewhere I am missing that is used for some of the other names used in these for files?
jsa
Posts: 274
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 »

By coincidence (or intentional obfuscation lol) scalar value happens to be 2280 at address 943a9 and function address happens to be bank 1 2280.

Both are valid with nothing to do with each other than the number 2280.

The example above gives me the scalar name and function name where expected. Post example code it you get something different.

I have put forward the idea, to tvrfan, of SYN as in single symbol.
To generate a definition from dir, the address is needed.
That might look like;
SYN 943A9 "1RATCH_MIN"
SYN 943AF "2RATCH_MIN"
SYM 12280 "Fn0x12280......"
FUN 12280 .......
For now use range for the scalar and function as needed.

What scalars and what files are you referring too?
tvrfan
Posts: 88
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 a bit busy with other stuff....and trying to fix args.

Yes, at the moment there is no way to name a VALUE (i.e. a scalar) separately from an ADDRESS (which may be a subroutine or a data structure, etc.) It's also very difficult from the code to tell which is which, and so SAD does handle some printout incorrectly and attaches a symbol name when it should not. A tricky problem to solve. Yes jsa and I have been discussing possible solutions, or workarounds. A symbol with a range kind of works....
Post Reply