# HG changeset patch # User Matti Hamalainen # Date 1562229617 -10800 # Node ID a494e4a4b6bc5e23dc94edb121c03eea294fea76 # Parent ad019d930401f60d5347b4d7af393a0e110111bf Minor improvements to Flinterlazer support. diff -r ad019d930401 -r a494e4a4b6bc tools/lib64fmts.c --- a/tools/lib64fmts.c Thu Jul 04 11:09:51 2019 +0300 +++ b/tools/lib64fmts.c Thu Jul 04 11:40:17 2019 +0300 @@ -941,11 +941,13 @@ DM_C64_GENERIC_MC_PIXEL_DEFS(img) const int vbank = rasterY & 7; int res; - Uint8 color1, color2; - Uint8 bgcol = img->bgcolor; - if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank , 0, 0, bgcol)) != DMERR_OK) + Uint8 color1, color2, bgcol = img->bgcolor; + + if ((res = dmC64GetGenericMCPixel(&color1, img, bmoffs, scroffs, vshift, vbank , 0, 0, bgcol)) != DMERR_OK || + (res = dmC64GetGenericMCPixel(&color2, img, bmoffs, scroffs, vshift, vbank + 8, 1, 0, bgcol)) != DMERR_OK) return res; - *col = color1 * 17; + + *col = (color1 * D64_NCOLORS) + color2; return DMERR_OK; } @@ -2467,7 +2469,7 @@ DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0x6000 - 0x284e, 0, 0x400, 0, DF_NORMAL), { DO_COPY , DS_BITMAP_RAM , 0x8000 - 0x284e, 1, 0 , 0, NULL, NULL, DF_NORMAL }, - DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0xA000 - 0x284e, 1, 0x400, 0, DF_NORMAL), + DEF_REPEAT_BLOCK_8(DS_SCREEN_RAM , 0xA000 - 0x284e, 8, 0x400, 0, DF_NORMAL), { DO_SET_OP , DS_EXTRA_INFO , D64_ILACE_COLOR, 0 , 0 , D64_EI_ILACE_TYPE, NULL, NULL, DF_DECODE }, { DO_SET_OP , DS_EXTRA_INFO , D64_FLI_8 , 0, 0 , D64_EI_FLI_TYPE, NULL, NULL, DF_DECODE },