EEC V file conversion

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

Freeze panes in spreadsheet. Google it.

1973D was my best judgement, as posted above.
SAD has auto discovered the next two words.

Code is the blunt force trauma of SAD commands. The user better be certain that it IS all code.

Any non code in between the small range code commands will be forced to code by the large range code command.

Better to use scan commands starting with 8fce8.
Sca 8fce8
If needed,
Sca 8fcfa
Etc.
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. I will give that a go and see what I come up with. Thank you. Most of the code commands were on the dir file provided by Decipha, but being made for an old version of SAD, I guess it is causing some errors to pop up. But I like that because I am learning the errors and how to fix them. With your help of course. And the old help file helps a lot too. I do appreciate the assistance with this. I will try and comment out big sections of the code commands in the dir file and try the sca command instead and see how that works.
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 »

Really old SAD did not have scan IIRC or error checking, so not surprising for an old DIR.
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 »

So.....When starting a disassembly, should I first go through the whole thing without a dir file and find all the areas that SAD did not disassemble and add the SCA command for all of those areas first until the whole file is disassembled correctly? There seems to be a bunch in OMAE2 that both SAD 4.012 and SAD 4.07.16b seem to miss with or without a dir file. So maybe I should start a new Dir file, instead of adding on to Decipha's file, and start with all of the areas SAD missed first, then start to add The SYM commands after the SCA commands and so on? Sorry if that is a bit long winded....
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 »

Yes first step is to get all the code disassembled.

Yes SAD can miss a lot of code.

Decipha's dir reflects what was required for the version of SAD used at the time. Change it or start afresh as you wish, both ways get to the same result.
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 »

What do I do with the sections that SAD just refuses to disassemble? For example, there are sections that when using the Scan command it still does nothing with. Do I then use a code command on that section? Or is there a good reason that SAD is skipping over some sections of the BIN? I’ll try and post an example tomorrow when I am back in the lst file.
decipha
Posts: 5050
Joined: 2021 Feb 15, 12:23
Location: Metairie, LA
Vehicle Information: Work Truck
'19 F-150 3.3L

Re: EEC V file conversion

Unread post by decipha »

you have to go through the code and determine yourself if its code or something else
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 »

Use code as a last resort.

There can be good reasons for scan deciding not to decode. Valid code may not be generated. Branches might jump to an operand.
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. I will drop down to the next line with my SCA command and see how that goes first.

Another question I have is determining Table and func sizes.....How exactly would I do that? LOL
I have a bunch of sections like this, and I am not sure how to determine where the start and end would be. I found a nice chart posted in the writeups section for how to add hex to a start address to find end address, but would there be an easier way to do this? And also how do I know which size to apply to the func or table?

Code: Select all

  Table_193fc:
193fc: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19402: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19408: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
1940e: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19414: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
1941a: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19420: ff,ff,00,00,00,00  table 255, 255,   0,   0,   0,   0
19426: 00,00,00,00,00,00  table   0,   0,   0,   0,   0,   0
1942c: 00,00,00,00,00,00  table   0,   0,   0,   0,   0,   0
19432: 00,00,00,00,00,00  table   0,   0,   0,   0,   0,   0
19438: 00,00,00,00,ff,ff  table   0,   0,   0,   0, 255, 255
1943e: fe,b4,00,02,fe,b4  table 254, 180,   0,   2, 254, 180
19444: 80,01,ee,9c,40,01  table 128,   1, 238, 156,  64,   1
1944a: 3b,8f,00,01,00,80  table  59, 143,   0,   1,   0, 128
19450: c0,00,1b,6f,80,00  table 192,   0,  27, 111, 128,   0
19456: c1,5a,00,00,00,00  table 193,  90,   0,   0,   0,   0
1945c: 66,66,28,50,20,20  table 102, 102,  40,  80,  32,  32
19462: 10,10,20,20,10,ff  table  16,  16,  32,  32,  16, 255
19468: f2,de,43,d9,c0,1b  table 242, 222,  67, 217, 192,  27
1946e: f9,80,3e,f8,9f,c6  table 249, 128,  62, 248, 159, 198
19474: ec,33,b5,33,4b,0a  table 236,  51, 181,  51,  75,  10
1947a: 0a,01,cd,00,00,ff  table  10,   1, 205,   0,   0, 255
19480: 00,64,64,00,01,ff  table   0, 100, 100,   0,   1, 255
19486: 40,01,00,03,01,ff  table  64,   1,   0,   3,   1, 255
1948c: 33,13,5f,5f,09,ff  table  51,  19,  95,  95,   9, 255
19492: 00,ff,01,ff,ec,0e  table   0, 255,   1, 255, 236,  14
19498: f4,01,e8,03,00,0a  table 244,   1, 232,   3,   0,  10
1949e: 00,1e,3d,0c,71,10  table   0,  30,  61,  12, 113,  16
194a4: f4,01,e8,03,3d,0c  table 244,   1, 232,   3,  61,  12
194aa: 00,0f,bf,02,01,ff  table   0,  15, 191,   2,   1, 255
194b0: 6d,5a,6d,57,64,45  table 109,  90, 109,  87, 100,  69
194b6: 52,41,46,00,46,00  table  82,  65,  70,   0,  70,   0
194bc: 46,00,46,ff,01,ff  table  70,   0,  70, 255,   1, 255
194c2: 00,80,ff,fb,ff,ff  table   0, 128, 255, 251, 255, 255
194c8: 00,14,00,14,00,14  table   0,  20,   0,  20,   0,  20
194ce: a2,a2,a2,ff,00,f5  table 162, 162, 162, 255,   0, 245
194d4: 80,0c,00,0f,00,64  table 128,  12,   0,  15,   0, 100
194da: c0,12,60,3b,96,00  table 192,  18,  96,  59, 150,   0
194e0: 00,14,00,14,a2,a2  table   0,  20,   0,  20, 162, 162
194e6: 7f,70,5a,60,3c,50  table 127, 112,  90,  96,  60,  80
194ec: 00,10,f6,00,80,00  table   0,  16, 246,   0, 128,   0
194f2: 80,00,80,00,ff,7f  table 128,   0, 128,   0, 255, 127
194f8: 00,07,00,19,00,07  table   0,   7,   0,  25,   0,   7
194fe: 88,ff,00,05,e0,fc  table 136, 255,   0,   5, 224, 252
19504: 00,03,c0,f9,00,02  table   0,   3, 192, 249,   0,   2
1950a: 00,e7,00,01,00,ce  table   0, 231,   0,   1,   0, 206
19510: 00,00,00,80,00,00  table   0,   0,   0, 128,   0,   0
Here is the table I found. Would be awesome if I had a tool where I could select the table or func and the size and enter the start address and it figured the end address for me, Is there a way to make something in a spreadsheet or something to do that?

