follow ft86club on our blog, twitter or facebook.
FT86CLUB
Ft86Club
Speed By Design
Register Garage Community Calendar Today's Posts Search

Go Back   Toyota GR86, 86, FR-S and Subaru BRZ Forum & Owners Community - FT86CLUB > Technical Topics > Software Tuning

Software Tuning Discuss all software tuning topics.

Register and become an FT86Club.com member. You will see fewer ads

User Tag List

Reply
 
Thread Tools Search this Thread
Old 10-16-2025, 02:40 AM   #1
callisto
Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: NA
Posts: 98
Thanks: 77
Thanked 69 Times in 37 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
V00C00G 17-20 USDM / EDM / JDM hybrid integrated ECU project

2025-11-08: v21 posted; see #3 for details.

When I set out to buy a new 2020 BRZ a few years ago to replace my seal-distraught 2013, the dealer misplaced it on the lot and conveniently found it with a 15% higher price. So I drove five hours away to a dealer that had a new 2019 BRZ at 10% off taking up showroom floor space, and on the drive home through the mountains after midnight as I was putting the car through various rpm/load patterns to get used to the differences and dial it in, I decided that it was now my life goal to upgrade my 2019 BRZ to the 2020 BRZ that I'd wanted. The 2020 was the final model year! And I had a theory that Subaru had done one last tuning pass on it, so that it was effectively a third gen1 OEM tune distinct from the prior B, K, and S eras.

Five years and a million lines of Ghidra discovery later, I have succeeded. I have created V00C-v15, an OEM+ 2020 USDM AK8 upgrade ECU for my 19US AL7 vehicle that incorporates the 2020 JDM closed loop and throttle behaviors and the 2018 EDM detailed tune of the direct/port injection system.

It idles so smoothly that I think it’s stalled, but no, it’s just idling quietly. Sometimes the only engine I can hear is the AOS doing its thing. Still sounds like itself under acceleration, though :)

The goal here was to build an OEM+ ECU; I don't have a dyno and I only have my daily driver BRZ, so I wanted an ECU that uses exclusively OEM maps without any creative invention on my part, that would simply deal with California's 91oct/E10 gas and give me a smoother drive.

USDM: I live in the US, so I used a US ECU, because I'd like to know if my evap canister fails someday. It took me two years to learn how CANbus communications work to even diagnose the 0x3D1 / U0155 dilemma, and then it was solved within a week. Thank you to the folks who chimed in on the forum thread about that! Also, V00C invested a lot of effort into AVCS tuning that nowhere else did.

JDM: I ran U01A on my car for a couple years, and then it took another year to figure out why it felt different than V00C. Turns out, 'DOM'estic AK8 has some subtle changes to a couple dozen undocumented fueling tables, and some not-so-subtle changes to throttle tip-in, and 12 of the 15 five-volt sensor CEL thresholds are tighter than USDM, and a tweak to MAF correction targets. But it has the K00G-era AVCS tune and no US smog bits, so I didn't want to just run U01A and be done. I never saw any CELs from the more strict thresholds in a year of U01A, but I haven't copied them into v15 yet.

EDM: A couple years ago, when I was looking into the direct/port injection ratio maps, I spot checked each lineage-branch of ECU and found that S20G had a significantly more detailed DI/PI tune that isn't available anywhere else in the world. I only had to create three new table defs, unlike the 40-odd for closed-loop, mostly because I visually checked the remainder to not have differences. Notably, the Total Injection Ratio table and the PI Ratio ECT Comp table must be used as a set, or else you're running almost double the intended amount of port injection and will see -0.2 IAM on base V00C, -0.4 IAM on V00C+U01A hybrid, that persists even if the timing maps are cut by -10 or more. V00C has two 'Override' toggles that point Cold and Hot to Warm as part of my diagnostic work; with them enabled, the DI/PI code paths for those tables, and their values, are identical between S20G and V00C in v15.

After half a decade of study, there are two changes I've made that aren't "copy paste it from one OEM ECU to another". First, -4 all timing cells, +4 all KCA Max cells, courtesy of wayno's advice in the Detuning thread, producing the best results so far; car already has good logic to dial it in more precisely, it just needed to start a litte further back, and if my logs show that +/-4 was too far, it's easily corrected. Second, I enabled knock learning across the entire range of operation and created specific separations out of the headroom unused by naturally-aspirated max load 1.4, aligned to the boundaries in the EDM DI/PI map; both so that the KCA logs can be monitored for DI/PI issues outside the defaults and so that it remains fine rather than coarse given the more complex map.

