As a thank you to donors who have contributed "above and beyond" I'm adding a new access level to the XDF.
This will be a "donor_plus" level XDF which will have additional level of table definition over the basic donor XDFs.
These leveled up XDFs are currently in progress and will be made available at the same time as the v2.2 donor XDFs.
I've uploaded a long overdue update to the MSB XDF's which bring them into line with the EU2 NNN versions.
The archive now includes additional D2 Auto XDF's (MSB101260, MSB101261 and MSB101350).
Thanks to Nicky at Rovertech providing bins for these ECUs.
Currently these XDF are only correct for the first map in the .bin.
The layout of second map is usually sufficiently different to require a different XDF.
I'll look at including definitions for the second map in a future release.
Donors can access the archive after logging in.
As I posted recently the data logger project has been taking up a lot of my time over the past few months.
The main intention of the logger is to enable faster, configurable data logging which can be saved into either CSV or Tuner Pro XDL formats.
Over the past few weeks I've been doing a bit of work on reverse engineering Tuner Pro's XDL data log format. I got about 95% worked out before I got in touch with Tuner Pro developer Mark Mansur who very kindly pointed out with the parts I'd got wrong and filled in the bits I couldn't figure out.
As a way of developing and testing the ADX writer code on the desktop, I've written a bunch of code that reads in an ADX file and Nanocom log file (from an Nanocom running current firmware) and uses that information to create an XDL log file.
There are some issues like the lack of Throttle % in the EVO logs that makes the convertor less useful than it should be.
As a teaser to show the possibilities ADX logging opens up this screen capture shows TP data tracing a converted Nanocom EVO log.
The MAF airflow calculation is being done in Tuner Pro RT, and a simple monitor setup shows AAP and MAP.
I'm currently working on new method for generating XDF's which is providing a chance to streamline the process.
One issue that has been bothering me is that significant portion of the NNN XDF's are redundant. This occurs because the XDF's are currently created based on the variant-fuel map pairs in each .map file.
The reality is that the only difference between the fuel maps in for example swdxe007-swtnp004.map and swdxe007-swtnp006.map is the number of the variant map in the fuel map. The fuel map checksum also changes by the difference between the variant map version numbers.
Neither of these differences have any impact on how the XDF defines the tables and constants within the fuel .map. A small number of NNN EU2 maps have additional differences in 5-6 constant values but again the structure of the fuel map is the same, so one XDF definition can edit both versions.
So the upshot is that the next release of the XDF's will be based on the fuel map identifier only, and this will reduce the number of NNN XDF by about 30-40%.
XDF auto loading
Tuner Pro has the ability to auto load XDF's when a .bin / .map is loaded. Unfortunately this must be manually configured but it saves a bit of messing around once it's configured. It's usable with current versions of the XDFs but will make more sense when the XDFs are consolidated.
The auto loading is configured under Tools > Preferences > Default XDFs by selecting enable default definitions.
These are the offsets for the current NNN XDFs.
The donor-ware XDF's for NNN ECU's had a bit of a version bump today...
Note: These XDF's and all future updates are available anyone who supports the site with a donation of $5.00 USD or more.
These are changes I could remember:
Version 2.0 20170822
- Add SOI maps
- Add Smoke compensation maps
Note that EU3 maps use an adjust map and scaling map pair.
The scaling map is a multiplier so if there is 0 in the scaling map the adjust output is 0.
It's going to take me a bit of time to document so please be patient.
Information will be posted when it is ready.
- Add Air Conditioning load map
- Add Auto Torque Reduction IQ map
- Add Auto Engine Torque map
- Alter scalar naming
- Add Waste Gate Modulator control maps and scalars
- Add "hidden" Injector Idle Response map to EU2 XDFs
- other stuff...
There were a few tweaks to improve axis scaling, and descriptions added...
As always the XDF's are a work in progress.
Tuner Pro Update
Mark Mansur has just uploaded a new version of Tuner Pro which fixes a bug introduced in the previous version.
The bug prevented the patches included in the Td5 XDF's from applying.
You can download the new version from the Tuner Pro Download Page.
Update I've added a short video giving a run through on adding a column header editor to a table.
A few people have asked how to edit headers for map tables, so this is quick how-to on setting up header edit maps.
The screen shots are for a EU2 map, so don't assume that the values in the screen shots will work for you - they most likely won't.
- Open up the smoke map definition (right click / F2) and noted the Address, Data Size and Number of Columns under the Columns tab.
- Add a new table (right click, Insert new XDF parameter), On the general tab add a name, the address from the columns tab of the original map and the data size.
- Add the number of columns under the columns tab.
This will give you a “table” which looks like this...
You can now edit the header values in the cells of the new table.
This video gives a quick run through of the process, and should hopefully fill in any gaps.
There are a couple of little tricks to loading up the Tuner Pro defintions so thought I'd make a quick post on the procedure.
You'll have to excuse the "retro" Win XP look n feel. I'm running a Windows virtual machine under macOS and XP does the job without too much bloat.
1. Open a file to edit.
Use File >> Open Bin to open the file to edit.
For nanocom .map file select "All Files" as the file type.
2. Open the XDF
Use XDF >> Select XDF to open the appropriate XDF file.
3. Add Compare Bin
Use Compare >> Load Compare Bins... to load one or more compare bins.
With a compare bin loaded you can use the "Show compare difference" and "Show compare bin data".
Using a random mod to illustrate, select a range of cells and multiply by 1.05
Clicking the "Scales" icon gives "Show compare bin data" - table values from the Compare Bin.
With "Show compare bin data" on, clicking "Show compare difference" shows the difference between the map being edited and the compare bin.
If you find yourself having to load the same base file and xdf every time you start Tuner Pro, go into Tools >> Preferences and under the "Genera"l tab enable the two options to load the last used file at startup.
I'm offering what I describe as a "basic" XDF as donor-ware.
These have a bit more detail on tables than Td5MapEditor, have some unit converted to more human friendly representations, and allow direct editing on MAP and Boost limits using the GUI.
The "deal" is anyone who makes a donation will receive an XDF of their choice. How much you donate is entirely up to you.
Tuner Pro is a powerful free (but not open) map editing program that runs under Windows. Out of the box there are no definition files available for the TD5 ECU so we need to create a XDF file from scratch.
The creation process requires a good understanding of the ECU file format you are creating the definition for. At a minimum this means understanding where the tables are located and how they are structured.
Step 1: Finding the Tables
As a starting point you will need a hex editor. I primarily use OSX and have been using Hex Fiend [ http://ridiculousfish.com/hexfiend/ ] as my primary editor. I’ve also used 0xED [ http://www.suavetech.com/0xed/ ] and that is possibly even better for the task at hand. I haven’t really used Windows or Linux Hex Editors so can’t recommend anything specific - I’m sure there are decent tools out there.
Once you have got your hex editor installed the first thing to do is open up your .map file. It’s actually easier to work with a straight .bin of the fuel map as it avoids a lot of the messing around with offsets…
The loaded file should look something like this:
The index of maps is located at an offset of 0x1CEFE from the start of the map file. Using the hex editors “go to position” , “go to offset”, or “move selection to” , enter the offset 0x1CEFE and hit return to get to first entry in the index list. As an aside “0x” indicates the number is hexadecimal, and the hex editor might require you enter this prefix. Hex Fiend does, 0xED doesn’t.
The map addresses are 2 bytes or 16 bits long, and the first map address should be 0x0934 in the EU3/15P maps at least. This address is an offset from the beginning of the fuel map. Because the Nanocom map format bundles both the variant and fuel map together it is necessary add the offset from the start of the .map file to the beginning of the fuel map. This should be 0x19010 for all NNN ECU’s.
Putting this together we now know that the ECU reference to the first map is: 0x19010 + 0x934 = 0x19944.
At offset 0x19944 you see the following:
This is the start of the definition of “Map 000”.
Step 2: Decoding the Map Definition
Once the index of map addresses has been located, and the method for locating the start point of each map definition is understood, we need to look at how the information in each definition is structured in order to extract useful information.
The map definition has the following format:
| column count (2 bytes) | row count (2 bytes) | column headers (2 bytes * column count) | row headers (none if row count = 1, else row headers (2 bytes * row count) | map data ( 2 bytes * column count * row count) |
So looking at the definition for map000/0x934 beginning at 0x19944 we can see that this 2D map has:
- 6 columns
- 1 row
- 6 column headers
- 0 row headers
- 6 items of data
When creating a definition for Tuner Pro the key pieces of information are:
- Number of Rows
- Number of Columns
- Start address of Map Data
- Start address of Row Headers
- Start address of Column Headers
The number of rows and columns are easy to obtain, but the other information requires a bit of simple math.
We know the start address of the map definition - 0x19944 offset from the start of the .map file in the case of Map 000.
The column and row counts each take 2 bytes, or a total of 4 bytes. So adding 4 bytes to the address of the map gives the start address of the column headers: 0x19948.
The column headers take up 2 bytes * number of columns. In this case 0x2 * 0x6 = 0xC which is added to the address of the column headers to find the next segment of the definition. As Map 000 has one row, and therefore a 2D table, there is no row header and the next segment beginning at 0x19954 is the map data.
The procedure is basically the same for every table. With 3D tables, you need to account for the size of the row headers but this is the only real difference.
Step 3: Creating a Tuner Pro Definition
Armed with the addresses for the table we can begin to create a map definition in Tuner Pro.
From the XDF menu in Tuner Pro select “New XDF”, then “View/Edit XDF Header Info”.
Starting from the top, fill out Title, Author, XDF version. The Nanocom .map file is 0x1D00E bytes long, so enter this into the “Bin Size (Hex)” field. Set the New XDF Item Defaults to “Size: 2 bytes (16 bits)”, “Signed - ticked”, “Output: Integer” and “Significant Digits: 2” , then “Apply” and “Close”. At this point it’s a good idea to save the XDF definition.
Step 4: Defining a Map
From the XDF menu select “Create new XDF Parameter. At the dialog that appears select “Table” and continue.
The next task is to fill in the Tuner Pro map definition. Name the tale something meaningful. It’s possibly worth following the Td5 Map Editor conventions here with Map000 -> Map 115.
Address needs to be filled with the start address of the map data. In the case of Map 000 this is 0x19954. As we know from earlier discussion of the ECU map structure the cell data size is 2 bytes. This is all that is really essential for this page.
Switch to the Row tab. For a 2D table with one row, all that is required is to enter 1 in the “Number of Rows”.
Switch to the Columns tab.
Here we need to enter a bit more information. “Number of columns” is set to 6, then Label Source is set to “Internal, Pure”. This enables an extra section of configuration options which allows setting the location of header data.
In the section “Pure Internal Axis Label Parameters” section enter the start address of the column headers, in this case 0x19948. Data size is set to 2 bytes (16 Bits), Address Step to 2 and Significant Digits to 2. Once you are done click Apply then Close.
At this point you should save the XDF file.
Step 5: Load a map file
From the file menu select “Open Bin…”, set the file type to “All Files (*.*)” then open up an EU3 TD5 map file.
Once you have both an XDF and “Bin” open you should be able to click on the Map000 in the Parameter tree display.
This will give you a floating window of the table with headers and data.
Clicking on the graph icon will give you a graphical display of the same information.
Step 6: Repeat until done…
The same process is repeated for each table you need to edit. There a lots of tweaks and refinements available but they aren’t necessary for basic editing.
End Note: Finding map addresses
Obviously the procedure for locating map addresses detailed above is painfully slow, and is given primarily so the process of finding the tables and how this portion of the fuel map is structured is clear. There is nothing worse than blindly following instructions with no understanding of the “why”.
A more practical solution is to set up a calculator in Excel. By using the HEX2DEC, DEC2HEX and IF functions it is reasonably straight forward to make a spreadsheet to do the grunt work. In fact I'm wondering why I didn't make one earlier.
The attached archive is an XLSX spreadsheet that calculates the three hex address required to configure the tables for Tuner Pro. The required inputs are Table address, number of columns, number of rows. You can select a base address of 0x19010 (if you are using the full map files) or 0x0 (if you are editing the fuel map only). It's also possible to select the row and column counts as dec(imal) or hex(idecimal).
The easiest way to get the base address and column and row sizes is to open the .map file you want to work with in Td5 Map Editor and read of the information from the table index list.
I've been using Luca's Td5 Map Editor to view map information as I work on the ECU code disassembly for the past 12 months or so, and it's been a useful tool for that purpose. However I've recently got to the point where Td5 Map Editor's map descriptions are quite different to how I'm thinking about code flows and operation. It's got to the point where I need to have to mentally over-ride the map descriptions every time I look at a "known" table.
I'd looked at Tuner Pro months ago and pushed it into the "not going to work" basket, but after reading the documentation on creating definintion files it looks like it might be useable. The big advantage for me is that I can create and edit the map descriptions very simply. The draw back is the definition format is hard coded to specific map addresses, so a definition is tied to a specific variant map at best and a specific fuel map at worst. Even so I think the advantages outweigh the drawbacks for my own use.
I've also been able to setup the "EGR Delete" that I've discovered as a reversable patch which is pretty cool. I'm yet to see any commercial remap using this trick and it is far neater and cleaner than the alternative of maxing out the EGR table. The delete sets a switch in the ECU config that results in the code that calculates EGR amount to be completely skipped.
We'll see where this leads....