![]() |
Detuning for lower octane
With fuel prices rising I have opted to pump RON95 for the time being instead of my usual RON97. For a liter of RON97 I can get 2.3 liters of RON95, hence the circumstances.
I have my self-developed tune based on Wayne's ROM which I have targeted for RON97, which I have increased ignition advance on the Base Timing B table, and the KCA table flattened out at 6 degs.Now I don't have my Tactrix plugged all the time so I depend on monitoring the KCA OBD2 PID to get a gauge of IAM and knock that I am seeing. Most of the time I see it at around 4 degs, which equates to an IAM of roughly 0.6. However on high RPM high loads I see the KCA values drop tremendously, down to 1 deg (sometimes even less than 0) which I am assuming at this point that IAM/FLKC/FBKC is pulling almost the entire KCA table in response to knock. So the likely answer is to simply remove 3-4 degs off Base Timing B at those areas, but then I would expect my IAM to increase since I am now running less timing, which would then compensate for the overall total timing. Instead, what I think would be a better way for the tune to adapt both to RON95/RON97 would be to remove a fixed amount of degs from the high RPM high loads areas from Base Timing B and add it into the KCA table instead? I don't see a problem with it, apart from the ECU taking potentially longer for IAM to adapt and less consistent power output. |
If you want more range, then reduce base timing and increase KCA, as you said. You could do 4 deg on entire both tables, including the cells that are 0 in KCA.
|
If you a pre facelift you can use the flex fuel roms and disable the fueling compensations but keep the riming adjustments. If you put a toggle switch to earth on the evap, you can actually switch between two timing maps instantly, you could evem add a little richer fueling if needed on the lower octane fuel
put your 95 fueling in E0 and 97 oin the E85 |
Alternativly do what wayne said and shift more timing into the KCA map so the iam has more scope to drop timng, also set your iam initial to say 0.7 instead of 1
|
Quote:
Quote:
Quote:
I suppose it could also be used for multiple timing maps, with a switch to deliver fixed voltages (0V, 3V, 5V for example), but if I understand the implementation correctly the second setting would only reside between the E0 and E85 value range? |
Quote:
yes it you input a voltage to the evap to simulate a flex kit you can have multiple maps |
Quote:
To install the switch, do I just unpin the existing pin and repin from my own connector? |
Quote:
correct standard A01G formware doesnt look at evap pressure input on A35 pin 20, but the modified fles A01G rom looks to that for flex fuel ethanol content |
Quote:
[ IAM * Calculated Torque A ] + [ (1.0 - IAM) * Calculated Torque B ] So, if you're detuning your base timing tables to increase IAM from 0.7 to 1.0, you may want to attend to those tables if throttle response worsens afterwards. The ECU seems to think IAM can go below 0.0625 (as in, one-tenth of 0.6!) so I'm quite curious if you saw values below the 0.7 default before your tuning changes. I was looking into this because Cali 91; on summer gas this year, I'm seeing IAM 0.7 advanced by +4-6 or so, and have decoded a lot more IAM code since 2022 :) Also note that if you were seeing IAM 0.3-0.4 or lower before the re-tune, that's the (<0.3) Normal / Safe (>0.4) threshold for the AVCS tables. EDIT: Only for automatics, but still! |
3 Attachment(s)
Been thinking about this more and studying code. IAM ranges from max 1.0 + max KCA all the way down to 0.0 at -5 tuning, by which time it will have cut out boost, AVCS, and rescaled the throttle. But it'll keep trying to probe upwards from "learned IAM" any time you do a WOT pull (whether to force it to or just to enjoy an onramp), which is why modifying Base Timing is ideal - a strategy that works less well in facelift era, since it's a 4D map linearly scaled between Base Timing A (IAM 1.0) and B (IAM 0.0), just like Calculated Torque is.
The code cheats and uses FLDI1 to set the max IAM of 1.0, so it isn't a 'normal' variable that can be patched in, but if you're curious to see it in the code yourself, it's here: A02G- @6e8f0; K00G- @72990; V00C- @7A6d4; a0 02 fd 82 00 29 81 12 fc d0 f6 9d f6 c5 8b 00 f6 cc fc 6c e0 01 a0 18 80 1b 30 11 90 02 70 01 40 85 a0 33 81 12 84 19 However, since the entire routine's purpose is to set IAM, and it's a void-void call from one of the main runloops, it's possible to patch it to instead set the max IAM to 'Advance Multiplier Initial' or to whatever float we prefer. I think Advance Multiplier Initial is a fine expression of "max IAM" when one has modded this code into place. The 'set current IAM' function is called by only a single place, one of the main runloops of the vehicle: Code:
void __stdcall FUN_0007a642 (void )@40820- 00 12 d0 00 And simply copy-pasted the IAM function's bytes to that location. @12d000- 4a f0 ff cb ff db ff eb ff fb d2 59 42 4b 6d 0c d6 59 blah blah etc. Sadly, it's not so easy as that, but it's close! Next: Ignoring all the broken indirect pointers, instead I'm going to patch it to read a float we store. I considered reusing the Initial IAM but tuning them separately is what I couldn't do to begin with, so may as well. Code:
; modify 2 bytes, insert +2+ new bytesCode:
fVar9 = 0.7;We have 10 bytes in which to jump into the distance and back. The difficulty is doing an indirect jump to an address while having room for a pointer, and then having it resume control in the right place. 2 bytes for MOV.L +x,pc into r2, 2 bytes to jsr/n r2, 2 bytes to goto (bra) over the pointer, 4 bytes for the pointer. 10 bytes == 10 bytes. Phew. So, instead, let's put just the 10 bytes we're modifying at 12d000: Code:
@7A6de- fc d0 fadd fr13,fr12Code:
@7A6de- d2 04 mov.l @(#0x4,pc),r2Code:
; load our new maximum into fr6, replacing the 1.0f previously set by fldi1 fr6Code:
@12d010- 3f 33 33 33 0.7Code:
7A6dc- d2 01 mova @(+0x1,pc), r2Code:
@12d000- d2 03 mov.l @(+0x3,pc), r2 ; float (+0x0) after this code blockUnfortunately I don't have a bench setup nor an emulator setup, so I can't test this code except by uploading it to my actual car, which would either work or panic the ECU, and I'm not quite sure what happens to the ECU if it panics. Probably nothing good for my ability to recover it with flashing the boring ways. But since I put in the effort to learn, duly shared for others to follow along! I'll update someday if I actually get confirmation that it works :) EDIT: Alright, I slept on it and figured out how to patch it in cleanly: just trap the IAM write at the end. See attached. This code hasn't change from A01G through V00C so the specific memory address may change, but for those looking to limit their IAM due to bad gas when it's not productive for the engine to keep striving for IAM 1.0, this ought to (pending testing! no warranty provided, buyer beware) permit capping IAM at something sensible for local gasoline. Which should, in theory, permit it to learn advance properly at the max without constantly resetting it due to IAM advance attempts, rather than having to manually tune everything. |
Quote:
|
| All times are GMT -4. The time now is 02:04 PM. |
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.