I recognize that it would be ideal if I could generalize this effort, but I only have one test vehicle and zero dollars available for more. For non-US folks, I would like to make a U01A-based hybrid that pulls in the final AVCS and DI/PI tunes from USDM and EDM. That's possible now, but anyone can do that with some dedication using the attached XML files. Note that I do not recommend attaching these XML files to the master 'stock ROMs' thread yet - I will post them there when they're finished - especially because I have no idea if the CEL toggles are all correct yet. U0155 is, for obvious reasons, correct in V00C :)

If I had a bench test setup, my next project would be to buy an 86GRMN ECU and download it and study the custom intake logic; it should be possible (~a year) to port it forward to V00C. Buying that ECU costs $350 but who knows when I'll learn to bench-dump it. PM me if you have a solution to this.

Attached are:

ZA1JV00C00G-v15-bin.zip: This is the 2020 USDM base. It still has all the smog bits enabled, and I patched CANbus id 0x3D7 to be 0x3D1 to work with non-20US facelifts. As far as I know, 3D7 is exclusive to 20US, but sample size n=2. If you get U0155 within 5 minutes of starting vehicle, try the other file.

ZA1JV00C00G-v15.xml: This is the RomRaider XML file I'm using with it. I do not guarantee that all tables have been mapped yet, but certainly the vast majority are. I have not verified the CEL disable/enable toggles, which is why they're commented out.

ZA1JU01A-v15.xml, ZA1JS20G-v15.xml: RomRaider XML files for 2020 JDM and 2018-2019 EDM. As above: I do not guarantee that all tables have been mapped yet, and in fact I'm pretty certain I have more work to do to finish that. But it's sufficient to run diffs to see what I've been merging into V00C00G.

logcfg-V00C.zip: Because one tactrix logcfg is never enough. The 'standard' one has the usual things that people expect in tuning. The rest have other, weirder, fancier things, like the memory addresses of the fuel trim and knock correction tables. I could write an entire log file exclusively for showing how the closed-loop process calculates fueling. Someday I'd like to be able to display my learned values with a keypress.

A brief description of the ECUs I now know and love:

20US V00C00G "AK8 H4 Tier3 MT", and 20JP U01A00G "AK8 H4 DOM MT", are the final AK8-generation ECUs here; if there are others, I haven't looked for them yet, but I will certainly get around to that eventually. I will abbreviate them without 00G hereafter. I was right! There was a final tuning pass hiding in the 2020 ECU!

19EU S20G "AL7 H4NA EU 6MT", and 19EU S10C "AL7 H4NA Tier2 6MT", are the 2018-2019 AL7-generation ECUs here; I suspect that S20G was the final EDM software release as, most likely, there's some sort of horsepower price paid for emissions catchup; perhaps someone will collect data on that someday. My new vehicle purchase came with S10C which was issued alongside K10C, N20C in TSB 11-184-18.

16EU K00G "AN5 H4NA EU 6MT" is the well-known base for the OFT tunes, the last 'simple' tune, and is widely understood by the community, and when I was solving the 0x3D1 problem, I had to go all the way back to 13US B00C "AR2 H4NA Tier2 6MT" to prove how rarely they change the one CANbus ID that gave me problems.

Thank you, FT86club.

I am forever, forever grateful to all of the work posted on this forum by everyone else. So many people were here and so many have faded away, and I have a folder with hundreds of printouts of their work that I've been reading through for years. ztan, steve, wayno, compelica, shiv, there are so many names I could list here. If you've ever posted about development in the tuning forum, I appreciate you. The prototype XML files and the debugging and logic and evolution of knowledge about the car is what made this possible.

I don't intend to stop here, but I'm moving in a few weeks directly after finals. My car is on V00C-v15 and I expect it'll remain on it for several months unless I have to alter that +/-4. I'll post an update the next time I have progress to report - at the very least, I'd like to document exactly what changed and why.
Attached Files
File Type: txt ZA1JS10C-v15-xml.txt (646.2 KB, 19 views)
File Type: txt logcfg-V00C.txt (5.1 KB, 19 views)
File Type: zip ZA1JV00C00G-v15-logcfg.zip (21.7 KB, 26 views)
File Type: zip ZA1JV00C00G-v21-bin.zip (1.16 MB, 16 views)
File Type: txt ZA1JV00C00G-v21-xml.txt (688.3 KB, 14 views)
File Type: txt ZA1JU01A-v21-xml.txt (677.2 KB, 13 views)
File Type: txt ZA1JS20G-v21-xml.txt (619.0 KB, 12 views)
File Type: txt logcfg-V00C-learntables.txt (3.3 KB, 11 views)

