# HG changeset patch # User Matti Hamalainen # Date 1559650895 -10800 # Node ID 44d7e8e2483c3ea6aabad19775501cd1caaa0517 # Parent 0a7ebb7198e30ca2d769d071cf45d90dddb40c81 Add in some fixups that the original CDHM decoder does, although these seem to be unnecessary. diff -r 0a7ebb7198e3 -r 44d7e8e2483c tools/lib64fmts.c --- a/tools/lib64fmts.c Tue Jun 04 15:05:53 2019 +0300 +++ b/tools/lib64fmts.c Tue Jun 04 15:21:35 2019 +0300 @@ -1047,6 +1047,16 @@ finish: + // Fixups that the original decoder does, not necessary really + dstBuf[0x7ff0 - baseAddr] = 0x03; + dstBuf[0x7ffe - baseAddr] = dstBuf[4]; + + for (size_t n = 0; n < 0x40; n++) + dstBuf[n] = 0xff; + + for (size_t n = 0; n < 0x100; n++) + dstBuf[0x40 + n] = 0x00; + dmGrowBufConstCreateFrom(&tmp, dstBuf, dstSize); res = dmC64DecodeGenericBMP(img, &tmp, fmt);