# HG changeset patch # User Matti Hamalainen # Date 1526242832 -10800 # Node ID 1f6aed186c4ea9e173ab5611aac408a1bddf7257 # Parent 5aa1c3ec91d5c4a8d6e08d3b83a1358e3ec44d6d Add somewhat broken support for "Big FLI" aka BFLI files. Needs more work. diff -r 5aa1c3ec91d5 -r 1f6aed186c4e tools/lib64fmts.c --- a/tools/lib64fmts.c Sun May 13 23:19:36 2018 +0300 +++ b/tools/lib64fmts.c Sun May 13 23:20:32 2018 +0300 @@ -464,6 +464,24 @@ } +static Uint8 fmtGetPixelBFLI( + const DMC64Image *img, const int bmoffs, const int scroffs, + const int vshift, const int vbitmap, const int raster) +{ + const int vbb = raster < 200 ? 0 : 1; + const int vbank = (raster & 7) + (vbb * 8); + const int vbmoffs = raster < 200 ? bmoffs : bmoffs - 8000; + const int vscroffs = scroffs & 1023; + +//fprintf(stderr, "bmoffs=%d, scroffs=%d, vshift=%d, vbitmap=%d, raster=%d\n", vbmoffs, vscroffs, vshift, vbb, raster); + + return dmC64GetGenericMCPixel( + img, vbmoffs, vscroffs, vshift, + vbank, vbb, 0, + img->bgcolor); +} + + static Uint8 fmtGetPixelBlackMailFLI( const DMC64Image *img, const int bmoffs, const int scroffs, const int vshift, const int vbitmap, const int raster) @@ -791,6 +809,25 @@ }, { + D64_FMT_MC | D64_FMT_FLI, "bfli", "Big FLI (unpacked) [BROKEN]", 0x3bff, 33795, DM_FMT_RD, + C64_SCR_WIDTH / 2, C64_SCR_HEIGHT * 2, + C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT, + NULL, + NULL, NULL, + NULL, NULL, + fmtGetPixelBFLI, + { + { DT_COLOR_RAM, 0x0001, 0, 0, NULL, NULL }, + DEF_SCREEN_RAMS_8( 0x0401, 0, 0x400) + { DT_BITMAP, 0x2401, 0, 0, NULL, NULL }, + DEF_SCREEN_RAMS_8( 0x4401, 8, 0x400) + { DT_BITMAP, 0x6401 - 24*8, 1, 0, NULL, NULL }, + { DT_LAST, 0, 0, 0, NULL, NULL }, + } + }, + + + { D64_FMT_MC | D64_FMT_FLI, "bml", "Blackmail FLI (unpacked)", 0x3b00, 17474, DM_FMT_RDWR, C64_SCR_WIDTH / 2, C64_SCR_HEIGHT, C64_SCR_CH_WIDTH , C64_SCR_CH_HEIGHT,