# DIR File for OMAE2, For Use With SAD V4.012 
# 20240327 Start over
# 20240328 Tidy up SCA commands
#          Re-order DIR. Least edited to the end.
#          Bring in Fn SYM's from Decipha's DIR.
#          Breakout Tb from Fn SYM's.
#          Show examples of Fn command.
#          Show example of V5.08 Math. (Commented out for V4.012)
#          Show examples of Tb command.
#          Comment certain Tb & Fn
#          Fix SLU's


rbase d2 280        # cmd
rbase d4 380        # cmd
rbase d6 10580        # cmd
rbase d8 10880        # cmd
rbase da 10980        # cmd
rbase dc 10a80        # cmd
rbase de 11080        # cmd
rbase e0 11180        # cmd
rbase e2 11280        # cmd
rbase e4 11380        # cmd
rbase e6 11480        # cmd
rbase e8 11580        # cmd
rbase ea 11680        # cmd
rbase ec 11780        # cmd
rbase f0 12060        # cmd
rbase f2 123b8        # cmd
rbase f4 1259e        # cmd
rbase f6 13a50        # cmd
rbase f8 14516        # cmd
rbase fa 154ca        # cmd
rbase fc 15b48        # cmd
rbase fe 18348        # cmd
rbase 1e4 18040        # cmd
rbase 1e6 1b18e        # cmd
rbase 2fa 1f398 



# ------------- PAYLOADS ---------------


# -------------- SCALARS ---------------

sym 0e86d "OBDII_REG_RESET"

sym 82375 "CalInit"


# ------------- FUNCTIONS --------------

sym 1217a "Fn021"

sym 121c0 "fn021a"

sym 121e0 "fn041"

sym 12200 "Fn070D"

sym 12260 "Fn825A"

sym 12280 "Fn825B"


SYM 12290 "uuwFn036_MAF_Transfer"                  # Mass Air Flow meter transfer FUNtion. CDAN 24-6
FUN 12290 12307 :UW V12800 :UWV37.626  P5
#V5 FUN 12290 12307 [UW=flo(X/12800.0)] [UW=MAF]   # volts > kg/hr

sym 12364 "uuwFn072A_Perload>Row"                  # Row Scaler
FUN 12364 1237F :UW V32768 :UW V16

sym 1238c "Fn022BX"
sym 123a4 "Fn022G"

SYM 123E2 "suwFn123E2"
FUN 123E2 123FD :SW :UW

sym 1240e "Fn044"
sym 1242e "Fn070E"
sym 1244a "Fn077"
sym 1245e "Fn078"
sym 12720 "Fn12720"                  # MISSED BY SAD # SAME AS Fn126FA IN RZASA
sym 12740 "Fn12740"                  # MISSED BY SAD # SAME AS Fn1271A IN RZASA
sym 127c4 "Fn001"
sym 127dc "Fn001A"
sym 127f4 "Fn001B"
sym 12840 "Fn008B"
#sym 128ab "Fn1329A"                     # SAD disagress, investigate
#sym 128b9 "Fn1327a"                     # SAD disagress, investigate

SYM 129A0 "uuwFn129a0"
FUN 129A0 129BB :UW :UW

SYM 129BC "Fn129bc"
FUN 129BC 129D7 :UW :UW

SYM 12a64 "suwFn12a64" 
FUN 12a64 12a7B :SW :UW

sym 12c66 "Fn315"


sym 13204 "Fn123D"
sym 13258 "Fn059"
sym 132d8 "Fn022Y"
sym 13350 "Fn035"
sym 133fa "Fn367W"
sym 1343c "Fn320A"
sym 134cc "Fn348A"
sym 135f8 "Fn303"
sym 13650 "Fn311"
sym 138e0 "Fn300"
sym 138ec "Fn325"
sym 138fa "Fn070B"
sym 13912 "Fn072T/Perload"
sym 13996 "FnPWCOM_BK"
sym 139ae "FnPWCOM_HS"
sym 139c6 "FnPWCOM_LS"
sym 139fa "FnRGP"
sym 13ba8 "Fn_HTR_XFER"
sym 13bd2 "FnCYLON"
sym 13bea "Fn441A_A"
sym 13bfe "Fn441B"
sym 13c12 "Fn441D"
sym 13c20 "Fn441T"
sym 13c3c "Fn442_A"
sym 13c64 "Fn443"
sym 13c8c "Fn443L"
sym 13ca8 "Fn445L"
sym 13cc4 "Fn448"
sym 13ce0 "Fn448A"
sym 13d08 "Fn449"
sym 13d30 "Fn449A"
sym 13d58 "Fn450"
sym 13d80 "Fn450L"
sym 13d9c "FnEXOMF"
sym 13f57 "FnBP_IAC_CRK"
sym 13f63 "Fn884"
SYM 13FB8 "Fn13FB8"
sym 13ffc "Fn035A"


