# HG changeset patch # User Matti Hamalainen # Date 1634528373 -10800 # Node ID 0b1e73d495033d1109792de8594fa01a9f8b094d # Parent dea1001eb4e8fd0c8d5b546ec6a29c89e2650dbe Add support for another unknown MC bitmap format. diff -r dea1001eb4e8 -r 0b1e73d49503 tools/lib64fmts.c --- a/tools/lib64fmts.c Mon Oct 18 02:35:53 2021 +0300 +++ b/tools/lib64fmts.c Mon Oct 18 06:39:33 2021 +0300 @@ -1393,6 +1393,23 @@ } +static const Uint8 fmtFormatXX4_MagicID_1[] = +{ + 0x00, 0x1f, 0x78, 0xa9, 0x3b, 0x8d, 0x11, 0xd0, + 0xa9, 0x18, 0x8d, 0x16, 0xd0, 0xa9, 0x18, 0x8d, +}; + +static int fmtProbeFormatXX4(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) +{ + if (buf->len >= fmt->size && + DM_MEMCMP_SIZE(buf->data, fmtFormatXX4_MagicID_1) == 0 + ) + return DM_PROBE_SCORE_MAX; + + return DM_PROBE_SCORE_FALSE; +} + + #define XX2_MIN_SIZE 4000 #define XX2_WIDTH_CH 40 #define XX2_HEIGHT_CH 10 @@ -2978,6 +2995,30 @@ }, NULL }, + + { + "xx4", "Unknown $1f00 format (unpacked)", 0x1f00, 10260, 0, DM_FMT_RD, + fmtProbeFormatXX4, + NULL, NULL, + { + D64_FMT_MC, + D64_SCR_WIDTH / 2, D64_SCR_HEIGHT, + D64_SCR_CH_WIDTH , D64_SCR_CH_HEIGHT, + 2, 1, + NULL, NULL, + NULL, + { + { DO_COPY , DS_BITMAP_RAM , 0x2000 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_COPY , DS_SCREEN_RAM , 0x3f40 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_COPY , DS_COLOR_RAM , 0x4328 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_SET_OP , DS_BGCOL , 0x4710 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_SET_OP , DS_D020 , 0x4711 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL }, + } + }, + NULL + }, + { "fp2", "FunPaint II (unpacked)", 0x3ff0, 33694, 0, DM_FMT_RDWR, fmtProbeFunPaint2,