Looking for some help with a modified program

For discussion and distribution of custom code and hacks
Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Looking for some help with a modified program

Postby Xnke » Mon Feb 13, 2017 1:32 pm

Been working with Robert Saar to get my truck running-he wrote a patch to allow the usage of 2-bar map sensors with the 16196397 PCM. He's said he mostly just copied his successful work on the $A1 code, and while the code works fine in $A1, I haven't got things working properly yet. He seems to have gotten busy with life and work, so I haven't been able to get the pickup truck running. I'm hoping to find someone here who can help me finish debugging and get things going.

Here's the details:

PCM is an early flash-based, dual 68HC11 Delco, for the 1994 F-body manual V6. it is similar to, but not a clone of, the LT1 computer from the same year. Flashing, datalogging, TunerproRT support, all that is there. I built an F-body 3.4L V6 engine to fit in my S-10 pickup truck, complete with 2006 Malibu aluminum heads/intake, (same architecture engine, nothing huge there) and just because someone dared me to, I fitted the supercharger from an L67 engine to the top.

The pickup used a 2.8L version of the same engine, and the 1228062 ECM running $4E was the original computer. I stripped the wiring harness and computer from the S10, and used the Camaro computer and wiring harness, to match the engine. Everything went well, and the engine has been broken in on a kludged program. Basically, using the 2-bar MAP sensor and 36lb/hr L67 injectors, but having the computer use the 1-bar MAP code and 17.50lb/hr stock injector settings. The engine ran fine this way, fuel and spark were perfectly acceptable for break-in.

Now, after fighting with bricked PCMs, bad tunerpro data, and finding out in the end it was all due to a bad USB-to-ALDL cable, I've gotten far enough to find out that the PCM isn't reading the MAP sensor while the engine is running. Basically with the patched code, the MAP sensor updates when I key-on, updates on cranking, but as soon as the engine transitions to "running" the MAP sensor stops updating and tunerpro reports a fixed MAP value. It's the correct value, but the computer appears to not be polling the sensor anymore. Not really gonna run too hot that way.


The above link was actually a video I was taking for the writer of Tunerpro, to show the data errors-this has since been fixed. It also shows the MAP sensor issue, which is why I linked it here.

The PCM works fine if I change the code back to the 1-bar factory code and sub in a 1-bar sensor...for that matter if I just chop the injector size in two and use the 2-bar sensor it works fine, but MAP readings are almost halved. Too much stuff relies on the MAP value in the PCM to actually try to drive it that way, so this isn't really an option.

Here is the stock BIN, the ADX, and the XDF file for tunerpro that includes both a known-good-working bugfix patch (the Revision 3.01 patch) and a Possibly-Might-Work-Great 2/3 bar Boost patch. If anyone here can take a look and see if there is anything that could help figure out why the PCM isn't updating the MAP sensor when patched for 2-bar map sensors, it would be *greatly* appreciated.

To use the patch, open the bin in Tunerpro, select the XDF and under "Patches" select the patch and choose "apply patch". This will apply the patch, and modify the BIN file for you. I have not dissasembled the BIN file yet, so I do not know exactly where it's patched, but I do have a description of how the patch works.

He changed the code to allow the user to set a few fields defining the MAP sensor range (so you can input the correct numbers for a 2 bar or 3 bar sensor), and then also emulates the 1-bar signal for the T-side transmission control code. MAP information is passed over the SPI bus(both an emulated 1BAR signal for T-side usage and the raw 2/3BAR signal for the end-user) since there isn't enough space on the T-side for more emulation code. speaking of space, after all has been added on the E-side, there are two sections of free space, one is about 900 continuous bytes, the other is about 2800 continuous bytes. The VE and Spark tables have been expanded a bit, and each has a second table added for 100-300KpA ranges. (Main VE and then Main VE Boosted, Main Spark and Main Spark Boosted)

The only quirk so far is that the barometric update function may require disabling/severe limiting(since baro updates happen with high throttle/low vacuum, when the blower does its magic). I do not know what's going on here, so not sure what this will require, if anything.

I'm a novice programmer, but I have worked with Atmel stuff before-just not the 68HC11, which is what this PCM uses. (two of them, actually) I will provide as much data/testing as I can, and if needed I can send a socketed PCM and harness plugs and wiring pinout. (I've got four here, they're cheap on Ebay!)

16240891 94 F manual.bin
Stock GM bin
(64 KiB) Downloaded 105 times

P66 V6.adx
ADX Datastream file
(159.14 KiB) Downloaded 118 times

P66 V6.xdf
XDF including patch
(825.56 KiB) Downloaded 101 times

User avatar
Posts: 86
Joined: Wed Dec 02, 2015 4:13 am

