Mykk
10-28-2017, 12:28 AM
Hey everyone, I'm going to remake this thread as an addendum to my previous thread on the same subject. I wanted to take this opportunity of photobucket destroying the internet to update this info thread with new pics and a few corrections of the the process.
I am by no means authoritative on this subject nor a pro tuner on this platform. All I can do is share the information that I have learned, collected and that I personally can currently comprehend up until this point. I am still learning new things about this process every day. Afterall; I'm a gearhead and not a programmer or engineer.
Let's start with 'How do I get the code from my car to start the tuning process?'
First remove the DME from the vehicle. Once on your work bench or preferred work space pry the 6 tabs back that hold the top plate to the DME base and pry up the plastic center pin rivit located in the middle of the DME base. More then likely those tabs will break off, don't worry about it:
http://preview.ibb.co/hALEy6/2017_10_27_17_48_10.jpg (http://ibb.co/cmGnJ6)
http://preview.ibb.co/guxuy6/2017_10_27_17_49_49.jpg (http://ibb.co/eMMMd6)
Flip over the DME and remove the 4 torx headed screws holding the DME cover on.
http://preview.ibb.co/fyKwBR/2017_10_27_17_49_06.jpg (http://ibb.co/dRiOrR)
With the DME cover removed next step is to move the top circuit board out of the way. Remove the torx headed screw that holds the top print board down.
http://preview.ibb.co/m4DdQm/2017_10_27_17_51_48.jpg (http://ibb.co/jPu7J6)
Lift the rear of the print board to unsnap from hold down clips then begin to pry the tabs that hold the print board into place in the electrical connector side:
http://preview.ibb.co/cZdyrR/2017_10_27_17_50_30.jpg (http://ibb.co/e6DWBR)
http://preview.ibb.co/b33Ckm/2017_10_27_17_50_50.jpg (http://ibb.co/gKQgd6)
http://preview.ibb.co/dVRnJ6/2017_10_27_17_51_08.jpg (http://ibb.co/emsirR)
http://preview.ibb.co/fddCkm/2017_10_27_17_51_28.jpg (http://ibb.co/bXS55m)
With the top print/circuit board loose, but still connected to bottom circuit board by way of wire ribbons you can now, Gently!, pry the chip loose from it's socket
http://preview.ibb.co/mGYOrR/2017_10_27_17_52_59.jpg (http://ibb.co/d3jk5m)
http://preview.ibb.co/c6P7J6/2017_10_27_17_52_40.jpg (http://ibb.co/mr6bBR)
Install chip into the chip reader/programmer: I use this inexpensive TL866CS reader and MiniPro V6.6 software to read and program chips. I also have a Moates Burn2 and Flash & Burn software but prefer the TL866CS.
http://preview.ibb.co/kGgbBR/2017_10_27_18_03_32.jpg (http://ibb.co/do9k5m)
Read the chip. Save the file. The stock chip is a 27C512, you can see I'm using the 27SF512 option to read it. Either setting will work. The 27C is UV erasable only, thus the exposed window on the chip. The 27SF is erasable electronically by the reader program. Here in my part of Arizona I can leave the exposed chip outside in direct sunlight for a couple days to a week in order to fully erase the information on the chip. Once the chip is blank the TL866CS can program the 27C512 chip, Burn2 can not.
http://preview.ibb.co/ijRXkm/2017_10_27_18_04_07.jpg (http://ibb.co/diWyQm)
So now you've got a 64kb file of binary code that gets viewed in hexadecimal. It's like looking at an alien language for the first time.
http://preview.ibb.co/cQ4UWR/2017_10_27_18_05_32.jpg (http://ibb.co/g9qQ5m)
Okay, there it is. The tune that runs your vehicle.... now what? As far as editing software is concerned, you've got options. Advanced tuners like to use a program called WinOLS, I didn't find this program user friendly and sought other options. The reason this program is popular is because for several applications of all makes & models the tuner can export the engineer released damos file in A2L format and have access to every map straight from the engineers mouth. I have not found such a file for the 404DME. For very basic code viewing I use a program called HxD. HxD is also good for comparing multiple tunes side by side and viewing the differences. Another popular tuning software (my preference) is TunerPro. Or in the case of the equipment I use TunerProRT for realtime emulation. At it's basic level Tunerpro only needs two fundamental files, the .BIN which is the saved binary file that we read from the chip earlier. Then also an .XDF file that acts as the BabelFish to decipher the raw code into a human interface that we can use to tune. .XDF files are individual tuner made files specific to each application. Because they are tuner made by enthusiasts they have a likely chance of being incorrect on a lot of different variables...especially for the M60's 404DME in which very little engineer data has been released to the public. TunerPro also uses a 3rd kind of file .ADX which act's as an interface to live data as the engine is running for datalogging and even setting up virtual gauges. There is no known .ADX file for the 404DME.
The Bosch Motronic version M3.3 formatting that runs our 404DME equip'd 530's & 540's has two distinct sections of coding. The first section of code has to do with the assignments and functioning of the specific flavor of the 8051 variant of microcontroller. The 2nd section of the code is what we will be focusing on, located there are all of the ignition timing maps and modifiers. All of the fueling maps and modifiers. DTC's. Transfer functions. Scalars & functions. Everything we need in order to tune:
The maps in Motronic M3.3 have whats know as axis identifiers and header information. Several axis identifiers are still a mystery, but from my research here's what I've found:
In hexadecimal:
D0 & CE = Engine RPM
D7 = Water Temperature
D3 & D4 = Intake Air Temp
D5 = Load
D6 & CC = Throttle Position Sensor
D7 = Water Temperature
D8 = Voltage
1C = Vehicle Speed/KPH
Unkown's:
CB, CF, D2, D9, 1D
The map header format in byte sequence is; Axis identifier, how many bytes the axis is, then the axis labeling.
For example;
In hexadecimal: D0 0C 05 0A 0A 0A 04 0C 0D 07 10 0A 1E 60
Converted hex to decimal: 208 012 005 010 010 010 013 012 013 007 025 010 030 096
D0 is RPM, the axis is 12 bytes long. In order to decipher axis labeling you work backwards. In hexadecimal FF is a blank byte, it tells the programming to ignore this byte or "reset". FF in decimal is 255. Starting at 255 you subtract the last byte's value and then use an engineer designated factor and offset. For RPM it's X*40. (Occasionally axis headers reference 256 for the equation, like this one)
256-96 = 160
160 * 40 = 6,400RPM
30 * 40 = 1200
6400-1200 = 5,200RPM
10 * 40 = 400
5400 - 280 = 4,800RPM
25*40 = 1000
5120-520= 3,800RPM
7 * 40=280
3800-280= 3,520RPM
13*40=520
3520-520= 3,000RPM
12*40=480
3000-480= 2,520RPM
13*40=520
2600-520= 2,000RPM
10*40=400
2200-400= 1,600RPM
10*40=400
1800-200 = 1,200RPM
10*40=400
1400-400= 800RPM
5*40=200
800-200= 600RPM
Let's look at that code:
Here is a Map that starts with that D0 identifier. After the D0 axis identifier & header info is another identifier of D5, for Load. We can also see that this is a 12x10 map based on the header info.
http://preview.ibb.co/hinSJ6/2017_10_27_18_06_00.jpg (http://ibb.co/bKi1d6)
Let's look at that Map in decimal format:
http://preview.ibb.co/bszVo6/2017_10_27_20_24_04.jpg (http://ibb.co/cXJ1vm)
The 120 bytes after the header axis info (12x10) are the actual values the tuning uses for whatever this map might be; ignition timing, fuel...etc
I know from my experience that this specific Map is Part Throttle Ignition Timing. There is a separate Map for Idle ignition timing as well as another Map for Wide Open Throttle ignition timing. Using an engineer specified formula of (X*.75)-45 we can translate the raw data in the decimal format of the code into actual human interface of crank degrees that looks like this (with RPM on Y-axis and Load on X-axis, low load is on left side of map. As load increases it draws from cells heading to the right). Keep in mind, this is one of many timing modifier maps. The value expressed here isn't the actual real time ignition timing event happening in the cylinder as there are several other maps working at the same time to add or remove timing based on temperatures, RPM and load.
This is the part throttle timing map from my 540i/6:
http://preview.ibb.co/jJfEFm/2017_10_27_20_32_54.jpg (http://ibb.co/myzkMR)
This one is from a 540i Automatic:
http://preview.ibb.co/jO9wT6/2017_10_27_20_34_22.jpg (http://ibb.co/n5BAo6)
..and this one is a 530i Auto:
http://preview.ibb.co/jBVs1R/2017_10_27_20_41_24.jpg (http://ibb.co/iYv386)
In the code at the end of the maps is a hexadecimal index. It has the hex addresses of every map used by the DME. Equating to 130 different maps, not including transfer functions, DTC's, scalars, switches or functions.
http://preview.ibb.co/nHt4gR/2017_10_27_20_49_41.jpg (http://ibb.co/kUsao6)
My own 404 XDF that I've been building for a couple of years now has roughly 152 different maps and functions.
I'll be back to update and keep giving details & examples as we fall down the rabbit hole....Next I'll talk about fueling, and some of the equipment used along the way to tune. Cheers -Mykk
I am by no means authoritative on this subject nor a pro tuner on this platform. All I can do is share the information that I have learned, collected and that I personally can currently comprehend up until this point. I am still learning new things about this process every day. Afterall; I'm a gearhead and not a programmer or engineer.
Let's start with 'How do I get the code from my car to start the tuning process?'
First remove the DME from the vehicle. Once on your work bench or preferred work space pry the 6 tabs back that hold the top plate to the DME base and pry up the plastic center pin rivit located in the middle of the DME base. More then likely those tabs will break off, don't worry about it:
http://preview.ibb.co/hALEy6/2017_10_27_17_48_10.jpg (http://ibb.co/cmGnJ6)
http://preview.ibb.co/guxuy6/2017_10_27_17_49_49.jpg (http://ibb.co/eMMMd6)
Flip over the DME and remove the 4 torx headed screws holding the DME cover on.
http://preview.ibb.co/fyKwBR/2017_10_27_17_49_06.jpg (http://ibb.co/dRiOrR)
With the DME cover removed next step is to move the top circuit board out of the way. Remove the torx headed screw that holds the top print board down.
http://preview.ibb.co/m4DdQm/2017_10_27_17_51_48.jpg (http://ibb.co/jPu7J6)
Lift the rear of the print board to unsnap from hold down clips then begin to pry the tabs that hold the print board into place in the electrical connector side:
http://preview.ibb.co/cZdyrR/2017_10_27_17_50_30.jpg (http://ibb.co/e6DWBR)
http://preview.ibb.co/b33Ckm/2017_10_27_17_50_50.jpg (http://ibb.co/gKQgd6)
http://preview.ibb.co/dVRnJ6/2017_10_27_17_51_08.jpg (http://ibb.co/emsirR)
http://preview.ibb.co/fddCkm/2017_10_27_17_51_28.jpg (http://ibb.co/bXS55m)
With the top print/circuit board loose, but still connected to bottom circuit board by way of wire ribbons you can now, Gently!, pry the chip loose from it's socket
http://preview.ibb.co/mGYOrR/2017_10_27_17_52_59.jpg (http://ibb.co/d3jk5m)
http://preview.ibb.co/c6P7J6/2017_10_27_17_52_40.jpg (http://ibb.co/mr6bBR)
Install chip into the chip reader/programmer: I use this inexpensive TL866CS reader and MiniPro V6.6 software to read and program chips. I also have a Moates Burn2 and Flash & Burn software but prefer the TL866CS.
http://preview.ibb.co/kGgbBR/2017_10_27_18_03_32.jpg (http://ibb.co/do9k5m)
Read the chip. Save the file. The stock chip is a 27C512, you can see I'm using the 27SF512 option to read it. Either setting will work. The 27C is UV erasable only, thus the exposed window on the chip. The 27SF is erasable electronically by the reader program. Here in my part of Arizona I can leave the exposed chip outside in direct sunlight for a couple days to a week in order to fully erase the information on the chip. Once the chip is blank the TL866CS can program the 27C512 chip, Burn2 can not.
http://preview.ibb.co/ijRXkm/2017_10_27_18_04_07.jpg (http://ibb.co/diWyQm)
So now you've got a 64kb file of binary code that gets viewed in hexadecimal. It's like looking at an alien language for the first time.
http://preview.ibb.co/cQ4UWR/2017_10_27_18_05_32.jpg (http://ibb.co/g9qQ5m)
Okay, there it is. The tune that runs your vehicle.... now what? As far as editing software is concerned, you've got options. Advanced tuners like to use a program called WinOLS, I didn't find this program user friendly and sought other options. The reason this program is popular is because for several applications of all makes & models the tuner can export the engineer released damos file in A2L format and have access to every map straight from the engineers mouth. I have not found such a file for the 404DME. For very basic code viewing I use a program called HxD. HxD is also good for comparing multiple tunes side by side and viewing the differences. Another popular tuning software (my preference) is TunerPro. Or in the case of the equipment I use TunerProRT for realtime emulation. At it's basic level Tunerpro only needs two fundamental files, the .BIN which is the saved binary file that we read from the chip earlier. Then also an .XDF file that acts as the BabelFish to decipher the raw code into a human interface that we can use to tune. .XDF files are individual tuner made files specific to each application. Because they are tuner made by enthusiasts they have a likely chance of being incorrect on a lot of different variables...especially for the M60's 404DME in which very little engineer data has been released to the public. TunerPro also uses a 3rd kind of file .ADX which act's as an interface to live data as the engine is running for datalogging and even setting up virtual gauges. There is no known .ADX file for the 404DME.
The Bosch Motronic version M3.3 formatting that runs our 404DME equip'd 530's & 540's has two distinct sections of coding. The first section of code has to do with the assignments and functioning of the specific flavor of the 8051 variant of microcontroller. The 2nd section of the code is what we will be focusing on, located there are all of the ignition timing maps and modifiers. All of the fueling maps and modifiers. DTC's. Transfer functions. Scalars & functions. Everything we need in order to tune:
The maps in Motronic M3.3 have whats know as axis identifiers and header information. Several axis identifiers are still a mystery, but from my research here's what I've found:
In hexadecimal:
D0 & CE = Engine RPM
D7 = Water Temperature
D3 & D4 = Intake Air Temp
D5 = Load
D6 & CC = Throttle Position Sensor
D7 = Water Temperature
D8 = Voltage
1C = Vehicle Speed/KPH
Unkown's:
CB, CF, D2, D9, 1D
The map header format in byte sequence is; Axis identifier, how many bytes the axis is, then the axis labeling.
For example;
In hexadecimal: D0 0C 05 0A 0A 0A 04 0C 0D 07 10 0A 1E 60
Converted hex to decimal: 208 012 005 010 010 010 013 012 013 007 025 010 030 096
D0 is RPM, the axis is 12 bytes long. In order to decipher axis labeling you work backwards. In hexadecimal FF is a blank byte, it tells the programming to ignore this byte or "reset". FF in decimal is 255. Starting at 255 you subtract the last byte's value and then use an engineer designated factor and offset. For RPM it's X*40. (Occasionally axis headers reference 256 for the equation, like this one)
256-96 = 160
160 * 40 = 6,400RPM
30 * 40 = 1200
6400-1200 = 5,200RPM
10 * 40 = 400
5400 - 280 = 4,800RPM
25*40 = 1000
5120-520= 3,800RPM
7 * 40=280
3800-280= 3,520RPM
13*40=520
3520-520= 3,000RPM
12*40=480
3000-480= 2,520RPM
13*40=520
2600-520= 2,000RPM
10*40=400
2200-400= 1,600RPM
10*40=400
1800-200 = 1,200RPM
10*40=400
1400-400= 800RPM
5*40=200
800-200= 600RPM
Let's look at that code:
Here is a Map that starts with that D0 identifier. After the D0 axis identifier & header info is another identifier of D5, for Load. We can also see that this is a 12x10 map based on the header info.
http://preview.ibb.co/hinSJ6/2017_10_27_18_06_00.jpg (http://ibb.co/bKi1d6)
Let's look at that Map in decimal format:
http://preview.ibb.co/bszVo6/2017_10_27_20_24_04.jpg (http://ibb.co/cXJ1vm)
The 120 bytes after the header axis info (12x10) are the actual values the tuning uses for whatever this map might be; ignition timing, fuel...etc
I know from my experience that this specific Map is Part Throttle Ignition Timing. There is a separate Map for Idle ignition timing as well as another Map for Wide Open Throttle ignition timing. Using an engineer specified formula of (X*.75)-45 we can translate the raw data in the decimal format of the code into actual human interface of crank degrees that looks like this (with RPM on Y-axis and Load on X-axis, low load is on left side of map. As load increases it draws from cells heading to the right). Keep in mind, this is one of many timing modifier maps. The value expressed here isn't the actual real time ignition timing event happening in the cylinder as there are several other maps working at the same time to add or remove timing based on temperatures, RPM and load.
This is the part throttle timing map from my 540i/6:
http://preview.ibb.co/jJfEFm/2017_10_27_20_32_54.jpg (http://ibb.co/myzkMR)
This one is from a 540i Automatic:
http://preview.ibb.co/jO9wT6/2017_10_27_20_34_22.jpg (http://ibb.co/n5BAo6)
..and this one is a 530i Auto:
http://preview.ibb.co/jBVs1R/2017_10_27_20_41_24.jpg (http://ibb.co/iYv386)
In the code at the end of the maps is a hexadecimal index. It has the hex addresses of every map used by the DME. Equating to 130 different maps, not including transfer functions, DTC's, scalars, switches or functions.
http://preview.ibb.co/nHt4gR/2017_10_27_20_49_41.jpg (http://ibb.co/kUsao6)
My own 404 XDF that I've been building for a couple of years now has roughly 152 different maps and functions.
I'll be back to update and keep giving details & examples as we fall down the rabbit hole....Next I'll talk about fueling, and some of the equipment used along the way to tune. Cheers -Mykk