Not sure I understand this.The row scaler is even more unusual in that an input between 100 and 0 increases the column from 0 to 1.
Search found 260 matches
- 2024 Jun 03, 09:48
- Forum: Hardware, Programming & Disassembly
- Topic: EEC V file conversion
- Replies: 395
- Views: 76500
Re: EEC V file conversion
- 2024 Jun 03, 09:45
- Forum: Hardware, Programming & Disassembly
- Topic: EEC V file conversion
- Replies: 395
- Views: 76500
Re: EEC V file conversion
So would there be a way for me to correct how it is being treated? Or would that have to be fixed in the actual SAD programming?You see the problem...
The table is being treated as bytes.
It should be 2 bytes per word.
8 columns requires 16 bytes per row.
So 8 words per row (16bytes) x 8 rows, problem solved.
- 2024 May 31, 10:20
- Forum: Hardware, Programming & Disassembly
- Topic: EEC V file conversion
- Replies: 395
- Views: 76500
Re: EEC V file conversion
No I have not, but I would assume by the functions it calls it would be 8, but It is 16, So I am very confused about how it all works exactly. Looks like it Checks the table 3 times before outputting a value. But I am lost after adding all of the extra code it takes to actually perform a table lookup. Seems very overcomplicated but I am sure I am making it that way in my head..Have you spotted any code for the row count?
Here is the complete Table lookup....I think?
Code: Select all
ROUTINE FOR swTb34EPPH
09756: a1,1c,5d,36 ldw R36,5d1c TMP2L = uuyFn.0x15d1c;
uuyFn.0x15d1c:
15d1c: ff,70 func 255, 112
15d1e: 50,60 func 80, 96
15d20: 28,40 func 40, 64
15d22: 00,00 func 0, 0
15d24: 00,10 func 0, 16
15d26: 00,10 func 0, 16
15d28: 00,10 func 0, 16
15d2a: 00,10 func 0, 16
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 ();
SLU92AE8_UUYFn:
92ae8: f2 pushp push(PSW);
# SJump Loop from L92AF3 until Process Value >= value @ Fn_Addr+2 SLU92AE8_UUYFn
92ae9: 9b,36,02,38 cmpb R38,[R36+2]
92aed: db,06 jc 92af5 if (TMP3L < [Fn_Addr+2]) { # Unsigned Operation
92aef: 65,02,00,36 ad2w R36,2 Fn_Addr += 2; # Increment to Next Row
92af3: 27,f4 sjmp 92ae9 goto 92ae9; }
# JC from L92AED Process Value >= value @ Fn_Addr+2 and PV is Unsigned SLU92AE8_UUYFn
92af5: 71,df,a2 an2b Ra2,df SIGNDSLP = 0; # SIGNDSLP Clear 0
92af8: b2,37,3a ldb R3a,[R36++] TMP4L = [Fn_Addr]; # R3A = X>PV
92afb: b2,37,3c ldb R3c,[R36++] TMP5L = [Fn_Addr]; # R3C = Yx>pv
92afe: 7a,36,3a sb2b R3a,[R36] TMP4L -= [Fn_Addr]; # R3A Xd = X>PV - X<PV
92b01: 7a,37,38 sb2b R38,[R36++] TMP3L -= [Fn_Addr]; # R38 PVd = PV - X<PV
92b04: 7a,36,3c sb2b R3c,[R36] TMP5L -= [Fn_Addr]; # R3C Yxd = Yx>pv - Yx<pv
92b07: db,05 jc 92b0e if (TMP5L < 0) { # Unsigned Operation
# Unsigned CV Increases by Row
92b09: 91,20,a2 orb Ra2,20 SIGNDSLP = 1; # Yxd Negative
92b0c: 13,3c negb R3c TMP5L = -TMP5L; } # Invert Yxd Positive
# Cont from L92B0C CV Increased by Row, Negative Yxd Inverted Positive SLU92AE8_UUYFn
# JC from L92B07 Unsigned Control Value Decreases by Row, Yxd Positive SLU92AE8_UUYFn
92b0e: 7c,38,3c ml2b R3c,R38 TMP5L *= TMP3L; # R3C = Yxd * PVd
92b11: 9c,3a,3c divb R3c,R3a TMP5L /= TMP4L; # R3C CVd = Yxd * PVd / Xd
92b14: 35,a2,02 jnb B5,Ra2,92b19 if (SIGNDSLP = 1) {
92b17: 13,3c negb R3c TMP5L = -TMP5L; } # Revert Negative
# Cont from L92B17 CVd Control Value Delta Reverted to Negative SLU92AE8_UUYFn
# JNB from L92B14 CVd Control Value Delta Positive SIGNDSLP = 0 SLU92AE8_UUYFn
92b19: 76,36,3c ad2b R3c,[R36] TMP5L += [Fn_Addr]; # R3C CV = CVd + Yx<pv
92b1c: 11,3d clrb R3d TMP5H = 0; # CV High Byte Clear 0
92b1e: 71,df,a2 an2b Ra2,df SIGNDSLP = 0; # Clear 0 SIGNDSLP
92b21: 71,ef,a2 an2b Ra2,ef SIGNDY = 0; # Clear 0 SIGNDY
92b24: f3 popp PSW = pop();
92b25: f0 ret return;
09764: ac,3c,34 ldzbw R34,R3c TMP1L = TMP5L;
09767: a1,2c,5d,36 ldw R36,5d2c TMP2L = uuyFn.0x15d2c;
uuyFn.0x15d2c:
15d2c: ff,70 func 255, 112
15d2e: c8,70 func 200, 112
15d30: ac,60 func 172, 96
15d32: 64,00 func 100, 0
15d34: 00,10 func 0, 16
15d36: 00,10 func 0, 16
15d38: 00,10 func 0, 16
15d3a: 00,10 func 0, 16
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 ();
SLU92AE8_UUYFn:
92ae8: f2 pushp push(PSW);
# SJump Loop from L92AF3 until Process Value >= value @ Fn_Addr+2 SLU92AE8_UUYFn
92ae9: 9b,36,02,38 cmpb R38,[R36+2]
92aed: db,06 jc 92af5 if (TMP3L < [Fn_Addr+2]) { # Unsigned Operation
92aef: 65,02,00,36 ad2w R36,2 Fn_Addr += 2; # Increment to Next Row
92af3: 27,f4 sjmp 92ae9 goto 92ae9; }
# JC from L92AED Process Value >= value @ Fn_Addr+2 and PV is Unsigned SLU92AE8_UUYFn
92af5: 71,df,a2 an2b Ra2,df SIGNDSLP = 0; # SIGNDSLP Clear 0
92af8: b2,37,3a ldb R3a,[R36++] TMP4L = [Fn_Addr]; # R3A = X>PV
92afb: b2,37,3c ldb R3c,[R36++] TMP5L = [Fn_Addr]; # R3C = Yx>pv
92afe: 7a,36,3a sb2b R3a,[R36] TMP4L -= [Fn_Addr]; # R3A Xd = X>PV - X<PV
92b01: 7a,37,38 sb2b R38,[R36++] TMP3L -= [Fn_Addr]; # R38 PVd = PV - X<PV
92b04: 7a,36,3c sb2b R3c,[R36] TMP5L -= [Fn_Addr]; # R3C Yxd = Yx>pv - Yx<pv
92b07: db,05 jc 92b0e if (TMP5L < 0) { # Unsigned Operation
# Unsigned CV Increases by Row
92b09: 91,20,a2 orb Ra2,20 SIGNDSLP = 1; # Yxd Negative
92b0c: 13,3c negb R3c TMP5L = -TMP5L; } # Invert Yxd Positive
# Cont from L92B0C CV Increased by Row, Negative Yxd Inverted Positive SLU92AE8_UUYFn
# JC from L92B07 Unsigned Control Value Decreases by Row, Yxd Positive SLU92AE8_UUYFn
92b0e: 7c,38,3c ml2b R3c,R38 TMP5L *= TMP3L; # R3C = Yxd * PVd
92b11: 9c,3a,3c divb R3c,R3a TMP5L /= TMP4L; # R3C CVd = Yxd * PVd / Xd
92b14: 35,a2,02 jnb B5,Ra2,92b19 if (SIGNDSLP = 1) {
92b17: 13,3c negb R3c TMP5L = -TMP5L; } # Revert Negative
# Cont from L92B17 CVd Control Value Delta Reverted to Negative SLU92AE8_UUYFn
# JNB from L92B14 CVd Control Value Delta Positive SIGNDSLP = 0 SLU92AE8_UUYFn
92b19: 76,36,3c ad2b R3c,[R36] TMP5L += [Fn_Addr]; # R3C CV = CVd + Yx<pv
92b1c: 11,3d clrb R3d TMP5H = 0; # CV High Byte Clear 0
92b1e: 71,df,a2 an2b Ra2,df SIGNDSLP = 0; # Clear 0 SIGNDSLP
92b21: 71,ef,a2 an2b Ra2,ef SIGNDY = 0; # Clear 0 SIGNDY
92b24: f3 popp PSW = pop();
92b25: f0 ret return;
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;
swTb34EPPH:
15d3c: 00,fc,00,02,cd,00,9a,00 table 0, 252, 0, 2, 205, 0, 154, 0
15d44: 00,00,00,00,33,00,00,f6 table 0, 0, 0, 0, 51, 0, 0, 246
15d4c: 00,fc,00,00,00,00,00,00 table 0, 252, 0, 0, 0, 0, 0, 0
15d54: 00,00,00,00,33,00,00,f6 table 0, 0, 0, 0, 51, 0, 0, 246
15d5c: 00,fc,00,00,00,00,00,00 table 0, 252, 0, 0, 0, 0, 0, 0
15d64: 00,00,00,00,00,00,00,f6 table 0, 0, 0, 0, 0, 0, 0, 246
15d6c: 00,fc,00,00,00,00,00,00 table 0, 252, 0, 0, 0, 0, 0, 0
15d74: 00,00,00,00,00,fe,00,f6 table 0, 0, 0, 0, 0, 254, 0, 246
15d7c: 00,fc,00,00,00,00,00,00 table 0, 252, 0, 0, 0, 0, 0, 0
15d84: 00,00,00,00,00,fe,00,f6 table 0, 0, 0, 0, 0, 254, 0, 246
15d8c: 00,fc,00,00,00,00,00,00 table 0, 252, 0, 0, 0, 0, 0, 0
15d94: 00,00,00,00,00,f6,00,f6 table 0, 0, 0, 0, 0, 246, 0, 246
15d9c: 00,fc,00,00,00,00,00,00 table 0, 252, 0, 0, 0, 0, 0, 0
15da4: 00,00,00,00,00,f6,00,f6 table 0, 0, 0, 0, 0, 246, 0, 246
15dac: 00,fc,00,00,00,fe,00,f6 table 0, 252, 0, 0, 0, 254, 0, 246
15db4: 00,f6,00,f6,00,f6,00,f6 table 0, 246, 0, 246, 0, 246, 0, 246
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 (VS_U4_DELTA)
# Input: R36 PVR Row to look up. = TMP5L (VSBART_RT)
# 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
##################################################################################
# Word Table 4 Cell Interpolate. Signed and Unsigned Word Output.
#
##################################################################################
# SCall from L92E67 Pass 1; Lo Row, Lo & Hi Column values SLU92E4A_WUWTb SLU92E8E_wTb.Interpolate:
92e8e: ac,3a,3e ldzbw R3e,R3a TMP6L = TMP4L; # wR3E = yPVC Pass 1
92e91: 37,96,01 jnb B7,R96,92e95 if (TblSflg = 1) { # Jump FE if Interpolate Unsigned
92e94: fe,4c,36,3e,44 sml3w R44,R3e,R36 TMP9L = TMP6L * TMP2L; # lR44 = wPVC * wCV2 Pass 1
92e99: 37,96,01 jnb B7,R96,92e9d if (TblSflg = 1) { # Jump FE if Interpolate Unsigned
92e9c: fe,4c,34,3e,40 sml3w R40,R3e,R34 TMP7L = TMP6L * TMP1L; # lR40 = wPVC * wCV1 Pass 1
# JNB from L92E99 TblSflg = 0 SLU92E8E_wTb.Interpolate
92ea1: 68,40,44 sb2w R44,R40 TMP9L -= TMP7L; # wR44 = wR44 - wR40
92ea4: a8,42,46 sbbw R46,R42 TMP0L -= TMP8L - CY; # wR44^^ = wR44^^ - wR40^^ - cy
92ea7: c4,36,44 stb R44,R36 TMP2L = TMP9L; # yR36 = y(wR44 - wR40)
92eaa: 0c,08,44 shrdw R44,8 TMP9L >>= 8; # lR44 = (lR44 - lR40) / 256
92ead: 44,34,44,3e ad3w R3e,R44,R34 Tb.CV = TMP9L + TMP1L; # Tb.CV = w(l)R44 - CV1 Pass 1
92eb1: 37,96,03 jnb B7,R96,92eb7 if (TblSflg = 1) { # Is Interpolate Signed
92eb4: 3f,3f,05 jb B7,R3f,92ebc if (B7_TMP6H = 1) return; } # Is Tb.CV Negative
# Cont from L92EB4 Tb.CV Signed value positive SLU92E8E_wTb.Interpolate
# JNB from L92EB1 Tb.CV Unsigned value TblSflg = 0 SLU92E8E_wTb.Interpolate
92eb7: 37,36,02 jnb B7,R36,92ebc if (B7_TMP2L = 1) { # Is y(wR44 - wR40) < x80
92eba: 07,3e incw R3e Tb.CV++; } }
# JB from L92EB4 Tb.CV Signed value negativeB7_TMP6H = 1 SLU92E8E_wTb.Interpolate
# JNB from L92EB7 y(wR44 - wR40) < x80 B7_TMP2L = 0 SLU92E8E_wTb.Interpolate
92ebc: f0 ret return;
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
#
##################################################################################
# Word Table 4 Cell Interpolate. Signed and Unsigned Word Output.
#
##################################################################################
# SCall from L92E7C Pass 2; Hi Row, Lo & Hi Column values SLU92E4A_WUWTb
SLU92E8E_wTb.Interpolate:
92e8e: ac,3a,3e ldzbw R3e,R3a TMP6L = TMP4L;
# wR3E = yPVC Pass 2
92e91: 37,96,01 jnb B7,R96,92e95 if (TblSflg = 1) { # Jump FE if Interpolate Unsigned
92e94: fe,4c,36,3e,44 sml3w R44,R3e,R36 TMP9L = TMP6L * TMP2L;
# lR44 = wPVC * wCV4 Pass 2
# JNB from L92E91 TblSflg = 0 SLU92E8E_wTb.Interpolate
92e99: 37,96,01 jnb B7,R96,92e9d if (TblSflg = 1) { # Jump FE if Interpolate Unsigned
92e9c: fe,4c,34,3e,40 sml3w R40,R3e,R34 TMP7L = TMP6L * TMP1L;
# lR40 = wPVC * wCV3 Pass 2
# JNB from L92E99 TblSflg = 0 SLU92E8E_wTb.Interpolate
92ea1: 68,40,44 sb2w R44,R40 TMP9L -= TMP7L; # wR44 = wR44 - wR40
92ea4: a8,42,46 sbbw R46,R42 TMP0L -= TMP8L - CY; # wR44^^ = wR44^^ - wR40^^ - cy
92ea7: c4,36,44 stb R44,R36 TMP2L = TMP9L; # yR36 = y(wR44 - wR40)
92eaa: 0c,08,44 shrdw R44,8 TMP9L >>= 8; # lR44 = (lR44 - lR40) / 256
92ead: 44,34,44,3e ad3w R3e,R44,R34 Tb.CV = TMP9L + TMP1L;
# Tb.CV = w(l)R44 - CV3 Pass 2
92eb1: 37,96,03 jnb B7,R96,92eb7 if (TblSflg = 1) { # Is Interpolate Signed
92eb4: 3f,3f,05 jb B7,R3f,92ebc if (B7_TMP6H = 1) return; } # Is Tb.CV Negative
# Cont from L92EB4 Tb.CV Signed value positive SLU92E8E_wTb.Interpolate
# JNB from L92EB1 Tb.CV Unsigned value TblSflg = 0 SLU92E8E_wTb.Interpolate
92eb7: 37,36,02 jnb B7,R36,92ebc if (B7_TMP2L = 1) { # Is y(wR44 - wR40) < x80
92eba: 07,3e incw R3e Tb.CV++; } }
# JB from L92EB4 Tb.CV Signed value negativeB7_TMP6H = 1 SLU92E8E_wTb.Interpolate
# JNB from L92EB7 y(wR44 - wR40) < x80 B7_TMP2L = 0 SLU92E8E_wTb.Interpolate
92ebc: f0 ret return;
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
#
##################################################################################
# Word Table 4 Cell Interpolate. Signed and Unsigned Word Output.
#
##################################################################################
# SCall from L92E87 Pass 3; Interpolated Lo Row & Hi Row values SLU92E4A_WUWTb
SLU92E8E_wTb.Interpolate:
92e8e: ac,3a,3e ldzbw R3e,R3a TMP6L = TMP4L;
# wR3E = yPVR Pass 3
92e91: 37,96,01 jnb B7,R96,92e95 if (TblSflg = 1) { # Jump FE if Interpolate Unsigned
92e94: fe,4c,36,3e,44 sml3w R44,R3e,R36 TMP9L = TMP6L * TMP2L;
# lR44 = wPVR * wCV3|4 Pass 3
# JNB from L92E91 TblSflg = 0 SLU92E8E_wTb.Interpolate
92e99: 37,96,01 jnb B7,R96,92e9d if (TblSflg = 1) { # Jump FE if Interpolate Unsigned
92e9c: fe,4c,34,3e,40 sml3w R40,R3e,R34 TMP7L = TMP6L * TMP1L;
# lR40 = wPVR * wCV1|2 Pass 3
# JNB from L92E99 TblSflg = 0 SLU92E8E_wTb.Interpolate
92ea1: 68,40,44 sb2w R44,R40 TMP9L -= TMP7L; # wR44 = wR44 - wR40
92ea4: a8,42,46 sbbw R46,R42 TMP0L -= TMP8L - CY; # wR44^^ = wR44^^ - wR40^^ - cy
92ea7: c4,36,44 stb R44,R36 TMP2L = TMP9L; # yR36 = y(wR44 - wR40)
92eaa: 0c,08,44 shrdw R44,8 TMP9L >>= 8; # lR44 = (lR44 - lR40) / 256
92ead: 44,34,44,3e ad3w R3e,R44,R34 Tb.CV = TMP9L + TMP1L;
# Tb.CV = w(l)R44 - CV1|2 Pass 3
92eb1: 37,96,03 jnb B7,R96,92eb7 if (TblSflg = 1) { # Is Interpolate Signed
92eb4: 3f,3f,05 jb B7,R3f,92ebc if (B7_TMP6H = 1) return; } # Is Tb.CV Negative
# Cont from L92EB4 Tb.CV Signed value positive SLU92E8E_wTb.Interpolate
# JNB from L92EB1 Tb.CV Unsigned value TblSflg = 0 SLU92E8E_wTb.Interpolate
92eb7: 37,36,02 jnb B7,R36,92ebc if (B7_TMP2L = 1) { # Is y(wR44 - wR40) < x80
92eba: 07,3e incw R3e Tb.CV++; } }
# JB from L92EB4 Tb.CV Signed value negativeB7_TMP6H = 1 SLU92E8E_wTb.Interpolate
# JNB from L92EB7 y(wR44 - wR40) < x80 B7_TMP2L = 0 SLU92E8E_wTb.Interpolate
92ebc: f0 ret return;
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)
- 2024 May 31, 08:46
- Forum: PCM / ECU / EEC Tuning
- Topic: 1998 Ranger PWM/FEPS ecu tuning
- Replies: 20
- Views: 547
Re: 1998 Ranger PWM/FEPS ecu tuning
My dad’s old ranger pcm was not a flashable pcm. I’ll have to see if he still has it, but I believe he sold it with the engine and transmission.
Yes, the j3 port is on the back, but the pcm will require that you remove the case for access to the port to clean it properly. Not hard to do. But honestly, I wouldn’t bother with it until you try to flash it with a known good cable and software if that is how you plan to tune it.
Yes, the j3 port is on the back, but the pcm will require that you remove the case for access to the port to clean it properly. Not hard to do. But honestly, I wouldn’t bother with it until you try to flash it with a known good cable and software if that is how you plan to tune it.
- 2024 May 30, 14:10
- Forum: PCM / ECU / EEC Tuning
- Topic: 1998 Ranger PWM/FEPS ecu tuning
- Replies: 20
- Views: 547
Re: 1998 Ranger PWM/FEPS ecu tuning
And the J1850 PWM PCMs are programmable usually. There were just certain ranger PCMs that were not. You could find someone with a good cable and have them try to reflash the pcm. Or maybe the dealership. Like I said…you have to have the correct cable and software and attempt to program it, if it will not program then it will need to be replaced. The new one looks and operates the same, it is just programmable. It may have been as simple as a couple jumpers or resistors that were just not installed on the older PCMs to allow for tuning. Or it could have been the type of eprom used in the older PCMs.
- 2024 May 30, 12:23
- Forum: PCM / ECU / EEC Tuning
- Topic: 1998 Ranger PWM/FEPS ecu tuning
- Replies: 20
- Views: 547
Re: 1998 Ranger PWM/FEPS ecu tuning
Decipha has a bunch of quarterhorse's (?) in stock and is selling them at the price they used to be sold for. The pcm in some of the old rangers were not programmable in any way available to the public at all and required replacement. A normal mongoose able or similar would be able to program the pcm if it is a programmable pcm. If it is not, it will require a chip or quarterhorse be used or will need to be replaced with programmable pcm. I can not remember seeing any visual difference in them at all, and I do not remember part numbers or anything like that. All I can remember is that when we attempted an update they would not update and there was a service message of some sort to replace pcm with latest available part number pcm and reprogram it with the latest level software available. That was years ago so I am not even sure you'll be able to find the service message anywhere. A chip or quarterhorse and tunerpro would be the cheapest way to go in my opinion, but you know what they say about opinions. You can attempt to get a better cable and try to reprogram it but the best way to go on older vehicles that have the J3 port is to utilize the port with a quaterhorse and tune away, then flash the tune to a chip and install the chip and enjoy.
- 2024 May 30, 10:29
- Forum: PCM / ECU / EEC Tuning
- Topic: 1998 Ranger PWM/FEPS ecu tuning
- Replies: 20
- Views: 547
Re: 1998 Ranger PWM/FEPS ecu tuning
All older Ford PCMs use the FEPS programming voltage. There were several PCMs put in some of the older rangers that were not "obd" programmable and they were replaced with a different PCM if the dealer needed to update the programing for some reason. The ones that did not get replaced are still out there and can not be programmed through the DLC connector and need to have a chip or quarterhorse installed in them to change tuning parameters. I replaced several of the older PCMs in the rangers for software updates due to spark knock. The new PCM that was installed was able to be programmed through the DLC.
- 2024 May 30, 09:16
- Forum: Hardware, Programming & Disassembly
- Topic: EEC V file conversion
- Replies: 395
- Views: 76500
Re: EEC V file conversion
Wow!!!! I do not understand this as well as I thought I did. The table lookups are a bit confusing now that I am looking at the big picture of how the table actually functions. I think this is the code you are referring to?
After looking at all of this, I just want to make sure I am viewing it correctly?
The code uses all of this to actually get through the table to get the end value, correct? I copied over the applicable code to a new document and will try and make some notes on it and post it back up for you to review and let me know if I am interpreting it correctly, if that is ok? One question I do need clarification on, the code uses the functions to set row and column lookup values, correct?
Code: Select all
09777: ad,08,38 ldzbw R38,8 TMP3L = 8; = (Table Width) 8 COLUMNS
Code: 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)
- 2024 May 29, 08:12
- Forum: Hardware, Programming & Disassembly
- Topic: EEC V file conversion
- Replies: 395
- Views: 76500
Re: EEC V file conversion
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
I have also found some of the fan code in the OMAE2 code. Hopefully I can make all of that work on my truck when I get it back up and running again. Also may give me something to transfer over to the READ0 code to use on my dads truck. I am also going to start building an "adapter" harness for my dads truck to hook up a second pcm to try the fan code with. I may hook up some leds for a visual indication the the fan code is working as designed before I go to an actual fan. Thoughts?
- 2024 May 28, 19:28
- Forum: Hardware, Programming & Disassembly
- Topic: EEC V file conversion
- Replies: 395
- Views: 76500
Re: EEC V file conversion
I don’t have any code specifically for 19c99. Just a pattern I noticed in both lst files. I’ll do some more research on it and hopefully I can find something that calls for an actual address. Wasn’t sure if the areas in the lst files were just needing to be defined as something to show up somewhere.