Also @nubcake, I think you are being overly optimistic. Especially regarding boost control.
You are not going to transplant existing boost control into the binary. Not unless you have a year to spare.
I wrote my own PID controller from scratch and that took lots less time.
I agree. Wasn't really talking about completely factory-like functionality, rather some greatly simplified approach like you suggested. Patching stock code in can quickly snowball on you. However, I would probably still try to retain as much factory code as possible, only eliminating some redundant or
time-consuming-to-patch-but-not-really-necessary features. It's not too hard, just tedious. Can probably do that in a couple of months, not a year. ME7 C167 code is largely portable, functions can usually be isolated as small code "chunks", which don't disturb each other or the stack and will properly work even when implanted into other ECU (provided, you alter all memory references ofc). E.g. I had copied one of the "double-adjustable cams" ZWGRU function to make my "WMI" ignition maps blend in smoothly with the factory ones.
I see the process like this:
1) isolate a list of "new" LDR functions (code chunks) that need to be patched in & their scheduling;
2) come up with a list of "new" memory vars needed;
3) cross-check which vars "intersect" with NA code, note which stock functions need patching;
(note: steps 1-3 can be greatly simplified by A2L parsing, but I would still go over those in IDA by hand)4) modify assembly code of said "new" or "altered" functions to reference free RAM & ROM instead of originals;
5) patch everything in at appropriate call tables, interface with outputs;
6) check that everything works, de-bug and finally:
7) properly calibrate everything.
1-3 look relatively easy.
4-5 will take quite a bit of time, but are also doable, especially if automated.
It's 6 and 7 that scares me the most, because copying stuff over is easy, but getting it to actually function properly is a completely different thing.
I don't see this as an impossible task. Hard, tedious - yes. Impossible - no.
So I won't be really surprised if someone had already gotten through all the trouble, even though I find that
highly unlikely.
But, I definitely agree, there are more ways than one to skin a cat.