So, I dug up some of the 2D maps out of the A4SGD10C ROM... it appears that there are two kinds of 2D maps... "real" 2D maps with full data information for the axis, and "pseudo" 2D maps that do not.
Here's a list of pseudo-2D maps with the accompanying "map descriptor" as found in the ROM:
- Code: Select all
10 00 0F 80 (16 items @ 1b each) (duty intake temp comp)
04 00 01 B8 05 81 (6 items @ 1b each) (duty press comp)
08 00 01 98 0B 81 (12 items @ 1b each) (boost press atm press comp)
00 08 53 33 04 91 (5 items @ 2b each) (injector opening time comp)
00 10 00 00 0F 81 (16 items @ 1b each) (ignition intake temp comp)
04 00 01 F8 04 91 (5 items @ 2b each) (boost CEL thresh)
04 00 01 B8 05 91 (6 items @ 2b each) (boost limit)
00 20 00 00 0F 81 (16 items @ 1b each) (OL/CL throttle thresh)
I've determined that the map descriptor essentially fits the following format for pseudo-2D maps:
<axis step> <axis start> <number of items - 1> <type> <data>
<type> seems to indicate the following:
0x80: 1 byte for axis values, 1 byte for data values
0x81: 2 bytes for axis values, 1 byte for data values
0x91: 2 byte for axis values, 2 bytes for data values
I'll extrapolate to say that 0x90 likely indicates 1 byte axis values with 2 byte data values.
The main problem I'm having right now is that I can't figure out a reasonable means for decoding the <axis step>. It's certainly the same for maps that use the same steps, and it's definitely different for maps that don't. I'm going to try and figure this out with a disassembler, but I'm not confident that I'll be able to.
As a for instance, though... the map for duty cycle intake air temp compensation looks like this:
10 00 0F 80 4D 53 5A 66 73 7A 80 80 80 80 80 80 80 80 80 80
So, with a type descriptor of 0x80, we see that there are 0x0F + 1 (16) values in the table, and both axis and data items are 1 byte. The axis start value is 0x00, and the step is 0x10.
This results in the following table:
00 4D -> -40C, -19.9%
10 53 -> -30C, -17.6%
20 5A -> -20C, -14.8%
30 66 -> -10C, -10.2%
40 73 -> 0C, -5.1%
50 7A -> 10C, -2.3%
60 80 -> 20C, 0%
70 80 -> 30C, 0%
80 80 -> 40C, 0%
90 80 -> 50C, 0%
A0 80 -> 60C, 0%
B0 80 -> 70C, 0%
C0 80 -> 80C, 0%
D0 80 -> 90C, 0%
E0 80 -> 100C, 0%
F0 80 -> 110C, 0%
The degrees C conversion is derived from an old, barely legible D****ECU screenshot out of Sport Compact Car.
So, the step + start works fine for single-byte axis values, but the two-byte axis values don't seem to have such a straightforward relationship, other than starting properly at the "start" value.
/Andrew