Re: Looking for some help with a modified program

Postby quadstar87 » Tue Mar 07, 2017 1:01 am

Does anyone have the disassembly for this? I can help but not without that. I do a lot with 2 and 3 bar on 68HC11 and probably have the code you need

Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Re: Looking for some help with a modified program

Postby Xnke » Wed Mar 22, 2017 3:20 pm

Yes, I have the disassembly, patch notes, and patch data from the guy who is currently helping-he is sending them along and I can send them to you.

He's just short on time, and his first two results are only partial successes

Attempt 1 got the A/D converted and 1Bar map emulated, but didn't work due to the way the Baro update is done.

Attempt 2 I am not sure why/what doesn't work, but the reported values are not quite right and it still doesn't update the MAP value correctly, I am thinking.

I *just* got attempt 2's code yesterday and reported the results to him-he's not gotten back with me yet.

The P66 ECM has two 68HC11's, and the T-side processor that does the baro update does not have codespace available to work in-but the E-side processor that does the MAP updates and most of the other MAP stuff has room. So, in attempt 2 he's moved the Baro update to the E-side processor, emulates the 1 bar signal to the T-side, and from there I am not sure what's going on. The patch notes will explain much much better than I can.

Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Re: Looking for some help with a modified program

Postby Xnke » Mon Mar 27, 2017 4:40 am

Quadstar87, I've PM'ed you a link to the P66V6 codebase that Robert has been working from, including the latest 2 bar stuff. He does the patches through Tunerpro, so I am sure that's how they're formatted.

Lemme know if you need anything else.

Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Re: Looking for some help with a modified program

Postby Xnke » Mon Mar 27, 2017 8:41 am

Turns out he's used a newer version of IDA to disassemble, so I need to upgrade to be able to look at it. Hopefully you've got a new enough version to be able to open the idb files

EDIT: The database files are for version Ida Pro 6.1.

EDIT: I went ahead and PM'ed you the actual .asm files as well-it just struck me that you may not use/have/prefer IDA.

Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Re: Looking for some help with a modified program

Postby Xnke » Thu Mar 30, 2017 8:48 am

Ok. I can't see an issue with the .asm files, so I'm posting them here. These are good disassemblies of both the E-side and T-side controller BINs, as they were read off the FLASH chips.

If anyone can help me make better sense of them or has ideas on how to successfully get them to read a 2-bar MAP sensor, feel free.
T side code.asm
Timing-Controller disassembly
(1.18 MiB) Downloaded 92 times
E side code.asm
Event-Controller disassembly
(1.03 MiB) Downloaded 98 times

Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Re: Looking for some help with a modified program

Postby Xnke » Fri Mar 31, 2017 11:42 am

Shit's goin' down now...Half price books, dollar and 50 cents!



Site Admin
User avatar
Posts: 5629
Joined: Sat Feb 28, 2009 8:34 pm

Re: Looking for some help with a modified program

Postby antus » Mon Apr 03, 2017 9:00 am

From your description there are 1 or more unpatched parts of the code which dont know the new range of the map scalar in ram (it sounds like its reading correctly but not always being interpreted correctly).

Youll need to search for code that references the map scalar in ram and if you find a new place modify the code there similar to other places in the code.

I believe some of our modified code bases have been modified to have a new scaled map and retain the original map so that code which does not need to be boost aware doesnt need modification. I dont know if thats of benifit in your case (especially if the patch is nearly there) but it might be worth keeping in mind.
Have you read the FAQ? For lots of information and links to significant threads see here: viewtopic.php?f=7&t=1396

Posts: 26
Joined: Thu Sep 24, 2015 1:42 pm

Re: Looking for some help with a modified program

Postby Xnke » Fri Apr 21, 2017 5:02 pm

well, we've verified that parts of the patch that should be working are working-but there have been consequences. Hopefully something gets sorted soon...I am itching to drive the truck.

User avatar
Posts: 495
Joined: Thu Sep 17, 2009 2:00 pm
Location: Perth, WA

Re: Looking for some help with a modified program

Postby charlay86 » Sat Apr 22, 2017 3:15 pm

As Antus noted, when I initially extended the spark tables in the enhanced bins, I added a second (cylinder air mass in my case, but you would be doing map) scalar variable and a bit flag to indicate which variable (and table) to use for the lookup.
So I kept the original 0-850mg Cylinder Air Mass (CAM) variable and added a new 850-1650mg CAM variable.
When the CAM exceeds 850mg the flag is set and when it is less than 850mg it is clear.
Any tables that you want to extend check the flag before they do the lookup and then load the correct variable and table offset.
All the remaining code then still works fine and you dont have to sacrifice the resolution.

Doing it as I have described makes it far simpler to patch too


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 2 guests