![]() |
Quote:
Firstly, none of this is magic ;) Basically, additional code is written (usually in C++) to undertake the fueling calculations using the speed density formula, and the required lookup tables are added to be referenced by this code. The code is then compiled and inserted into the rom, usually in free ROM space. The way it works is that the existing code calls subroutines in making the (MAF based) fueling calculations. The new SD code replaces this 'hook' into the MAF fueling calculation routine with the custom SD code, and then returns the 'answer' back into the main routine. That's part of the cons of an SD system shoehorned into a MAF implementation - it's not ideal, since all the key calibrations are still referenced in engine load (g/s) as opposed to pressure, which they would be in a native SD implementation (for example the Subaru group N Rom). SD has been available in open source for quite a while (16bit roms, Carberry, Freon's implementation of the 32bit version, and more recently a much more sophisticated implementation by Merp). The source code is actually readily available (see here), and once you dig out all the required hooks and addresses in the rom, would be fairly straightforward to compile. I ported some of the earlier 32bit roms, and also worked with Merp on digging out the required addresses on another rom after he set up a patch development platform in HEW that integrates the disassembly from IDA with the Renesas development environment. I know there are developers on here who should be comfortable working in an IDE such as HEW - I'm willing to work with them to develop a patch. Unfortunately, I started learning arse about end - ASM before C++ - so it's still quite a learning curve for me until I'm comfortable in HEW. |
Quote:
Quote:
Quote:
|
Quote:
Quote:
I could take you through the code, but I fear it will start getting quite OT in this thread - maybe we can start another thread? The hook is a JSR, e.g. Code:
jsr @r3 ; Merp_Speed_Density_Patch |
Quote:
Though I am more than willing to learn more about it and look into it more. Cheers, William Knose |
Quote:
Why would you need to create a whole set of calibrations if you could create a well defined MAF look up table based off the MAP sensor and RPM and other compensations? I understand there is the theory that if you create a whole new set of calibration tables it will perform better but if the MAF lookup table does the same job what would be the difference? Cheers, William Knose |
Quote:
Based on what's been reversed engineered, Subaru appears to be very much behind the times, which isn't surprising considering how small they are. But that leads for simpler modding in some ways. The low level stuff (what assembly commands are used and where it's stored) is important to make sure there isn't any kind of bug or hardware issue, but the high level--the big picture of the control system--is what ultimately affects the tuning. In a typical controls development process, the block diagrams and control architecture are developed first in prototype phase, and the final details of the low level code and hardware implementation are last. Quote:
So there's nothing inherently wrong with converting some pressure into a flow value like all the SD conversion ROMS do. You just can't possibly do an OEM level of control, especially since modern speed density systems on turbo engines use multiple pressure sensors. With the SD conversion roms, when compared to a native implementation you're giving up complexity for simplicity. Quote:
In the end when you're tuning it you just end up putting whatever values into the various tables to get the best results you can. |
Quote:
Quote:
The worry with implementations on stock ECUs, as with any modification really, is what unknown compensations and logic are at play. With 250,000 lines of code plus, and only a fraction understood / disassembled, there is always more to learn. But as with most tuning, you can do a pretty good job as long as you have access to the main levers re: timing, fueling, airflow. Quote:
|
Quote:
Quote:
Quote:
|
EcuTeK Speed Density Custom Mapping
Here is a little more on EcuTeK Speed Density and photos directly from their software.
EcuTeK Custom Speed Density Tables - Speed Density Activation MAF - ECU will use SD Mass Airflow map rather than MAF sensor above this MAF. For hysteresis, top value should be higher than lower value - Speed Density Activation MAP - ECU will use SD Mass Airflow map rather than MAF sensor above this MAP. For hysteresis, top value should be higher than lower value - Speed Density Activation RPM - ECU will use SD Mass Airflow map rather than MAF sensor above this RPM. For hysteresis, top value should be higher than lower value - Speed Density Mass Airflow - Mass airflow derived from RPM and MAP - Speed Density Temperature Compensation - SD Mass Airflow adjustment based on IAT - Speed Density Throttle Delta Compensation - Compensate SD based on Throttle Delta and RPM http://www.delicioustuning.com/sites..._Tables_01.png http://www.delicioustuning.com/sites..._Tables_02.png All tables can be enabled based on: - Map Mode - In which map mode speed density will be active, available maps are 1,2,3,4 - Thresholds - This will offer the ability to offer a change when Speed Density is active. Active only above/below threshold maps. Cheers, William Knose |
SD hook
Looking for an opensource hook into the MAF lookup subroutine to implement SD...
Using the A01G ROM, the subroutine at 2B0D6 (2B17E in A01C ROM) is the only place that I can find that sends MAF_V to get looked up For the MAF table, 2B0D6 is called with r13=08, MAF_V in fr4. The Pull2D function is called and the return MAF value is in fr0. As this table is is indirectly referenced and a few other sensors (ECT, IAT, OilTemp) also use this subroutine, does anyone have a good idea as to how to jump out and back in seamlessly? Looks to me that the hook on Pull2D would work, then need to jump into MerpMod or similar code based on the value at r13. @Td-d, NSFW, Merp, dschultz: Anyone have good ideas? Code:
ROM:0002B0D6 loc_2B0D6: ; CODE XREF: sub_2B0A2+28j |
1 Attachment(s)
Quote:
Below is a plot of MAF Voltage vs AFR error (Wideband-AFR_Command/AFR_Command) on a Bosch 4.9 PLX wideband in the rear O2 sensor position, daily driven logs. Boost up to 9psi for these logs. Parameter filters: Open Loop operation not in decceleration mode, ECT >80, Throttle >10. Quite close to maxing my MAF here, but blow through in this position seems to work ok for me (I'm always WOT at the top end of the scale, so not much partial throttle boost variation to give the above scenarios). |
Quote:
|
Just posted up my opensource SD solution:
http://www.ft86club.com/forums/showthread.php?t=86521 Happy for anyone to use the code and develop (at their own risk) or integrate into MerpMod. |
| All times are GMT -4. The time now is 07:33 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
User Alert System provided by
Advanced User Tagging v3.3.0 (Lite) -
vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.