changeset 1915:788cfc7096f3

Add support for Gigapaint hires (unpacked) format.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 27 Jun 2018 15:43:20 +0300
parents 87245043a7ae
children 34ba8e2d2dd7
files tools/lib64fmts.c
diffstat 1 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Wed Jun 27 13:35:10 2018 +0300
+++ b/tools/lib64fmts.c	Wed Jun 27 15:43:20 2018 +0300
@@ -9,6 +9,15 @@
 #include "lib64gfx.h"
 
 
+static int fmtProbeGigapaintHires(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len == fmt->size &&
+        dmCompareAddr16(buf, 0, fmt->addr))
+        return DM_PROBE_SCORE_MAX;
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
 
 static int fmtProbeKoalaPainterPacked(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
 {
@@ -1598,6 +1607,25 @@
     },
 
     {
+        "gih", "Gigapaint hires (unpacked)", 0x6000, 8002, DM_FMT_RDWR,
+        fmtProbeGigapaintHires,
+        NULL, NULL,
+        {
+            D64_FMT_HIRES,
+            C64_SCR_WIDTH   , C64_SCR_HEIGHT,
+            C64_SCR_CH_WIDTH, C64_SCR_CH_HEIGHT,
+            NULL, NULL,
+            NULL,
+            {
+                { DO_COPY       , DS_BITMAP_RAM  , 0x0000, 0, 0,   0, NULL, NULL },
+                { DO_SET_OP     , DS_SCREEN_RAM  , 0x0F  , 0, 0,   0, NULL, NULL },
+                { DO_LAST       , 0              , 0     , 0, 0,   0, NULL, NULL },
+            }
+        },
+        NULL
+    },
+
+    {
         "bfli", "Pu-239 Big FLI/BFLI (unpacked)", 0x3bff, 33795, DM_FMT_RD,
         NULL,
         NULL, NULL,