comparison tools/lib64fmts.c @ 2544:0b1e73d49503

Add support for another unknown MC bitmap format.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 18 Oct 2021 06:39:33 +0300
parents 671f41166527
children e028058648ea
comparison
equal deleted inserted replaced
2543:dea1001eb4e8 2544:0b1e73d49503
1384 1384
1385 static int fmtProbeFormatXX3(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) 1385 static int fmtProbeFormatXX3(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
1386 { 1386 {
1387 if (buf->len == fmt->size && 1387 if (buf->len == fmt->size &&
1388 DM_MEMCMP_SIZE(buf->data, fmtFormatXX3_MagicID_1) == 0 1388 DM_MEMCMP_SIZE(buf->data, fmtFormatXX3_MagicID_1) == 0
1389 )
1390 return DM_PROBE_SCORE_MAX;
1391
1392 return DM_PROBE_SCORE_FALSE;
1393 }
1394
1395
1396 static const Uint8 fmtFormatXX4_MagicID_1[] =
1397 {
1398 0x00, 0x1f, 0x78, 0xa9, 0x3b, 0x8d, 0x11, 0xd0,
1399 0xa9, 0x18, 0x8d, 0x16, 0xd0, 0xa9, 0x18, 0x8d,
1400 };
1401
1402 static int fmtProbeFormatXX4(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
1403 {
1404 if (buf->len >= fmt->size &&
1405 DM_MEMCMP_SIZE(buf->data, fmtFormatXX4_MagicID_1) == 0
1389 ) 1406 )
1390 return DM_PROBE_SCORE_MAX; 1407 return DM_PROBE_SCORE_MAX;
1391 1408
1392 return DM_PROBE_SCORE_FALSE; 1409 return DM_PROBE_SCORE_FALSE;
1393 } 1410 }
2976 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL }, 2993 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL },
2977 }, 2994 },
2978 }, 2995 },
2979 NULL 2996 NULL
2980 }, 2997 },
2998
2999 {
3000 "xx4", "Unknown $1f00 format (unpacked)", 0x1f00, 10260, 0, DM_FMT_RD,
3001 fmtProbeFormatXX4,
3002 NULL, NULL,
3003 {
3004 D64_FMT_MC,
3005 D64_SCR_WIDTH / 2, D64_SCR_HEIGHT,
3006 D64_SCR_CH_WIDTH , D64_SCR_CH_HEIGHT,
3007 2, 1,
3008 NULL, NULL,
3009 NULL,
3010 {
3011 { DO_COPY , DS_BITMAP_RAM , 0x2000 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL },
3012 { DO_COPY , DS_SCREEN_RAM , 0x3f40 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL },
3013 { DO_COPY , DS_COLOR_RAM , 0x4328 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL },
3014 { DO_SET_OP , DS_BGCOL , 0x4710 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL },
3015 { DO_SET_OP , DS_D020 , 0x4711 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL },
3016 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL },
3017 }
3018 },
3019 NULL
3020 },
3021
2981 { 3022 {
2982 "fp2", "FunPaint II (unpacked)", 0x3ff0, 33694, 0, DM_FMT_RDWR, 3023 "fp2", "FunPaint II (unpacked)", 0x3ff0, 33694, 0, DM_FMT_RDWR,
2983 fmtProbeFunPaint2, 3024 fmtProbeFunPaint2,
2984 fmtDecodeFunPaint2, fmtEncodeFunPaint2Unpacked, 3025 fmtDecodeFunPaint2, fmtEncodeFunPaint2Unpacked,
2985 { }, &dmC64CommonFormats[3] 3026 { }, &dmC64CommonFormats[3]