Last edited by callisto; 11-10-2025 at 07:15 AM. Reason: updated to v21
callisto is offline   Reply With Quote
The Following 9 Users Say Thank You to callisto For This Useful Post:
Compelica (10-16-2025), DarkPira7e (10-16-2025), gkubed (10-17-2025), makinen (10-21-2025), mikalem (11-06-2025), smackrel (10-16-2025), T-Steve (11-09-2025), Tatsu333 (10-17-2025), tomm.brz (10-19-2025)
Old 10-16-2025, 02:45 AM   #2
callisto
Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: NA
Posts: 98
Thanks: 77
Thanked 69 Times in 37 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
TLDR, please? (it took three years to write these three sentences)

This V00C work is my effort to make an OEM+ flash that has the best of all three worlds: US evap/smog logic, EU direct/port injector logic, and JP fueling logic.

Relative to the S10C (19US) that my 2019 BRZ came with, S20G (18EU) has a much more precisely dialed-in DI/PI system and U01A (20JP) has a much more precisely dialed-in fueling system with tangential changes to cranking, idle, tip-in, and MAF correction.

As of v21, all V00C OEM values modified are copied from either S20G or U01A unmodified, except for a single disable from S20G that I rescaled instead (see AVCS below).

What all does this project incorporate into V00C? (besides years of reading SH-2A assembly code)

Port Injection (ratios, thresholds, compensations):

This project began when I became curious what differed between two final non-US releases, S20G (EU) and U01A (JP). For various reasons I'm fascinated by the DI/PI system of this engine, and when I saw how much more detailed and smoothed the S20G map was than any other release worldwide, I started trying to incorporate that into U01A. After U01A v4 I suddenly uncovered the U0155 solution for running V00C on MY19, a much longer-standing goal, and so I tried to incorporate the S20G port injection into V00C. As is usual for V00C versus U01A, it did not go as smoothly - but neither V00C nor U01A were exactly thrilled by this at first, even though both had newer fueling logic than S20G that should have worked well with it. Identifying all of the changes was an adventure; there are certain logic branches that use a 'default' PI ratio of 60% in S20G where in all other ECUs it's 50%, except that V00C has in a specific single routine a more advanced decision tree, of which one leaf parallels S20G, but it took several revisions to pin that down precisely in the XML as table PI Ratio Threshold (Unknown), given that the logic tree is built on a bunch of engine values I don't yet have explanations for.

Direct Injection (firing angle):

After a couple especially bad rounds of low IAM, I decided to read everything ever posted on the forum about DI/PI; this uncovered a very interesting thread about trying to tune DI/PI for knock prevention rather than for horsepower, which is exactly the sort of thing I'm interested in; three hours of reading, one sleep interval, and one webinar transcript later, I realized that tuning DI/PI in this engine requires tuning not only PI ratios but also the DI firing angles in order to compensate for the heating shifts, found that I hadn't yet fixed the RR def for DI in S20g, and discovered that the PI mixture/charge benefits in S20G are accompanied by DI timing/cooling changes. With those incorporated, DI/PI seems copacetic now. Notably, every other DI table and value that I inspected is unchanged between V00C and U01A, but this specific firing angle change was quite significant and strongly resembles the new shape of the PI map.

Fueling (Tip-In, Closed Loop, Open Loop, Cranking, Idle, MAF Correction):

U01A is so much smoother on my car than either S10C or V00C, both at idle and when accelerating. I ended up reviewing perhaps the entirety of the closed loop, documenting tens of tables and constants that hadn't been surfaced previously, and identifying every difference between U01A and V00C in those codepaths. U01A is running a later version of the main engine code than V00C, and nearly every change I identified ends up reducing compensations in various interesting ways that build on the changes in V00C.
Tip-In: U01A activates enrichment at half of the IPW threshold of K00G/S10C/V00C, now Active Above 1.2ms. Compensation B/C (ECT) expands to a 3D table in the facelift era, with port injection ratio as the new Y-axis. Since in S10C/V00C the table is filled with the same noop zeroes as K00G, and given the intensity of changes to the port injection system imported from S20G, I incorporated S20G/U01A where at PI ratio 50%..100% it gradually adds compensation in B (+60..+30% <=0..+50C; 0% >=+60C) and subtracts compensation in C (0% <= +30C; -20..-70% +40..>=60C).

