changeset 2620:2aa885371c13

Reorganize the format list a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 29 Nov 2023 10:53:01 +0200
parents e00a9e1f26c0
children ad18774054e3
files tools/lib64fmts.c
diffstat 1 files changed, 309 insertions(+), 294 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Tue Nov 28 20:06:41 2023 +0200
+++ b/tools/lib64fmts.c	Wed Nov 29 10:53:01 2023 +0200
@@ -12,6 +12,173 @@
 #define DM_MEMCMP_LEN(mptr, mcmp) memcmp((mptr), (mcmp), strlen(mcmp))
 
 
+#define XX2_MIN_SIZE   4000
+#define XX2_WIDTH_CH   40
+#define XX2_HEIGHT_CH  10
+#define XX2_SIZE       (XX2_WIDTH_CH * XX2_HEIGHT_CH)
+#define XX2_BSIZE      (XX2_SIZE * 8)
+
+
+static int fmtProbeFormatXX2(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len >= XX2_MIN_SIZE &&
+        buf->len <= XX2_MIN_SIZE + 8 &&
+        dmCompareAddr16(buf, 0, fmt->addr))
+        return DM_PROBE_SCORE_MAYBE;
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
+
+static int fmtDecodeFormatXX2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    int res;
+    DMGrowBuf tmp;
+
+    // If there is only data for less than XX2_MIN_SIZE bytes,
+    // allocate a buffer of that size and copy data there.
+    // Otherwise allocate len bytes.
+    if (dmGrowBufCopy(&tmp, buf, buf->len < XX2_MIN_SIZE ? XX2_MIN_SIZE - buf->len : 0) == NULL)
+        return DMERR_MALLOC;
+
+    tmp.len = tmp.size;
+    res = dmC64DecodeGenericBMP(img, &tmp, fmt);
+    dmGrowBufFree(&tmp);
+    return res;
+}
+
+
+static const Uint8 fmtFormatXX3_MagicID_1[] =
+{
+    0x01, 0x08, 0x0B, 0x08,  0xF0, 0x02, 0x9E, 0x32,
+    0x30, 0x36, 0x31, 0x00,  0x00, 0x00, 0xA9, 0x14,
+    0x8D, 0x18, 0xD0, 0xA2,  0x00, 0xA9, 0x20, 0x9D,
+    0x00, 0x04, 0x9D, 0x00,  0x05, 0x9D, 0x00, 0x06,
+};
+
+static int fmtProbeFormatXX3(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len == fmt->size &&
+        DM_MEMCMP_SIZE(buf->data, fmtFormatXX3_MagicID_1) == 0
+        )
+        return DM_PROBE_SCORE_MAX;
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
+
+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;
+}
+
+
+static const Uint8 fmtFormatXX5_MagicID_1[] =
+{
+    0x00, 0x10, 0xa9, 0x01, 0x8d, 0x86, 0x02, 0x20,
+    0x44, 0xe5, 0xa9, 0x16, 0x8d, 0x18, 0xd0, 0xa2,
+};
+
+static int fmtProbeFormatXX5(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len >= fmt->size &&
+        DM_MEMCMP_SIZE(buf->data, fmtFormatXX5_MagicID_1) == 0
+        )
+        return DM_PROBE_SCORE_MAX;
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
+
+static int fmtGetPixelXX5(DMC64ScanLine *scan,
+    const DMC64Image *img, const int rasterX, const int rasterY)
+{
+    DM_C64_GENERIC_SC_PIXEL_DEFS(img)
+
+#if 1
+    (void) vshift;
+
+    return dmC64GetGenericMCPixel(scan->col, img,
+        bmoffs, scroffs,
+        6 - (rasterX & 6),
+//        (rasterY & 7) + (8 * (rasterX & 1)),
+        (rasterY & 7),
+        rasterX & 1, 0, img->bgcolor);
+#else
+    const int vbank = rasterY & 7;
+    Uint8 color1, color2, bgcol = img->bgcolor;
+    int res;
+
+    if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank    , rasterX & 1, 0, bgcol)) != DMERR_OK ||
+        (res = dmC64GetGenericMCPixel(&color2, img, bmoffs, scroffs, vshift, vbank + 8, rasterX & 1, 0, bgcol)) != DMERR_OK)
+        return res;
+
+    *(scan->col) = (color1 * D64_NCOLORS) + color2;
+
+    return res;
+#endif
+}
+
+
+static const Uint8 fmtFormatXX6_MagicID_1[] =
+{
+    0x01, 0x08, 0x0b, 0x08,  0xd5, 0x07, 0x9e, 0x34,
+    0x30, 0x39, 0x36, 0x00,  0x00, 0x00, 0x00, 0x00,
+};
+
+static const Uint8 fmtFormatXX6_MagicID_2[] =
+{
+    0x00, 0xAD, 0x10, 0x47,  0x8D, 0x21, 0xD0, 0xA9,
+    0x00, 0x8D, 0x20, 0xD0,  0xA2, 0x00, 0xBD, 0x40,
+};
+
+static int fmtProbeFormatXX6(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len == fmt->size &&
+        DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX6_MagicID_1) == 0 &&
+        DM_MEMCMP_SIZE(buf->data + 0x0800, fmtFormatXX6_MagicID_2) == 0
+        )
+        return DM_PROBE_SCORE_MAX;
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
+
+static const Uint8 fmtFormatXX7_MagicID_1[] =
+{
+    0x01, 0x08, 0x0b, 0x08,  0xe0, 0x02, 0x9e, 0x32,
+    0x30, 0x36, 0x31, 0x00,  0x00, 0x00, 0xa2, 0x19,
+};
+
+static const Uint8 fmtFormatXX7_MagicID_2[] =
+{
+    0xa2, 0x60, 0xa9, 0x00,  0x20, 0x10, 0x0a, 0xa9,
+    0x26, 0xa2, 0x0a, 0x20,  0x10, 0x0a, 0xa2, 0x1f,
+};
+
+static int fmtProbeFormatXX7(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len == fmt->size &&
+        DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX7_MagicID_1) == 0 &&
+        DM_MEMCMP_SIZE(buf->data + 0x0100, fmtFormatXX7_MagicID_2) == 0
+        )
+        return DM_PROBE_SCORE_MAX;
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
+
 // Basic probe, but return MAX score for this format
 static int fmtProbeGigapaintHires(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
 {
@@ -1376,158 +1543,6 @@
 }
 
 
-#define XX2_MIN_SIZE   4000
-#define XX2_WIDTH_CH   40
-#define XX2_HEIGHT_CH  10
-#define XX2_SIZE       (XX2_WIDTH_CH * XX2_HEIGHT_CH)
-#define XX2_BSIZE      (XX2_SIZE * 8)
-
-
-static int fmtProbeFormatXX2(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len >= XX2_MIN_SIZE &&
-        buf->len <= XX2_MIN_SIZE + 8 &&
-        dmCompareAddr16(buf, 0, fmt->addr))
-        return DM_PROBE_SCORE_MAYBE;
-
-    return DM_PROBE_SCORE_FALSE;
-}
-
-
-static int fmtDecodeFormatXX2(DMC64Image *img, const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    int res;
-    DMGrowBuf tmp;
-
-    // If there is only data for less than XX2_MIN_SIZE bytes,
-    // allocate a buffer of that size and copy data there.
-    // Otherwise allocate len bytes.
-    if (dmGrowBufCopy(&tmp, buf, buf->len < XX2_MIN_SIZE ? XX2_MIN_SIZE - buf->len : 0) == NULL)
-        return DMERR_MALLOC;
-
-    tmp.len = tmp.size;
-    res = dmC64DecodeGenericBMP(img, &tmp, fmt);
-    dmGrowBufFree(&tmp);
-    return res;
-}
-
-
-static const Uint8 fmtFormatXX3_MagicID_1[] =
-{
-    0x01, 0x08, 0x0B, 0x08,  0xF0, 0x02, 0x9E, 0x32,
-    0x30, 0x36, 0x31, 0x00,  0x00, 0x00, 0xA9, 0x14,
-    0x8D, 0x18, 0xD0, 0xA2,  0x00, 0xA9, 0x20, 0x9D,
-    0x00, 0x04, 0x9D, 0x00,  0x05, 0x9D, 0x00, 0x06,
-};
-
-static int fmtProbeFormatXX3(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len == fmt->size &&
-        DM_MEMCMP_SIZE(buf->data, fmtFormatXX3_MagicID_1) == 0
-        )
-        return DM_PROBE_SCORE_MAX;
-
-    return DM_PROBE_SCORE_FALSE;
-}
-
-
-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;
-}
-
-
-static const Uint8 fmtFormatXX5_MagicID_1[] =
-{
-    0x00, 0x10, 0xa9, 0x01, 0x8d, 0x86, 0x02, 0x20,
-    0x44, 0xe5, 0xa9, 0x16, 0x8d, 0x18, 0xd0, 0xa2,
-};
-
-static int fmtProbeFormatXX5(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len >= fmt->size &&
-        DM_MEMCMP_SIZE(buf->data, fmtFormatXX5_MagicID_1) == 0
-        )
-        return DM_PROBE_SCORE_MAX;
-
-    return DM_PROBE_SCORE_FALSE;
-}
-
-
-static int fmtGetPixelXX5(DMC64ScanLine *scan,
-    const DMC64Image *img, const int rasterX, const int rasterY)
-{
-    DM_C64_GENERIC_SC_PIXEL_DEFS(img)
-
-    (void) vshift;
-
-    return dmC64GetGenericMCPixel(scan->col, img,
-        bmoffs, scroffs,
-        6 - (rasterX & 6),
-        (rasterY & 7),
-        rasterX & 1, 0, img->bgcolor);
-}
-
-
-static const Uint8 fmtFormatXX6_MagicID_1[] =
-{
-    0x01, 0x08, 0x0b, 0x08,  0xd5, 0x07, 0x9e, 0x34,
-    0x30, 0x39, 0x36, 0x00,  0x00, 0x00, 0x00, 0x00,
-};
-
-static const Uint8 fmtFormatXX6_MagicID_2[] =
-{
-    0x00, 0xAD, 0x10, 0x47,  0x8D, 0x21, 0xD0, 0xA9,
-    0x00, 0x8D, 0x20, 0xD0,  0xA2, 0x00, 0xBD, 0x40,
-};
-
-static int fmtProbeFormatXX6(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len == fmt->size &&
-        DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX6_MagicID_1) == 0 &&
-        DM_MEMCMP_SIZE(buf->data + 0x0800, fmtFormatXX6_MagicID_2) == 0
-        )
-        return DM_PROBE_SCORE_MAX;
-
-    return DM_PROBE_SCORE_FALSE;
-}
-
-
-static const Uint8 fmtFormatXX7_MagicID_1[] =
-{
-    0x01, 0x08, 0x0b, 0x08,  0xe0, 0x02, 0x9e, 0x32,
-    0x30, 0x36, 0x31, 0x00,  0x00, 0x00, 0xa2, 0x19,
-};
-
-static const Uint8 fmtFormatXX7_MagicID_2[] =
-{
-    0xa2, 0x60, 0xa9, 0x00,  0x20, 0x10, 0x0a, 0xa9,
-    0x26, 0xa2, 0x0a, 0x20,  0x10, 0x0a, 0xa2, 0x1f,
-};
-
-static int fmtProbeFormatXX7(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len == fmt->size &&
-        DM_MEMCMP_SIZE(buf->data + 0x0000, fmtFormatXX7_MagicID_1) == 0 &&
-        DM_MEMCMP_SIZE(buf->data + 0x0100, fmtFormatXX7_MagicID_2) == 0
-        )
-        return DM_PROBE_SCORE_MAX;
-
-    return DM_PROBE_SCORE_FALSE;
-}
-
-
 static int fmtProbeCosmosDesignsHiresManager(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
 {
     if (buf->len > 32 && dmCompareAddr16(buf, 0, fmt->addr))
@@ -3186,141 +3201,6 @@
     },
 
     {
-        "xx1", "Unknown $2000 format (unpacked)", 0x2000, 10242, 0, DM_FMT_RDWR,
-        NULL,
-        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  , 0x0000, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY      , DS_SCREEN_RAM  , 0x2000, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY      , DS_COLOR_RAM   , 0x2400, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_OP    , DS_BGCOL       , 0x00  , 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_LAST      , 0              , 0     , 0,  0,   0, NULL, NULL, DF_NORMAL },
-            }
-        },
-        NULL
-    },
-
-    {
-        "xx2", "Unknown $2000 format (unpacked)", 0x2000, 0, 0, DM_FMT_RDWR,
-        fmtProbeFormatXX2,
-        fmtDecodeFormatXX2, NULL,
-        {
-            D64_FMT_MC,
-            XX2_WIDTH_CH * 4, XX2_HEIGHT_CH * 8,
-            XX2_WIDTH_CH    , XX2_HEIGHT_CH,
-            2, 1,
-            NULL, NULL,
-            NULL,
-            {
-                { DO_COPY      , DS_BITMAP_RAM  , 0x0000, 0,  XX2_BSIZE,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY      , DS_SCREEN_RAM  , XX2_BSIZE, 0,  XX2_SIZE,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY      , DS_COLOR_RAM   , XX2_BSIZE + XX2_SIZE, 0,  XX2_SIZE,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_OP    , DS_BGCOL       , 11    , 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_LAST      , 0              , 0     , 0,  0,   0, NULL, NULL, DF_NORMAL },
-            }
-        },
-        NULL
-    },
-
-    {
-        "xx3", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 10500, 0, DM_FMT_RD,
-        fmtProbeFormatXX3,
-        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  , 0x09f2 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY       , DS_SCREEN_RAM  , 0x2932 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_MEM_LO , DS_D020        , 0x09e6 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_MEM_LO , DS_BGCOL       , 0x09e7 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY       , DS_COLOR_RAM   , 0x2d1a - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_LAST       , 0              , 0              , 0,  0,   0, NULL, NULL, DF_NORMAL },
-            },
-        },
-        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
-    },
-
-    {
-        "xx6", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 16148, 0, DM_FMT_RD,
-        fmtProbeFormatXX6,
-        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 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY       , DS_SCREEN_RAM  , 0x3f40 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY       , DS_COLOR_RAM   , 0x4328 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_OP     , DS_D020        , 0x00           , 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_MEM_LO , DS_BGCOL       , 0x4710 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_LAST       , 0              , 0              , 0,  0,   0, NULL, NULL, DF_NORMAL },
-            },
-        },
-        NULL
-    },
-
-    {
-        "xx7", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 9590, 0, DM_FMT_RD,
-        fmtProbeFormatXX7,
-        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  , 0x0a26 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_COPY       , DS_SCREEN_RAM  , 0x2968 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_MEM_LO , DS_D020        , 0x2966 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
-                { DO_SET_MEM_LO , DS_BGCOL       , 0x2967 - 0x0801, 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,
         fmtDecodeFunPaint2, fmtEncodeFunPaint2Unpacked,
@@ -3620,6 +3500,110 @@
     },
 
     {
+        "vhi", "EXON VHI Editor 0.1 (unpacked)", 0x2000, 17389, 0, DM_FMT_RDWR,
+        NULL,
+        NULL, NULL,
+        { 0 }, &dmC64CommonFormats[12]
+    },
+
+    {
+        "vhip", "EXON VHI Editor 0.1 (packed)", 0x2000, 17389, 0, DM_FMT_RD,
+        fmtProbeEXON_VHI_Packed,
+        fmtDecodeEXON_VHI_Packed, NULL,
+        { 0 }, &dmC64CommonFormats[12]
+    },
+
+    {
+        "xx1", "Unknown $2000 format (unpacked)", 0x2000, 10242, 0, DM_FMT_RDWR,
+        NULL,
+        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  , 0x0000, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY      , DS_SCREEN_RAM  , 0x2000, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY      , DS_COLOR_RAM   , 0x2400, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_OP    , DS_BGCOL       , 0x00  , 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_LAST      , 0              , 0     , 0,  0,   0, NULL, NULL, DF_NORMAL },
+            }
+        },
+        NULL
+    },
+
+    {
+        "xx2", "Unknown $2000 format (unpacked)", 0x2000, 0, 0, DM_FMT_RDWR,
+        fmtProbeFormatXX2,
+        fmtDecodeFormatXX2, NULL,
+        {
+            D64_FMT_MC,
+            XX2_WIDTH_CH * 4, XX2_HEIGHT_CH * 8,
+            XX2_WIDTH_CH    , XX2_HEIGHT_CH,
+            2, 1,
+            NULL, NULL,
+            NULL,
+            {
+                { DO_COPY      , DS_BITMAP_RAM  , 0x0000, 0,  XX2_BSIZE,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY      , DS_SCREEN_RAM  , XX2_BSIZE, 0,  XX2_SIZE,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY      , DS_COLOR_RAM   , XX2_BSIZE + XX2_SIZE, 0,  XX2_SIZE,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_OP    , DS_BGCOL       , 11    , 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_LAST      , 0              , 0     , 0,  0,   0, NULL, NULL, DF_NORMAL },
+            }
+        },
+        NULL
+    },
+
+    {
+        "xx3", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 10500, 0, DM_FMT_RD,
+        fmtProbeFormatXX3,
+        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  , 0x09f2 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY       , DS_SCREEN_RAM  , 0x2932 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_MEM_LO , DS_D020        , 0x09e6 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_MEM_LO , DS_BGCOL       , 0x09e7 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY       , DS_COLOR_RAM   , 0x2d1a - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_LAST       , 0              , 0              , 0,  0,   0, NULL, NULL, DF_NORMAL },
+            },
+        },
+        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
+    },
+
+    {
         "xx5", "Unknown $1000 format (unpacked)", 0x1000, 45000, 0, DM_FMT_RD | DM_FMT_BROKEN,
         fmtProbeFormatXX5,
         NULL, NULL,
@@ -3652,17 +3636,48 @@
     },
 
     {
-        "vhi", "EXON VHI Editor 0.1 (unpacked)", 0x2000, 17389, 0, DM_FMT_RDWR,
-        NULL,
+        "xx6", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 16148, 0, DM_FMT_RD,
+        fmtProbeFormatXX6,
         NULL, NULL,
-        { 0 }, &dmC64CommonFormats[12]
+        {
+            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 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY       , DS_SCREEN_RAM  , 0x3f40 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY       , DS_COLOR_RAM   , 0x4328 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_OP     , DS_D020        , 0x00           , 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_MEM_LO , DS_BGCOL       , 0x4710 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_LAST       , 0              , 0              , 0,  0,   0, NULL, NULL, DF_NORMAL },
+            },
+        },
+        NULL
     },
 
     {
-        "vhip", "EXON VHI Editor 0.1 (packed)", 0x2000, 17389, 0, DM_FMT_RD,
-        fmtProbeEXON_VHI_Packed,
-        fmtDecodeEXON_VHI_Packed, NULL,
-        { 0 }, &dmC64CommonFormats[12]
+        "xx7", "Unknown $0801 format (viewer) (unpacked)", 0x0801, 9590, 0, DM_FMT_RD,
+        fmtProbeFormatXX7,
+        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  , 0x0a26 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_COPY       , DS_SCREEN_RAM  , 0x2968 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_MEM_LO , DS_D020        , 0x2966 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_SET_MEM_LO , DS_BGCOL       , 0x2967 - 0x0801, 0,  0,   0, NULL, NULL, DF_NORMAL },
+                { DO_LAST       , 0              , 0              , 0,  0,   0, NULL, NULL, DF_NORMAL },
+            }
+        },
+        NULL
     },
 
 };