I am experiencing an error where an address is not being resolved properly. I am completely green in this, but in other versions this worked properly.
looking for the MAF curve i can find the address in the following code. This is for GCM2 Cal, i have attached the bin.
Code: Select all
Sub578:
874d1: f2 pushp push(PSW);
874d2: af,f0,02,3a ldzbw R3a,[Rf0+2] wR3a = [2062];
874d6: 08,01,3a shrw R3a,1 R3a >>= 1; #[ R3a /= 2]
874d9: b1,01,38 ldb R38,1 R38 = 1;
874dc: c4,39,38 stb R38,R39 R39 = R38;
874df: 93,3b,3d,9a,38 orb R38,[R3a+9a3d] R38 |= [R3a+9a3d];
874e4: ef,4c,b2 call 82733 Sub415();
874e7: b1,03,42 ldb R42,3 R42 = 3;
874ea: e0,42,fd djnz R42,874ea R42--;
if (R42 != 0) goto 874ea;
874ed: b0,15,36 ldb R36,R15 R36 = LSSI_A;
874f0: 73,3b,3f,9a,36 an2b R36,[R3a+9a3f] R36 &= [R3a+9a3f];
874f5: 9b,3b,41,9a,36 cmpb R36,[R3a+9a41]
874fa: df,f1 je 874ed if (R36 = [R3a+9a41]) goto 874ed;
874fc: fa di disable ints;
874fd: b0,19,47 ldb R47,R19 R47 = LSSI_C;
87500: b0,17,46 ldb R46,R17 R46 = LSSI_B;
87503: b0,15,36 ldb R36,R15 R36 = LSSI_A;
87506: fb ei enable ints;
87507: 93,3b,43,9a,39 orb R39,[R3a+9a43] R39 |= [R3a+9a43];
8750c: 98,39,36 cmpb R36,R39
8750f: d7,c8 jne 874d9 if (R36 != R39) goto 874d9;
87511: c3,68,32,46 stw R46,[R68+32] [R68+32] = R46;
87515: a1,62,22,36 ldw R36,2262 R36 = 2262;
87519: a0,46,38 ldw R38,R46 R38 = R46;
8751c: ef,24,b4 call 82943 Sub424();
8751f: c0,29,3c stw R3c,R29 R29 = R3c;
87522: f3 popp PSW = pop();
87523: f0 ret return;
At 87515 the MAF curve is located at bank 1 address 2262. In previous versions, this was relabeled to func_MAF_Transfer when i added the following line to the dir file. But now it just stays listed as 2262 with no relabeling or resolving or whatever you want to call it.
Code: Select all
func 12262 122d9 "func_MAF_Transfer" :W V +12800 :W V +1024
Code: Select all
8 74ed: b0,15,36 ldb R36,R15 tmp2l = LSSI_A;
8 74f0: 73,3b,3f,9a,36 an2b R36,[R3a+9a3f] tmp2l &= [tmp4l+9a3f];
8 74f5: 9b,3b,41,9a,36 cmpb R36,[R3a+9a41]
8 74fa: df,f1 je 74ed if (tmp2l == [tmp4l+9a41]) goto 74ed;
8 74fc: fa di disable ints;
8 74fd: b0,19,47 ldb R47,R19 tmp0h = LSSI_C;
8 7500: b0,17,46 ldb R46,R17 tmp0l = LSSI_B;
8 7503: b0,15,36 ldb R36,R15 tmp2l = LSSI_A;
8 7506: fb ei enable ints;
8 7507: 93,3b,43,9a,39 orb R39,[R3a+9a43] tmp3h |= [tmp4l+9a43];
8 750c: 98,39,36 cmpb R36,R39
8 750f: d7,c8 jne 74d9 if (tmp2l != tmp3h) goto 74d9;
8 7511: c3,68,32,46 stw R46,[R68+32] [R68+32] = tmp0l;
8 7515: a1,62,22,36 ldw R36,2262 tmp2l = func_MAF_Transfer; // MAF Transfer Function
8 7519: a0,46,38 ldw R38,R46 tmp3l = tmp0l;
8 751c: ef,24,b4 call 2943 Sub211();
8 751f: c0,29,3c stw R3c,R29 temp2h = tmp5l;
8 7522: f3 popp pop(PSW);
8 7523: f0 ret return;
I dont see a specific bank swap before the ldw unless the following sub424 knows to swap to bank 1 before loading R36.
I have done hardly any dissasembly and breakout of the code, as most of it doesnt make sense yet, but i am still learning.