Closed Loop: U01A alters nearly a quarter of the tables involved in the closed loop fueling system. I ended up incorporating all of their changes in bulk; it's possible to math out how they effect the final fueling, but that's a far more extensive project than trying to import the fueling improvements from U01A into V00C, and given how many of them improved closed loop fueling specifically in maps keyed by PI Ratio, I hope that this ends up combining the smoothness of U01A's fueling with the finesse of S20G's DI/PI.

Open Loop: U01A raises the Minimum Active POL Enrichment to 14.70, versus V00C's 14.41. I waffled on this change a great deal, as I don't yet have the logs proving which is better, but given the car's interdependent CL/OL system and that I had two years of good driving experiences on U01A, I decided to incorporate 14.70 into v21. Now that I've solved the DI/PI issues I was studying from v1..v20, I'll be expanding logging into VVT and CL/OL so that I can get more information on how this alters the engine's performance, and I hope to study the rest of the open loop system code to see what other changes might be worth incorporating.

Cranking: U01A seems to use less IPW to start the engine. I noticed zero starting issues from 5C..100C in two years of usage, and they tend to parallel the same ECT regions as the closed loop fueling table changes, so I incorporated the Cranking table changes.

Idle: U01A significantly lowers the idle speed targets in Idle Speed Target L (only) across the board, relative to V00C/S20G (an unusual pairing!), removing altogether the significant bump at -20..+90 and lowering the peak target from 8 to 2 (!) table-wide. With this change incorporated, on a cold start at 23C ambient and then idling, I might tentatively estimate that the 'cold' state indicator on the dashboard stays on longer than it does with V00C, but I don't have a clean before/after test of ECT warmup temperatures to be certain. I ended up incorporating this since I'm moving to a residential neighborhood where a reduction in cold-engine idle intensity would be appreciated. It still does ~1600 rpm for a bit and then softens down to ~1000 and then does a PI burst for catalyst heatup as usual.

MAF Correction: This particular shift in MAF Correction After Start (Neutral, In Gear) was interesting. There are two primary divergences to consider. K00G has an eight-row table, of which idle mode counters 1-2 have a gradient +35-40g/s..+7g/s at <=-10..90C. S20G smooths out the gradient to +32..+4g/s at <=-20..90C; S10C/V00C, to +32..+6g/s at <=-10..90C, with a bump to +40 at -10C; and U01A, to -32..+6g/s at <=-10..90C with no bump. Notably, however, V00C/U01A, which both run newer fueling code than S10C/S20G, make two additional changes: they normalize each non-zero row to the same values, and they add a third data row at counter 8, that neither S10C nor S20G have. I considered this for a long while. I ruled out incorporating the values from S20G because I remember seeing in another table somewhere that US/JP have one tenth higher engine load table definitions than EU and so I'd better stick with either U01A or V00C for this, and I decided that since I'd incorporated a great deal of fueling compensations that affect the 'g/s' of the vehicle at the temperatures changed here, that I should use U01A's values rather than V00C's.
AVCS (Learning):

In the guts of the AVCS code logic, which is so similar intake and exhaust that (irritated perfectionist voice) led to two S10C XML correction releases, there is a single set of constants on the intake side that change. I have approximately identified these as A/B path +advance/-retard learning constants, though investigation will continue since I do not appreciate mysteries. Notably, S20G dials back the intensity of adjustments to a fraction of their original value, and then disables one of the four paths outright. I chose to adopt the S20G lower-intensity AVCS adjustment velocities, though I did not adopt the disabled path but instead used the ratio of A+/- (both present) to calculate the appropriate missing B value. This work is reflected in table AVCS Intake Unknown Adj H, and can be easily reverted by setting all values to their V00C/U01A OEM of +0.500 (all positive numbers as stored, the advance/retard logic handles 'negative' itself).

