Re: EEC V file conversion
Posted: 2024 May 16, 17:20
I apologize, I missed the correlation of the data sources to the line numbers. I thought you were just numbering the data sources in list format. I feel stupid now, LOL. ThanksRead the details in the header for {?}.
Great, thanks for verifying that for me. I will add that in as an Rbase value. I am surprised that SAD missed that one as it seems to be in the code very frequently.B302 is good.
Code: Select all
OMAE2 code line - ADDR pointer
L_99DBC - 1873E
L_99E0D - 18806
L_99E5E - 188CECode: Select all
0803b: b3,41,99,9c,40 ldb R40,[R40+9c99] TMP7L = [TMP7L+19c99];
0807d: b3,45,99,9c,44 ldb R44,[R44+9c99] TMP9L = [TMP9L+19c99];
080d3: b3,3d,99,9c,3c ldb R3c,[R3c+9c99] TMP5L = [TMP5L+19c99];
Code: Select all
0b8fd: b3,41,fe,a1,40 ldb R40,[R40+a1fe] R40 = [R40+1a1fe];
0b93f: b3,45,fe,a1,44 ldb R44,[R44+a1fe] R44 = [R44+1a1fe];
0b995: b3,3d,fe,a1,3c ldb R3c,[R3c+a1fe] R3c = [R3c+1a1fe];
The table address is loaded into R3C before a table lookup sub call.###### Word Table Lookup Subroutines: R3C Tb_Addr Reg, R34 Column Input Reg, R36 Row Input Reg
###### R38 Column Quantity Input Reg, R3E Output Reg
Code: Select all
09756: a1,1c,5d,36 ldw R36,5d1c TMP2L = uuyFn.0x15d1c;
0975a: b3,01,93,f3,38 ldb R38,[R0+f393] TMP3L = VS_U4_DELTA;
0975f: 10,09 rombk 9
09761: ef,84,93 call 92ae8 SLU92AE8_UUYFn ();
09764: ac,3c,34 ldzbw R34,R3c TMP1L = TMP5L;
09767: a1,2c,5d,36 ldw R36,5d2c TMP2L = uuyFn.0x15d2c;
0976b: b3,e4,fd,38 ldb R38,[Re4+fd] TMP3L = VSBART_RT;
0976f: 10,09 rombk 9
09771: ef,74,93 call 92ae8 SLU92AE8_UUYFn ();
09774: ac,3c,36 ldzbw R36,R3c TMP2L = TMP5L;
09777: ad,08,38 ldzbw R38,8 TMP3L = 8;
0977a: a1,3c,5d,3c ldw R3c,5d3c TMP5L = swTb34EPPH; <<<<<<<<<<<<<<<<<<<<<<<<
0977e: 10,09 rombk 9
09780: ef,b0,96 call 92e33 SLU92E33_Y16SWTb (); <<<<<<<<<<<<<<<<<<<<<<<<
09783: a0,3e,3c ldw R3c,R3e TMP5L = TMP6L;
Is there a way to define a table without knowing the exact size and purpose of the table? If so, could you please give me an example of how the best way of doing so would look? Thanks again for all of the help, this new DIR file has helped me find a good bit more in the OMAE2 code. Going to switch back to the READ0 code soon and see what else I can find there to get me further along to the path of building a good DEF file for my dads truck.Yes these are tables.
1873E
18806
188CE
Code: Select all
09777: ad,08,38 ldzbw R38,8 TMP3L = 8; = (Table Width) 8 COLUMNSCode: Select all
ROUTINE FOR swTb34EPPH
09756: a1,1c,5d,36 ldw R36,5d1c TMP2L = uuyFn.0x15d1c;
0975a: b3,01,93,f3,38 ldb R38,[R0+f393] TMP3L = VS_U4_DELTA;
0975f: 10,09 rombk 9
09761: ef,84,93 call 92ae8 SLU92AE8_UUYFn ();
09764: ac,3c,34 ldzbw R34,R3c TMP1L = TMP5L;
09767: a1,2c,5d,36 ldw R36,5d2c TMP2L = uuyFn.0x15d2c;
0976b: b3,e4,fd,38 ldb R38,[Re4+fd] TMP3L = VSBART_RT;
0976f: 10,09 rombk 9
09771: ef,74,93 call 92ae8 SLU92AE8_UUYFn ();
09774: ac,3c,36 ldzbw R36,R3c TMP2L = TMP5L;
09777: ad,08,38 ldzbw R38,8 TMP3L = 8; = (Table Width) 8 COLUMNS
0977a: a1,3c,5d,3c ldw R3c,5d3c TMP5L = swTb34EPPH;
0977e: 10,09 rombk 9
09780: ef,b0,96 call 92e33 SLU92E33_Y16SWTb ();
CONTINUED BELOW
#
#################################################################################
# Word Table Lookup with 4 Cell Interpolate. Signed and Unsigned Word Output.
#
# Byte size PVC column and PVR row values are multiplied by 16 on entry.
#
# PVC Process Value Column is Unsigned Byte or Word.
# PVR Process Value Row is Unsigned Byte or Word.
# Tb.CV Control Value is Signed when TblSflg is Set 1
#
# Input: R34 PVC Column to look up. = TMP1L
# Input: R36 PVR Row to look up. = TMP5L
# Input: R38 Cq Quantity of Columns in Table (Table Width) = 8 AS PER LINE 09777 ABOVE
# Input: R3C Tb_Addr Table Address = swTb34EPPH (0x15d3c)
# Output: R3E Tb.CV Control Value (Lookup result Output Value) = TMP6L
##################################################################################
###### Entry Point for PVC & PVR Byte Input / Tb.CV Signed Word Output
# Call from L09780 Sub_0954e
SLU92E33_Y16SWTb:
92e33: f2 pushp push(PSW);
92e34: 91,80,96 orb R96,80 TblSflg = 1; # Signed Table B7 Set 1
92e37: 00 skip goto 92e39;
92e39: 11,35 clrb R35 TMP1H = 0; # yPVC^
92e3b: 09,04,34 shlw R34,4 TMP1L <<= 4; # wPVC * 16
92e3e: 11,37 clrb R37 TMP2H = 0; # yPVR^
92e40: 09,04,36 shlw R36,4 TMP2L <<= 4; # wPVR * 16
92e43: 20,06 sjmp 92e4b goto 92e4b;
92e4b: 5c,37,38,3e ml3b R3e,R38,R37 TMP6L = TMP3L * TMP2H; # wR3E = Cq * PVR^
92e4f: b0,34,3a ldb R3a,R34 TMP4L = TMP1L; # yR3A = yPVC
92e52: b0,36,3b ldb R3b,R36 TMP4H = TMP2L; # yR3B = yPVR
92e55: ac,35,34 ldzbw R34,R35 TMP1L = TMP1H; # wR34 = yPVC^
92e58: 64,34,3e ad2w R3e,R34 TMP6L += TMP1L; # wR3E = (Cq * PVR^) + PVC^
92e5b: 09,01,3e shlw R3e,1 TMP6L <<= 1; # wR3E = ((Cq * PVR^) + PVC^) * 2
92e5e: 64,3e,3c ad2w R3c,R3e Tb_Addr += TMP6L; # Tb_Addr = Tb_Addr + ((Cq * PVR^) + PVC^) * 2
92e61: a2,3d,34 ldw R34,[R3c++] TMP1L = [Tb_Addr]; # CV1 (Word Size)
92e64: a2,3c,36 ldw R36,[R3c] TMP2L = [Tb_Addr]; # CV2 (Word Size)
92e67: 28,25 scall 92e8e SLU92E8E_wTb.Interpolate (); # Pass 1
92e69: 09,01,38 shlw R38,1 TMP3L <<= 1; # Cq = Cq * 2 (Word Width)
92e6c: 64,38,3c ad2w R3c,R38 Tb_Addr += TMP3L; # Tb_Addr = Tb_Addr + Cq
92e6f: a2,3c,36 ldw R36,[R3c] TMP2L = [Tb_Addr]; # CV4 (Word Size)
92e72: 05,3c decw R3c Tb_Addr--; # Tb_Addr = Tb_Addr - 1
92e74: 05,3c decw R3c Tb_Addr--; # Tb_Addr = Tb_Addr - 1
92e76: a2,3c,34 ldw R34,[R3c] TMP1L = [Tb_Addr]; # CV3 (Word Size)
92e79: a0,3e,38 ldw R38,R3e TMP3L = TMP6L; # R38 = wCV1|2
92e7c: 28,10 scall 92e8e SLU92E8E_wTb.Interpolate (); # Pass 2
92e7e: a0,3e,36 ldw R36,R3e TMP2L = TMP6L; # R36 = wCV3|4
92e81: a0,38,34 ldw R34,R38 TMP1L = TMP3L; # R34 = wCV1|2
92e84: b0,3b,3a ldb R3a,R3b TMP4L = TMP4H; # R3A = yPVR
92e87: 28,05 scall 92e8e SLU92E8E_wTb.Interpolate (); # Pass 3
92e89: 71,7f,96 an2b R96,7f TblSflg = 0; # Reset B7 Clear 0
92e8c: f3 popp PSW = pop();
92e8d: f0 ret return;
CONTINUED FROM ABOVE
09783: a0,3e,3c ldw R3c,R3e TMP5L = TMP6L; = (Lookup result Output Value)