View Single Post
Old 10-16-2025, 01:45 AM   #2
callisto
Senior Member
 
Join Date: Nov 2021
Drives: 2019 Subaru BRZ
Location: PNW, US
Posts: 120
Thanks: 99
Thanked 108 Times in 55 Posts
Mentioned: 4 Post(s)
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 09:50 AM. Reason: implemented PI ratio compression when IAM <1.0
callisto is offline   Reply With Quote