What differences were reviewed but ultimately excluded? (there's still unreviewed differences)

TODO, I have to review three years of rather haphazard notes still. IIRC, most AVCS tables are on this list as S20G just inherits K00G and V00C=U01A are further ahead in that area.

Which tables specifically are changed from OEM V00C? (as of v21)

In approximately RomRaider order. Punctuation marks: tables I created* for this project, ^on/off switches I created to fix a specific byte or avoid relocating tables:
  • ^U0155 fix for 2017-2019 USDM
  • Ignition Timing Compensation Idle Target In Error B
  • Idle Speed Target L
  • AVCS Intake Unknown Adj* H
  • CL Fueling Transient Unknown* B, S, W, ZA
  • Input A Rising Load Activation ECT Load 2, 3, 6, 8, 12, 14
  • Cranking Fuel Injector Pulse Width (ECT) B, E, F, I, J
  • Tip-in Enrichment Compensation (ECT) B,C
  • PI Ratio Thresholds
  • PI Ratio Threshold (Load, RPM, Unknown)
  • PI Ratio ECT Compensation (& Load)
  • Total Injection Ratio Port Warm
  • ^Total Injection Ratio Port Override (Cold, Hot)
  • GDI Firing Angle Cold Idle
  • ^GDI Firing Angle Override (Low/High / Cold/Hot)
  • DiPi Fueling ECT Unknown* 1, 2, 3, 4, 7 A/B, 10, 11 A, 14, 15, 16, 18, 23, 28 A
  • Minimum Active Primary Open Loop Enrichment
  • MAF Correction After Start (Neutral, In Gear)

Why doesn't this incorporate any of the usual performance tune changes? (such as throttle, fueling, idle, and so on)

I used a for-sale tune on my 2013 BRZ and it was critically necessary to get that vehicle to perform well. But when I replaced it with a 2019 and tried to use that same K00G-derived tune, it did not particularly improve my vehicle relative to S10C, and when I went looking for other for-sale tunes, they all either derived from K00G or installed the DRM that prohibits the exact tuning work this community did back in gen1. So I decided to document S10C internally to understand what was so unusual about facelifts, which required learning Ghidra and SuperH both, to see what all was different and whether I could incorporate anything from my purchases into my vehicle without having to downgrade from S10C. Eventually I found V00C and tried to run it, but the U0155 obstacle took me years to diagnose and mitigate, and so in the meantime I started comparing K00G to S10C to V00C, and then added in U01A and S20G and B00C.

What I suspected, and what I was not entirely correct about, was that the 2020 JDM release had an extra-special ECU. Not to the degree of split-intake like the 2017 GRMN86, but given that Subaru was offering a ten-year engine wash and retrofit and update to the latest bits, it seemed likely that they'd invested some effort into that final year's ECU as well. Yes, they did! 2020 JDM has the best fueling logic of all gen1 OEM ECUs - but, 2020 EDM has the best injector logic, and meanwhile 2020 USDM has the only evap/smog logic of the three. So creating the holy trinity of "final release" became my quest. This release is the first step towards that goal, and only around v20 did I finally prove with certainty how to Tactrix log the IAM, LTFT, and FLKC learning table data. The next step is to drive the car for as long as possible without a battery pull, to see what it looks like when the learning tables stabilize; both to determine whether further MAF/MAP/VVT tuning would make any difference, but also to enable community loggers to show the learning progress after a flash.

Ultimately, this all reflects my aesthetic choices. I'm building an OEM++ vehicle, and facelift-era ECUs are perfectly sufficient to enjoy the car without having to tune it further, but moving up from S10C to either of V00C/U01A demonstrated on my car that OEM+ was possible out of the box; when the hybrid work pays off, I'll have an OEM+ vehicle that is the very best of OEM, and that makes me happy. The last time my mechanic drove my car, he reacted viscerally, positively, to the experience, but was completely unable to explain why it felt so magical to drive. That is my aesthetic goal for this hybrid project. Also, I can say under penalty of perjury that I have gone out of my way to maintain or improve the vehicle's emissions, which I find aesthetically pleasing (yes, I'm weird, but I also have asthma).

I respect that both facelift non-performance work aren't as interesting to the wider tuner community. But there's another reason I'm putting in all this work: to publish RomRaider XML defs for gen1 facelift V00C/U01A, which can now be flashed onto any facelift (thanks to the V00C-U0155 fix switch above), so that XML tuners on facelift vehicles have the option to port their K00G work forward, or to inspect post-facelift tuning changes for possible incorporation into K00G tunes, or to ask questions like "Can I just copy this table or are there new tables waiting in the code?" (which, now, I can answer!), or to suggest new projects like "Can we expand K00G's tables?" (sure, it's dead simple, I can provide instructions). Others who are interested in performance tuning are much more likely to do well with it than I will, so I'll provide the shoulders to stand on and let them excel instead. There aren't many of us XML tuners left at all, but that's fine. Our car is worth it all to me.

What's next for the ECU work? (so many things)

