changeset 2541:671f41166527

Reorder / rename Unknown format 3 to Format XX3.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 27 Jul 2021 08:56:41 +0300
parents a60e046b7294
children b544a8e32a35
files tools/lib64fmts.c
diffstat 1 files changed, 41 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Mon Jul 26 01:51:13 2021 +0300
+++ b/tools/lib64fmts.c	Tue Jul 27 08:56:41 2021 +0300
@@ -12,25 +12,6 @@
 #define DM_MEMCMP_LEN(mptr, mcmp) memcmp((mptr), (mcmp), strlen(mcmp))
 
 
-static const Uint8 fmtUnknown3_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 fmtProbeUnknown3(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
-{
-    if (buf->len == fmt->size &&
-        DM_MEMCMP_SIZE(buf->data, fmtUnknown3_MagicID_1) == 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)
 {
@@ -1393,6 +1374,25 @@
 }
 
 
+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;
+}
+
+
 #define XX2_MIN_SIZE   4000
 #define XX2_WIDTH_CH   40
 #define XX2_HEIGHT_CH  10
@@ -2957,6 +2957,28 @@
     },
 
     {
+        "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
+    },
+    {
         "fp2", "FunPaint II (unpacked)", 0x3ff0, 33694, 0, DM_FMT_RDWR,
         fmtProbeFunPaint2,
         fmtDecodeFunPaint2, fmtEncodeFunPaint2Unpacked,
@@ -3255,28 +3277,6 @@
         { }, &dmC64CommonFormats[0]
     },
 
-    {
-        "xx3", "Unknown 3 (unpacked)", 0x0801, 10500, 0, DM_FMT_RD,
-        fmtProbeUnknown3,
-        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
-    },
 
 };