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 valuesByte 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:
| Quantity | Raw type | Scaling | Unit |
|---|---|---|---|
| Engine_RPM (map axes) | u8 | X*40 | rpm |
| Engine_Load | u8 | X*0.715 | kg/h |
| Ignition advance | u8 | X*0.75-22.5 | ° |
| Coolant / radiator / IAT temp (byte) | u8 | X*0.75-48 | °C |
| Temperature (word) | u16 | X*0.00293-48 | °C |
| Sensor voltage (word ADC) | u16 | X*0.000084 | V |
| Throttle angle | u8 | X*0.391 | ° |
| Duty cycles | u8 | X*0.390625 | % |
| Engine_Torque | u8 | X*2 | Nm |
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):
| Map | ROM struct | Shape | Axes |
|---|---|---|---|
Ignition_Normal | 0x0A59E | 16×14 | RPM × Load → ° |
Ignition_Knock_Prevention | 0x0A828 | 16×14 | RPM × Load → ° |
Ignition_WOT | 0x0A51A | 16×6 | RPM × Load → ° |
Ignition_Idle | 0x0A9B0 | 8×3 | RPM × Load → ° |
Injection_Normal | 0x09454 | 16×12 | RPM × Load → correction (X-128) |
Injection_WOT | 0x093B8 | 16 | RPM → correction (X-128) |
MAF_Correction | 0x09058 | 12×12 | Airflow × Throttle → raw |
Torque | 0x09AE0 | 11×10 | RPM × Load → Nm |
Knock1…Knock4 | 0x09E1C / 0x09E6A / 0x09EB8 / 0x09F06 | 12×4 each | RPM × Load → raw |