Tuner Pro

XDF progress update

Posted: 
Monday, November 5, 2018 - 11:30

Current Status

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.

XDF auto load

These are the offsets for the current NNN XDFs.

Map Offset ID Byte
svlne004-svtnp003 0x1cfe6 0x8f
swdxe007-swtnp004 0x1cfe6 0x9b
swdxr004-swtnp004 0x1cfe6 0xdf
swdxr004-swtnp006 0x1cfe6 0xdf
swdxe007-swtnp006 0x1cfe6 0x9b
sthdr009-sttdp009 0x1ba26 0x3d
suhde036-sutdp014 0x1ba26 0x44
swdxr002-swtnp004 0x1cfe6 0xb8
svdxe008-svtnp006 0x1cfe6 0x30
suhdr009-sutzp005 0x1ba26 0x3f
svdxe008-svtnp005 0x1cfe6 0x30
suhde036-sutdp012 0x1ba26 0x44
suhdr009-sutzp004 0x1ba26 0x3f
svloe005-svtnp005 0x1cfe6 0xca
svloj002-svtnp006 0x1cfe6 0xbd
svdxe004-svtnp003 0x1cfe6 0xe6
svloe004-svtnp003 0x1cfe6 0xd1
svdxe003-svtnp003 0x1cfe6 0xad
sthle022-sttlp010 0x1b98e 0xee
swdxk001-swtnp004 0x1cfe6 0x33
svloe005-svtnp006 0x1cfe6 0xca
svdxr007-svtnp005 0x1cfe6 0x51
sthde021-sttdp010 0x1ba26 0xa1
svloe002-svtnp003 0x1cfe6 0x8b
svdxr007-svtnp006 0x1cfe6 0x51
svloj002-svtnp003 0x1cfe6 0xbd
svlor005-svtnp005 0x1cfe6 0x9
svlor004-svtnp003 0x1cfe6 0xf
sthde021-sttdp009 0x1ba26 0xa2
svlor002-svtnp003 0x1cfe6 0x10
svdxr005-svtnp003 0x1cfe6 0x4d
svdxr002-svtnp003 0x1cfe6 0x4e
swdxk003-swtnp006 0x1cfe6 0x86
svdxe006-svtnp003 0x1cfe6 0x2c
sthle022-sttlp009 0x1b98e 0xef
svdxg003-svtnp006 0x1cfe6 0x7b
swdxk003-swtnp004 0x1cfe6 0x86
surdk004-sutzp004 0x1ba26 0x3b
svlnr004-svtnp003 0x1cfe6 0x16
svlnr005-svtnp005 0x1cfe6 0xff
swdxe004-swtnp004 0x1cfe6 0x5a
surdk004-sutzp005 0x1ba26 0x3b
svlnr005-svtnp006 0x1cfe6 0xff
svlne006-svtnp003 0x1cfe6 0xd5
sthdr009-sttdp010 0x1ba26 0x3c
svlne007-svtnp005 0x1cfe6 0xbb
svlnr002-svtnp003 0x1cfe6 0x18
svlne007-svtnp006 0x1cfe6 0xbb

Tuner Pro XDF's

Posted: 
Tuesday, August 22, 2017 - 16:00

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.

Header editing in Tuner Pro

Posted: 
Wednesday, April 5, 2017 - 13:45

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.

  1. Open up the smoke map definition (right click / F2) and noted the Address, Data Size and Number of Columns under the Columns tab.

Find column details

  1. 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.

New Table - General Tab

  1. Add the number of columns under the columns tab.

 Columns Tab

And save.

This will give you a “table” which looks like this...

 Completed header editor

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.

Using an XDF with Td5 engine maps...

Posted: 
Thursday, March 2, 2017 - 06:45

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.

Open dialog

2. Open the XDF

Use XDF >> Select XDF to open the appropriate XDF file.

Open XDF

3. Add Compare Bin

Use Compare >> Load Compare Bins... to load one or more compare bins.

Load 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
    Random mod

  • Clicking the "Scales" icon gives "Show compare bin data" - table values from the Compare Bin.
    compare bin data

  • With "Show compare bin data" on, clicking "Show compare difference" shows the difference between the map being edited and the compare bin.
    compare difference

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.

Footnote

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.

Creating Tuner Pro maps for the Td5 ECU

Posted: 
Monday, January 6, 2014 - 19:30

Introduction

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.

 

Td5 Map editing tools: TunerPro

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. 

TunerPro screenshot with in progress TD5 definitions

 

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....