sym 14076 "Fn018G"
sym 1408a "Fn020D"
sym 14098 "Fn802a"
sym 140a4 "Fn805"
sym 140bc "Fn875HD"
sym 140e4 "Fn875HN"

sym 1426E "uuwFn1426E"    # SAME AS Fn13F6C IN RZASA
FUN 1426E 1428D :UW :UW

sym 1429e "Fn830"
sym 142b6 "Fn879"
sym 142d2 "Fn882A"
sym 142ee "Fn891"
sym 142fa "Fn894"
sym 14382 "Fn826A"
sym 14638 "Fn776"
sym 14cf7 "Fn721"
sym 14d03 "Fn729"
sym 14d12 "Fn760"
sym 14e3a "Fn741"
sym 14ec2 "Fn012"
sym 14eda "Fn013"
SYM 14F1A "Fn016"
sym 14f44 "Fn024F"
sym 14f50 "Fn028"
sym 14f68 "Fn029"
sym 14fde "Fn704A"
sym 14ffe "Fn732"


sym 1508d "Fn767"
sym 150a0 "Fn797"
sym 1533f "Fn724A"
sym 1534D "Fn725A"
sym 15492 "Fn034A"

sym 154ae "uuwFn070C_RPM>Clm"            # Column Scaler
FUN 154AE 154C9 :UW V4 :UW V256

SYM 15AA6 "Fn15AA6"
FUN 15AA6 15ABD :UW :UW

sym 15adc "Fn821"
sym 15e6e "FnUP1DLY"
sym 15e7a "FnUP2DLY"


sym 164f6 "Fn12S"
sym 1654e "Fn23S"
sym 165a6 "Fn34S"
sym 165ce "Fn21S"
sym 165f6 "Fn32S"
sym 1661e "Fn43S"
sym 168d9 "uuyFn1ls"

sym 168ed "uuyFn2ls"                     # Investigate, SAD has not found
FUN 168ED 16900 :UY :UY                  # FUN Command added to resolve

sym 16901 "uuyFn3ls"                     # Investigate, SAD has not found
FUN 16901 16914 :UY :UY                  # FUN Command added to resolve

sym 16915 "uuyFn4ls"                     # Investigate, SAD has not found
FUN 16915 16928 :UY :UY                  # FUN Command added to resolve

sym 16a19 "uuyFn1us"

sym 16a2d "uuyFn2us"                     # Investigate, SAD has not found
FUN 16A2D 16A40 :UY :UY                  # FUN Command added to resolve

sym 16a41 "uuyFn3us"                     # Investigate, SAD has not found
FUN 16A41 16A54 :UY :UY                  # FUN Command added to resolve

sym 16a55 "uuyFn4us"                     # Investigate, SAD has not found
FUN 16A55 16A68 :UY :UY                  # FUN Command added to resolve


SYM 17AE2 "FnTQDNWD"
SYM 17AFA "FnTQUPWD"
SYM 17B12 "FnTQIAN"
SYM 17B42 "FnTQTPN"


sym 18134 "FnFL_NRM_X"
sym 18150 "FnFL_NRM_Y"
sym 1816c "FnFLO_NRM_X"
sym 1818c "FnFLO_NRM_Y"
sym 18252 "Fn027B"

SYM 19166 "Fn19166"
SYM 19186 "Fn19186"
SYM 19218 "Fn19218"
SYM 19240 "Fn19240"
SYM 1925c "Fn1925c"

sym 192fe "Fniect_cht"
FUN 192FE 19311 :SW :UW

SYM 19420 "uuwFn19420"
FUN 19420 1943B :UW V1 :UW V1



# ------------- TABLES --------------
sym 12472 "Tb1036B"
sym 124d6 "Tb1037"

sym 1253a "wuTb1039_ISC_Flow_Rate"   # Investigate table size, SAD gets 2 rows
TAB 1253A 1259C :O11 UY V64 P1       # Air flow rate through ISCV at ESTP, lbm/min. CDAN 21-64
                                     # TAB Command added to resolve

sym 12860 "Tb1338"
sym 12879 "Tb1348"
sym 12892 "Tb1347"
sym 12c16 "Tb1353E"

sym 1305e "Tb1325A"
sym 132ea "Tb1023?"
sym 13814 "Tb1362X_LOST"
sym 13946 "Tb1360"
sym 13dc4 "TbFL_EXT"
sym 13e1c "TbFLO"

