Skip to content

XDF for 430066 (rebased) ​

Not verified on a car

This XDF was generated by moving the addresses of the MS4x 430069 XDF to 430066. The addresses are backed by evidence (below), but nobody has driven a car with a calibration edited through this file. Check the values before you flash. Compare them with the stock read, look for implausible numbers, and keep a full backup. Fix the checksums afterwards (tools/ms43_checksum.py).

Credit

Item names, descriptions, categories, scaling (MATH) and dimensions are the work of the MS4x community / MS4x Dev Team (ms4x.net), taken unchanged from their 430069 XDF v1.12. ms43-wiki only changed the addresses, the header, one version warning, and dropped the items listed under Left out. The original files state no licence, so all rights stay with their authors.

Downloads ​

FileForItems
Siemens_MS43_430066_512K_rebased.xdf430066, 512 KB full image (BASEOFFSET 0x70000)3691 (1445 tables, 2246 constants)
Siemens_MS43_430066_64K_rebased.xdf430066, 64 KB calibration (BASEOFFSET 0, offset = file − 0x70000)the same items

The two files differ only in BASEOFFSET and the region size, the same way the MS4x 430069 512K/64K pair does. Check that your file says 430066 at 0x70008 (512 KB) or 0x0008 (64 KB).

The per-item mapping (430069 address → 430066 address, method, confidence, evidence, checks) is in data/xdf_430066_map.json. It was generated by tools/rebase_xdf.py from the community 430069 image and a private 430066 read.

Result ​

Items
430069 XDF items3703 (1447 tables, 2256 constants)
Placed, high confidence3579
Placed, medium confidence112
Left out12 (2 tables, 10 constants)

Placed locations by method (3693 locations = 3691 item addresses + 2 embedded axis addresses; linked axes are items of their own):

MethodHighMediumTotal
code: a paired code or program-data reference at the item34241073531
segment: between two placed neighbours with the same shift1572159
pattern: unchanged bytes in a long aligned block, where the code pair disagrees–22
gap: the only candidate shift that reproduces the bytes–11

The code evidence breaks down into 1593 scalar reads (DPP0 mem operands), 1396 lookup calls (far pointers or descriptors passed to the lookup library), 536 fault-path records (DTC code words) and 6 near-pointer conversions.

For 3637 of 3693 locations, the 430069 bytes are identical in 430066 at the new address. That's independent confirmation of the address. The other 56 hold different calibration values, mostly DTC numbers and a few maps (see Validation).

Shifts (430066 − 430069, in bytes):

Shift−420−14−8−6−5−40+2+3+4+5+6+7+8+9+10+37+2074
Locations1207104224595224291751669214269395694733914

