Thanks for the latest.
DO NOT;
* Command scan on the DATA in bank 1. Bank 1 is primarily data. Scan is for code.
* Command code on the DATA in bank 1. Bank 1 is primarily data. Code is for code.
* Leave latent scan and code commands in your DIR. Delete them if they do not produce valid code.
* Copy and paste duplicates into your DIR.
Put aside your current DIR's and start from a blank empty DIR.txt file. Too many errors added.
Search the LST for ??? to find undisassembled binary.
Add the LU subs outlined below. See if they work before proceeding.
Add scan commands for Banks 0, 8 & 9. Confirm they all work, giving valid code.
Post that DIR, don't add anything else yet.
Lots of scan commands required, do you think it would be easier if you could scan a range that automatically restarted the scan after each return?
This is the first lookup from MSG, SAD has overlooked a number of them.
Code: Select all
sub 82895 "UUYFuncLU_82895" $ F uuyflu 36
I referred you to the RZASA DIR posted in this thread previously, these are the lookups you can match up with OMAE2.
You can also look at what I did for your EQE3 DIR VS RZASA.
Code: Select all
##### Function Lookup Subroutines: R36 Fn_Addr Reg, R38 Input Reg, R3C output Reg
SUB 92A2E "SLU92A2E_SUYFn" $ F suyflu 36 # Undiscovered by SAD4.07.16
SUB 92A6C "SLU92A6C_SSYFn" $ F ssyflu 36 # Undiscovered by SAD4.07.16
SUB 92AAA "SLU92AAA_USYFn" $ F usyflu 36 # Undiscovered by SAD4.07.16
SUB 92AE8 "SLU92AE8_UUYFn" $ F uuyflu 36 # Undiscovered by SAD4.07.16
#
SUB 92B26 "SLU92B26_SUWFn" $ F suwflu 36 # Undiscovered by SAD4.07.16
SUB 92B62 "SLU92B62_SSWFn" $ F sswflu 36 # Undiscovered by SAD4.07.16
SUB 92B9E "SLU92B9E_USWFn" $ F uswflu 36 # Undiscovered by SAD4.07.16
SUB 92BDA "SLU92BDA_UUWFn" $ F uuwflu 36 # Undiscovered by SAD4.07.16
#
SUB 92C16 "SLU92C16_**YFn" $ F uuyflu 36 # Un/Signed In, Un/Signed Out
#
SUB 92C62 "SLU92C62_**WFn" $ F uuwflu 36 # Un/Signed In, Un/Signed Out
###### 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 92D8E "SLU92D8E_Y16SYTb" $F sytlu 3C 38 # Byte Inputs *16, Signed Word Out
SUB 92D93 "SLU92D93_Y16UYTb" $F uytlu 3C 38 # Byte Inputs *16, Unsigned Word Out
SUB 92DA0 "SLU92DA0_WSYTb" $F sytlu 3C 38 # Word Inputs, Signed Word Out
SUB 92DA5 "SLU92DA5_WUYTb" $F uytlu 3C 38 # Word Inputs, Unsigned Word Out
#
SUB 92DF3 "SLU92DF3_yTb.Interpolate" # Interpolate 4 byte cells to find Control Value Pass 1 & 2
SUB 92DF7 "SLU92DF7_yTb.Interpolate" # 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 92E33 "SLU92E33_Y16SWTb" $F swtlu 3C 38 # Byte Inputs *16, Signed Word Out
SUB 92E38 "SLU92E38_Y16UWTb" $F uwtlu 3C 38 # Byte Inputs *16, Unsigned Word Out
SUB 92E45 "SLU92E45_WSWTb" $F swtlu 3C 38 # Word Inputs, Signed Word Out
SUB 92E4A "SLU92E4A_WUWTb" $F uwtlu 3C 38 # Word Inputs, Unsigned Word Out
#
SUB 92E8E "SLU92E8E_wTb.Interpolate" # Interpolate 4 word cells to find Control Value
From this screen grab, you can see they match off RZASA 92a2e <> OMAE2 826AD.
Put the lookup subs in OMAE2 dir and change/rename the addresses.
Looking at your previous example and the comments from the rzasa LU dir commands above;
Code: Select all
07bc2: a1,ae,54,36 ldw R36,54ae TMP2L = FN070C; # Function address R36
07bc6: a0,95,38 ldw R38,R194 TMP3L = N_RPM; # Input Reg R38
07bc9: 10,08 rombk 8
07bcb: ef,8b,ac call 82859 Sub_82859 (); # Fn Lookup Subroutine
07bce: a0,3c,34 ldw R34,R3c TMP1L = TMP5L; # Table column input R34 = Function Out R3C
07bd1: af,e8,60,2a ldzbw R2a,[Re8+60] TEMP3L = ACPRES;
07bd5: a1,20,94,36 ldw R36,9420 TMP2L = 9420; # Function address R36
07bd9: a0,2a,38 ldw R38,R2a TMP3L = TEMP3L; # Input Reg R38 = ACPRES
07bdc: 10,08 rombk 8
07bde: ef,78,ac call 82859 Sub_82859 (); # Fn Lookup Subroutine
07be1: c0,36,3c stw R3c,R36 TMP2L = TMP5L; # Table row input R36 = Function Out R3C
07be4: ad,06,38 ldzbw R38,6 TMP3L = 6; # Table column count
07be7: 45,b4,10,fe,3c ad3w R3c,Rfe,10b4 TMP5L = Table_193fc; # Table address
07bec: 10,08 rombk 8
07bee: ef,31,ae call 82a22 UYTabLU_82a22 (); # Tb Lookup Subroutine
07bf1: 08,02,3c shrw R3c,2 TMP5L >>= 2; } # Unrounded table output R3C>>=2
07bf4: c3,e2,64,3c stw R3c,[Re2+64] [112e4] = TMP5L; # Store result to RAM
Ponder the above, we can get deeper into how Fn and Tb sizes can be worked out after you do the scan and LU DIR.