sym 144b0 "TbCLDCUTMUL"
sym 144ec "TbCYL_OFF_A"
sym 14c3a "Tb2100"
sym 14d26 "Tb2200"
sym 14d89 "Tb2220"
sym 14da7 "Tb2225"
sym 14dc5 "Tb2230"
sym 14de3 "Tb2250"
sym 14e16 "Tb2600"
sym 14e56 "Tb2000A_PM/Tb2000D"
sym 14e80 "Tb2001A"
sym 14e9e "Tb2002"

sym 15006 "Tb1142"
sym 1502a "Tb2300A"
sym 15146 "Tb2400"

sym 175aa "Tb21DYTX_VS"
sym 17672 "Tb32DYTX_VS"
sym 176d6 "Tb23DYTX_VS"
sym 1773a "Tb43DYTX_VS"
SYM 17C92 "TbPCTD1"
SYM 17CB6 "TbPCTD2"
SYM 17CDA "TbPCTD3"
SYM 17CFE "TbPCTU2"
SYM 17D22 "TbPCTU3"

SYM 17D46 "_uTbPCTU4_Tq_Mdltn_3-4"  # SAD has overun, Investigate
TAB 17D46 17D69 :O6 UY V128         # TAB Command added to resolve

sym 192da "TbIECT_NL"




# -------- DISASSEMBLY COMMANDS --------
# -------------- BANK 0 ----------------

SYM 02000 "Bank_0_Start"

# -------------- BANK 1 ----------------
SYM 12000 "Bank_1_Start"

# -------------- BANK 8 ----------------

SYM 82000 "Bank_8_Start"
WOR 8F8D6 8F8E5

# -------------- BANK 9 ----------------

SYM 92000 "Bank_9_Start"


# --------------------------------------







# ------------ Subroutine list----------

##### Function Lookup Subroutines: R36 Fn_Addr Reg, R38 Input Reg, R3C output Reg
sub  826ad  "SLU826AD_SUYFn"   $ F suyflu 36
sub  826eb  "SLU826EB_SSYFn"   $ F ssyflu 36 
sub  82729  "SLU82729_USYFn"   $ F usyflu 36 
SUB  82767  "SLU82767_UUYFn"   $ F uuyflu 36
#
SUB  827A5  "SLU827A5_SUWFn"   $ F suwflu 36
SUB  827E1  "SLU827E1_SSWFn"   $ F sswflu 36
SUB  8281D  "SLU8281D_USWFn"   $ F uswflu 36
SUB  82859  "SLU82859_UUWFn"   $ F uuwflu 36
#
sub  82895  "SLU82895_**YFn"    $ F uuyflu 36  
#
sub  828e1  "SLU828E1_**WFn"    $ F uuwflu 36 

###### Byte Table Lookup Subroutines: R3C Tb_Addr Reg, R34 Column Input Reg, R36 Row Input Reg
######    R38 Column Quantity Input Reg, R3C Unrounded Output Reg, R3E Rounded Output Reg
SUB  82A0B  "SLU82A0B_Y16SYTb"   $F sytlu 3C 38       # Byte Inputs *16, Signed Word Out 
SUB  82A10  "SLU82A10_Y16UYTb"   $F uytlu 3C 38       # Byte Inputs *16, Unsigned Word Out
SUB  82A1D  "SLU82A1D_WSYTb"     $F sytlu 3C 38       # Word Inputs, Signed Word Out
SUB  82A22  "SLU82A22_WUYTb"     $F uytlu 3C 38       # Word Inputs, Unsigned Word Out 
#
SUB  82A70  "SLU82A70_yTb.Interpolate"                # TabCore: Interpolate 4 byte cells to find Control Value Pass 1 & 2
SUB  82a74  "SLU82a74_yTb.Interpolate"                # TabCore: Interpolate 4 byte cells to find Control Value Pass 3


###### Word Table Lookup Subroutines: R3C Tb_Addr Reg, R34 Column Input Reg, R36 Row Input Reg
######    R38 Column Quantity Input Reg, R3E Output Reg
sub  82ab0  "SLU82ab0_Y16SWTb"     $ F uwtlu 3c 38    # Byte Inputs *16, Signed Word Out
sub  82ab5  "SLU82ab5_Y16UWTb"     $ F uwtlu 3c 38    # Byte Inputs *16, Unsigned Word Out
sub  82ac2  "SLU82ac2_WSWTb"       $ F uwtlu 3c 38    # Word Inputs, Signed Word Out
sub  82ac8  "SLU82ac8_WUWTb"       $ F uwtlu 3c 38    # Word Inputs, Unsigned Word Out

SUB  82B0B  "SLU82B0B_wTb.Interpolate"                # TabCore: Interpolate 4 word cells to find Control Value

SUB  82B3A  "Sbg82B3A_Tmr_Upd"
SUB  82c6f  "Sbg82C6F_Tmr_Upd"
# --------------------------------------