Code: Select all

The following quick reference charts are to quickly find the end address of a function and table to input in your directive file.
Table End Address
Tbl	Y Rows	x   X Cols     Table Size               Decimal Size	Hex Size
Tbl	10	x	12	byte(*2)		(120-1)= 119	77
Tbl	10	x	10	byte(*2)		(100-1)= 99	63
Tbl	9	x	11	byte(*2)		(99-1)= 98	62
Tbl	8	x	12	byte(*2)		(96-1)= 95	5F
Tbl	8	x	10	byte(*2)		(80-1)= 79	4F
Tbl	6	x	12	byte(*2)		(72-1)= 71	47
Tbl	6	x	6	WORD(*4)	        (72-1)= 71	47
Tbl	6	x	6	byte(*2)		(36-1)= 35	23
Tbl	5	x	5	byte(*2)		(25-1)= 24	18


Function End Address
Func  Columns       Function Size       Decimal Size	Hex Size
Func	30		WORD(*4)	(120-1)= 119	77
Func	13		WORD(*4)	(52-1)= 51	33
Func	12		WORD(*4)	(48-1)= 39	2F
Func	12		byte(*2)	(24-1)= 23	17
Func	10		WORD(*4)	(40-1)= 39	27
Func	10		byte(*2)	(20-1)= 19	13
Func	8		WORD(*4)	(32-1)= 31	1F
Func	8		byte(*2)	(16-1)= 15	F
Func	7		WORD(*4)	(28-1)= 27	1B
Func	7		byte(*2)	(14-1)= 13	D
Func	6		WORD(*4)	(24-1)= 23	17
Func	6		byte(*2)	(12-1)= 11	B
Func	5		WORD(*4)	(20-1)= 19	13
Func	5		byte(*2)	(10-1)= 9	9
Func	4		WORD(*4)	(16-1)= 15	F
Func	4		byte(*2)	(8-1)= 7	7
***Add HEX size to Start address to find end address.
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 Mar 26, 10:06 Ok. No problem. I will drop down to the next line with my SCA command and see how that goes first.
Scan stops when it hits a return. So yes another scan command is needed to start it off again. Request, of tvrfan, the scan command works over a range if you think that would help. That way scan starts anew after the return.
Another question I have is determining Table and func sizes.....How exactly would I do that? LOL
Make sure all the lookup subs are being captured by SAD. If not add the lot to DIR. Quite likely to be similar to RZASA.

Start with the function sizes first.
I have a bunch of sections like this, and I am not sure how to determine where the start and end would be
.
Functions start with ff / ff,ff / 7f / 7f,ff input column top value and descend to 00 / 00,00 / 80 / 80,00. Can you identify which of those are un/signed? Pretty easy to eyeball the pattern with out knowing much else.
I found a nice chart posted in the writeups section for how to add hex to a start address to find end address, but would there be an easier way to do this?

