Checksums
[verified]: six checksums, all matching on every available dump (five 512 KB files, four of them distinct, and one 64 KB calibration in three copies; see results). Five were known (MS4x community documentation, ported from nfsx ms4x-checksum.ts). The sixth, a word sum over boot block 2, was found while building this wiki.
All values are little-endian. Region tables store ECU bus addresses as (lo u16, hi u16) pairs. Segments 0x09–0x0E map to file 0x1–0x6 (file = ecu − 0x80000); 0x07 (calibration) maps 1:1. See Memory map.
Algorithms
- CRC-16: reflected polynomial
0xA001(the CRC-16/ARC table; nfsx calls it "CCITT 0x1021 bit-reversed", which is the same table), init = a seed read from the image, no final XOR. One running CRC is chained over all regions of a checksum; region ends are inclusive. - add-32: initial u32 + Σ u16 LE words, mod 2³². Region ends in the table are exclusive.
The six checksums
| # | Name | Kind | Result at | Metadata | Covers (430069) | Protects |
|---|---|---|---|---|---|---|
| 1 | Boot | CRC-16 | 0x03C24 u16 | count 0x3C26 (=1), start 0x3C28, end 0x3C2C; seed u16 at 0x3FE6 (0x2D2D) | 0x00000–0x0308D | boot code (not the UIF/ISN area) |
| 2 | Boot block | add-32 | 0x0BFF8 u32 | none found; init 0 | 0x08000–0x0BFF7 | boot block 2 |
| 3 | Program | CRC-16 | 0x6FDE0 u16 | count 0x6FDE2 (=6) + 6 × 8-byte table; seed pointer 0x6ED42 → 0xEFFB6 (file 0x6FFB6) | 0x10000–0x1FFFF, 0x20000–0x2FFFB, 0x30000–0x3FCB9, 0x40000–0x4A8CB, 0x50000–0x5FFF7, 0x60000–0x6EFFF | program code |
| 4 | Calibration | CRC-16 | 0x73FE0 u16 | count 0x73FE2 (=2) + 2 × 8-byte table; seed u16 at 0x7000C | 0x70000–0x72FFF, 0x74000–0x7EE17 | whole calibration except the CRC block 0x73000–0x73FFF |
| 5 | Program (add) | add-32 | 0x6FDAE u32 | init 0x6FDB2 (0xA5A5A5A5); 2 regions at 0x6FDBE | 0x50000–0x53BF7, 0x6E876–0x6E877 | a program sub-range (monitoring code, [inferred]) |
| 6 | Calibration (add) | add-32 | 0x72FFC u32 (cal_mon_cks_1/2) | init 0x6FDB8 (0xA5A5A5A5); 2 regions at 0x6FDCE | 0x712C6–0x71315, 0x7EB94–0x7EE15 | "calibration monitor values" (XDF description) |
430066 differences: same offsets, different ranges, read from the tables in the image. Program 0x2FFFD, 0x3FBC5, 0x4A7F3, 0x5FFFF ends; Program (add) region 2 0x6E86E–0x6E86F; Calibration (add) region 1 0x712CC–0x7131B. [verified]
Notes:
- The Calibration CRC seed pointer nfsx reads at
0x6ED9AisFFFFFFFFin every dump, so the fallback seed address0x7000Cis what applies. The program's ident pointer table lists0x7000Cat0x6ED5A. [verified] - The seeds are ASCII: Boot
"--", Program"00"/"10"inside the program ident, Calibration"69"/"66", the last two SW digits. - Ordering: the Calibration add-32 result (
0x72FFC) sits inside the Calibration CRC range. Recompute the add-32 first. The Program add-32 result (0x6FDAE) is outside every Program CRC range, so there the order does not matter. (nfsx's comment says otherwise.) - Not covered by any checksum:
0x308E–0x3FFF(UIF, ISN, factory idents),0x4000–0x7FFF,0xBFF8–0xFFFF, theFFtails of each program block,0x6F000–0x6FFFF(checksum tables, HW numbers, program ident, trailer),0x73000–0x73FFFand0x7EE18–0x7FFFF. - Where checksum #2 is verified (boot or program code) was not located. Its stored value matches Σ words on both ECUs (
0x120619E5/0x12335EC6). [verified]
Calibration-only files
A 64 KB file (file 0 = flash 0x70000) carries checksum #4 completely: result, region table and seed are all inside it. Checksum #6's region table is in the program (0x6FDCE), so the tool falls back to a built-in table keyed on the SW number at 0x70008 (430066 and 430069, both read from full images). For any other SW, checksum #6 is reported but not computed.
Disabling checks
The Community Patchlist's Checksum Bypass (430069 only) sets lc_swi_cal_mon_cks (0x70E07) 01 → A5, 0x6FFB0 00 → A8, a code byte at 0x63595 84 → 94, and 0x73FFE 0000 → FFFF ("disables both checksums for the calibration data section"). See Patchlist.
Tool
ms43_checksum.py (Python 3, no dependencies) verifies and fixes all six checksums in a 512 KB image, or #4 and #6 in a 64 KB calibration:
python3 -I ms43_checksum.py dump.bin # verify, exit 1 on mismatch
python3 -I ms43_checksum.py dump.bin --fix # rewrite stored values in place
python3 -I ms43_checksum.py dump.bin --json # machine-readable report--fix writes the add-32 sums first, then the CRCs. Tested by corrupting bytes in each covered region of a 512 KB and a 64 KB file: --fix restores a passing image, and fixing a 64 KB file gives the same bytes as fixing the same edit in the 512 KB image.
Results
| File | SW | Boot | Boot block | Program | Calibration | Prog (add) | Cal (add) |
|---|---|---|---|---|---|---|---|
Siemens_MS43_MS430069_E46_M54B25_EU4_LHD.bin | 430069 | C6D5 ✓ | 120619E5 ✓ | 727E ✓ | 5ADF ✓ | B3DAAD17 ✓ | A6202B49 ✓ |
…_430069_CC.512KB.bin | 430069 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
…_430066_512KB.bin | 430066 | C6D5 ✓ | 12335EC6 ✓ | A2ED ✓ | EA53 ✓ | B3D92978 ✓ | A6202B49 ✓ |
…_430066_512KB-JMGF.bin (= -JMGF-tunex) | 430066 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
…_430066_64KB.bin (= MS43_calibration.bin = test.bin) | 430066 | — | — | — | EA53 ✓ | — | A6202B49 ✓ (built-in table) |
Every dump passes. The CC and JMGF edits are all in the boot sector outside 0x0000–0x308D, so they leave every checksum unchanged.