Search found 437 matches

by jsa
2024 Dec 03, 16:24
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Dec 03, 08:08 Another question, which may be a stupid question, so please excuse me if it is... What is this sub actually doing?

Code: Select all

   Sxx994BA_RZAxxxxx_:
It's writing 4 bytes out through the low speed serial out to a peripheral chip, waiting some time with shrw, then reading the 4 reply bytes from the low speed serial in. If two reply bytes don't match the sent bytes, loop until they do and save the other two bytes.

Once these are understood, you would have a better idea of what to name it.

Code: Select all

     # Call  from L9870B                                                           Sub_983ae
     # SCall from L9954D                                                           Sub_99504
     # SCall from L99581                                                           Sub_99504
     # SCall from L995B6                                                           Sub_99504
     # SCall from L995EB                                                           Sub_99504
     # SCall from L9964E                                                           Sub_99606
     # SCall from L996B9                                                           Sub99673
These are fixed in V5.08, >>=

Code: Select all

994ce: 08,05,00           shrw  R0,5             ZERO = 5;
994d1: 08,05,00           shrw  R0,5             ZERO = 5;

994da: 08,09,00           shrw  R0,9             ZERO = 9;
994dd: 08,09,00           shrw  R0,9             ZERO = 9;
994e0: 08,0d,00           shrw  R0,d             ZERO = d;
994e3: 08,0d,00           shrw  R0,d             ZERO = d;
by jsa
2024 Dec 03, 16:06
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

BOOSTEDEVERYTHING wrote: 2024 Dec 03, 07:59 When using v4.012 I get a ton of errors for duplicate commands. Is this due to one of the vector commands? Should I just comment these out for "resolved with vector commands" as the reason ????
Yes, comment out the SCA or get rid of them altogether, most likely redundant because of Sub commands.

BOOSTEDEVERYTHING wrote: 2024 Dec 03, 08:38 Here is a good example of when it calls for multiple flags...

Code: Select all

   Sxx970D3_RZAxxxxx_:
970ea: 71,e3,48           an2b  R48,e3           FGTMP0L &= e3;                   <--------------------------------- 

I assume it matches with this....
[code]
   IF (MGB_KILL_SW == 0)                           /* not inducing misfire */
   THEN
                                           mgb_kill_flg = 0;     
                                           mgb_sync_flg = 0;
                                           mgb_det_flg = 0;
                                           return;                 /* skip this process */
How would I tell which flag number (bit number?, maybe I am not using the correct term) it is referring to so I can define them in my DIR file?
Get your calculator out and set it to programming mode.
Set it to enter a hex number.
Enter E3.
Set it to show the Bin number.
You should see; 11100011
Lets assume all flags are set 11111111

Code: Select all

 11111111
&11100011
=11100011
E3 is called a mask, it masks the bits to be left unchanged and the bits to be cleared.
1 & 1 gives a 1 result.
1 & 0 gives a 0 result.
0 & 1 gives a 0 result.
0 & 0 gives a 0 result.
https://en.wikipedia.org/wiki/Bitwise_operation

So E3 will clear bits 2, 3 & 4, leaving bits 0, 1, 5, 6 & 7 as they were.
All you know now is that those three flags are bits 2, 3 or 4 in no particular order, though you could make assumptions about the order for further investigation.

Code: Select all

970d4: b3,01,d4,0d,48     ldb   R48,[R0+dd4]     FGTMP0L = MIS_FLG_FG1;
So investigating further, search LST for other uses of DD4;

Code: Select all

   Sub_96f13:
96f13: f2                 pushp                  push(PSW);
96f14: 9b,ff,04,01,00     cmpb  R0,[Rfe+104]     
96f19: d7,0f              jne   96f2a            if (S.0x17342 = 0)  {
96f1b: b3,01,d4,0d,48     ldb   R48,[R0+dd4]     R48 = [10dd4];  <-----
96f20: 71,f7,48           an2b  R48,f7           B3_R48 = 0;     <-----
96f23: c7,01,d4,0d,48     stb   R48,[R0+dd4]     [10dd4] = R48;  <-----
96f28: 20,05              sjmp  96f2f            goto 96f2f; }
Now find that code in the strategy document and you will be able to name Bit 3.
You could add to CMT;

Code: Select all

96F20 # [B3_DD4] \sDD4:3
Bits 2 & 4 seem a little more elusive.
by jsa
2024 Dec 03, 14:58
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

I find it best to put the default name at the bottom of the range set.

Code: Select all

sym 30  2234 2256  “Calc_result”
sym 30  2279 2303  "Fuel_charge"
sym 30  "default_name"   
by jsa
2024 Dec 02, 18:54
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

Yeah, same here for 16B, something that got fixed for 4.012.

If you wish to keep using 16B without the error change it to WOR or STR commands and drop the bank option if need be.

I look forward to the day where we have a V5 that supersedes both those.
by jsa
2024 Dec 02, 14:52
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

tvrfan wrote: 2024 Nov 27, 13:40
Databases (etc.)
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.

What tools do you suggest?



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.

I think the common link is the PID name or SYMbol name, though with aliases in some cases.
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.
Yeah, inconsistent source data is the first hurdle.
by jsa
2024 Dec 02, 14:33
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

F0 converted to bits is 1111 0000.
1111 1111 & 1111 0000 = 1111 0000
0000 0000 & 1111 0000 = 0000 0000
& is for clearing bits, in this case bits zero to three.

0000 0000 | 1111 0000 = 1111 0000
| is for setting bits, in this case bits four to seven.

SAD is for 8061 and 8065 processors, more modern processors are different, so they require a different disassebler. Ghidra is free. Winols is supposed to be payed for I think.

Yes the database is involved, hence no instant solution, it'll take time. A spreadsheet can be imported to a database easy enough.

Which SAD version gives those invalid bank errors?
The command over lap means you have another command within that address range.
by jsa
2024 Nov 27, 21:43
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

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 98 times
RZASAMY_CMT.zip
(134.71 KiB) Downloaded 116 times
Stock_EKO2_256k_CMT.zip
(119.84 KiB) Downloaded 96 times
by jsa
2024 Nov 27, 21:34
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

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 95 times
by jsa
2024 Nov 22, 19:22
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

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?
by jsa
2024 Nov 18, 15:30
Forum: Hardware, Programming & Disassembly
Topic: EEC V file conversion
Replies: 691
Views: 393459

Re: EEC V file conversion

Post the CMT file entries for your example and, edit and post your example as you expect it to look.