Get lookups defined in dir. Make sure all code is disassembled. Then SAD will get more for you automatically.

Manually, use a Hex calculator.
And also how do I know which size to apply to the func or table?
The code will tell. More on that later.
Where you at with scan and code?
What about lookups?

Rough eyeball disassembly...

Code: Select all

Table_193fc:
193fc: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19402: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19408: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
1940e: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
19414: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9
1941a: 06,06,07,07,09,09  table   6,   6,   7,   7,   9,   9

Function

Code: Select all

19420: ff,ff,00,00,00,00  table 255, 255,   0,   0,   0,   0
19426: 00,00,00,00,00,00  table   0,   0,   0,   0,   0,   0
1942c: 00,00,00,00,00,00  table   0,   0,   0,   0,   0,   0
19432: 00,00,00,00,00,00  table   0,   0,   0,   0,   0,   0
19438: 00,00,00,00,
May/not be a function. Need the bin at hand to confirm.

Code: Select all

ff,ff  table   0,   0,   0,   0,
Could be a table or could be a structure or could be scalars or...

Code: Select all

255, 255
1943e: fe,b4,00,02,fe,b4  table 254, 180,   0,   2, 254, 180
19444: 80,01,ee,9c,40,01  table 128,   1, 238, 156,  64,   1
1944a: 3b,8f,00,01,00,80  table  59, 143,   0,   1,   0, 128
19450: c0,00,1b,6f,80,00  table 192,   0,  27, 111, 128,   0
19456: c1,5a,00,00,00,00  table 193,  90,   0,   0,   0,   0
1945c: 66,66,28,50,20,20  table 102, 102,  40,  80,  32,  32
19462: 10,10,20,20,10,ff  table  16,  16,  32,  32,  16, 255
19468: f2,de,43,d9,c0,1b  table 242, 222,  67, 217, 192,  27
1946e: f9,80,3e,f8,9f,c6  table 249, 128,  62, 248, 159, 198
19474: ec,33,b5,33,4b,0a  table 236,  51, 181,  51,  75,  10
1947a: 0a,01,cd,00,00,ff  table  10,   1, 205,   0,   0, 255
19480: 00,64,64,00,01,ff  table   0, 100, 100,   0,   1, 255
19486: 40,01,00,03,01,ff  table  64,   1,   0,   3,   1, 255
1948c: 33,13,5f,5f,09,ff  table  51,  19,  95,  95,   9, 255
19492: 00,ff,01,ff,ec,0e  table   0, 255,   1, 255, 236,  14
19498: f4,01,e8,03,00,0a  table 244,   1, 232,   3,   0,  10
1949e: 00,1e,3d,0c,71,10  table   0,  30,  61,  12, 113,  16
194a4: f4,01,e8,03,3d,0c  table 244,   1, 232,   3,  61,  12
194aa: 00,0f,bf,02,01,ff  table   0,  15, 191,   2,   1, 255
194b0: 6d,5a,6d,57,64,45  table 109,  90, 109,  87, 100,  69
194b6: 52,41,46,00,46,00  table  82,  65,  70,   0,  70,   0
194bc: 46,00,46,ff,01,ff  table  70,   0,  70, 255,   1, 255
194c2: 00,80,ff,fb,ff,ff  table   0, 128, 255, 251, 255, 255
194c8: 00,14,00,14,00,14  table   0,  20,   0,  20,   0,  20
194ce: a2,a2,a2,ff,00,f5  table 162, 162, 162, 255,   0, 245
194d4: 80,0c,00,0f,00,64  table 128,  12,   0,  15,   0, 100
194da: c0,12,60,3b,96,00  table 192,  18,  96,  59, 150,   0
194e0: 00,14,00,14,a2,a2  table   0,  20,   0,  20, 162, 162
194e6: 7f,70,5a,60,3c,50  table 127, 112,  90,  96,  60,  80
194ec: 00,10,f6,00,80,00  table   0,  16, 246,   0, 128,   0
194f2: 80,00,80,00,ff,7f  table 128,   0, 128,   0, 255, 127
194f8: 00,07,00,19,00,07  table   0,   7,   0,  25,   0,   7
194fe: 88,ff,00,05,e0,fc  table 136, 255,   0,   5, 224, 252
19504: 00,03,c0,f9,00,02  table   0,   3, 192, 249,   0,   2
1950a: 00,e7,00,01,00,ce  table   0, 231,   0,   1,   0, 206
19510: 00,00,00,80,00,00  table   0,   0,   0, 128,   0,   0
Here is the table I found. Would be awesome if I had a tool where I could select the table or func and the size and enter the start address and it figured the end address for me, Is there a way to make something in a spreadsheet or something to do that?
You could do something in excel. I'd get SAD to do a better job then use a hex calculator where needed.
Post Reply