changeset 234:7afa7c257d93

Add load address check to FBI FLI Designer import.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 06 Sep 2018 13:27:04 +0300
parents 1d9f9c3d8ab1
children 2e772a17a4ed
files exporters.pde
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/exporters.pde	Thu Sep 06 13:25:15 2018 +0300
+++ b/exporters.pde	Thu Sep 06 13:27:04 2018 +0300
@@ -369,11 +369,11 @@
         //    DEF_SCREEN_RAMS_8(0x0400, 0, 0x400, 0),
         //    { DO_COPY      , DS_BITMAP_RAM  , 0x2400, 0,  0,   0, NULL, NULL },
         //    { DO_LAST      , 0              , 0     , 0,  0,   0, NULL, NULL },
-        if (fdata.length != 17409)
-        {
-            // TODO XXX: Check for load addresses 3c00 and 3ff0
+        if (fdata.length != 17409 ||
+            ((fdata[1] != 0x3c || fdata[0] != 0x00) &&
+             (fdata[1] != 0x3f || fdata[0] != 0xf0)))
             return false;
-        }
+
         for (y = 0; y < 25; y++)
         for (x = 0; x < 40; x++)
         for (y2 = 0; y2 < 8; y2++)
@@ -391,8 +391,10 @@
             g_map[65536 + x + y * 40 + 1000] = byte(p2);
             g_map[65536 + x + y * 40 + 2000] = byte(p3);
         }
-        g_map[0] = byte(0); //bord
-        g_map[1] = byte(0); //baku
+
+        // Background is not used, and border is not defined
+        g_map[0] = byte(0);
+        g_map[1] = byte(0);
     }
     else
     if (g_machine == MSX)