# HG changeset patch # User Matti Hamalainen # Date 1701301971 -7200 # Node ID 07c85fffd80520ea880af2655d74f1686e1c39cd # Parent 00b21276f2c0b1a649a54adf316fb0c97ae7bfe2 Add support for unknown hires format XX10. diff -r 00b21276f2c0 -r 07c85fffd805 tools/lib64fmts.c --- a/tools/lib64fmts.c Wed Nov 29 21:35:37 2023 +0200 +++ b/tools/lib64fmts.c Thu Nov 30 01:52:51 2023 +0200 @@ -179,7 +179,7 @@ } -static const Uint8 fmtFormatXX9_MagicID_1[] = +static const Uint8 fmtFormatXX9_MagicID[] = { 0x01, 0x08, 0x0b, 0x08, 0xe0, 0x02, 0x9e, 0x32, 0x30, 0x36, 0x31, 0x00, 0x00, 0x00, 0xa2, 0x19, @@ -192,7 +192,29 @@ static int fmtProbeFormatXX9(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) { if (buf->len == fmt->size && - DM_MEMCMP_SIZE(buf->data, fmtFormatXX9_MagicID_1) == 0 + DM_MEMCMP_SIZE(buf->data, fmtFormatXX9_MagicID) == 0 + ) + return DM_PROBE_SCORE_MAX; + + return DM_PROBE_SCORE_FALSE; +} + + +static const Uint8 fmtFormatXX10_MagicID[] = +{ + 0x01, 0x08, 0x0B, 0x08 , 0x20, 0x03, 0x9E, 0x32, + 0x30, 0x36, 0x31, 0x00 , 0x00, 0x00, 0xA2, 0x00, + 0xBD, 0x77, 0x28, 0x9D , 0x00, 0x40, 0xBD, 0x77, + 0x29, 0x9D, 0x00, 0x41 , 0xBD, 0x77, 0x2A, 0x9D, + 0x00, 0x42, 0xBD, 0x5F , 0x2B, 0x9D, 0xE8, 0x42, + 0xCA, 0xD0, 0xE5, 0xA2 , 0x00, 0xBD, 0x37, 0x09, + 0x9D, 0x00, 0x60, 0xBD , 0x37, 0x0A, 0x9D, 0x00, +}; + +static int fmtProbeFormatXX10(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) +{ + if (buf->len == fmt->size && + DM_MEMCMP_SIZE(buf->data, fmtFormatXX10_MagicID) == 0 ) return DM_PROBE_SCORE_MAX; @@ -3726,6 +3748,27 @@ NULL }, + { + "xx10", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 9312, 0, DM_FMT_RD, + fmtProbeFormatXX10, + NULL, NULL, + { + D64_FMT_HIRES, + D64_SCR_WIDTH , D64_SCR_HEIGHT, + D64_SCR_CH_WIDTH, D64_SCR_CH_HEIGHT, + 1, 1, + NULL, NULL, + NULL, + { + { DO_COPY , DS_BITMAP_RAM , 0x0937 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_COPY , DS_SCREEN_RAM , 0x2877 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_SET_MEM_LO , DS_D020 , 0x0934 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_SET_MEM_LO , DS_BGCOL , 0x0934 - 0x0801, 0, 0, 0, NULL, NULL, DF_NORMAL }, + { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL, DF_NORMAL }, + } + }, + NULL + }, };