Small update.
Thanks again to RibShark — the RAM dump and the relocation pseudocode were the missing pieces.
The decompression side now looks much more solid. The packed block at 0x158000 appears to decode as:
firmware packed block
-> canonical Huffman + LZ-style decode
-> raw pre-fixup ...
Search found 5 matches
- Wed Jul 01, 2026 2:16 pm
- Forum: LibreDrive drives
- Topic: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
- Replies: 7
- Views: 1181
- Tue Jun 30, 2026 5:21 pm
- Forum: LibreDrive drives
- Topic: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
- Replies: 7
- Views: 1181
Re: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
Thanks again — I spent more time comparing the stock 1.00 firmware decode against the RAM dump, and there is a much better update now.
The short version is that the decompression side now looks effectively solved for the bytes covered by the RAM dump. The remaining raw differences are not random ...
The short version is that the decompression side now looks effectively solved for the bytes covered by the RAM dump. The remaining raw differences are not random ...
- Tue Jun 30, 2026 5:03 pm
- Forum: LibreDrive drives
- Topic: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
- Replies: 7
- Views: 1181
Re: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
Thanks, that RAM dump was exactly what was needed.
I agree with your correction: my original decoder had the two header fields interpreted the wrong way round, and it also had at least two semantic mistakes in the LZ/Huffman layer.
The original interpretation I was using was:
field0 = compressed ...
I agree with your correction: my original decoder had the two header fields interpreted the wrong way round, and it also had at least two semantic mistakes in the LZ/Huffman layer.
The original interpretation I was using was:
field0 = compressed ...
- Sun Jun 28, 2026 2:28 pm
- Forum: LibreDrive drives
- Topic: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
- Replies: 7
- Views: 1181
Re: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
Small update / WIP.
I made some progress on the 0x158000 packed block in BU40N 1.00.
The original table split still looks correct:
0x158008 288-byte literal/length code-length table
0x158128 32-byte distance code-length table
0x158148 compressed bitstream
I now have an experimental Python ...
I made some progress on the 0x158000 packed block in BU40N 1.00.
The original table split still looks correct:
0x158008 288-byte literal/length code-length table
0x158128 32-byte distance code-length table
0x158148 compressed bitstream
I now have an experimental Python ...
- Mon Jun 22, 2026 12:40 pm
- Forum: LibreDrive drives
- Topic: BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
- Replies: 7
- Views: 1181
BU40N MT1959 firmware format: packed region at 0x158000 (compression method known?)
I'm comparing BU40N 1.00 and 1.03 firmware internals while investigating OmniDrive behaviour and noticed a large packed-looking region that differs almost completely between firmware versions despite having a very similar header structure.
Firmware images examined:
BU40N_1.00_stock.bin
MD5 ...
Firmware images examined:
BU40N_1.00_stock.bin
MD5 ...