From: Toni Wilen Date: Wed, 16 Jul 2025 08:21:40 +0000 (+0300) Subject: Fix fast mode color selection if blacker than black or other color adjustment was... X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=73479c61bda56663835d2c1ca036f01868bc4c9c;p=francis%2Fwinuae.git Fix fast mode color selection if blacker than black or other color adjustment was active. --- diff --git a/custom.cpp b/custom.cpp index 2a84bec3..97b38413 100644 --- a/custom.cpp +++ b/custom.cpp @@ -643,7 +643,7 @@ static int display_hstart_fastmode; static int color_table_index; static bool color_table_changed; #define COLOR_TABLE_ENTRIES 2 -static uae_u8 color_tables[COLOR_TABLE_ENTRIES * 256 * sizeof(uae_u32)]; +static uae_u8 color_tables[COLOR_TABLE_ENTRIES * 512 * sizeof(uae_u32)]; #define HSYNCTIME (maxhpos * CYCLE_UNIT) @@ -4274,6 +4274,7 @@ static void COLOR_WRITE(uae_u16 v, int num) uae_u32 cval = (cr << 16) | (cg << 8) | cb; agnus_colors.color_regs_aga[colreg] = cval; + agnus_colors.acolors[colreg] = getxcolor(cval); } else { @@ -8475,7 +8476,6 @@ static uaecptr *getptfromreg(int reg) return &dummyrgaaddr; } - uae_u8 *save_custom_slots(size_t *len, uae_u8 *dstptr) { uae_u8 *dstbak, *dst; @@ -10757,8 +10757,10 @@ static bool draw_line_fast(struct linestate *l, int ldv, uaecptr bplptp[8], bool if (color_table_index >= COLOR_TABLE_ENTRIES) { color_table_index = 0; } - l->linecolorstate = color_tables + color_table_index * 256 * sizeof(uae_u32); + l->linecolorstate = color_tables + color_table_index * 512 * sizeof(uae_u32); uae_u8 *dpt = l->linecolorstate; + memcpy(dpt, agnus_colors.acolors, colors * sizeof(uae_u32)); + dpt += 256 * sizeof(uae_u32); if (aga_mode) { memcpy(dpt, agnus_colors.color_regs_aga, colors * sizeof(uae_u32)); } else { @@ -10766,7 +10768,7 @@ static bool draw_line_fast(struct linestate *l, int ldv, uaecptr bplptp[8], bool } color_table_changed = false; } else { - l->linecolorstate = color_tables + color_table_index * 256 * sizeof(uae_u32); + l->linecolorstate = color_tables + color_table_index * 512 * sizeof(uae_u32); } l->color0 = aga_mode ? agnus_colors.color_regs_aga[0] : agnus_colors.color_regs_ecs[0]; diff --git a/drawing.cpp b/drawing.cpp index f4176a17..17638355 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -6666,12 +6666,7 @@ void draw_denise_border_line_fast(int gfx_ypos, enum nln_how how, struct linesta bool ecsena = ecs_denise && (ls->bplcon0 & 1) != 0; bool brdblank = (ls->bplcon3 & 0x20) && ecsena; - uae_u32 bgcol; - if (aga_mode) { - bgcol = brdblank ? 0x000000 : ls->color0; - } else { - bgcol = brdblank ? 0x000000 : xcolors[ls->color0]; - } + uae_u32 bgcol = brdblank ? 0x000000 : getxcolor(ls->color0); int hbstrt_offset = ls->hbstrt_offset >> rshift; int hbstop_offset = ls->hbstop_offset >> rshift; @@ -6799,11 +6794,11 @@ void draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct lines uae_u32 bgcol; if (aga_mode) { - bgcol = brdblank ? 0x000000 : ls->color0; + bgcol = brdblank ? 0x000000 : getxcolor(ls->color0); } else if (res == 2) { bgcol = brdblank ? 0x000000 : bordercolor_ecs_shres; } else { - bgcol = brdblank ? 0x000000 : xcolors[ls->color0]; + bgcol = brdblank ? 0x000000 : getxcolor(ls->color0); } //bgcol = 0xff00; diff --git a/genlinetoscr.cpp b/genlinetoscr.cpp index 9de277bd..3816b662 100644 --- a/genlinetoscr.cpp +++ b/genlinetoscr.cpp @@ -1017,21 +1017,21 @@ static void gen_fastdraw_drawmode_ecs(char *colname) if (modes == CMODE_DUALPF) { outf("{"); outf("uae_u8 dpval = dpf_lookup[c];"); - outf("%s = xcolors[colors_ocs[dpval]];", colname); + outf("%s = acolors[dpval];", colname); outf("}"); } else if (modes == CMODE_HAM) { outf("%s = decode_ham_pixel_fast(c, colors_ocs);", colname); } else if (modes == CMODE_EXTRAHB_ECS_KILLEHB) { - outf("%s = xcolors[colors_ocs[c & 31]];", colname); + outf("%s = acolors[c & 31];", colname); } else if (modes == CMODE_EXTRAHB) { outf("c &= bplehb_mask;"); outf("if (c <= 31) {"); - outf(" %s = xcolors[colors_ocs[c]];", colname); + outf(" %s = acolors[c];", colname); outf("} else {"); outf(" %s = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];", colname); outf("}"); } else { - outf("%s = xcolors[colors_ocs[c]];", colname); + outf("%s = acolors[c];", colname); } } @@ -1044,24 +1044,24 @@ static void gen_fastdraw_drawmode_aga(char *colname) outf(" dpval += dblpfofs[bpldualpf2of];"); outf("}"); outf("dpval ^= bxor;"); - outf("%s = colors_aga[dpval];", colname); + outf("%s = acolors[dpval];", colname); outf("}"); } else if (modes == CMODE_HAM) { outf("%s = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);", colname); } else if (modes == CMODE_EXTRAHB_ECS_KILLEHB) { outf("c ^= bxor;"); - outf("%s = colors_aga[c & 31];", colname); + outf("%s = acolors[c & 31];", colname); } else if (modes == CMODE_EXTRAHB) { outf("c ^= bxor;"); outf("if (c & 0x20) {"); outf(" uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;"); outf(" %s = CONVERT_RGB(v);", colname); outf("} else {"); - outf(" %s = colors_aga[c];", colname); + outf(" %s = acolors[c];", colname); outf("}"); } else { outf("c ^= bxor;"); - outf("%s = colors_aga[c];", colname); + outf("%s = acolors[c];", colname); } } @@ -1157,10 +1157,11 @@ static void gen_fastdraw(void) { int doubling = outres - res; + outf("uae_u32 *acolors = (uae_u32*)ls->linecolorstate;"); if (aga) { - outf("uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;"); + outf("uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32));"); } else { - outf("uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;"); + outf("uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32));"); } if (aga) { outf("uae_u8 bxor = ls->bplcon4 >> 8;"); diff --git a/linetoscr_aga_fast.cpp b/linetoscr_aga_fast.cpp index c33c1ddd..990efe1b 100644 --- a/linetoscr_aga_fast.cpp +++ b/linetoscr_aga_fast.cpp @@ -6,7 +6,8 @@ static void lts_aga_n_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -41,7 +42,7 @@ static void lts_aga_n_ilores_dlores_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; } @@ -57,7 +58,8 @@ static void lts_aga_n_ilores_dlores_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -97,7 +99,7 @@ static void lts_aga_dpf_ilores_dlores_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -114,7 +116,8 @@ static void lts_aga_dpf_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -153,7 +156,7 @@ static void lts_aga_ehb_ilores_dlores_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -170,7 +173,8 @@ static void lts_aga_ehb_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -220,7 +224,8 @@ static void lts_aga_ham_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -255,7 +260,7 @@ static void lts_aga_kehb_ilores_dlores_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; } @@ -271,7 +276,8 @@ static void lts_aga_kehb_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -306,7 +312,7 @@ static void lts_aga_n_ihires_dlores_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -320,7 +326,8 @@ static void lts_aga_n_ihires_dlores_b1(int draw_start, int draw_end, int draw_st } static void lts_aga_n_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -355,12 +362,12 @@ static void lts_aga_n_ihires_dlores_b1_filtered(int draw_start, int draw_end, in c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -373,7 +380,8 @@ static void lts_aga_n_ihires_dlores_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -413,7 +421,7 @@ static void lts_aga_dpf_ihires_dlores_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -428,7 +436,8 @@ static void lts_aga_dpf_ihires_dlores_b1(int draw_start, int draw_end, int draw_ } static void lts_aga_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -468,7 +477,7 @@ static void lts_aga_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -479,7 +488,7 @@ static void lts_aga_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -493,7 +502,8 @@ static void lts_aga_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -532,7 +542,7 @@ static void lts_aga_ehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -547,7 +557,8 @@ static void lts_aga_ehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_ } static void lts_aga_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -586,7 +597,7 @@ static void lts_aga_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -596,7 +607,7 @@ static void lts_aga_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -610,7 +621,8 @@ static void lts_aga_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -659,7 +671,8 @@ static void lts_aga_ham_ihires_dlores_b1(int draw_start, int draw_end, int draw_ } static void lts_aga_ham_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -710,7 +723,8 @@ static void lts_aga_ham_ihires_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -745,7 +759,7 @@ static void lts_aga_kehb_ihires_dlores_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -759,7 +773,8 @@ static void lts_aga_kehb_ihires_dlores_b1(int draw_start, int draw_end, int draw } static void lts_aga_kehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -794,12 +809,12 @@ static void lts_aga_kehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -852,7 +867,8 @@ static void lts_aga_kehb_ishres_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -888,13 +904,13 @@ static void lts_aga_n_ilores_dhires_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; } @@ -910,7 +926,8 @@ static void lts_aga_n_ilores_dhires_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -951,7 +968,7 @@ static void lts_aga_dpf_ilores_dhires_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -963,7 +980,7 @@ static void lts_aga_dpf_ilores_dhires_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -980,7 +997,8 @@ static void lts_aga_dpf_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1020,7 +1038,7 @@ static void lts_aga_ehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -1031,7 +1049,7 @@ static void lts_aga_ehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -1048,7 +1066,8 @@ static void lts_aga_ehb_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1104,7 +1123,8 @@ static void lts_aga_ham_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1140,13 +1160,13 @@ static void lts_aga_kehb_ilores_dhires_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; } @@ -1162,7 +1182,8 @@ static void lts_aga_kehb_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1197,7 +1218,7 @@ static void lts_aga_n_ihires_dhires_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; } @@ -1213,7 +1234,8 @@ static void lts_aga_n_ihires_dhires_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1253,7 +1275,7 @@ static void lts_aga_dpf_ihires_dhires_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -1270,7 +1292,8 @@ static void lts_aga_dpf_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1309,7 +1332,7 @@ static void lts_aga_ehb_ihires_dhires_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -1326,7 +1349,8 @@ static void lts_aga_ehb_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1376,7 +1400,8 @@ static void lts_aga_ham_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1411,7 +1436,7 @@ static void lts_aga_kehb_ihires_dhires_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; } @@ -1427,7 +1452,8 @@ static void lts_aga_kehb_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1462,7 +1488,7 @@ static void lts_aga_n_ishres_dhires_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -1476,7 +1502,8 @@ static void lts_aga_n_ishres_dhires_b1(int draw_start, int draw_end, int draw_st } static void lts_aga_n_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1511,12 +1538,12 @@ static void lts_aga_n_ishres_dhires_b1_filtered(int draw_start, int draw_end, in c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -1529,7 +1556,8 @@ static void lts_aga_n_ishres_dhires_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1569,7 +1597,7 @@ static void lts_aga_dpf_ishres_dhires_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1584,7 +1612,8 @@ static void lts_aga_dpf_ishres_dhires_b1(int draw_start, int draw_end, int draw_ } static void lts_aga_dpf_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1624,7 +1653,7 @@ static void lts_aga_dpf_ishres_dhires_b1_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1635,7 +1664,7 @@ static void lts_aga_dpf_ishres_dhires_b1_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -1649,7 +1678,8 @@ static void lts_aga_dpf_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1688,7 +1718,7 @@ static void lts_aga_ehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1703,7 +1733,8 @@ static void lts_aga_ehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_ } static void lts_aga_ehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1742,7 +1773,7 @@ static void lts_aga_ehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1752,7 +1783,7 @@ static void lts_aga_ehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -1766,7 +1797,8 @@ static void lts_aga_ehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1815,7 +1847,8 @@ static void lts_aga_ham_ishres_dhires_b1(int draw_start, int draw_end, int draw_ } static void lts_aga_ham_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1866,7 +1899,8 @@ static void lts_aga_ham_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1901,7 +1935,7 @@ static void lts_aga_kehb_ishres_dhires_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -1915,7 +1949,8 @@ static void lts_aga_kehb_ishres_dhires_b1(int draw_start, int draw_end, int draw } static void lts_aga_kehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1950,12 +1985,12 @@ static void lts_aga_kehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -1968,7 +2003,8 @@ static void lts_aga_kehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2006,25 +2042,25 @@ static void lts_aga_n_ilores_dshres_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[2]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[3]; *buf1++ = col; } @@ -2040,7 +2076,8 @@ static void lts_aga_n_ilores_dshres_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2083,7 +2120,7 @@ static void lts_aga_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -2095,7 +2132,7 @@ static void lts_aga_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -2107,7 +2144,7 @@ static void lts_aga_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[2]; *buf1++ = col; @@ -2119,7 +2156,7 @@ static void lts_aga_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[3]; *buf1++ = col; @@ -2136,7 +2173,8 @@ static void lts_aga_dpf_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2178,7 +2216,7 @@ static void lts_aga_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -2189,7 +2227,7 @@ static void lts_aga_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -2200,7 +2238,7 @@ static void lts_aga_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[2]; *buf1++ = col; @@ -2211,7 +2249,7 @@ static void lts_aga_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[3]; *buf1++ = col; @@ -2228,7 +2266,8 @@ static void lts_aga_ehb_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2296,7 +2335,8 @@ static void lts_aga_ham_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2334,25 +2374,25 @@ static void lts_aga_kehb_ilores_dshres_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[2]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[3]; *buf1++ = col; } @@ -2368,7 +2408,8 @@ static void lts_aga_kehb_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2404,13 +2445,13 @@ static void lts_aga_n_ihires_dshres_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; } @@ -2426,7 +2467,8 @@ static void lts_aga_n_ihires_dshres_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2467,7 +2509,7 @@ static void lts_aga_dpf_ihires_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -2479,7 +2521,7 @@ static void lts_aga_dpf_ihires_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -2496,7 +2538,8 @@ static void lts_aga_dpf_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2536,7 +2579,7 @@ static void lts_aga_ehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -2547,7 +2590,7 @@ static void lts_aga_ehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -2564,7 +2607,8 @@ static void lts_aga_ehb_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2620,7 +2664,8 @@ static void lts_aga_ham_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2656,13 +2701,13 @@ static void lts_aga_kehb_ihires_dshres_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; } @@ -2678,7 +2723,8 @@ static void lts_aga_kehb_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2713,7 +2759,7 @@ static void lts_aga_n_ishres_dshres_b1(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; } @@ -2729,7 +2775,8 @@ static void lts_aga_n_ishres_dshres_b1_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2769,7 +2816,7 @@ static void lts_aga_dpf_ishres_dshres_b1(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -2786,7 +2833,8 @@ static void lts_aga_dpf_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2825,7 +2873,7 @@ static void lts_aga_ehb_ishres_dshres_b1(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -2842,7 +2890,8 @@ static void lts_aga_ehb_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2892,7 +2941,8 @@ static void lts_aga_ham_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2927,7 +2977,7 @@ static void lts_aga_kehb_ishres_dshres_b1(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; } @@ -2943,7 +2993,8 @@ static void lts_aga_kehb_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_aga_n_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2980,7 +3031,7 @@ static void lts_aga_n_ilores_dlores_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -2997,7 +3048,8 @@ static void lts_aga_n_ilores_dlores_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3039,7 +3091,7 @@ static void lts_aga_dpf_ilores_dlores_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -3057,7 +3109,8 @@ static void lts_aga_dpf_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3098,7 +3151,7 @@ static void lts_aga_ehb_ilores_dlores_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -3116,7 +3169,8 @@ static void lts_aga_ehb_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3169,7 +3223,8 @@ static void lts_aga_ham_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3206,7 +3261,7 @@ static void lts_aga_kehb_ilores_dlores_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -3223,7 +3278,8 @@ static void lts_aga_kehb_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3260,7 +3316,7 @@ static void lts_aga_n_ihires_dlores_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -3275,7 +3331,8 @@ static void lts_aga_n_ihires_dlores_b2(int draw_start, int draw_end, int draw_st } static void lts_aga_n_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3312,12 +3369,12 @@ static void lts_aga_n_ihires_dlores_b2_filtered(int draw_start, int draw_end, in c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -3331,7 +3388,8 @@ static void lts_aga_n_ihires_dlores_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3373,7 +3431,7 @@ static void lts_aga_dpf_ihires_dlores_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3389,7 +3447,8 @@ static void lts_aga_dpf_ihires_dlores_b2(int draw_start, int draw_end, int draw_ } static void lts_aga_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3431,7 +3490,7 @@ static void lts_aga_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3442,7 +3501,7 @@ static void lts_aga_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -3457,7 +3516,8 @@ static void lts_aga_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3498,7 +3558,7 @@ static void lts_aga_ehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3514,7 +3574,8 @@ static void lts_aga_ehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_ } static void lts_aga_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3555,7 +3616,7 @@ static void lts_aga_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3565,7 +3626,7 @@ static void lts_aga_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -3580,7 +3641,8 @@ static void lts_aga_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3632,7 +3694,8 @@ static void lts_aga_ham_ihires_dlores_b2(int draw_start, int draw_end, int draw_ } static void lts_aga_ham_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3686,7 +3749,8 @@ static void lts_aga_ham_ihires_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3723,7 +3787,7 @@ static void lts_aga_kehb_ihires_dlores_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -3738,7 +3802,8 @@ static void lts_aga_kehb_ihires_dlores_b2(int draw_start, int draw_end, int draw } static void lts_aga_kehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3775,12 +3840,12 @@ static void lts_aga_kehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -3834,7 +3899,8 @@ static void lts_aga_kehb_ishres_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3873,14 +3939,14 @@ static void lts_aga_n_ilores_dhires_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -3897,7 +3963,8 @@ static void lts_aga_n_ilores_dhires_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3941,7 +4008,7 @@ static void lts_aga_dpf_ilores_dhires_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -3954,7 +4021,7 @@ static void lts_aga_dpf_ilores_dhires_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -3972,7 +4039,8 @@ static void lts_aga_dpf_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4015,7 +4083,7 @@ static void lts_aga_ehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -4027,7 +4095,7 @@ static void lts_aga_ehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -4045,7 +4113,8 @@ static void lts_aga_ehb_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4106,7 +4175,8 @@ static void lts_aga_ham_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4145,14 +4215,14 @@ static void lts_aga_kehb_ilores_dhires_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -4169,7 +4239,8 @@ static void lts_aga_kehb_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4206,7 +4277,7 @@ static void lts_aga_n_ihires_dhires_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -4223,7 +4294,8 @@ static void lts_aga_n_ihires_dhires_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4265,7 +4337,7 @@ static void lts_aga_dpf_ihires_dhires_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -4283,7 +4355,8 @@ static void lts_aga_dpf_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4324,7 +4397,7 @@ static void lts_aga_ehb_ihires_dhires_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -4342,7 +4415,8 @@ static void lts_aga_ehb_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4395,7 +4469,8 @@ static void lts_aga_ham_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4432,7 +4507,7 @@ static void lts_aga_kehb_ihires_dhires_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -4449,7 +4524,8 @@ static void lts_aga_kehb_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4486,7 +4562,7 @@ static void lts_aga_n_ishres_dhires_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -4501,7 +4577,8 @@ static void lts_aga_n_ishres_dhires_b2(int draw_start, int draw_end, int draw_st } static void lts_aga_n_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4538,12 +4615,12 @@ static void lts_aga_n_ishres_dhires_b2_filtered(int draw_start, int draw_end, in c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -4557,7 +4634,8 @@ static void lts_aga_n_ishres_dhires_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4599,7 +4677,7 @@ static void lts_aga_dpf_ishres_dhires_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -4615,7 +4693,8 @@ static void lts_aga_dpf_ishres_dhires_b2(int draw_start, int draw_end, int draw_ } static void lts_aga_dpf_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4657,7 +4736,7 @@ static void lts_aga_dpf_ishres_dhires_b2_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -4668,7 +4747,7 @@ static void lts_aga_dpf_ishres_dhires_b2_filtered(int draw_start, int draw_end, dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -4683,7 +4762,8 @@ static void lts_aga_dpf_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4724,7 +4804,7 @@ static void lts_aga_ehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -4740,7 +4820,8 @@ static void lts_aga_ehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_ } static void lts_aga_ehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4781,7 +4862,7 @@ static void lts_aga_ehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -4791,7 +4872,7 @@ static void lts_aga_ehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -4806,7 +4887,8 @@ static void lts_aga_ehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4858,7 +4940,8 @@ static void lts_aga_ham_ishres_dhires_b2(int draw_start, int draw_end, int draw_ } static void lts_aga_ham_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4912,7 +4995,8 @@ static void lts_aga_ham_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4949,7 +5033,7 @@ static void lts_aga_kehb_ishres_dhires_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -4964,7 +5048,8 @@ static void lts_aga_kehb_ishres_dhires_b2(int draw_start, int draw_end, int draw } static void lts_aga_kehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5001,12 +5086,12 @@ static void lts_aga_kehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -5020,7 +5105,8 @@ static void lts_aga_kehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5063,28 +5149,28 @@ static void lts_aga_n_ilores_dshres_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[2]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[3]; *buf1++ = col; *buf2++ = col; @@ -5101,7 +5187,8 @@ static void lts_aga_n_ilores_dshres_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5149,7 +5236,7 @@ static void lts_aga_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -5162,7 +5249,7 @@ static void lts_aga_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -5175,7 +5262,7 @@ static void lts_aga_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[2]; *buf1++ = col; @@ -5188,7 +5275,7 @@ static void lts_aga_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[3]; *buf1++ = col; @@ -5206,7 +5293,8 @@ static void lts_aga_dpf_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5253,7 +5341,7 @@ static void lts_aga_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -5265,7 +5353,7 @@ static void lts_aga_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -5277,7 +5365,7 @@ static void lts_aga_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[2]; *buf1++ = col; @@ -5289,7 +5377,7 @@ static void lts_aga_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[3]; *buf1++ = col; @@ -5307,7 +5395,8 @@ static void lts_aga_ehb_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5384,7 +5473,8 @@ static void lts_aga_ham_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5427,28 +5517,28 @@ static void lts_aga_kehb_ilores_dshres_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[2]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[3]; *buf1++ = col; *buf2++ = col; @@ -5465,7 +5555,8 @@ static void lts_aga_kehb_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5504,14 +5595,14 @@ static void lts_aga_n_ihires_dshres_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -5528,7 +5619,8 @@ static void lts_aga_n_ihires_dshres_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5572,7 +5664,7 @@ static void lts_aga_dpf_ihires_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -5585,7 +5677,7 @@ static void lts_aga_dpf_ihires_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -5603,7 +5695,8 @@ static void lts_aga_dpf_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5646,7 +5739,7 @@ static void lts_aga_ehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -5658,7 +5751,7 @@ static void lts_aga_ehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -5676,7 +5769,8 @@ static void lts_aga_ehb_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5737,7 +5831,8 @@ static void lts_aga_ham_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5776,14 +5871,14 @@ static void lts_aga_kehb_ihires_dshres_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -5800,7 +5895,8 @@ static void lts_aga_kehb_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_n_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5837,7 +5933,7 @@ static void lts_aga_n_ishres_dshres_b2(int draw_start, int draw_end, int draw_st c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -5854,7 +5950,8 @@ static void lts_aga_n_ishres_dshres_b2_filtered(int draw_start, int draw_end, in } static void lts_aga_dpf_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5896,7 +5993,7 @@ static void lts_aga_dpf_ishres_dshres_b2(int draw_start, int draw_end, int draw_ dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -5914,7 +6011,8 @@ static void lts_aga_dpf_ishres_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ehb_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5955,7 +6053,7 @@ static void lts_aga_ehb_ishres_dshres_b2(int draw_start, int draw_end, int draw_ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -5973,7 +6071,8 @@ static void lts_aga_ehb_ishres_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_ham_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6026,7 +6125,8 @@ static void lts_aga_ham_ishres_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_aga_kehb_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6063,7 +6163,7 @@ static void lts_aga_kehb_ishres_dshres_b2(int draw_start, int draw_end, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; diff --git a/linetoscr_aga_genlock_fast.cpp b/linetoscr_aga_genlock_fast.cpp index ef04910f..d2598cd2 100644 --- a/linetoscr_aga_genlock_fast.cpp +++ b/linetoscr_aga_genlock_fast.cpp @@ -6,7 +6,8 @@ static void lts_aga_n_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -44,7 +45,7 @@ static void lts_aga_n_ilores_dlores_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -62,7 +63,8 @@ static void lts_aga_n_ilores_dlores_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -105,7 +107,7 @@ static void lts_aga_dpf_ilores_dlores_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -124,7 +126,8 @@ static void lts_aga_dpf_ilores_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -166,7 +169,7 @@ static void lts_aga_ehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -185,7 +188,8 @@ static void lts_aga_ehb_ilores_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -240,7 +244,8 @@ static void lts_aga_ham_ilores_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -278,7 +283,7 @@ static void lts_aga_kehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -296,7 +301,8 @@ static void lts_aga_kehb_ilores_dlores_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -334,7 +340,7 @@ static void lts_aga_n_ihires_dlores_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -350,7 +356,8 @@ static void lts_aga_n_ihires_dlores_b1_genlock(int draw_start, int draw_end, int } static void lts_aga_n_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -388,12 +395,12 @@ static void lts_aga_n_ihires_dlores_b1_filtered_genlock(int draw_start, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -408,7 +415,8 @@ static void lts_aga_n_ihires_dlores_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -451,7 +459,7 @@ static void lts_aga_dpf_ihires_dlores_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -468,7 +476,8 @@ static void lts_aga_dpf_ihires_dlores_b1_genlock(int draw_start, int draw_end, i } static void lts_aga_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -511,7 +520,7 @@ static void lts_aga_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -522,7 +531,7 @@ static void lts_aga_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -538,7 +547,8 @@ static void lts_aga_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -580,7 +590,7 @@ static void lts_aga_ehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -597,7 +607,8 @@ static void lts_aga_ehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, i } static void lts_aga_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -639,7 +650,7 @@ static void lts_aga_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -649,7 +660,7 @@ static void lts_aga_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -665,7 +676,8 @@ static void lts_aga_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -719,7 +731,8 @@ static void lts_aga_ham_ihires_dlores_b1_genlock(int draw_start, int draw_end, i } static void lts_aga_ham_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -775,7 +788,8 @@ static void lts_aga_ham_ihires_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -813,7 +827,7 @@ static void lts_aga_kehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -829,7 +843,8 @@ static void lts_aga_kehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -867,12 +882,12 @@ static void lts_aga_kehb_ihires_dlores_b1_filtered_genlock(int draw_start, int d c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -927,7 +942,8 @@ static void lts_aga_kehb_ishres_dlores_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -967,7 +983,7 @@ static void lts_aga_n_ilores_dhires_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -975,7 +991,7 @@ static void lts_aga_n_ilores_dhires_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -993,7 +1009,8 @@ static void lts_aga_n_ilores_dhires_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1038,7 +1055,7 @@ static void lts_aga_dpf_ilores_dhires_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -1052,7 +1069,7 @@ static void lts_aga_dpf_ilores_dhires_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -1071,7 +1088,8 @@ static void lts_aga_dpf_ilores_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1115,7 +1133,7 @@ static void lts_aga_ehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -1128,7 +1146,7 @@ static void lts_aga_ehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -1147,7 +1165,8 @@ static void lts_aga_ehb_ilores_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1211,7 +1230,8 @@ static void lts_aga_ham_ilores_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1251,7 +1271,7 @@ static void lts_aga_kehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1259,7 +1279,7 @@ static void lts_aga_kehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1277,7 +1297,8 @@ static void lts_aga_kehb_ilores_dhires_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1315,7 +1336,7 @@ static void lts_aga_n_ihires_dhires_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1333,7 +1354,8 @@ static void lts_aga_n_ihires_dhires_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1376,7 +1398,7 @@ static void lts_aga_dpf_ihires_dhires_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -1395,7 +1417,8 @@ static void lts_aga_dpf_ihires_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1437,7 +1460,7 @@ static void lts_aga_ehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -1456,7 +1479,8 @@ static void lts_aga_ehb_ihires_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1511,7 +1535,8 @@ static void lts_aga_ham_ihires_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1549,7 +1574,7 @@ static void lts_aga_kehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1567,7 +1592,8 @@ static void lts_aga_kehb_ihires_dhires_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1605,7 +1631,7 @@ static void lts_aga_n_ishres_dhires_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -1621,7 +1647,8 @@ static void lts_aga_n_ishres_dhires_b1_genlock(int draw_start, int draw_end, int } static void lts_aga_n_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1659,12 +1686,12 @@ static void lts_aga_n_ishres_dhires_b1_filtered_genlock(int draw_start, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -1679,7 +1706,8 @@ static void lts_aga_n_ishres_dhires_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1722,7 +1750,7 @@ static void lts_aga_dpf_ishres_dhires_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1739,7 +1767,8 @@ static void lts_aga_dpf_ishres_dhires_b1_genlock(int draw_start, int draw_end, i } static void lts_aga_dpf_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1782,7 +1811,7 @@ static void lts_aga_dpf_ishres_dhires_b1_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1793,7 +1822,7 @@ static void lts_aga_dpf_ishres_dhires_b1_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -1809,7 +1838,8 @@ static void lts_aga_dpf_ishres_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1851,7 +1881,7 @@ static void lts_aga_ehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1868,7 +1898,8 @@ static void lts_aga_ehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, i } static void lts_aga_ehb_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1910,7 +1941,7 @@ static void lts_aga_ehb_ishres_dhires_b1_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -1920,7 +1951,7 @@ static void lts_aga_ehb_ishres_dhires_b1_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -1936,7 +1967,8 @@ static void lts_aga_ehb_ishres_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -1990,7 +2022,8 @@ static void lts_aga_ham_ishres_dhires_b1_genlock(int draw_start, int draw_end, i } static void lts_aga_ham_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2046,7 +2079,8 @@ static void lts_aga_ham_ishres_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2084,7 +2118,7 @@ static void lts_aga_kehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -2100,7 +2134,8 @@ static void lts_aga_kehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, } static void lts_aga_kehb_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2138,12 +2173,12 @@ static void lts_aga_kehb_ishres_dhires_b1_filtered_genlock(int draw_start, int d c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -2158,7 +2193,8 @@ static void lts_aga_kehb_ishres_dhires_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2202,7 +2238,7 @@ static void lts_aga_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2210,7 +2246,7 @@ static void lts_aga_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2218,7 +2254,7 @@ static void lts_aga_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[2]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2226,7 +2262,7 @@ static void lts_aga_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[3]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2244,7 +2280,8 @@ static void lts_aga_n_ilores_dshres_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2293,7 +2330,7 @@ static void lts_aga_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -2307,7 +2344,7 @@ static void lts_aga_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -2321,7 +2358,7 @@ static void lts_aga_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[2]; *buf1++ = col; @@ -2335,7 +2372,7 @@ static void lts_aga_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[3]; *buf1++ = col; @@ -2354,7 +2391,8 @@ static void lts_aga_dpf_ilores_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2402,7 +2440,7 @@ static void lts_aga_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -2415,7 +2453,7 @@ static void lts_aga_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -2428,7 +2466,7 @@ static void lts_aga_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[2]; *buf1++ = col; @@ -2441,7 +2479,7 @@ static void lts_aga_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[3]; *buf1++ = col; @@ -2460,7 +2498,8 @@ static void lts_aga_ehb_ilores_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2542,7 +2581,8 @@ static void lts_aga_ham_ilores_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2586,7 +2626,7 @@ static void lts_aga_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2594,7 +2634,7 @@ static void lts_aga_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2602,7 +2642,7 @@ static void lts_aga_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[2]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2610,7 +2650,7 @@ static void lts_aga_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[3]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2628,7 +2668,8 @@ static void lts_aga_kehb_ilores_dshres_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2668,7 +2709,7 @@ static void lts_aga_n_ihires_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2676,7 +2717,7 @@ static void lts_aga_n_ihires_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2694,7 +2735,8 @@ static void lts_aga_n_ihires_dshres_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2739,7 +2781,7 @@ static void lts_aga_dpf_ihires_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -2753,7 +2795,7 @@ static void lts_aga_dpf_ihires_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -2772,7 +2814,8 @@ static void lts_aga_dpf_ihires_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2816,7 +2859,7 @@ static void lts_aga_ehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -2829,7 +2872,7 @@ static void lts_aga_ehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -2848,7 +2891,8 @@ static void lts_aga_ehb_ihires_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2912,7 +2956,8 @@ static void lts_aga_ham_ihires_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -2952,7 +2997,7 @@ static void lts_aga_kehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2960,7 +3005,7 @@ static void lts_aga_kehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2978,7 +3023,8 @@ static void lts_aga_kehb_ihires_dshres_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3016,7 +3062,7 @@ static void lts_aga_n_ishres_dshres_b1_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -3034,7 +3080,8 @@ static void lts_aga_n_ishres_dshres_b1_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3077,7 +3124,7 @@ static void lts_aga_dpf_ishres_dshres_b1_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -3096,7 +3143,8 @@ static void lts_aga_dpf_ishres_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3138,7 +3186,7 @@ static void lts_aga_ehb_ishres_dshres_b1_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -3157,7 +3205,8 @@ static void lts_aga_ehb_ishres_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3212,7 +3261,8 @@ static void lts_aga_ham_ishres_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3250,7 +3300,7 @@ static void lts_aga_kehb_ishres_dshres_b1_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -3268,7 +3318,8 @@ static void lts_aga_kehb_ishres_dshres_b1_filtered_genlock(int draw_start, int d } static void lts_aga_n_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3308,7 +3359,7 @@ static void lts_aga_n_ilores_dlores_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -3327,7 +3378,8 @@ static void lts_aga_n_ilores_dlores_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3372,7 +3424,7 @@ static void lts_aga_dpf_ilores_dlores_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -3392,7 +3444,8 @@ static void lts_aga_dpf_ilores_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3436,7 +3489,7 @@ static void lts_aga_ehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -3456,7 +3509,8 @@ static void lts_aga_ehb_ilores_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3514,7 +3568,8 @@ static void lts_aga_ham_ilores_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3554,7 +3609,7 @@ static void lts_aga_kehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -3573,7 +3628,8 @@ static void lts_aga_kehb_ilores_dlores_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3613,7 +3669,7 @@ static void lts_aga_n_ihires_dlores_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -3630,7 +3686,8 @@ static void lts_aga_n_ihires_dlores_b2_genlock(int draw_start, int draw_end, int } static void lts_aga_n_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3670,12 +3727,12 @@ static void lts_aga_n_ihires_dlores_b2_filtered_genlock(int draw_start, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -3691,7 +3748,8 @@ static void lts_aga_n_ihires_dlores_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3736,7 +3794,7 @@ static void lts_aga_dpf_ihires_dlores_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3754,7 +3812,8 @@ static void lts_aga_dpf_ihires_dlores_b2_genlock(int draw_start, int draw_end, i } static void lts_aga_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3799,7 +3858,7 @@ static void lts_aga_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3810,7 +3869,7 @@ static void lts_aga_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -3827,7 +3886,8 @@ static void lts_aga_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3871,7 +3931,7 @@ static void lts_aga_ehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3889,7 +3949,8 @@ static void lts_aga_ehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, i } static void lts_aga_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -3933,7 +3994,7 @@ static void lts_aga_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3943,7 +4004,7 @@ static void lts_aga_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -3960,7 +4021,8 @@ static void lts_aga_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4017,7 +4079,8 @@ static void lts_aga_ham_ihires_dlores_b2_genlock(int draw_start, int draw_end, i } static void lts_aga_ham_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4076,7 +4139,8 @@ static void lts_aga_ham_ihires_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4116,7 +4180,7 @@ static void lts_aga_kehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -4133,7 +4197,8 @@ static void lts_aga_kehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, } static void lts_aga_kehb_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4173,12 +4238,12 @@ static void lts_aga_kehb_ihires_dlores_b2_filtered_genlock(int draw_start, int d c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -4234,7 +4299,8 @@ static void lts_aga_kehb_ishres_dlores_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4277,7 +4343,7 @@ static void lts_aga_n_ilores_dhires_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -4286,7 +4352,7 @@ static void lts_aga_n_ilores_dhires_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -4305,7 +4371,8 @@ static void lts_aga_n_ilores_dhires_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4353,7 +4420,7 @@ static void lts_aga_dpf_ilores_dhires_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -4368,7 +4435,7 @@ static void lts_aga_dpf_ilores_dhires_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -4388,7 +4455,8 @@ static void lts_aga_dpf_ilores_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4435,7 +4503,7 @@ static void lts_aga_ehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -4449,7 +4517,7 @@ static void lts_aga_ehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -4469,7 +4537,8 @@ static void lts_aga_ehb_ilores_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4538,7 +4607,8 @@ static void lts_aga_ham_ilores_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4581,7 +4651,7 @@ static void lts_aga_kehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -4590,7 +4660,7 @@ static void lts_aga_kehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -4609,7 +4679,8 @@ static void lts_aga_kehb_ilores_dhires_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4649,7 +4720,7 @@ static void lts_aga_n_ihires_dhires_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -4668,7 +4739,8 @@ static void lts_aga_n_ihires_dhires_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4713,7 +4785,7 @@ static void lts_aga_dpf_ihires_dhires_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -4733,7 +4805,8 @@ static void lts_aga_dpf_ihires_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4777,7 +4850,7 @@ static void lts_aga_ehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -4797,7 +4870,8 @@ static void lts_aga_ehb_ihires_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4855,7 +4929,8 @@ static void lts_aga_ham_ihires_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4895,7 +4970,7 @@ static void lts_aga_kehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -4914,7 +4989,8 @@ static void lts_aga_kehb_ihires_dhires_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -4954,7 +5030,7 @@ static void lts_aga_n_ishres_dhires_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -4971,7 +5047,8 @@ static void lts_aga_n_ishres_dhires_b2_genlock(int draw_start, int draw_end, int } static void lts_aga_n_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5011,12 +5088,12 @@ static void lts_aga_n_ishres_dhires_b2_filtered_genlock(int draw_start, int draw c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -5032,7 +5109,8 @@ static void lts_aga_n_ishres_dhires_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5077,7 +5155,7 @@ static void lts_aga_dpf_ishres_dhires_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -5095,7 +5173,8 @@ static void lts_aga_dpf_ishres_dhires_b2_genlock(int draw_start, int draw_end, i } static void lts_aga_dpf_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5140,7 +5219,7 @@ static void lts_aga_dpf_ishres_dhires_b2_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -5151,7 +5230,7 @@ static void lts_aga_dpf_ishres_dhires_b2_filtered_genlock(int draw_start, int dr dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - colf = colors_aga[dpval]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -5168,7 +5247,8 @@ static void lts_aga_dpf_ishres_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5212,7 +5292,7 @@ static void lts_aga_ehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -5230,7 +5310,8 @@ static void lts_aga_ehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, i } static void lts_aga_ehb_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5274,7 +5355,7 @@ static void lts_aga_ehb_ishres_dhires_b2_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -5284,7 +5365,7 @@ static void lts_aga_ehb_ishres_dhires_b2_filtered_genlock(int draw_start, int dr uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; colf = CONVERT_RGB(v); } else { - colf = colors_aga[c]; + colf = acolors[c]; } col = filter_pixel(col, colf); cp += cpadds[0]; @@ -5301,7 +5382,8 @@ static void lts_aga_ehb_ishres_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5358,7 +5440,8 @@ static void lts_aga_ham_ishres_dhires_b2_genlock(int draw_start, int draw_end, i } static void lts_aga_ham_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5417,7 +5500,8 @@ static void lts_aga_ham_ishres_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5457,7 +5541,7 @@ static void lts_aga_kehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpadds[0]; @@ -5474,7 +5558,8 @@ static void lts_aga_kehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, } static void lts_aga_kehb_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5514,12 +5599,12 @@ static void lts_aga_kehb_ishres_dhires_b2_filtered_genlock(int draw_start, int d c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; c ^= bxor; - colf = colors_aga[c & 31]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpadds[0]; *buf1++ = col; @@ -5535,7 +5620,8 @@ static void lts_aga_kehb_ishres_dhires_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5584,7 +5670,7 @@ static void lts_aga_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -5593,7 +5679,7 @@ static void lts_aga_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -5602,7 +5688,7 @@ static void lts_aga_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[2]; *buf1++ = col; *buf2++ = col; @@ -5611,7 +5697,7 @@ static void lts_aga_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[3]; *buf1++ = col; *buf2++ = col; @@ -5630,7 +5716,8 @@ static void lts_aga_n_ilores_dshres_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5684,7 +5771,7 @@ static void lts_aga_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -5699,7 +5786,7 @@ static void lts_aga_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -5714,7 +5801,7 @@ static void lts_aga_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[2]; *buf1++ = col; @@ -5729,7 +5816,7 @@ static void lts_aga_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[3]; *buf1++ = col; @@ -5749,7 +5836,8 @@ static void lts_aga_dpf_ilores_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5802,7 +5890,7 @@ static void lts_aga_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -5816,7 +5904,7 @@ static void lts_aga_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -5830,7 +5918,7 @@ static void lts_aga_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[2]; *buf1++ = col; @@ -5844,7 +5932,7 @@ static void lts_aga_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[3]; *buf1++ = col; @@ -5864,7 +5952,8 @@ static void lts_aga_ehb_ilores_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -5955,7 +6044,8 @@ static void lts_aga_ham_ilores_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6004,7 +6094,7 @@ static void lts_aga_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -6013,7 +6103,7 @@ static void lts_aga_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -6022,7 +6112,7 @@ static void lts_aga_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[2]; *buf1++ = col; *buf2++ = col; @@ -6031,7 +6121,7 @@ static void lts_aga_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[3]; *buf1++ = col; *buf2++ = col; @@ -6050,7 +6140,8 @@ static void lts_aga_kehb_ilores_dshres_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6093,7 +6184,7 @@ static void lts_aga_n_ihires_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -6102,7 +6193,7 @@ static void lts_aga_n_ihires_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -6121,7 +6212,8 @@ static void lts_aga_n_ihires_dshres_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6169,7 +6261,7 @@ static void lts_aga_dpf_ihires_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -6184,7 +6276,7 @@ static void lts_aga_dpf_ihires_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[1]; *buf1++ = col; @@ -6204,7 +6296,8 @@ static void lts_aga_dpf_ihires_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6251,7 +6344,7 @@ static void lts_aga_ehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -6265,7 +6358,7 @@ static void lts_aga_ehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[1]; *buf1++ = col; @@ -6285,7 +6378,8 @@ static void lts_aga_ehb_ihires_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6354,7 +6448,8 @@ static void lts_aga_ham_ihires_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6397,7 +6492,7 @@ static void lts_aga_kehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -6406,7 +6501,7 @@ static void lts_aga_kehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[1]; *buf1++ = col; *buf2++ = col; @@ -6425,7 +6520,8 @@ static void lts_aga_kehb_ihires_dshres_b2_filtered_genlock(int draw_start, int d } static void lts_aga_n_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6465,7 +6561,7 @@ static void lts_aga_n_ishres_dshres_b2_genlock(int draw_start, int draw_end, int c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c]; + col = acolors[c]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; @@ -6484,7 +6580,8 @@ static void lts_aga_n_ishres_dshres_b2_filtered_genlock(int draw_start, int draw } static void lts_aga_dpf_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6529,7 +6626,7 @@ static void lts_aga_dpf_ishres_dshres_b2_genlock(int draw_start, int draw_end, i dpval += dblpfofs[bpldualpf2of]; } dpval ^= bxor; - col = colors_aga[dpval]; + col = acolors[dpval]; } cp += cpadds[0]; *buf1++ = col; @@ -6549,7 +6646,8 @@ static void lts_aga_dpf_ishres_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ehb_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6593,7 +6691,7 @@ static void lts_aga_ehb_ishres_dshres_b2_genlock(int draw_start, int draw_end, i uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f; col = CONVERT_RGB(v); } else { - col = colors_aga[c]; + col = acolors[c]; } cp += cpadds[0]; *buf1++ = col; @@ -6613,7 +6711,8 @@ static void lts_aga_ehb_ishres_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_ham_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6671,7 +6770,8 @@ static void lts_aga_ham_ishres_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_aga_kehb_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u32 *colors_aga = (uae_u32*)(ls->linecolorstate + 256 * sizeof(uae_u32)); uae_u8 bxor = ls->bplcon4 >> 8; int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; @@ -6711,7 +6811,7 @@ static void lts_aga_kehb_ishres_dshres_b2_genlock(int draw_start, int draw_end, c = *cp; clxdat |= bplcoltable[c]; c ^= bxor; - col = colors_aga[c & 31]; + col = acolors[c & 31]; cp += cpadds[0]; *buf1++ = col; *buf2++ = col; diff --git a/linetoscr_ecs_fast.cpp b/linetoscr_ecs_fast.cpp index f228cb29..e0708c81 100644 --- a/linetoscr_ecs_fast.cpp +++ b/linetoscr_ecs_fast.cpp @@ -6,7 +6,8 @@ static void lts_ecs_n_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -39,7 +40,7 @@ static void lts_ecs_n_ilores_dlores_b1(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; } @@ -55,7 +56,8 @@ static void lts_ecs_n_ilores_dlores_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -90,7 +92,7 @@ static void lts_ecs_dpf_ilores_dlores_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -107,7 +109,8 @@ static void lts_ecs_dpf_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -142,7 +145,7 @@ static void lts_ecs_ehb_ilores_dlores_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -161,7 +164,8 @@ static void lts_ecs_ehb_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -210,7 +214,8 @@ static void lts_ecs_ham_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ilores_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -243,7 +248,7 @@ static void lts_ecs_kehb_ilores_dlores_b1(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; } @@ -259,7 +264,8 @@ static void lts_ecs_kehb_ilores_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -292,7 +298,7 @@ static void lts_ecs_n_ihires_dlores_b1(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -306,7 +312,8 @@ static void lts_ecs_n_ihires_dlores_b1(int draw_start, int draw_end, int draw_st } static void lts_ecs_n_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -339,11 +346,11 @@ static void lts_ecs_n_ihires_dlores_b1_filtered(int draw_start, int draw_end, in uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -356,7 +363,8 @@ static void lts_ecs_n_ihires_dlores_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -391,7 +399,7 @@ static void lts_ecs_dpf_ihires_dlores_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -406,7 +414,8 @@ static void lts_ecs_dpf_ihires_dlores_b1(int draw_start, int draw_end, int draw_ } static void lts_ecs_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -441,14 +450,14 @@ static void lts_ecs_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; { uae_u8 dpval = dpf_lookup[c]; - colf = xcolors[colors_ocs[dpval]]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpaddv; @@ -462,7 +471,8 @@ static void lts_ecs_dpf_ihires_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -497,7 +507,7 @@ static void lts_ecs_ehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -514,7 +524,8 @@ static void lts_ecs_ehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_ } static void lts_ecs_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -549,7 +560,7 @@ static void lts_ecs_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -558,7 +569,7 @@ static void lts_ecs_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, uae_u32 colf; c &= bplehb_mask; if (c <= 31) { - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; } else { colf = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -574,7 +585,8 @@ static void lts_ecs_ehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -621,7 +633,8 @@ static void lts_ecs_ham_ihires_dlores_b1(int draw_start, int draw_end, int draw_ } static void lts_ecs_ham_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -671,7 +684,8 @@ static void lts_ecs_ham_ihires_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dlores_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -704,7 +718,7 @@ static void lts_ecs_kehb_ihires_dlores_b1(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -718,7 +732,8 @@ static void lts_ecs_kehb_ihires_dlores_b1(int draw_start, int draw_end, int draw } static void lts_ecs_kehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -751,11 +766,11 @@ static void lts_ecs_kehb_ihires_dlores_b1_filtered(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c & 31]]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -808,7 +823,8 @@ static void lts_ecs_kehb_ishres_dlores_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -842,11 +858,11 @@ static void lts_ecs_n_ilores_dhires_b1(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; } @@ -862,7 +878,8 @@ static void lts_ecs_n_ilores_dhires_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -898,14 +915,14 @@ static void lts_ecs_dpf_ilores_dhires_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -922,7 +939,8 @@ static void lts_ecs_dpf_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -958,7 +976,7 @@ static void lts_ecs_ehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -967,7 +985,7 @@ static void lts_ecs_ehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -986,7 +1004,8 @@ static void lts_ecs_ehb_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1040,7 +1059,8 @@ static void lts_ecs_ham_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ilores_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1074,11 +1094,11 @@ static void lts_ecs_kehb_ilores_dhires_b1(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; } @@ -1094,7 +1114,8 @@ static void lts_ecs_kehb_ilores_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1127,7 +1148,7 @@ static void lts_ecs_n_ihires_dhires_b1(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; } @@ -1143,7 +1164,8 @@ static void lts_ecs_n_ihires_dhires_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1178,7 +1200,7 @@ static void lts_ecs_dpf_ihires_dhires_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -1195,7 +1217,8 @@ static void lts_ecs_dpf_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1230,7 +1253,7 @@ static void lts_ecs_ehb_ihires_dhires_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1249,7 +1272,8 @@ static void lts_ecs_ehb_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1298,7 +1322,8 @@ static void lts_ecs_ham_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1331,7 +1356,7 @@ static void lts_ecs_kehb_ihires_dhires_b1(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; } @@ -1347,7 +1372,8 @@ static void lts_ecs_kehb_ihires_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1391,7 +1417,8 @@ static void lts_ecs_n_ishres_dhires_b1(int draw_start, int draw_end, int draw_st } static void lts_ecs_n_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1435,7 +1462,8 @@ static void lts_ecs_n_ishres_dhires_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1479,7 +1507,8 @@ static void lts_ecs_dpf_ishres_dhires_b1(int draw_start, int draw_end, int draw_ } static void lts_ecs_dpf_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1523,7 +1552,8 @@ static void lts_ecs_dpf_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1567,7 +1597,8 @@ static void lts_ecs_ehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_ } static void lts_ecs_ehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1611,7 +1642,8 @@ static void lts_ecs_ehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1655,7 +1687,8 @@ static void lts_ecs_ham_ishres_dhires_b1(int draw_start, int draw_end, int draw_ } static void lts_ecs_ham_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1699,7 +1732,8 @@ static void lts_ecs_ham_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ishres_dhires_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1743,7 +1777,8 @@ static void lts_ecs_kehb_ishres_dhires_b1(int draw_start, int draw_end, int draw } static void lts_ecs_kehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1787,7 +1822,8 @@ static void lts_ecs_kehb_ishres_dhires_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1823,19 +1859,19 @@ static void lts_ecs_n_ilores_dshres_b1(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; } @@ -1851,7 +1887,8 @@ static void lts_ecs_n_ilores_dshres_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1889,28 +1926,28 @@ static void lts_ecs_dpf_ilores_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -1927,7 +1964,8 @@ static void lts_ecs_dpf_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -1965,7 +2003,7 @@ static void lts_ecs_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1974,7 +2012,7 @@ static void lts_ecs_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1983,7 +2021,7 @@ static void lts_ecs_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1992,7 +2030,7 @@ static void lts_ecs_ehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2011,7 +2049,8 @@ static void lts_ecs_ehb_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2075,7 +2114,8 @@ static void lts_ecs_ham_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ilores_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2111,19 +2151,19 @@ static void lts_ecs_kehb_ilores_dshres_b1(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; } @@ -2139,7 +2179,8 @@ static void lts_ecs_kehb_ilores_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2173,11 +2214,11 @@ static void lts_ecs_n_ihires_dshres_b1(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; } @@ -2193,7 +2234,8 @@ static void lts_ecs_n_ihires_dshres_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2229,14 +2271,14 @@ static void lts_ecs_dpf_ihires_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -2253,7 +2295,8 @@ static void lts_ecs_dpf_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2289,7 +2332,7 @@ static void lts_ecs_ehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2298,7 +2341,7 @@ static void lts_ecs_ehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2317,7 +2360,8 @@ static void lts_ecs_ehb_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2371,7 +2415,8 @@ static void lts_ecs_ham_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2405,11 +2450,11 @@ static void lts_ecs_kehb_ihires_dshres_b1(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; } @@ -2425,7 +2470,8 @@ static void lts_ecs_kehb_ihires_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2474,7 +2520,8 @@ static void lts_ecs_n_ishres_dshres_b1_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2523,7 +2570,8 @@ static void lts_ecs_dpf_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2572,7 +2620,8 @@ static void lts_ecs_ehb_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2621,7 +2670,8 @@ static void lts_ecs_ham_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ishres_dshres_b1(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2670,7 +2720,8 @@ static void lts_ecs_kehb_ishres_dshres_b1_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2705,7 +2756,7 @@ static void lts_ecs_n_ilores_dlores_b2(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -2722,7 +2773,8 @@ static void lts_ecs_n_ilores_dlores_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2759,7 +2811,7 @@ static void lts_ecs_dpf_ilores_dlores_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -2777,7 +2829,8 @@ static void lts_ecs_dpf_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2814,7 +2867,7 @@ static void lts_ecs_ehb_ilores_dlores_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2834,7 +2887,8 @@ static void lts_ecs_ehb_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2886,7 +2940,8 @@ static void lts_ecs_ham_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ilores_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2921,7 +2976,7 @@ static void lts_ecs_kehb_ilores_dlores_b2(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -2938,7 +2993,8 @@ static void lts_ecs_kehb_ilores_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -2973,7 +3029,7 @@ static void lts_ecs_n_ihires_dlores_b2(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -2988,7 +3044,8 @@ static void lts_ecs_n_ihires_dlores_b2(int draw_start, int draw_end, int draw_st } static void lts_ecs_n_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3023,11 +3080,11 @@ static void lts_ecs_n_ihires_dlores_b2_filtered(int draw_start, int draw_end, in uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -3041,7 +3098,8 @@ static void lts_ecs_n_ihires_dlores_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3078,7 +3136,7 @@ static void lts_ecs_dpf_ihires_dlores_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3094,7 +3152,8 @@ static void lts_ecs_dpf_ihires_dlores_b2(int draw_start, int draw_end, int draw_ } static void lts_ecs_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3131,14 +3190,14 @@ static void lts_ecs_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; { uae_u8 dpval = dpf_lookup[c]; - colf = xcolors[colors_ocs[dpval]]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpaddv; @@ -3153,7 +3212,8 @@ static void lts_ecs_dpf_ihires_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3190,7 +3250,7 @@ static void lts_ecs_ehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3208,7 +3268,8 @@ static void lts_ecs_ehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_ } static void lts_ecs_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3245,7 +3306,7 @@ static void lts_ecs_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3254,7 +3315,7 @@ static void lts_ecs_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, uae_u32 colf; c &= bplehb_mask; if (c <= 31) { - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; } else { colf = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3271,7 +3332,8 @@ static void lts_ecs_ehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3321,7 +3383,8 @@ static void lts_ecs_ham_ihires_dlores_b2(int draw_start, int draw_end, int draw_ } static void lts_ecs_ham_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3374,7 +3437,8 @@ static void lts_ecs_ham_ihires_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dlores_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3409,7 +3473,7 @@ static void lts_ecs_kehb_ihires_dlores_b2(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -3424,7 +3488,8 @@ static void lts_ecs_kehb_ihires_dlores_b2(int draw_start, int draw_end, int draw } static void lts_ecs_kehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3459,11 +3524,11 @@ static void lts_ecs_kehb_ihires_dlores_b2_filtered(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c & 31]]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -3517,7 +3582,8 @@ static void lts_ecs_kehb_ishres_dlores_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3554,12 +3620,12 @@ static void lts_ecs_n_ilores_dhires_b2(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -3576,7 +3642,8 @@ static void lts_ecs_n_ilores_dhires_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3615,7 +3682,7 @@ static void lts_ecs_dpf_ilores_dhires_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -3623,7 +3690,7 @@ static void lts_ecs_dpf_ilores_dhires_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -3641,7 +3708,8 @@ static void lts_ecs_dpf_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3680,7 +3748,7 @@ static void lts_ecs_ehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3690,7 +3758,7 @@ static void lts_ecs_ehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3710,7 +3778,8 @@ static void lts_ecs_ehb_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3769,7 +3838,8 @@ static void lts_ecs_ham_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ilores_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3806,12 +3876,12 @@ static void lts_ecs_kehb_ilores_dhires_b2(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -3828,7 +3898,8 @@ static void lts_ecs_kehb_ilores_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3863,7 +3934,7 @@ static void lts_ecs_n_ihires_dhires_b2(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -3880,7 +3951,8 @@ static void lts_ecs_n_ihires_dhires_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3917,7 +3989,7 @@ static void lts_ecs_dpf_ihires_dhires_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -3935,7 +4007,8 @@ static void lts_ecs_dpf_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -3972,7 +4045,7 @@ static void lts_ecs_ehb_ihires_dhires_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3992,7 +4065,8 @@ static void lts_ecs_ehb_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4044,7 +4118,8 @@ static void lts_ecs_ham_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4079,7 +4154,7 @@ static void lts_ecs_kehb_ihires_dhires_b2(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -4096,7 +4171,8 @@ static void lts_ecs_kehb_ihires_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4143,7 +4219,8 @@ static void lts_ecs_n_ishres_dhires_b2(int draw_start, int draw_end, int draw_st } static void lts_ecs_n_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4190,7 +4267,8 @@ static void lts_ecs_n_ishres_dhires_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4237,7 +4315,8 @@ static void lts_ecs_dpf_ishres_dhires_b2(int draw_start, int draw_end, int draw_ } static void lts_ecs_dpf_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4284,7 +4363,8 @@ static void lts_ecs_dpf_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4331,7 +4411,8 @@ static void lts_ecs_ehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_ } static void lts_ecs_ehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4378,7 +4459,8 @@ static void lts_ecs_ehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4425,7 +4507,8 @@ static void lts_ecs_ham_ishres_dhires_b2(int draw_start, int draw_end, int draw_ } static void lts_ecs_ham_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4472,7 +4555,8 @@ static void lts_ecs_ham_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ishres_dhires_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4519,7 +4603,8 @@ static void lts_ecs_kehb_ishres_dhires_b2(int draw_start, int draw_end, int draw } static void lts_ecs_kehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4566,7 +4651,8 @@ static void lts_ecs_kehb_ishres_dhires_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4607,22 +4693,22 @@ static void lts_ecs_n_ilores_dshres_b2(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -4639,7 +4725,8 @@ static void lts_ecs_n_ilores_dshres_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4682,7 +4769,7 @@ static void lts_ecs_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -4690,7 +4777,7 @@ static void lts_ecs_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -4698,7 +4785,7 @@ static void lts_ecs_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -4706,7 +4793,7 @@ static void lts_ecs_dpf_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -4724,7 +4811,8 @@ static void lts_ecs_dpf_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4767,7 +4855,7 @@ static void lts_ecs_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4777,7 +4865,7 @@ static void lts_ecs_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4787,7 +4875,7 @@ static void lts_ecs_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4797,7 +4885,7 @@ static void lts_ecs_ehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4817,7 +4905,8 @@ static void lts_ecs_ehb_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4890,7 +4979,8 @@ static void lts_ecs_ham_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ilores_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -4931,22 +5021,22 @@ static void lts_ecs_kehb_ilores_dshres_b2(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -4963,7 +5053,8 @@ static void lts_ecs_kehb_ilores_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5000,12 +5091,12 @@ static void lts_ecs_n_ihires_dshres_b2(int draw_start, int draw_end, int draw_st uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -5022,7 +5113,8 @@ static void lts_ecs_n_ihires_dshres_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5061,7 +5153,7 @@ static void lts_ecs_dpf_ihires_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -5069,7 +5161,7 @@ static void lts_ecs_dpf_ihires_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -5087,7 +5179,8 @@ static void lts_ecs_dpf_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5126,7 +5219,7 @@ static void lts_ecs_ehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5136,7 +5229,7 @@ static void lts_ecs_ehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_ clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5156,7 +5249,8 @@ static void lts_ecs_ehb_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5215,7 +5309,8 @@ static void lts_ecs_ham_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5252,12 +5347,12 @@ static void lts_ecs_kehb_ihires_dshres_b2(int draw_start, int draw_end, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -5274,7 +5369,8 @@ static void lts_ecs_kehb_ihires_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_n_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5327,7 +5423,8 @@ static void lts_ecs_n_ishres_dshres_b2_filtered(int draw_start, int draw_end, in } static void lts_ecs_dpf_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5380,7 +5477,8 @@ static void lts_ecs_dpf_ishres_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ehb_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5433,7 +5531,8 @@ static void lts_ecs_ehb_ishres_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_ham_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; @@ -5486,7 +5585,8 @@ static void lts_ecs_ham_ishres_dshres_b2_filtered(int draw_start, int draw_end, } static void lts_ecs_kehb_ishres_dshres_b2(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; int end = draw_end; diff --git a/linetoscr_ecs_genlock_fast.cpp b/linetoscr_ecs_genlock_fast.cpp index e00328a7..f55e49f8 100644 --- a/linetoscr_ecs_genlock_fast.cpp +++ b/linetoscr_ecs_genlock_fast.cpp @@ -6,7 +6,8 @@ static void lts_ecs_n_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -42,7 +43,7 @@ static void lts_ecs_n_ilores_dlores_b1_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -60,7 +61,8 @@ static void lts_ecs_n_ilores_dlores_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -98,7 +100,7 @@ static void lts_ecs_dpf_ilores_dlores_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -117,7 +119,8 @@ static void lts_ecs_dpf_ilores_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -155,7 +158,7 @@ static void lts_ecs_ehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -176,7 +179,8 @@ static void lts_ecs_ehb_ilores_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -230,7 +234,8 @@ static void lts_ecs_ham_ilores_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -266,7 +271,7 @@ static void lts_ecs_kehb_ilores_dlores_b1_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -284,7 +289,8 @@ static void lts_ecs_kehb_ilores_dlores_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -320,7 +326,7 @@ static void lts_ecs_n_ihires_dlores_b1_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -336,7 +342,8 @@ static void lts_ecs_n_ihires_dlores_b1_genlock(int draw_start, int draw_end, int } static void lts_ecs_n_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -372,11 +379,11 @@ static void lts_ecs_n_ihires_dlores_b1_filtered_genlock(int draw_start, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -391,7 +398,8 @@ static void lts_ecs_n_ihires_dlores_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -429,7 +437,7 @@ static void lts_ecs_dpf_ihires_dlores_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -446,7 +454,8 @@ static void lts_ecs_dpf_ihires_dlores_b1_genlock(int draw_start, int draw_end, i } static void lts_ecs_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -484,14 +493,14 @@ static void lts_ecs_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int dr clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; { uae_u8 dpval = dpf_lookup[c]; - colf = xcolors[colors_ocs[dpval]]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpaddv; @@ -507,7 +516,8 @@ static void lts_ecs_dpf_ihires_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -545,7 +555,7 @@ static void lts_ecs_ehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -564,7 +574,8 @@ static void lts_ecs_ehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, i } static void lts_ecs_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -602,7 +613,7 @@ static void lts_ecs_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int dr clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -611,7 +622,7 @@ static void lts_ecs_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int dr uae_u32 colf; c &= bplehb_mask; if (c <= 31) { - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; } else { colf = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -629,7 +640,8 @@ static void lts_ecs_ehb_ihires_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -681,7 +693,8 @@ static void lts_ecs_ham_ihires_dlores_b1_genlock(int draw_start, int draw_end, i } static void lts_ecs_ham_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -736,7 +749,8 @@ static void lts_ecs_ham_ihires_dlores_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -772,7 +786,7 @@ static void lts_ecs_kehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -788,7 +802,8 @@ static void lts_ecs_kehb_ihires_dlores_b1_genlock(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dlores_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -824,11 +839,11 @@ static void lts_ecs_kehb_ihires_dlores_b1_filtered_genlock(int draw_start, int d uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c & 31]]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -883,7 +898,8 @@ static void lts_ecs_kehb_ishres_dlores_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -921,13 +937,13 @@ static void lts_ecs_n_ilores_dhires_b1_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -945,7 +961,8 @@ static void lts_ecs_n_ilores_dhires_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -985,7 +1002,7 @@ static void lts_ecs_dpf_ilores_dhires_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -994,7 +1011,7 @@ static void lts_ecs_dpf_ilores_dhires_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -1013,7 +1030,8 @@ static void lts_ecs_dpf_ilores_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1053,7 +1071,7 @@ static void lts_ecs_ehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1064,7 +1082,7 @@ static void lts_ecs_ehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1085,7 +1103,8 @@ static void lts_ecs_ehb_ilores_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1147,7 +1166,8 @@ static void lts_ecs_ham_ilores_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1185,13 +1205,13 @@ static void lts_ecs_kehb_ilores_dhires_b1_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1209,7 +1229,8 @@ static void lts_ecs_kehb_ilores_dhires_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1245,7 +1266,7 @@ static void lts_ecs_n_ihires_dhires_b1_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1263,7 +1284,8 @@ static void lts_ecs_n_ihires_dhires_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1301,7 +1323,7 @@ static void lts_ecs_dpf_ihires_dhires_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -1320,7 +1342,8 @@ static void lts_ecs_dpf_ihires_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1358,7 +1381,7 @@ static void lts_ecs_ehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -1379,7 +1402,8 @@ static void lts_ecs_ehb_ihires_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1433,7 +1457,8 @@ static void lts_ecs_ham_ihires_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1469,7 +1494,7 @@ static void lts_ecs_kehb_ihires_dhires_b1_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -1487,7 +1512,8 @@ static void lts_ecs_kehb_ihires_dhires_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1537,7 +1563,8 @@ static void lts_ecs_n_ishres_dhires_b1_genlock(int draw_start, int draw_end, int } static void lts_ecs_n_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1587,7 +1614,8 @@ static void lts_ecs_n_ishres_dhires_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1637,7 +1665,8 @@ static void lts_ecs_dpf_ishres_dhires_b1_genlock(int draw_start, int draw_end, i } static void lts_ecs_dpf_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1687,7 +1716,8 @@ static void lts_ecs_dpf_ishres_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1737,7 +1767,8 @@ static void lts_ecs_ehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, i } static void lts_ecs_ehb_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1787,7 +1818,8 @@ static void lts_ecs_ehb_ishres_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1837,7 +1869,8 @@ static void lts_ecs_ham_ishres_dhires_b1_genlock(int draw_start, int draw_end, i } static void lts_ecs_ham_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1887,7 +1920,8 @@ static void lts_ecs_ham_ishres_dhires_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1937,7 +1971,8 @@ static void lts_ecs_kehb_ishres_dhires_b1_genlock(int draw_start, int draw_end, } static void lts_ecs_kehb_ishres_dhires_b1_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -1987,7 +2022,8 @@ static void lts_ecs_kehb_ishres_dhires_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2029,25 +2065,25 @@ static void lts_ecs_n_ilores_dshres_b1_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2065,7 +2101,8 @@ static void lts_ecs_n_ilores_dshres_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2109,7 +2146,7 @@ static void lts_ecs_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2118,7 +2155,7 @@ static void lts_ecs_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2127,7 +2164,7 @@ static void lts_ecs_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2136,7 +2173,7 @@ static void lts_ecs_dpf_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -2155,7 +2192,8 @@ static void lts_ecs_dpf_ilores_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2199,7 +2237,7 @@ static void lts_ecs_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2210,7 +2248,7 @@ static void lts_ecs_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2221,7 +2259,7 @@ static void lts_ecs_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2232,7 +2270,7 @@ static void lts_ecs_ehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2253,7 +2291,8 @@ static void lts_ecs_ehb_ilores_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2331,7 +2370,8 @@ static void lts_ecs_ham_ilores_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2373,25 +2413,25 @@ static void lts_ecs_kehb_ilores_dshres_b1_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2409,7 +2449,8 @@ static void lts_ecs_kehb_ilores_dshres_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2447,13 +2488,13 @@ static void lts_ecs_n_ihires_dshres_b1_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2471,7 +2512,8 @@ static void lts_ecs_n_ihires_dshres_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2511,7 +2553,7 @@ static void lts_ecs_dpf_ihires_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2520,7 +2562,7 @@ static void lts_ecs_dpf_ihires_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -2539,7 +2581,8 @@ static void lts_ecs_dpf_ihires_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2579,7 +2622,7 @@ static void lts_ecs_ehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2590,7 +2633,7 @@ static void lts_ecs_ehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -2611,7 +2654,8 @@ static void lts_ecs_ehb_ihires_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2673,7 +2717,8 @@ static void lts_ecs_ham_ihires_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2711,13 +2756,13 @@ static void lts_ecs_kehb_ihires_dshres_b1_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; gpix = get_genlock_transparency_fast(c); @@ -2735,7 +2780,8 @@ static void lts_ecs_kehb_ihires_dshres_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2790,7 +2836,8 @@ static void lts_ecs_n_ishres_dshres_b1_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2845,7 +2892,8 @@ static void lts_ecs_dpf_ishres_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2900,7 +2948,8 @@ static void lts_ecs_ehb_ishres_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -2955,7 +3004,8 @@ static void lts_ecs_ham_ishres_dshres_b1_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ishres_dshres_b1_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3010,7 +3060,8 @@ static void lts_ecs_kehb_ishres_dshres_b1_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3048,7 +3099,7 @@ static void lts_ecs_n_ilores_dlores_b2_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -3067,7 +3118,8 @@ static void lts_ecs_n_ilores_dlores_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3107,7 +3159,7 @@ static void lts_ecs_dpf_ilores_dlores_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -3127,7 +3179,8 @@ static void lts_ecs_dpf_ilores_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3167,7 +3220,7 @@ static void lts_ecs_ehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3189,7 +3242,8 @@ static void lts_ecs_ehb_ilores_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3246,7 +3300,8 @@ static void lts_ecs_ham_ilores_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3284,7 +3339,7 @@ static void lts_ecs_kehb_ilores_dlores_b2_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -3303,7 +3358,8 @@ static void lts_ecs_kehb_ilores_dlores_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3341,7 +3397,7 @@ static void lts_ecs_n_ihires_dlores_b2_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -3358,7 +3414,8 @@ static void lts_ecs_n_ihires_dlores_b2_genlock(int draw_start, int draw_end, int } static void lts_ecs_n_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3396,11 +3453,11 @@ static void lts_ecs_n_ihires_dlores_b2_filtered_genlock(int draw_start, int draw uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -3416,7 +3473,8 @@ static void lts_ecs_n_ihires_dlores_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3456,7 +3514,7 @@ static void lts_ecs_dpf_ihires_dlores_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; @@ -3474,7 +3532,8 @@ static void lts_ecs_dpf_ihires_dlores_b2_genlock(int draw_start, int draw_end, i } static void lts_ecs_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3514,14 +3573,14 @@ static void lts_ecs_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int dr clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; { uae_u8 dpval = dpf_lookup[c]; - colf = xcolors[colors_ocs[dpval]]; + colf = acolors[dpval]; } col = filter_pixel(col, colf); cp += cpaddv; @@ -3538,7 +3597,8 @@ static void lts_ecs_dpf_ihires_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3578,7 +3638,7 @@ static void lts_ecs_ehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3598,7 +3658,8 @@ static void lts_ecs_ehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, i } static void lts_ecs_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3638,7 +3699,7 @@ static void lts_ecs_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int dr clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3647,7 +3708,7 @@ static void lts_ecs_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int dr uae_u32 colf; c &= bplehb_mask; if (c <= 31) { - colf = xcolors[colors_ocs[c]]; + colf = acolors[c]; } else { colf = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -3666,7 +3727,8 @@ static void lts_ecs_ehb_ihires_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3721,7 +3783,8 @@ static void lts_ecs_ham_ihires_dlores_b2_genlock(int draw_start, int draw_end, i } static void lts_ecs_ham_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3779,7 +3842,8 @@ static void lts_ecs_ham_ihires_dlores_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3817,7 +3881,7 @@ static void lts_ecs_kehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; cp += cpaddv; @@ -3834,7 +3898,8 @@ static void lts_ecs_kehb_ihires_dlores_b2_genlock(int draw_start, int draw_end, } static void lts_ecs_kehb_ihires_dlores_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3872,11 +3937,11 @@ static void lts_ecs_kehb_ihires_dlores_b2_filtered_genlock(int draw_start, int d uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; c = cp[1]; clxdat |= bplcoltable[c]; uae_u32 colf; - colf = xcolors[colors_ocs[c & 31]]; + colf = acolors[c & 31]; col = filter_pixel(col, colf); cp += cpaddv; *buf1++ = col; @@ -3932,7 +3997,8 @@ static void lts_ecs_kehb_ishres_dlores_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -3973,14 +4039,14 @@ static void lts_ecs_n_ilores_dhires_b2_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -3999,7 +4065,8 @@ static void lts_ecs_n_ilores_dhires_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4042,7 +4109,7 @@ static void lts_ecs_dpf_ilores_dhires_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -4052,7 +4119,7 @@ static void lts_ecs_dpf_ilores_dhires_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -4072,7 +4139,8 @@ static void lts_ecs_dpf_ilores_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4115,7 +4183,7 @@ static void lts_ecs_ehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4127,7 +4195,7 @@ static void lts_ecs_ehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4149,7 +4217,8 @@ static void lts_ecs_ehb_ilores_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4216,7 +4285,8 @@ static void lts_ecs_ham_ilores_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4257,14 +4327,14 @@ static void lts_ecs_kehb_ilores_dhires_b2_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -4283,7 +4353,8 @@ static void lts_ecs_kehb_ilores_dhires_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4321,7 +4392,7 @@ static void lts_ecs_n_ihires_dhires_b2_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -4340,7 +4411,8 @@ static void lts_ecs_n_ihires_dhires_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4380,7 +4452,7 @@ static void lts_ecs_dpf_ihires_dhires_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -4400,7 +4472,8 @@ static void lts_ecs_dpf_ihires_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4440,7 +4513,7 @@ static void lts_ecs_ehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -4462,7 +4535,8 @@ static void lts_ecs_ehb_ihires_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4519,7 +4593,8 @@ static void lts_ecs_ham_ihires_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4557,7 +4632,7 @@ static void lts_ecs_kehb_ihires_dhires_b2_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -4576,7 +4651,8 @@ static void lts_ecs_kehb_ihires_dhires_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4629,7 +4705,8 @@ static void lts_ecs_n_ishres_dhires_b2_genlock(int draw_start, int draw_end, int } static void lts_ecs_n_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4682,7 +4759,8 @@ static void lts_ecs_n_ishres_dhires_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4735,7 +4813,8 @@ static void lts_ecs_dpf_ishres_dhires_b2_genlock(int draw_start, int draw_end, i } static void lts_ecs_dpf_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4788,7 +4867,8 @@ static void lts_ecs_dpf_ishres_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4841,7 +4921,8 @@ static void lts_ecs_ehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, i } static void lts_ecs_ehb_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4894,7 +4975,8 @@ static void lts_ecs_ehb_ishres_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -4947,7 +5029,8 @@ static void lts_ecs_ham_ishres_dhires_b2_genlock(int draw_start, int draw_end, i } static void lts_ecs_ham_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5000,7 +5083,8 @@ static void lts_ecs_ham_ishres_dhires_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5053,7 +5137,8 @@ static void lts_ecs_kehb_ishres_dhires_b2_genlock(int draw_start, int draw_end, } static void lts_ecs_kehb_ishres_dhires_b2_filtered_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5106,7 +5191,8 @@ static void lts_ecs_kehb_ishres_dhires_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5153,28 +5239,28 @@ static void lts_ecs_n_ilores_dshres_b2_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -5193,7 +5279,8 @@ static void lts_ecs_n_ilores_dshres_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5242,7 +5329,7 @@ static void lts_ecs_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -5252,7 +5339,7 @@ static void lts_ecs_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -5262,7 +5349,7 @@ static void lts_ecs_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -5272,7 +5359,7 @@ static void lts_ecs_dpf_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -5292,7 +5379,8 @@ static void lts_ecs_dpf_ilores_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5341,7 +5429,7 @@ static void lts_ecs_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5353,7 +5441,7 @@ static void lts_ecs_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5365,7 +5453,7 @@ static void lts_ecs_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5377,7 +5465,7 @@ static void lts_ecs_ehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5399,7 +5487,8 @@ static void lts_ecs_ehb_ilores_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5486,7 +5575,8 @@ static void lts_ecs_ham_ilores_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5533,28 +5623,28 @@ static void lts_ecs_kehb_ilores_dshres_b2_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -5573,7 +5663,8 @@ static void lts_ecs_kehb_ilores_dshres_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5614,14 +5705,14 @@ static void lts_ecs_n_ihires_dshres_b2_genlock(int draw_start, int draw_end, int uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c]]; + col = acolors[c]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -5640,7 +5731,8 @@ static void lts_ecs_n_ihires_dshres_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5683,7 +5775,7 @@ static void lts_ecs_dpf_ihires_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } *buf1++ = col; *buf2++ = col; @@ -5693,7 +5785,7 @@ static void lts_ecs_dpf_ihires_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; { uae_u8 dpval = dpf_lookup[c]; - col = xcolors[colors_ocs[dpval]]; + col = acolors[dpval]; } cp += cpaddv; *buf1++ = col; @@ -5713,7 +5805,8 @@ static void lts_ecs_dpf_ihires_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5756,7 +5849,7 @@ static void lts_ecs_ehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5768,7 +5861,7 @@ static void lts_ecs_ehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, i clxdat |= bplcoltable[c]; c &= bplehb_mask; if (c <= 31) { - col = xcolors[colors_ocs[c]]; + col = acolors[c]; } else { col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777]; } @@ -5790,7 +5883,8 @@ static void lts_ecs_ehb_ihires_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5857,7 +5951,8 @@ static void lts_ecs_ham_ihires_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5898,14 +5993,14 @@ static void lts_ecs_kehb_ihires_dshres_b2_genlock(int draw_start, int draw_end, uae_u32 col; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; *buf1++ = col; *buf2++ = col; gpix = get_genlock_transparency_fast(c); *gbuf++ = gpix; c = *cp; clxdat |= bplcoltable[c]; - col = xcolors[colors_ocs[c & 31]]; + col = acolors[c & 31]; cp += cpaddv; *buf1++ = col; *buf2++ = col; @@ -5924,7 +6019,8 @@ static void lts_ecs_kehb_ihires_dshres_b2_filtered_genlock(int draw_start, int d } static void lts_ecs_n_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -5983,7 +6079,8 @@ static void lts_ecs_n_ishres_dshres_b2_filtered_genlock(int draw_start, int draw } static void lts_ecs_dpf_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -6042,7 +6139,8 @@ static void lts_ecs_dpf_ishres_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ehb_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -6101,7 +6199,8 @@ static void lts_ecs_ehb_ishres_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_ham_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3); @@ -6160,7 +6259,8 @@ static void lts_ecs_ham_ishres_dshres_b2_filtered_genlock(int draw_start, int dr } static void lts_ecs_kehb_ishres_dshres_b2_genlock(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls) { - uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate; + uae_u32 *acolors = (uae_u32*)ls->linecolorstate; + uae_u16 *colors_ocs = (uae_u16*)(ls->linecolorstate + 256 * sizeof(uae_u32)); int bufaddv = 1 << bufadd; int cpaddv = 1 << cpadd; uae_u8 gpix = get_genlock_transparency_border_fast(ls->bplcon3);