# HG changeset patch # User Matti Hamalainen # Date 1506293358 -10800 # Node ID 054561dbcd5756e82e9a01135ff6a6b455aabb5d # Parent b5fc5a05033d8e16488afaa537737efa6cdadda3 Add support for Crest Hires FLI Designer format. diff -r b5fc5a05033d -r 054561dbcd57 tools/lib64gfx.c --- a/tools/lib64gfx.c Mon Sep 25 01:41:56 2017 +0300 +++ b/tools/lib64gfx.c Mon Sep 25 01:49:18 2017 +0300 @@ -579,6 +579,19 @@ } +static Uint8 fmtGetPixelCHFLI( + const DMC64Image *img, const int bmoffs, const int scroffs, + const int vshift, const int vbitmap, const int raster) +{ + const int vbank = raster & 7; + + if ((img->bitmap[vbitmap][bmoffs] >> vshift) & 1) + return img->screen[vbank][scroffs] >> 4; + else + return img->screen[vbank][scroffs] & 15; +} + + // // Array with data for supported formats // @@ -909,6 +922,18 @@ } }, + { + D64_FMT_HIRES | D64_FMT_FLI, "chi", "Crest Hires FLI Designer (unpacked)", 0x4000, 16386, + C64_SCR_WIDTH, 14 * 8, + C64_SCR_CH_WIDTH , 14, + NULL, NULL, + NULL, NULL, NULL, fmtGetPixelCHFLI, + { + { DT_BITMAP, 0x0000, 0, 0, NULL, NULL }, + DEF_SCREEN_RAMS_8( 0x2000, 0, 0x400) + { DT_LAST, 0, 0, 0, NULL, NULL }, + } + }, }; const int ndmC64ImageFormats = sizeof(dmC64ImageFormats) / sizeof(dmC64ImageFormats[0]);