Skip to content

Map structures ​

The firmware's lookup routines take a pointer to a self-describing struct in ROM. The struct carries the RAM addresses of its inputs and output, so the input/output variable determines the physical scaling. All multi-byte fields are big-endian. [verified] against the wiki map viewer, the decompiled lookup routines (lookup_closest3D/lookup_closest2D in notes.c), and all 239 maps in every F000 dump.

Byte / Word Map2D (curve) ​

+0   u32   in        RAM address of the input variable (0x00FFxxxx)
+4   u32   out       RAM address the result is written to
+8   u16   n         number of breakpoints
+10  T[n]  axis      breakpoints, ascending        (T = u8 or u16)
+10+n*sizeof(T)  T[n]  data   values

Byte Map3D (map) ​

+0   u32   in_x      RAM address of the row input
+4   u32   in_z      RAM address of the column input
+8   u32   out       RAM address of the result
+12  u8    nx        row count
+13  u8    nz        column count
+14  u8[nx] axis_x   row breakpoints
+14+nx  u8[nz] axis_z  column breakpoints
+14+nx+nz  u8[nx*nz]  data, row-major: data[i*nz + j] = f(axis_x[i], axis_z[j])

Interpolation is linear between breakpoints with clamping at the ends; some 2D curves use a "round-up" (nearest-breakpoint) lookup instead.

Distinguishing 2D from 3D: a 3D struct has three leading 0x00FF… pointers. In a 2D struct the third long is the u16 n plus the first axis bytes.

Scaling ​

physical = raw * factor + offset, with factor/offset taken from the input or output variable in RAM variables. Some representative scalings:

QuantityRaw typeScalingUnit
Engine_RPM (map axes)u8X*40rpm
Engine_Loadu8X*0.715kg/h
Ignition advanceu8X*0.75-22.5°
Coolant / radiator / IAT temp (byte)u8X*0.75-48°C
Temperature (word)u16X*0.00293-48°C
Sensor voltage (word ADC)u16X*0.000084V
Throttle angleu8X*0.391°
Duty cyclesu8X*0.390625%
Engine_Torqueu8X*2Nm

Variables named BYTE_00FFxxxx / WORD_00FFxxxx aren't identified yet; their maps are exposed raw.

Inventory ​

239 maps: 158 Byte 2D, 64 Byte 3D, 17 Word 2D. 236 are in the calibration sector (0x8164–0xAE77) and 3 are in the program. 112 are named; 127 are identified by address only. See map catalogue for the full catalogue with addresses, axes, units and partial-dump offsets.

The most tuning-relevant maps, confirmed by diffing community "tuned" files against stock (only these changed):

MapROM structShapeAxes
Ignition_Normal0x0A59E16×14RPM × Load → °
Ignition_Knock_Prevention0x0A82816×14RPM × Load → °
Ignition_WOT0x0A51A16×6RPM × Load → °
Ignition_Idle0x0A9B08×3RPM × Load → °
Injection_Normal0x0945416×12RPM × Load → correction (X-128)
Injection_WOT0x093B816RPM → correction (X-128)
MAF_Correction0x0905812×12Airflow × Throttle → raw
Torque0x09AE011×10RPM × Load → Nm
Knock1…Knock40x09E1C / 0x09E6A / 0x09EB8 / 0x09F0612×4 eachRPM × Load → raw