Mercurial > hg > dmlib
comparison tools/lib64fmts.c @ 2581:60ffbddedd07
Add read support for unknown $0801 viewer format XX6.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 20 Mar 2022 14:53:51 +0200 |
parents | 317d2f4b322c |
children | 880aa08c6aed |
comparison
equal
deleted
inserted
replaced
2580:317d2f4b322c | 2581:60ffbddedd07 |
---|---|
1473 return dmC64GetGenericMCPixel(scan->col, img, | 1473 return dmC64GetGenericMCPixel(scan->col, img, |
1474 bmoffs, scroffs, | 1474 bmoffs, scroffs, |
1475 6 - (rasterX & 6), | 1475 6 - (rasterX & 6), |
1476 (rasterY & 7), | 1476 (rasterY & 7), |
1477 rasterX & 1, 0, img->bgcolor); | 1477 rasterX & 1, 0, img->bgcolor); |
1478 } | |
1479 | |
1480 | |
1481 static const Uint8 fmtFormatXX6_MagicID_1[] = | |
1482 { | |
1483 0x01, 0x08, 0x0b, 0x08, 0xd5, 0x07, 0x9e, 0x34, | |
1484 0x30, 0x39, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, | |
1485 }; | |
1486 | |
1487 static const Uint8 fmtFormatXX6_MagicID_2[] = | |
1488 { | |
1489 0x00, 0xAD, 0x10, 0x47, 0x8D, 0x21, 0xD0, 0xA9, | |
1490 0x00, 0x8D, 0x20, 0xD0, 0xA2, 0x00, 0xBD, 0x40, | |
1491 }; | |
1492 | |
1493 static int fmtProbeFormatXX6(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) | |
1494 { | |
1495 if (buf->len == fmt->size && | |
1496 DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX6_MagicID_1) == 0 && | |
1497 DM_MEMCMP_SIZE(buf->data + 0x0800, fmtFormatXX6_MagicID_2) == 0 | |
1498 ) | |
1499 return DM_PROBE_SCORE_MAX; | |
1500 | |
1501 return DM_PROBE_SCORE_FALSE; | |
1478 } | 1502 } |
1479 | 1503 |
1480 | 1504 |
1481 static int fmtProbeCosmosDesignsHiresManager(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) | 1505 static int fmtProbeCosmosDesignsHiresManager(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) |
1482 { | 1506 { |
3046 { DO_SET_OP , DS_BGCOL , 0x4710 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, | 3070 { DO_SET_OP , DS_BGCOL , 0x4710 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, |
3047 { DO_SET_OP , DS_D020 , 0x4711 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, | 3071 { DO_SET_OP , DS_D020 , 0x4711 - 0x1f00, 0, 0, 0, NULL, NULL, DF_NORMAL }, |
3048 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL }, | 3072 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL }, |
3049 } | 3073 } |
3050 }, | 3074 }, |
3075 NULL | |
3076 }, | |
3077 | |
3078 { | |
3079 "xx6", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 16148, 0, DM_FMT_RD, | |
3080 fmtProbeFormatXX6, | |
3081 NULL, NULL, | |
3082 { | |
3083 D64_FMT_MC, | |
3084 D64_SCR_WIDTH / 2, D64_SCR_HEIGHT, | |
3085 D64_SCR_CH_WIDTH , D64_SCR_CH_HEIGHT, | |
3086 2, 1, | |
3087 NULL, NULL, | |
3088 NULL, | |
3089 { | |
3090 { DO_COPY , DS_BITMAP_RAM , 0x2000 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, | |
3091 { DO_COPY , DS_SCREEN_RAM , 0x3f40 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, | |
3092 { DO_COPY , DS_COLOR_RAM , 0x4328 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, | |
3093 { DO_SET_OP , DS_D020 , 0x00 , 0, 0, 0, NULL, NULL, DF_NORMAL }, | |
3094 { DO_SET_MEM_LO , DS_BGCOL , 0x4710 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, | |
3095 { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL }, | |
3096 }, | |
3097 }, | |
3051 NULL | 3098 NULL |
3052 }, | 3099 }, |
3053 | 3100 |
3054 { | 3101 { |
3055 "fp2", "FunPaint II (unpacked)", 0x3ff0, 33694, 0, DM_FMT_RDWR, | 3102 "fp2", "FunPaint II (unpacked)", 0x3ff0, 33694, 0, DM_FMT_RDWR, |