View Single Post
Old 06-15-2023, 03:40 AM   #9
callisto
Senior Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: PNW, US
Posts: 100
Thanks: 79
Thanked 75 Times in 41 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
Quote:
Originally Posted by Compelica View Post
Would love to have that memory address for the learned value for A01G, unfortunately still don't have enough time to pick up Ghidra
Sure, it only took a few minutes; the function is unchanged from A01G to K00G. Let me know if you get any useful results?

Quote:
It runs a series of checks that are logged as a boolean T/F at FFF8C2F1; if true, then learning is permitted; if false, then learning is not permitted.
In A01G, this boolean is at FFF8BE75.
In U01A, this boolean is at FFF8BE91.

Quote:
Among the variety of things that need to be true, the engine speed needs to be at least 30.0, and the ECT needs to be less than 98.0. That float is stored in this block of three floats used in the limits-check function:

00124924 - 41 f0 00 00 - float: 30.0
00124928 - 42 c4 00 00 - float: 98.0
0012492c - 44 21 dd 50 - float: 647.458
In A01G, these three values are (unchanged) at 0012072c, 00120730, 00120734.
In U01A, these three values are at 0012585c, 00125860, 00125864.

Quote:
I'm still working through where the learnings are stored, but I believe it's somewhere in these two-byte shorts at FFF8C2EC, C2EE, and C2F2; those should have something non-zero right now, and should be zeroed out and remained zeroed once the patch above is in place.
In A10G, these are FFF8BE70, BE72, and BE76.
In U01A, these are FFF8BE8C, BE8E, and BE92.

Quote:
EDIT: For curiosity's sake, it's taking the IAT and looking it up in a previously-undocumented table of "correction in degrees" percentages (below), then applying that result as a MAF correction, then testing some RAM values that I don't recognize yet (FFF8BBBC and FFF8179C)
In A10G, FFF8B70C and 1368.
In U01A, FFF8B6E8 and 11B0.

Quote:
to see if their sum is greater than either 0.37 times, or 0.52 times, that correction; if so, then the short at C4D0, or C4D2, is incremented - unless learning is disabled above. (The table lookup result is always logged at C4CC as a float, whether or not learning is enabled.)
In A10G, (short) BE70, BE72, and (float) BE6C.
In U01A, (short) BE8C, BE8E, and (float) BE92.

Quote:
K00G - 00128fec float[9]: -40, -20, 0, 20, 25, 40, 60, 80, 100; 00129010 word[9]: 6400h, 6CA8h, 7552h, 7DDCh, 8000h, 8674h, 8F04h, 97A8h, A033h; multiply by 3.0518044E-5
In A10G, 00120758 float[9], 0012077c word[9], same values.
In U01A, 00125888 float[9], 001258ac word[9], same values.

Last edited by callisto; 06-16-2023 at 07:13 PM. Reason: adding U01A
callisto is offline   Reply With Quote
The Following User Says Thank You to callisto For This Useful Post:
Compelica (06-15-2023)