# ------------- MATH COMMANDS -----------
#calc "MAF" = flo(X/37.62556)              # kg/Hr
#calc "MAF" = flo(X/1024)                  # lb/min

# --------------------------------------


# ------------- SCAN COMMANDS -----------
# -------------- BANK 0 ----------------
SCA 021ce
SCA 021e8
SCA 02202
SCA 0221c
SCA 039b8
SCA 07608
SCA 09915
SCA 0991f
SCA 09929
SCA 09933
SCA 0999f
SCA 09a09
SCA 09a11
SCA 09a36
SCA 09a59
SCA 09d62
SCA 09d69
SCA 09d74
SCA 09d78
SCA 09d7c
SCA 09d80
SCA 09d84
SCA 0ab26
SCA 0acdc
SCA 0ad1e
SCA 0ad40
SCA 0ad62
SCA 0ad84
SCA 0ade4
SCA 0ae6c
SCA 0aec1
SCA 0aecf
SCA 0af61
SCA 0affa
SCA 0b0f5
SCA 0b1ad
SCA 0b218
SCA 0b2a6
SCA 0b2f7
SCA 0b352
SCA 0b3a1
SCA 0b3cd
SCA 0b3f8
SCA 0b400
SCA 0b861
SCA 0ba2c
SCA 0ba5c
SCA 0bb8f
SCA 0bbbf
SCA 0bc93
SCA 0bcbd
SCA 0bcf2
SCA 0bd0c
SCA 0bd4e
SCA 0bd74
SCA 0bdce
SCA 0be12
SCA 0be2f
SCA 0c364
SCA 0c44e
SCA 0f9a4
SCA 0fcf2
SCA 0fd2a

# -------------- BANK 1 ----------------
SCA 1DB53

# -------------- BANK 8 ----------------
SCA 824bc
SCA 82585
SCA 82594
SCA 825b2
SCA 825c1
SCA 825d9
SCA 825e0
SCA 825eb
SCA 825f2
SCA 826a4
SCA 82988
SCA 82992
SCA 82de9
SCA 83211
SCA 8381e
SCA 85923
SCA 85982
SCA 85f2d
SCA 8622d
SCA 8623b
SCA 86244
SCA 86340
SCA 8a6fd
SCA 8a714
SCA 8a7b9
SCA 8aa2c
SCA 8aaa8
SCA 8b9a7
SCA 8b9f2
SCA 8f6ca
SCA 8fb26
SCA 8fb32
SCA 8fb56
SCA 8fb62
SCA 8fba4
SCA 8fbec
SCA 8fbf2
SCA 8fc22
SCA 8fc28
SCA 8fc34
SCA 8fc52
SCA 8fc58
SCA 8fc82
SCA 8fc88
SCA 8fc8e
SCA 8fca0
SCA 8fca6
SCA 8fcb2
SCA 8fcc4
SCA 8fcca
SCA 8fcd0
SCA 8fcd6
SCA 8fcdc
SCA 8fce2
SCA 8fce8
SCA 8fcee
SCA 8fcfa
SCA 8fd00
SCA 8fd06
SCA 8fd0c
SCA 8fd12
SCA 8fd18
SCA 8fd1e
SCA 8fd24
SCA 8FD2A
SCA 8fd30
SCA 8FD36
SCA 8fd3c
SCA 8fd42
SCA 8fd48
SCA 8fd4e
SCA 8fd66
SCA 8fd6c
SCA 8fd90
SCA 8fe1a
SCA 8fe20
SCA 8fe44
SCA 8fe4a
SCA 8fe50
SCA 8fe56
SCA 8feda
SCA 8fee6
SCA 8fef8
SCA 8fefe
SCA 8ff04
SCA 8ff0a
SCA 8ff10
SCA 8ff16
SCA 8ff1c
SCA 8ff22
SCA 8ff28
SCA 8ff2e
SCA 8ff4c
SCA 8ff52
SCA 8ff58
SCA 8ff6a
SCA 8ff70
SCA 8ff94
SCA 8ff96

# -------------- BANK 9 ----------------

SCA 9c432
SCA 9fda5
#SCA 9ff1c DID NOT PRODUCE ANY RESULT
#SCA 9ff29 DID NOT PRODUCE ANY RESULT
#SCA 9ff92 DID NOT PRODUCE ANY RESULT
#SCA 9fffc DID NOT PRODUCE ANY RESULT

# -------------- FILL COMMANDS -------------

# -------------- BANK 8 --------------------

FILL 8FF9A 8FFFD

# SAD FINDS 8FFFE 8FFFF AS INVALID ADDRESS


# -------------- BANK 9 --------------------

FILL 92004 9200E

# --------------------------------------