In no particular order, I am interested in starting/finishing/progressing all of these things; a handful are already underway, slowly:
  • Finding/Making a Port Injection ratio lookup table for IAM compensation to see if it stabilizes at a higher IAM on 91oct. (v22, #4)
  • Releasing a K00G table expansion ECU that lets tuners have more finesse than the stock tables allow.
  • Porting the A01G speed density logic to K00G and to U01A/V00C and then logging its results alongside raw sensor data.
  • Releasing RomRaider XMLs and Tactrix logcfgs for every gen1 ECU.
  • Writing a templating engine for generating RomRaider XMLs (xaxis, yaxis, sizes) from ECU table memory locations.
  • Patching RomRaider to support our 2d/3d tables natively to dramatically simplify the XML defs.
  • Creating a git repository that contains the table data from all gen1 ECUs for analysis and diffing.
  • Comparing 92oct E0 to 92oct E10 fuel and learning more about flexfuel tuning.
  • Documenting the CAN communications routines and how the CAN values are produced.
  • Understanding the 2020 USDM 0x3D7 CAN change.
  • Finding/Dumping an GRMN86 ECU bin, analyzing/posting the custom intake logic, and integrating it into V00C/U01A.
  • Creating a hybrid U01A for non-US folks following the logic described above.
  • Finding/Making a MAF sensor map for the gen2 O2 sensor in gen1 facelift intake.
  • Map Q00G and compare it to its predecessor/successor K00G/S20G.

Last edited by callisto; 11-13-2025 at 10:50 AM. Reason: implemented PI ratio compression when IAM <1.0
callisto is offline   Reply With Quote
Old 11-08-2025, 09:20 AM   #3
callisto
Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: NA
Posts: 98
Thanks: 77
Thanked 69 Times in 37 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
Here's v21. It took three weeks and a great deal of reading of old forum posts, but I finally pinned down why v15 had such a weak IAM compared to stock U01A/V00C - I had missed the DI table change accompanying the PI table change! - and removed all of the low octane detuning now that it's performing well. Initial results since yesterday show IAM steadily advancing, it's currently at 0.8+ with no drops yet, on the usual Cali 91oct gas. Next on my list is to figure out a logcfg that satisfies all of the fields expected by the maptuning app.

New:

- Copied GDI firing angle (High Cold) table from S20G. I had to read another fifty pages of forum discussions from the gen1 era to uncover the missing realization that direct injection and port injection are tuned in concert by separate tables. Sigh. V00C/U01A have improved the GDI Pressure tables since K00G/S20G, so I left those along, but S20G's direct firing angle table is critical for using S20G's novel port injection ratio table. Also, added RomRaider option switches to make V00C, like S20G, use the High Cold data for all five firing angle tables. (No changes to base timing; that's still V00C/U01A OEM.)

- Table "AVCS Intake Unknown Adj H" created, with values that derive from S20G. Buried in the AVCS intake code is a set of A/B +/- values that control how aggressively the engine's learning logic advances or retards the cams, with seeming ties to the direct/port injection calculations. Compared to every other ECU, the S20G logic is slightly more conservative in advance, and outright disables the B/- path altogether. As V00C has slightly more complex code paths than S20G, but also has the old K00G-era A/B/+/- values, I decided to adopt the more conservative values from S20G except for the B- disable value, which I replaced instead by comparing A+ to A- and then applying that to B+. So, AB+/- 0.5 (K00G, U01A, V00C) becomes A+/- 0.250/0.055 B+/- 0.320/0.070 (S20G-derived).

- Added RomRaider option switch to permit use with pre-2020 USDM, which when enabled changes a specific CAN id from 0x3D7 to 0x3D1, resolving the issue that causes U0155 without having to disable that CEL. The attached -3D1.bin / -3D7.bin now highlight this switch as the only change when compared in RomRaider.

Updated:

- Fuel Injection Ratio ECT Threshold A/B. Imported the remaining known direct/port injection ratio table changes from S20G. I'd previously left out some ECT thresholds work while debugging DI/PI, but now that I have the direct injection issue pinned down, I pulled these in to ensure that the ECU doesn't unintentionally amplify the port injection ratio.

- Ignition Timing Compensation Idle Target In Error Range B. This table has changed drastically since K00G in the facelift era ECUs, and also extended the X axis one step further to +300 RPM of idle speed error, though most of that new column is just zeroes. However, S20G improves on S10C/U01A/V00C, smoothing out the +200 and +300 columns, so I incorporated that here - anything that improves idle in our vehicles is a win.

- CL Fueling Target Compensation A/B/C (defs). V00C has slightly more complex closed loop / engine load compensation logic, and so in order to pin down what changed, I ended up renaming the A/B/C tables so that the A/B tables can be compared to and copied from other ECUs if desired, which lack the (now) C table altogether. Their contents are now unmodified stock V00C, as there's no improvements to bring in from S20G/U01A and clearly V00C was OEM tuned, in particular, in this specific place. Works for me.

Reverted:

- Reset base timing, knock advance, knock correction to V00C OEM; in v15 they were heavily detuned while I investigated DI/PI things.

- Restored MAF, MAP sensor CEL thresholds from V00C; in v15 they had the old more permissive K00G/S20G/U01A values.

Note that this is not a complete description of everything that has changed from V00C OEM to V00C v22 - for that, see #2 above, or use the attached v22 XML defs with RomRaider to inspect and compare against V00C00G.bin (or if you have an EcuTek license, it can open v22 just fine, insofar as I haven't made any new tables or anything, but I can't possibly verify that EcuTek can see every change I've made, so you might want to use RomRaider to identify changes and then EcuTek-or-whatever to validate that you can see them at all).

Last edited by callisto; 11-10-2025 at 05:58 AM. Reason: i posted the complete description above
callisto is offline   Reply With Quote
Old 11-13-2025, 10:45 AM   #4
callisto
Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: NA
Posts: 98
Thanks: 77
Thanked 69 Times in 37 Posts
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Garage
  • Finding/Making a Port Injection ratio lookup table for IAM compensation to see if it stabilizes at a higher IAM on 91oct.

v21 still produces extremely poor results over time on 91oct (learned IAM below 0.6!), though the AFR vs. commanded is basically identical through the entire WOT on every release that uses the JDM fueling logic. I tested with a PI ratio table capped at 30% back around v18 and it appreciated that, and having ruled out everything else, this PI table is just too hot for 91oct. So, here's v22 implementing IAM-adjusted port injection ratio, produced by hex-patching new code into v21.

if value > offset: value = (iam * (value - offset)) + offset; else, value unchanged.

offset = PI Ratio Thresholds (Low) - 10% in S20G, v22
value = Total Warm Injection Ratio lookup - varies by rpm/load, as high as 60% in S20G, v22
iam = 0.7 by default, we're all familiar

example: (iam 0.8 * (60.2% - 10%)) + 10% = (80% of 50.2%) + 10% = (40.2% + 10%) = 50.2%

I used the low threshold as the offset because I wanted to ensure that cells with PI always continue to have PI. I'm modifying only the result of the table lookup before the twenty-odd compensations occur, so that all of the downstream code continues working properly (e.g. overriding DI/PI during cold start). And for the time being I'm simply using a linear map of (iam: 0.0->1.0) -> (pi_ratio: offset->value) to shrink the port injection 'envelope' to fit available gas without reducing the fidelity of the gradient.

After an hour or so of driving with a couple of WOT, it's a little over 0.8 (stable at 0.82 as of Friday night) and advanced itself as high as 0.95 when cruising in sixth gear, but I need to give it some more learning time. For the curious, here's a datazap zoomed into the final WOT; locating IAM drop events and inspect the various PI Ratio fields at those points in time will show the adjustment's effect on PI lookup (example). It still has a lot of learning cycles left to do, but at least that validates the logic.

Decompiled code:

Code:
void CALC_dipi_ratio_IAM_degrade_FUN(float value)

{
  ENGINE_dipi_total_injection_ratio_port_result = value;
  if (((0.35 <= value) && (ENGINE_iam[0] < 1.0)) &&
     (ENGINE_dipi_total_injection_ratio_port_result = 0.35, 0.0 < ENGINE_iam[0])) {
    ENGINE_dipi_total_injection_ratio_port_result = (value - 0.35) * ENGINE_iam[0] + 0.35;
  }
  return;
}
Native assembly:

Code:
                             //
                             // custom.iam_dipi 
                             // ram:00130000-ram:00130fff
                             //
                             *************************************************************
                             *                            FUNCTION                         
                             *************************************************************
                             void  __stdcall  CALC_dipi_ratio_IAM_degrade_FUN  (float 
             void              <VOID>         <RETURN>
             float             fr0:4          value
             undefined4        fr1:4          offset                                  XREF[1]:     00130002 (W)   
             undefined4        fr2:4          iam                                     XREF[1]:     0013000a (W)   
                             CALC_dipi_ratio_IAM_degrade_FUN                 XREF[2]:     QUERY_dipi_ratio_tables_FUN:0006
                                                                                          QUERY_dipi_ratio_tables_FUN:0006
        00130000 d4  0a           mov.l      @(-> PI_Ratio_Thresholds ,pc ),r4                 = 001118c0
        00130002 f1  48           fmov.s     @r4 => PI_Ratio_Thresholds ,offset
        00130004 f1  05           fcmp/gt    value ,offset
        00130006 89  0c           bt         LAB_00130022
        00130008 d4  09           mov.l      @(-> ENGINE_iam ,pc ),r4                           = fff815cc
        0013000a f2  48           fmov.s     @r4 => ENGINE_iam ,iam                             = ??
        0013000c f3  9d           fldi1      fr3
        0013000e f3  25           fcmp/gt    iam ,fr3
        00130010 8b  07           bf         LAB_00130022
        00130012 f3  8d           fldi0      fr3
        00130014 f2  35           fcmp/gt    fr3 ,iam
        00130016 89  01           bt         LAB_0013001c
        00130018 a0  03           bra        LAB_00130022
        0013001a f0  1c           _fmov      offset ,value
                             LAB_0013001c                                    XREF[1]:     00130016 (j)   
        0013001c f0  11           fsub       offset ,value
        0013001e f0  22           fmul       iam ,value
        00130020 f0  10           fadd       offset ,value
                             LAB_00130022                                    XREF[3]:     00130006 (j) ,  00130010 (j) , 
                                                                                          00130018 (j)   
        00130022 d4  04           mov.l      @(-> ENGINE_dipi_total_injection_ratio_port_res  = fff8a180
        00130024 4f  26           lds.l      @r15 +, pr
        00130026 00  0b           rts
        00130028 f4  0a           _fmov.s    value ,@ r4 => ENGINE_dipi_total_injection_ratio_p  = ??
        0013002a 00  00           align      align(2)
                             PTR_PI_Ratio_Thresholds_0013002c                XREF[1]:     CALC_dipi_ratio_IAM_degrade_FUN:
        0013002c 00  11  18       float[2]   PI_Ratio_Thresholds
                 c0
                             PTR_ENGINE_iam_00130030                         XREF[1]:     CALC_dipi_ratio_IAM_degrade_FUN:
        00130030 ff  f8  15       float[2]   ENGINE_iam                                       = ??
                 cc
                             PTR_ENGINE_dipi_total_injection_ratio_port_res  XREF[1]:     CALC_dipi_ratio_IAM_degrade_FUN:
        00130034 ff  f8  a1       float *    ENGINE_dipi_total_injection_ratio_port_result    = ??
                 80
And the patch at @620fe..62107 that jumps to the new routine:

Code:
        000620fe d4  01           mov.l      @(-> CALC_dipi_ratio_IAM_degrade_FUN  ,pc ),r4    = 00130000
        00062100 44  2b           jmp        @r4 => CALC_dipi_ratio_IAM_degrade_FUN
        00062102 00  09           _nop
                             PTR_CALC_dipi_ratio_IAM_degrade_FUN_00062104    XREF[1]:     000620fe (R)   
        00062104 00  13  00       addr       CALC_dipi_ratio_IAM_degrade_FUN
                 00
If this works out long-term I'll find an FFF8 memory hole to put it into for logging, but for now it's stable and behaving appropriately enough, so posting it here (but not updating the main post above yet). Use v21 xml and logcfg above to interact with this, to flip the U0155 switch if needed, etc.
Attached Files
File Type: zip ZA1JV00C00G-v22-mod-iam_dipi.zip (592.4 KB, 15 views)

Last edited by callisto; 11-14-2025 at 11:41 PM.
callisto is offline   Reply With Quote
 
Reply

Tags
ecu, s20g, u01a, v00c, v00c00g


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
EDM Thread!! Synack Off-Topic Lounge [WARNING: NO POLITICS] 194 12-13-2013 01:18 PM
EDM armrest with a slight stain on the surface Vten Interior Parts (Incl. Lighting) 5 10-13-2013 10:52 PM
EDM, Techno, dubstep creation Thongpocket Off-Topic Lounge [WARNING: NO POLITICS] 0 04-04-2013 12:16 AM
Edm customer appreciation@ Mayfield FRSMAK86 CANADA 0 08-15-2012 01:50 AM
Halogen manual leveling works with edm/jdm HID headlights ? adprokid Cosmetic Modification (Interior/Exterior/Lighting) 0 07-03-2012 01:32 PM


All times are GMT -4. The time now is 05:03 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
User Alert System provided by Advanced User Tagging v3.3.0 (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.

Garage vBulletin Plugins by Drive Thru Online, Inc.