Method ​

  1. Code references. Both programs were disassembled and their calibration references extracted with tools/c166_analysis.py (see Code structure). The lookup library 0x0D0002–0x0D10EB is byte-identical in both, so the same routine catalogue applies.

  2. Code alignment. The two instruction streams (segments 9–14, in address order) were aligned with difflib over tokens that mask every address-like operand:

    • immediates ≥ 0x100, and all immediates moved into the argument registers R12–R15 (the lookup pointers);
    • DPP0/DPP1 memory operands (< 0x8000), [Rn+#disp] with disp ≥ 0x100;
    • branch and call targets outside the lookup library.

    Two tokenisations were run: one keeps the RAM/SFR operands, one masks them, because RAM variables also moved. Pairs where the two disagree (733 instructions) are dropped. Pairs found by only one of them (6116) are used, but never count as a long run. 103,794 of 111,011 430069 instructions are paired by both.

  3. Reference pairing. Calibration references at paired sites are matched by kind and role: table, X axis and Y axis of the same lookup call, or a scalar read. That gives 7044 votes "430069 address → 430066 address". The fault-path records in the program constants (22 bytes, four near pointers to the DTC words) were paired by record id and trailing fields: 134 of 161 records.

  4. Placement. For each XDF location, in this order:

    1. code: the vote at the item, inside it, or at its axis count prefix. Weak kinds (pointer-arg, indexed) are only candidates. If the 430066 bytes at the paired address equal another nearby 430069 item's bytes, the pair "slid" along repetitive code, and it is rejected.
    2. segment: both nearest placed neighbours have the same shift. Locations whose bytes are identical are placed first. Locations with changed bytes are placed only after all gap and pattern anchors exist, and never where the calibration byte alignment disagrees. That way an 8-byte deletion plus a 16-byte insertion between two distant code anchors (the DTC table at 0x70220/0x702F0) can't hide.
    3. gap: neighbours with different shifts. The candidate shifts (both neighbours, the byte-alignment shift, nearby block shifts) are tried, and exactly one must reproduce the 430069 bytes inside the neighbour window.
    4. pattern: a unique verbatim match inside the window (last resort), or an override when an item with distinctive bytes sits unchanged inside an aligned block of ≥ 32 bytes and the code pair points elsewhere.

    Every candidate must pass the struct check:

    • inside the calibration;
    • not erased (FF) in 430066 if it wasn't in 430069;
    • the count prefix preserved (if the 430069 item is preceded by its own element count, as every axis is);
    • ascending axes still ascending;
    • lookup dims (nx, ny from the 430066 axis counts) equal to the 430069 ones.
  5. Overlaps. Two items that don't overlap in 430069 must not overlap in 430066. The weaker placement is dropped.

  6. XDF. The 430069 XML is rewritten in place. Only mmedaddress values change, and the left-out items are removed. Items are matched by position, because 17 uniqueids in the 430069 XDF are used twice. No linked axis refers to a duplicate.

Confidence ​

LevelMeaning
highcode pair in a matched run of ≥ 6 instructions (or a short run whose target carries the unchanged, distinctive 430069 bytes), one shift, struct check passed, byte alignment not contradicting. Or segment between two code-placed neighbours with identical bytes
mediumcode pair in a short run confirmed only by a neighbour's shift (99), fault-record pairs that contradict the byte alignment (8, the all-zero DTC words, below), segment with changed bytes or one-sided, gap, pattern
lownot written to the XDF (see Left out)

Validation ​

python3 -I tools/rebase_xdf.py check … parses both rebased XDFs and decodes every item from the 430066 read. 0 errors.

The check covers:

  • 512K and 64K agree on every address (offset − 0x70000) and decode the same values;
  • every address equals the map;
  • no linked axis dangles;
  • titles, descriptions, categories, MATH, units, dimensions, sizes and axis definitions are unchanged from the 430069 XDF.
CheckResult
New overlaps in 4300660 (12 overlapping pairs exist in the 430069 XDF itself and are kept)
Count prefix = XDF dims (axes and counted tables)601 checked, 0 fail
Linked axis count in 430066 = table dims1232 checked, 0 fail
Bytes identical at the new address3637 of 3693
430066 location read by 430066 code3663. 20 only through data pointers / weak refs, 10 not referenced at all (as in 430069: the XDF has unreferenced items)
Agrees with an independent calibration byte alignment (difflib, blocks ≥ 8 bytes)3619 agree, 8 disagree (explained below), 66 not inside an aligned block
Plausibility (430066 value far outside the 430069 range)30 flags, all reviewed: DTC numbers that differ between the programs (17), cal_cks (the checksum), ip_tps_req_ltc_min_0…5__n__maf_mmv (13–17.5 → 2.0–6.1), ip_isapwm_* (3), c_abc_inc_tout_* (2), c_t_load_is_cdn_tia_plaus. All but one (c_dtc_sav_0, segment) are code-placed, so these are calibration differences, not misplacements. Check them before editing

Program differences found on the way ​

These are places where 430066 is not a simple shift of 430069. The rebase follows the evidence in each case:

  • ip_pvs_min_at_2_ef__n_32 moved from 0x78000 to 0x77E5C (−420), next to at_1. The switch at 0x0A983A uses 0x1D:3E5C for case 0 in 430066. The other 8 curves of the group close up by −5.
  • c_dtc_ftl_obd_0…3 moved from 0x70220 to 0x70A3A (+2074). The fault-path record with id 0x118D points there in 430066. c_dtc_er_ad_* and c_dtc_ftl_can_* keep their addresses (records 0x00F4, 0x128B). All three groups are 0000 in both images, so only the records can tell them apart. These are the 8 disagreements with the byte alignment.
  • lc_diag_actchk_vls_down_ready moved from 0x70E01 to 0x70E26 (+37 versus +5 around it). 430066 inserts 3 bytes at 0x70E24, and the same instruction (a 491-instruction matched run) reads 0x70E26.
  • ip_ti_cop_nr_*__n__maf: 430069 has two switch blocks (the _1 and _2 maps). 430066 has one, which uses the _2 maps and an extra map at 0x786FE that has no XDF item. All ten maps are placed at −5, with identical bytes.
  • ip_n_vim_tia__tia and its axis ldp_tia__n_vim_tia: the data is unchanged at −14/−5, but the 430066 code at the corresponding site uses 0x7EB74/0x74B1B. They are placed by pattern (medium), and may be unused by 430066.
  • DTC table: with the ftl_obd group (8 bytes at 0x70220) moved out, the words from 0x70228 shift by −8. 430066 then inserts 16 bytes at 0x702F0 (0441×4, 0442×4), so the rest of the table shifts by +8.

Left out ​

12 items, all 430069 additions: TIA/ES plausibility checks. They are among the 91 items that the 430069 XDF has and the 430064 XDF doesn't (XDF 430064 vs 430069). In each case, 430069 code reads the item only at sites that have no counterpart in 430066, and no candidate address reproduces its bytes.

Item430069Reason
c_maf_min_int_cdn_tia_plaus0x7077Areading code absent in 430066
c_t_ast_t_es0x7084Areading code absent
c_t_es_dif_plaus0x708B0reading code absent
c_abc_inc_t_es0x70A5Freading code absent
c_abc_max_t_es0x70AAAreading code absent
c_ctr_is_cdn_tia_plaus0x70B3Creading code absent
c_tco_es_plaus0x70CE1reading code absent
c_tco_min_is_cdn_tia_plaus0x70D04reading code absent
c_vs_max_is_cdn_tia_plaus0x70DDBreading code absent
c_tam_max_tia_plaus_diag0x70E35reading code absent; 430066 has one byte less here (23 23 → 23), and that byte belongs to c_tam_max_tam_diag (code-placed)
ldp_tam_tia_plaus_diag (axis)0x74184reading code absent; bytes not in the 430066 calibration
id_t_is_min_tia_plaus_diag__tam0x79466reading code absent; bytes not in the 430066 calibration

No table was dropped because of a missing linked axis. ldp_tam_tia_plaus_diag is used only by id_t_is_min_tia_plaus_diag__tam.

Caveats ​

  • Not verified on a car. The addresses rest on static analysis of one 430066 read. Confidence rates the address correspondence only, not whether the item means the same thing in the older program.
  • Names are inherited. 430066 is an older build. Where its code uses an object differently (the cases above), the 430069 name may not describe what 430066 does with it.
  • Calibration values differ. 56 locations hold different bytes from 430069, including DTC numbers, ip_tps_req_ltc_min_* and the checksum. Don't copy 430069 values over without understanding them.
  • Not in the XDF does not mean absent. 430066 objects that have no 430069 XDF item (for example the map at 0x786FE) are not defined here.
  • The patchlist is not rebased. It is 430069-only and its base data differs on 430066 (see Variants).
  • The 112 medium-confidence items are worth a manual look before you edit them. They are mostly constants: 48 DMTL, 9 DTC, 8 fuel system and 7 injection. Only 7 are tables. data/xdf_430066_map.json lists the evidence for each.

Reproduce ​

bash
python3 -I tools/rebase_xdf.py build \
  --bin69 Siemens_MS43_MS430069_E46_M54B25_EU4_LHD.bin \
  --bin66 <430066 512 KB read> \
  --xdf Siemens_MS43_430069_512K.xdf --c166dis ../c166dis \
  --map data/xdf_430066_map.json \
  --out512 docs/public/xdf/Siemens_MS43_430066_512K_rebased.xdf \
  --out64 docs/public/xdf/Siemens_MS43_430066_64K_rebased.xdf

python3 -I tools/rebase_xdf.py check --bin66 <430066 512 KB read> \
  --map data/xdf_430066_map.json \
  --out512 docs/public/xdf/Siemens_MS43_430066_512K_rebased.xdf \
  --out64 docs/public/xdf/Siemens_MS43_430066_64K_rebased.xdf \
  --xdf Siemens_MS43_430069_512K.xdf

A build takes about 3 minutes, mostly the two difflib code alignments.