static int not_safe_mode;
static bool dmal_next;
static int fast_lines_cnt;
+static bool lineoptimizations_allowed;
static uae_u32 scandoubled_bpl_ptr[MAX_SCANDOUBLED_LINES][2][MAX_PLANES];
static bool scandoubled_bpl_ena[MAX_SCANDOUBLED_LINES];
}
}
+#define CE_MODE_RGA_OPTIMIZATIONS 0
+
static uae_u32 rga_slot_in_offset, rga_slot_first_offset, rga_slot_out_offset;
static evt_t last_rga_cycle;
+
+#if CE_MODE_RGA_OPTIMIZATIONS
static bool drga_written;
static bool fast_mode_ce_not;
static bool drga_bpl, drga_spr;
static int fast_mode_strobe_cnt;
static uae_u8 bpl_line_store[256 * 8];
+#endif
static void write_drga_strobe(uae_u16 rga)
{
r->rga = rga;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (rga == 0x38 || rga == 0x3a || rga == 0x3c) {
if (agnus_hpos != 3 || fast_mode_strobe_cnt != 0) {
fast_mode_ce_not = true;
}
}
fast_mode_strobe_cnt++;
+#endif
};
static void write_drga(uae_u16 rga, uaecptr pt, uae_u32 v)
{
r->pt = pt;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
};
static void write_drga_dat_spr(uae_u16 rga, uaecptr pt, uae_u32 v)
{
r->pt = pt;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
drga_spr = true;
+#endif
};
static void write_drga_dat_spr_wide(uae_u16 rga, uaecptr pt, uae_u64 v)
{
r->pt = pt;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
drga_spr = true;
+#endif
};
+#if CE_MODE_RGA_OPTIMIZATIONS
static uae_u16 *fast_plane_store16[MAX_PLANES];
static uae_u32 *fast_plane_store32[MAX_PLANES];
static uae_u64 *fast_plane_store64[MAX_PLANES];
+#endif
static void write_drga_dat_bpl16(uae_u16 rga, uaecptr pt, uae_u16 v, int plane)
{
r->pt = pt;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (currprefs.cpu_memory_cycle_exact) {
*fast_plane_store16[plane] = v;
fast_plane_store16[plane]++;
}
drga_bpl = true;
+#endif
};
static void write_drga_dat_bpl32(uae_u16 rga, uaecptr pt, uae_u32 v, int plane)
{
r->pt = pt;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (currprefs.cpu_memory_cycle_exact) {
*fast_plane_store32[plane] = v;
fast_plane_store32[plane]++;
}
drga_bpl = true;
+#endif
};
static void write_drga_dat_bpl64(uae_u16 rga, uaecptr pt, uae_u64 v, int plane)
{
r->pt = pt;
r->flags = 0;
r->line = rga_denise_cycle_line;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (currprefs.cpu_memory_cycle_exact) {
*fast_plane_store64[plane] = v;
fast_plane_store64[plane]++;
}
drga_bpl = true;
+#endif
};
static void write_drga_flag(uae_u32 flags, uae_u32 mask)
static uae_s16 bpl1mod, bpl2mod;
static uaecptr bplpt[MAX_PLANES];
-static uaecptr bplptx[MAX_PLANES];
uae_u16 bplcon0;
if (currprefs.gfx_overscanmode >= OVERSCANMODE_ULTRA) {
hsyncdebug = currprefs.gfx_overscanmode - OVERSCANMODE_ULTRA + 1;
}
+ struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
+ lineoptimizations_allowed = vidinfo->inbuffer == vidinfo->outbuffer && !lightpen_active;
}
void notice_new_xcolors(void)
void compute_framesync(void)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
+ struct vidbuffer *vb = vidinfo->inbuffer;
struct amigadisplay *ad = &adisplays[0];
int islace = interlace_seen ? 1 : 0;
int isntsc = (beamcon0 & BEAMCON0_PAL) ? 0 : 1;
}
stored_chipset_refresh = cr;
lof_changing = 0;
- vidinfo->drawbuffer.inxoffset = -1;
- vidinfo->drawbuffer.inyoffset = -1;
+ vb->inxoffset = -1;
+ vb->inyoffset = -1;
updateextblk();
hsync_end_left_border = display_hstart_cyclewait_end + display_hstart_cyclewait;
}
if (currprefs.gfx_overscanmode >= OVERSCANMODE_ULTRA) {
- vidinfo->drawbuffer.inwidth = current_linear_hpos << (res2 + 1);
+ vb->inwidth = current_linear_hpos << (res2 + 1);
} else {
- vidinfo->drawbuffer.inwidth = (current_linear_hpos - (display_hstart_cyclewait_skip + display_hstart_cyclewait_skip2)) << (res2 + 1);
+ vb->inwidth = (current_linear_hpos - (display_hstart_cyclewait_skip + display_hstart_cyclewait_skip2)) << (res2 + 1);
}
- vidinfo->drawbuffer.inwidth2 = vidinfo->drawbuffer.inwidth;
- vidinfo->drawbuffer.extrawidth = -2;
+ vb->inwidth2 = vb->inwidth;
+ vb->extrawidth = -2;
if (currprefs.gfx_extrawidth > 0) {
- vidinfo->drawbuffer.extrawidth = currprefs.gfx_extrawidth << res2;
+ vb->extrawidth = currprefs.gfx_extrawidth << res2;
}
- vidinfo->drawbuffer.extraheight = -2;
+ vb->extraheight = -2;
if (currprefs.gfx_extraheight > 0) {
- vidinfo->drawbuffer.extraheight = currprefs.gfx_extraheight << vres2;
+ vb->extraheight = currprefs.gfx_extraheight << vres2;
}
- if (vidinfo->drawbuffer.extrawidth == -2 && ((new_beamcon0 & (BEAMCON0_VARVBEN | bemcon0_vsync_mask)) || currprefs.gfx_overscanmode >= OVERSCANMODE_EXTREME)) {
- vidinfo->drawbuffer.extrawidth = -1;
+ if (vb->extrawidth == -2 && ((new_beamcon0 & (BEAMCON0_VARVBEN | bemcon0_vsync_mask)) || currprefs.gfx_overscanmode >= OVERSCANMODE_EXTREME)) {
+ vb->extrawidth = -1;
}
int mfl = minfirstline + 1;
int maxv = current_linear_vpos - (mfl > vsync_startline ? mfl - vsync_startline : 0);
- vidinfo->drawbuffer.inheight = maxv << vres2;
- vidinfo->drawbuffer.inheight2 = vidinfo->drawbuffer.inheight;
- vidinfo->drawbuffer.inxoffset = 0;
+ vb->inheight = maxv << vres2;
+ vb->inheight2 = vb->inheight;
+ vb->inxoffset = 0;
- //write_log(_T("Width %d Height %d\n"), vidinfo->drawbuffer.inwidth, vidinfo->drawbuffer.inheight);
+ //write_log(_T("Width %d Height %d\n"), vb->inwidth, vb->inheight);
- if (vidinfo->drawbuffer.inwidth < 16)
- vidinfo->drawbuffer.inwidth = 16;
- if (vidinfo->drawbuffer.inwidth2 < 16)
- vidinfo->drawbuffer.inwidth2 = 16;
- if (vidinfo->drawbuffer.inheight < 1)
- vidinfo->drawbuffer.inheight = 1;
- if (vidinfo->drawbuffer.inheight2 < 1)
- vidinfo->drawbuffer.inheight2 = 1;
+ if (vb->inwidth < 16)
+ vb->inwidth = 16;
+ if (vb->inwidth2 < 16)
+ vb->inwidth2 = 16;
+ if (vb->inheight < 1)
+ vb->inheight = 1;
+ if (vb->inheight2 < 1)
+ vb->inheight2 = 1;
- if (vidinfo->drawbuffer.inwidth > vidinfo->drawbuffer.width_allocated)
- vidinfo->drawbuffer.inwidth = vidinfo->drawbuffer.width_allocated;
- if (vidinfo->drawbuffer.inwidth2 > vidinfo->drawbuffer.width_allocated)
- vidinfo->drawbuffer.inwidth2 = vidinfo->drawbuffer.width_allocated;
+ if (vb->inwidth > vb->width_allocated)
+ vb->inwidth = vb->width_allocated;
+ if (vb->inwidth2 > vb->width_allocated)
+ vb->inwidth2 = vb->width_allocated;
- if (vidinfo->drawbuffer.inheight > vidinfo->drawbuffer.height_allocated)
- vidinfo->drawbuffer.inheight = vidinfo->drawbuffer.height_allocated;
- if (vidinfo->drawbuffer.inheight2 > vidinfo->drawbuffer.height_allocated)
- vidinfo->drawbuffer.inheight2 = vidinfo->drawbuffer.height_allocated;
+ if (vb->inheight > vb->height_allocated)
+ vb->inheight = vb->height_allocated;
+ if (vb->inheight2 > vb->height_allocated)
+ vb->inheight2 = vb->height_allocated;
- vidinfo->drawbuffer.outwidth = vidinfo->drawbuffer.inwidth;
- vidinfo->drawbuffer.outheight = vidinfo->drawbuffer.inheight;
+ vb->outwidth = vb->inwidth;
+ vb->outheight = vb->inheight;
- if (vidinfo->drawbuffer.outwidth > vidinfo->drawbuffer.width_allocated)
- vidinfo->drawbuffer.outwidth = vidinfo->drawbuffer.width_allocated;
+ if (vb->outwidth > vb->width_allocated)
+ vb->outwidth = vb->width_allocated;
- if (vidinfo->drawbuffer.outheight > vidinfo->drawbuffer.height_allocated)
- vidinfo->drawbuffer.outheight = vidinfo->drawbuffer.height_allocated;
+ if (vb->outheight > vb->height_allocated)
+ vb->outheight = vb->height_allocated;
check_nocustom();
if (changed & (DMA_MASTER | DMA_AUD3 | DMA_AUD2 | DMA_AUD1 | DMA_AUD0)) {
audio_state_machine();
}
+#if CE_MODE_RGA_OPTIMIZATIONS
if (changed & (DMA_MASTER | DMA_BITPLANE | DMA_COPPER)) {
fast_mode_ce_not = true;
}
+#endif
}
static int irq_forced;
static void BPLxPTH(uae_u16 v, int num)
{
bplpt[num] = (bplpt[num] & 0x0000ffff) | ((uae_u32)v << 16);
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPLxPTL(uae_u16 v, int num)
{
bplpt[num] = (bplpt[num] & 0xffff0000) | (v & 0x0000fffe);
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static uae_u16 BPLCON0_Agnus_mask(uae_u16 v)
}
checksyncstopped(va);
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPLCON0(uae_u16 v)
return;
}
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
// UHRES, BYPASS
if (va & (0x0080 | 0x0020)) {
#endif
bplcon1_saved = v;
bplcon1 = v;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPLCON2(uae_u16 v)
{
bplcon2_saved = v;
bplcon2 = v;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPLCON3(uae_u16 v)
{
bplcon3_saved = v;
bplcon3 = v;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPLCON4(uae_u16 v)
{
bplcon4_saved = v;
bplcon4 = v;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPL1MOD(uae_u16 v)
{
v &= ~1;
bpl1mod = v;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPL2MOD(uae_u16 v)
{
v &= ~1;
bpl2mod = v;
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void BPLxDAT(int num, uae_u16 data)
v &= ddf_mask;
ddfstrt = 0xffff;
push_pipeline(&ddfstrt, v);
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void DDFSTOP(uae_u16 v)
ddfstop_saved = v;
v &= ddf_mask;
push_pipeline(&ddfstop, v);
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void FMODE(uae_u16 v)
}
set_chipset_mode(false);
setup_fmodes(bplcon0);
+#if CE_MODE_RGA_OPTIMIZATIONS
fast_mode_ce_not = true;
+#endif
}
static void FNULL(uae_u16 v)
static uae_u16 CLXDAT(void)
{
+ draw_denise_line_queue_flush();
uae_u16 v = clxdat | 0x8000;
clxdat = 0;
return v;
}
bpl_autoscale();
-
- for (int i = 0; i < GET_PLANES(bplcon0); i++) {
- bplptx[i] = bplpt[i];
- }
}
/*
if (cpu_sleep_millis(1) < 0)
break;
}
+
while (rpt_vsync(clockadjust) < 0) {
rtg_vsynccheck();
+#if 0
if (audio_is_pull_event()) {
maybe_process_pull_audio();
break;
}
+#endif
}
+
+#if 0
+ static evt_t ttt;
+ write_log("%lld\n", read_processor_time() - ttt);
+ ttt = read_processor_time();
+#endif
}
+
+
evt_t tnow = read_processor_time();
idletime += tnow - start;
curr_time = tnow;
// the rest
static int linecounter;
static int nextwaitvpos;
- int maxlc = 16;
+ int maxlc = 8, maxlcm = 4;
linecounter++;
- if (vpos == 0)
- nextwaitvpos = maxvpos_display * 1 / 4;
+ if (linear_vpos == 0)
+ nextwaitvpos = maxlc * 4;
if (audio_is_pull() > 0 && !currprefs.turbo_emulation && (linecounter & (maxlc - 1)) == 0) {
maybe_process_pull_audio();
frame_time_t rpt = read_processor_time();
rpt = read_processor_time();
}
}
- if (linear_vpos + 1 < maxvpos + lof_store && linear_vpos >= nextwaitvpos && linear_vpos < maxvpos - (maxvpos / 3) && (audio_is_pull() <= 0 || (audio_is_pull() > 0 && audio_pull_buffer()))) {
- nextwaitvpos += maxvpos_display * 1 / 3;
- vsyncmintime += vsynctimeperline;
+ if (linear_vpos + maxlc * maxlcm < current_linear_vpos && linear_vpos >= nextwaitvpos && (audio_is_pull() <= 0 || (audio_is_pull() > 0 && audio_pull_buffer()))) {
+ nextwaitvpos += maxlc * maxlcm;
+ vsyncmintime += vsynctimeperline * maxlc * maxlcm;
if (vsync_isdone(NULL) <= 0 && !currprefs.turbo_emulation) {
frame_time_t rpt = read_processor_time();
// sleep if more than 2ms "free" time
}
if (vpos == vsync_startline + 1 && !maxvpos_display_vsync_next) {
inputdevice_read_msg(true);
+ draw_denise_line_queue_flush();
vsync_display_render();
vsync_display_rendered = false;
if (currprefs.cs_hvcsync == 0) {
rga_denise_cycle_start = 0;
rga_denise_cycle_count = 0;
rga_denise_cycle_line = 1;
+#if CE_MODE_RGA_OPTIMIZATIONS
for (int i = 0; i < MAX_PLANES; i++) {
fast_plane_store16[i] = (uae_u16*)bpl_line_store;
fast_plane_store32[i] = (uae_u32*)bpl_line_store;
fast_plane_store64[i] = (uae_u64*)bpl_line_store;
}
+#endif
vsync_startline = 3;
copper_dma_change_cycle = 0;
{
rga_denise_cycle_start = rga_denise_cycle;
rga_denise_cycle_count = 0;
+#if 0
for (int i = 0; i <= 5; i++) {
struct denise_rga *rga = &rga_denise[(rga_denise_cycle - i) & DENISE_RGA_SLOT_MASK];
if (rga->line == rga_denise_cycle_line && rga->rga != 0x1fe) {
}
rga->line++;
}
+#endif
rga_denise_cycle_line++;
}
{
int type = 0;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (currprefs.cpu_memory_cycle_exact) {
if (get_strobe_reg(0) != 0x3c) {
type = LINETYPE_BLANK;
} else if (drga_bpl && ddfstop > ddfstrt && ddfstrt >= 0x14 && GET_RES_AGNUS(bplcon0) == GET_RES_DENISE(bplcon0) && dmaen(DMA_BITPLANE)) {
type = LINETYPE_BPL;
}
- } else {
+ } else
+#endif
+ {
if (get_strobe_reg(0) != 0x3c) {
type = LINETYPE_BLANK;
- } else if (vdiwstate == diw_states::DIW_waiting_start || GET_PLANES(bplcon0) == 0 || !dmaen(DMA_BITPLANE)) {
- if ((bplcon0 & 1) && (bplcon3 & 0x20)) {
- type = LINETYPE_BLANK;
- } else {
- type = LINETYPE_BORDER;
+ } else if (lineoptimizations_allowed) {
+ if (vdiwstate == diw_states::DIW_waiting_start || GET_PLANES(bplcon0) == 0 || !dmaen(DMA_BITPLANE)) {
+ if ((bplcon0 & 1) && (bplcon3 & 0x20)) {
+ type = LINETYPE_BLANK;
+ } else {
+ type = LINETYPE_BORDER;
+ }
+ } else if (ddfstop > ddfstrt && ddfstrt >= 0x14 && GET_RES_AGNUS(bplcon0) == GET_RES_DENISE(bplcon0) && dmaen(DMA_BITPLANE)) {
+ type = LINETYPE_BPL;
}
- } else if (ddfstop > ddfstrt && ddfstrt >= 0x14 && GET_RES_AGNUS(bplcon0) == GET_RES_DENISE(bplcon0) && dmaen(DMA_BITPLANE)) {
- type = LINETYPE_BPL;
}
}
return type;
int planes = GET_PLANES(bplcon0);
int len = l->bpllen;
for (int i = 0; i < planes; i++) {
- uaecptr apt = currprefs.cpu_memory_cycle_exact ? bplptx[i] : bplpt[i];
+ uaecptr apt = bplpt[i];
#if 0
if (custom_fastmode_bplextendmask & (1 << i)) {
int mod = getbplmod(i);
return -1;
}
}
- if (!dontaddbpl && !currprefs.cpu_memory_cycle_exact) {
+ if (!dontaddbpl) {
// advance bpl pointers
for (int i = 0; i < planes; i++) {
int mod = getbplmod(i);
}
l->color0 = aga_mode ? agnus_colors.color_regs_aga[0] : agnus_colors.color_regs_ecs[0];
int dvp = calculate_linetype(ldv);
- return draw_denise_border_line_fast(dvp, nextline_how, l);
+ draw_denise_border_line_fast_queue(dvp, nextline_how, l);
+ return true;
}
// draw bitplane line quickly (no copper, no sprites, no weird things, normal mode)
}
int colors = getcolorcount(planes);
int len = l->bpllen;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (currprefs.cpu_memory_cycle_exact) {
for (int i = 0; i < planes; i++) {
uae_u8 *pt = bpl_line_store + i * 256;
l->bplpt[i] = pt;
}
- } else {
+ } else
+#endif
+ {
for (int i = 0; i < planes; i++) {
uaecptr pt = bplpt[i];
l->bplpt[i] = get_real_address(pt);
l->fetchstart_mask = fetchstart_mask;
// draw quickly, store new state
int dvp = calculate_linetype(ldv);
- if (draw_denise_bitplane_line_fast(dvp, nextline_how, l)) {
- if (!currprefs.cpu_memory_cycle_exact) {
- // advance bpl pointers
- int len = l->bpllen;
- for (int i = 0; i < planes; i++) {
- int mod = getbplmod(i);
- bplpt[i] += mod + len;
- }
- }
- return true;
+ draw_denise_bitplane_line_fast_queue(dvp, nextline_how, l);
+ // advance bpl pointers
+ len = l->bpllen;
+ for (int i = 0; i < planes; i++) {
+ int mod = getbplmod(i);
+ bplpt[i] += mod + len;
}
- return false;
+ return true;
}
static bool draw_always(void)
uae_u32 c = aga_mode ? agnus_colors.color_regs_aga[0] : agnus_colors.color_regs_ecs[0];
if (!always && c == l->color0) {
ret = true;
- } else if (always || currprefs.cs_optimizations == DISPLAY_OPTIMIZATIONS_FULL) {
+ } else if (1 && (always || currprefs.cs_optimizations == DISPLAY_OPTIMIZATIONS_FULL)) {
ret = draw_border_fast(l, linear_display_vpos + 1);
}
}
} else if (type == LINETYPE_BPL && !l->vb) {
if (1) {
int r = checkprevfieldlinestateequalbpl(l, always);
- if (always || (r < 0 && currprefs.cs_optimizations == DISPLAY_OPTIMIZATIONS_FULL)) {
+ if (1 && (always || (r < 0 && currprefs.cs_optimizations == DISPLAY_OPTIMIZATIONS_FULL))) {
// no match but same parameters: do quick BPL emulation
r = draw_line_fast(l, linear_display_vpos + 1);
}
uae_u8 *dpt = l->linedatastate;
int planes = GET_PLANES(bplcon0);
for (int i = 0; i < planes; i++) {
- uaecptr apt = currprefs.cpu_memory_cycle_exact ? bplptx[i] : bplpt[i];
+ uaecptr apt = bplpt[i];
#if 0
if (custom_fastmode_bplextendmask & (1 << i)) {
apt += fetchmode_bytes + getbplmod(i);
}
}
+#if CE_MODE_RGA_OPTIMIZATIONS
static bool draw_line_ce_fast(void)
{
if (linear_vpos >= MAX_SCANDOUBLED_LINES) {
if (c == l->color0) {
ret = true;
} else if (always|| currprefs.cs_optimizations == DISPLAY_OPTIMIZATIONS_FULL) {
- ret = draw_border_fast(l, linear_display_vpos);
+ //ret = draw_border_fast(l, linear_display_vpos);
}
}
} else if (type == LINETYPE_BPL && !l->vb) {
}
}
}
- if (ret) {
- uae_u16 strobe = get_strobe_reg(0);
- denise_handle_quick_strobe(strobe, agnus_hpos);
- } else {
+ if (!ret) {
l->type = 0;
}
return ret;
drga_bpl = false;
drga_spr = false;
}
+#endif
static void draw_line(void)
{
- bool can_fast_ce = currprefs.cpu_memory_cycle_exact && currprefs.cs_optimizations < DISPLAY_OPTIMIZATIONS_NONE;
-
int dvp = calculate_linetype(linear_display_vpos);
+#if CE_MODE_RGA_OPTIMIZATIONS
+ bool can_fast_ce = 0 && currprefs.cpu_memory_cycle_exact && currprefs.cs_optimizations < DISPLAY_OPTIMIZATIONS_NONE;
if (can_fast_ce && !fast_mode_ce_not && !drga_spr) {
if (draw_line_ce_fast()) {
clear_fast_mode_ce();
return;
}
}
+#endif
int wclks = linear_hpos - (display_hstart_cyclewait_skip - display_hstart_cyclewait_skip2);
if (wclks > linear_hpos) {
struct linestate *l = NULL;
if (linear_vpos < MAX_SCANDOUBLED_LINES) {
l = &lines[linear_vpos][lof_display];
+#if CE_MODE_RGA_OPTIMIZATIONS
if (can_fast_ce) {
if (!fast_mode_ce_not && !drga_spr) {
storelinestate();
resetlinestate();
}
}
+#endif
}
int cs = 0;// (beamcon0 & BEAMCON0_VARHSYEN) ? agnus_phsync_end - agnus_phsync_start : agnus_hsync_end - agnus_hsync_start;
int cslen = 10;
- draw_denise_line(dvp, nextline_how, rga_denise_cycle_line, rga_denise_cycle_start, rga_denise_cycle_count,
+ draw_denise_line_queue(dvp, nextline_how, rga_denise_cycle_line, rga_denise_cycle_start, rga_denise_cycle, rga_denise_cycle_count,
display_hstart_cyclewait_skip, display_hstart_cyclewait_skip2,
wclks, cs, cslen, lol, l);
+#if CE_MODE_RGA_OPTIMIZATIONS
clear_fast_mode_ce();
+#endif
}
static void dmal_fast(void)
}
#endif
-static void quick_denise_rga(void)
-{
- for (int i = 0; i < rga_denise_cycle_count; i++) {
- int off = i + rga_denise_cycle_start;
- struct denise_rga *rd = &rga_denise[off & DENISE_RGA_SLOT_MASK];
- if (rd->line == rga_denise_cycle_line && rd->rga != 0x1fe && (rd->rga < 0x38 || rd->rga >= 0x40)) {
- denise_update_reg(rd->rga, rd->v);
- }
- }
-}
-
static void do_draw_line(void)
{
if (custom_fastmode_exit) {
custom_fastmode_exit = 0;
- quick_denise_rga();
+ quick_denise_rga_queue(rga_denise_cycle_line, rga_denise_cycle_start, rga_denise_cycle);
next_denise_rga();
decide_line_end();
goto end;
if (!custom_disabled) {
if (custom_fastmode >= 0) {
if (doflickerfix_active() && scandoubled_bpl_ena[linear_vpos]) {
+ draw_denise_line_queue_flush();
denise_store_registers();
draw_line();
+ draw_denise_line_queue_flush();
do_scandouble();
denise_restore_registers();
lof_display ^= 1;
decide_line_end();
end:;
+#if CE_MODE_RGA_OPTIMIZATIONS
if (currprefs.cpu_memory_cycle_exact) {
for (int i = 0; i < MAX_PLANES; i++) {
fast_plane_store16[i] = (uae_u16*)(bpl_line_store + i * 256);
fast_plane_store64[i] = (uae_u64*)(bpl_line_store + i * 256);
}
}
+#endif
}
static void decide_hsync(void)
linear_vpos_prev[1] = linear_vpos_prev[0];
linear_vpos_prev[0] = linear_vpos;
linear_vpos = 0;
- denise_mark_last_line();
if (!custom_disabled) {
start_draw_denise();
do_draw_line();
rga_denise_cycle = rdc;
} else {
- denise_handle_quick_strobe(str, display_hstart_fastmode);
+ denise_handle_quick_strobe_queue(str, display_hstart_fastmode, rga_denise_cycle);
+ //denise_handle_quick_strobe(str, display_hstart_fastmode);
next_denise_rga();
decide_line_end();
}
#include "devices.h"
#include "gfxboard.h"
+extern int multithread_enabled;
+#define MULTITHREADED_DENISE (multithread_enabled != 0)
+
#define BLANK_COLOR 0x000000
#define AUTOSCALE_SPRITES 1
#define LOL_SHIFT_COLORS 0
+
+
+static uae_sem_t write_sem, read_sem;
+
+struct denise_rga_queue
+{
+ int type;
+ int vpos;
+ int gfx_ypos;
+ nln_how how;
+ uae_u32 linecnt;
+ int startpos, endpos;
+ int total;
+ int skip;
+ int skip2;
+ int dtotal;
+ int calib_start;
+ int calib_len;
+ bool lol;
+ uae_u16 strobe;
+ int strobe_pos;
+ struct linestate *ls;
+};
+
+static volatile uae_atomic rga_queue_read, rga_queue_write;
+static int denise_thread_state;
+static struct denise_rga_queue rga_queue[DENISE_RGA_SLOT_CHUNKS];
+
+static void quick_denise_rga(int linecnt, int startpos, int endpos)
+{
+ int pos = startpos;
+ while (pos != endpos) {
+ struct denise_rga *rd = &rga_denise[pos];
+ if (rd->line == linecnt && rd->rga != 0x1fe && (rd->rga < 0x38 || rd->rga >= 0x40)) {
+ denise_update_reg(rd->rga, rd->v);
+ }
+ pos++;
+ pos &= DENISE_RGA_SLOT_MASK;
+ }
+}
+
+static void denise_handle_quick_strobe(uae_u16 strobe, int offset, int vpos);
+
+static void read_denise_line_queue(void)
+{
+ while (rga_queue_read == rga_queue_write) {
+ uae_sem_wait(&write_sem);
+ }
+
+ struct denise_rga_queue *q = &rga_queue[rga_queue_read & DENISE_RGA_SLOT_CHUNKS_MASK];
+ bool next = false;
+
+ //evt_t t1 = read_processor_time();
+
+ if (q->type == 0) {
+ draw_denise_line(q->gfx_ypos, q->how, q->linecnt, q->startpos, q->total, q->skip, q->skip2, q->dtotal, q->calib_start, q->calib_len, q->lol, q->ls);
+ next = true;
+ } else if (q->type == 1) {
+ draw_denise_bitplane_line_fast(q->gfx_ypos, q->how, q->ls);
+ } else if (q->type == 2) {
+ draw_denise_border_line_fast(q->gfx_ypos, q->how, q->ls);
+ } else if (q->type == 3) {
+ quick_denise_rga(q->linecnt, q->startpos, q->endpos);
+ } else if (q->type == 4) {
+ denise_handle_quick_strobe(q->strobe, q->strobe_pos, q->vpos);
+ next = true;
+ }
+
+ //evt_t t2 = read_processor_time();
+
+ //write_log("%lld ", (t2 - t1));
+
+ if (next) {
+ for (int i = 0; i <= 5; i++) {
+ struct denise_rga *rga = &rga_denise[(q->endpos - i) & DENISE_RGA_SLOT_MASK];
+ rga->line++;
+ }
+ }
+
+ atomic_inc(&rga_queue_read);
+
+ uae_sem_post(&read_sem);
+}
+
+static void denise_thread(void *v)
+{
+ denise_thread_state = 1;
+ while(denise_thread_state) {
+ read_denise_line_queue();
+ }
+ denise_thread_state = -1;
+}
+
+static bool denise_locked;
+
+static bool denise_lock(void)
+{
+ draw_denise_line_queue_flush();
+
+ if (denise_locked) {
+ return true;
+ }
+
+ int monid = 0;
+ struct amigadisplay *ad = &adisplays[monid];
+ struct vidbuf_description *vidinfo = &ad->gfxvidinfo;
+ struct vidbuffer *vb = &vidinfo->drawbuffer;
+ struct vidbuffer *vbin = &vidinfo->tempbuffer;
+
+ if (vb->inheight < vbin->inheight || vb->inwidth < vbin->inwidth) {
+ return false;
+ }
+
+ if (!lockscr(vb, false, display_reset > 0)) {
+ notice_screen_contents_lost(monid);
+ return false;
+ }
+ denise_locked = true;
+ return true;
+}
+
int scandoubled_line;
struct amigadisplay adisplays[MAX_AMIGADISPLAYS];
typedef void (*LINETOSRC_FUNC)(void);
static LINETOSRC_FUNC lts;
static bool lts_changed, lts_request;
-typedef void (*LINETOSRC_FUNCF)(int,int,int,int,int,int,int,int,int,uae_u32,uae_u8*,uae_u8*,int,int*,int,uae_u8, void*);
+typedef void (*LINETOSRC_FUNCF)(int,int,int,int,int,int,int,int,int,uae_u32,uae_u8*,uae_u8*,int,int*,int,struct linestate*);
static int denise_hcounter, denise_hcounter_next, denise_hcounter_new, denise_hcounter_prev;
static uae_u32 bplxdat[MAX_PLANES], bplxdat2[MAX_PLANES], bplxdat3[MAX_PLANES];
static int pix_prev;
static int last_bpl_pix;
static int previous_strobe;
-static bool denise_strlong, agnus_lol, extblank;
-static int lol;
-static int denise_lol_shift_prev, denise_lol_shifted_prev;
+static bool denise_strlong, denise_strlong_fast, agnus_lol, extblank;
+static int lol, lol_fast;
+static int denise_lol_shift_prev;
+static bool denise_lol_shift_enable;
static int decode_specials, decode_specials_debug;
static int *dpf_lookup, *dpf_lookup_no;
static int denise_sprres, denise_spr_add, denise_spr_shiftsize;
static int hstrt_offset, hstop_offset;
static int bpl1dat_trigger_offset;
static int internal_pixel_cnt, internal_pixel_start_cnt;
-static bool no_denise_lol;
+static bool no_denise_lol, denise_strlong_detected;
void set_inhibit_frame(int monid, int bit)
{
int get_vertical_visible_height(bool useoldsize)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
- int h = vidinfo->drawbuffer.inheight;
+ int h = vidinfo->inbuffer->inheight;
if (programmedmode <= 1) {
h = maxvsize_display;
}
if (!isnativevidbuf(0)) {
- *pw = vidinfo->outbuffer->outwidth;
- *ph = vidinfo->outbuffer->outheight;
+ *pw = vidinfo->inbuffer->outwidth;
+ *ph = vidinfo->inbuffer->outheight;
*pdx = 0;
*pdy = 0;
*prealh = -1;
if (w <= 0 || h <= 0 || dx < 0 || dy < 0)
return ret;
if (doublescan <= 0 && programmedmode != 1) {
- if (dx > vidinfo->outbuffer->inwidth / 2)
+ if (dx > vidinfo->inbuffer->inwidth / 2)
return ret;
- if (dy > vidinfo->outbuffer->inheight / 2)
+ if (dy > vidinfo->inbuffer->inheight / 2)
return ret;
}
return true;
}
// false = transparent
-STATIC_INLINE bool get_genlock_transparency(uae_u8 v)
+static bool get_genlock_transparency(uae_u8 v)
+{
+ if (!ecs_genlock_features_active) {
+ if (v == 0)
+ return false;
+ return true;
+ } else {
+ return get_genlock_very_rare_and_complex_case(v);
+ }
+}
+static bool get_genlock_transparency_fast(uae_u8 v)
{
if (!ecs_genlock_features_active) {
if (v == 0)
}
}
-STATIC_INLINE bool get_genlock_transparency_border(void)
+static bool get_genlock_transparency_border(void)
{
if (!ecs_genlock_features_active) {
return false;
}
}
+static bool get_genlock_transparency_border_fast(uae_u16 bplcon3)
+{
+ if (!ecs_genlock_features_active) {
+ return false;
+ } else {
+ // border color with BRDNTRAN bit set = not transparent
+ if (bplcon3 & 0x0010)
+ return true;
+ return get_genlock_very_rare_and_complex_case(0);
+ }
+}
+
+
static void gen_pfield_tables(void)
{
for (int i = 0; i < 256; i++) {
}
}
-void init_row_map(void)
-{
- struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
- static uae_u8 *oldbufmem;
- static int oldheight, oldpitch;
- static bool oldgenlock, oldburst;
- int i, j;
-
- if (vidinfo->drawbuffer.height_allocated > max_uae_height) {
- write_log (_T("Resolution too high, aborting\n"));
- abort ();
- }
- if (!row_map) {
- row_map = xmalloc(uae_u8*, max_uae_height + 1);
- row_map_genlock = xmalloc(uae_u16*, max_uae_height + 1);
- }
-
- if (oldbufmem && oldbufmem == vidinfo->drawbuffer.bufmem &&
- oldheight == vidinfo->drawbuffer.height_allocated &&
- oldpitch == vidinfo->drawbuffer.rowbytes &&
- oldgenlock == init_genlock_data &&
- oldburst == (row_map_color_burst_buffer ? 1 : 0))
- return;
- xfree(row_map_genlock_buffer);
- row_map_genlock_buffer = NULL;
- if (init_genlock_data) {
- row_map_genlock_buffer = xcalloc(uae_u16, vidinfo->drawbuffer.width_allocated * (vidinfo->drawbuffer.height_allocated + 2));
- }
- xfree(row_map_color_burst_buffer);
- row_map_color_burst_buffer = NULL;
- if (currprefs.cs_color_burst) {
- row_map_color_burst_buffer = xcalloc(uae_u8, vidinfo->drawbuffer.height_allocated + 2);
- }
- j = oldheight == 0 ? max_uae_height : oldheight;
- for (i = vidinfo->drawbuffer.height_allocated; i < max_uae_height + 1 && i < j + 1; i++) {
- row_map[i] = row_tmp8;
- row_map_genlock[i] = row_tmp16;
- }
- for (i = 0, j = 0; i < vidinfo->drawbuffer.height_allocated; i++, j += vidinfo->drawbuffer.rowbytes) {
- row_map[i] = vidinfo->drawbuffer.bufmem + j;
- if (init_genlock_data) {
- row_map_genlock[i] = row_map_genlock_buffer + vidinfo->drawbuffer.width_allocated * (i + 1);
- } else {
- row_map_genlock[i] = NULL;
- }
- }
- oldbufmem = vidinfo->drawbuffer.bufmem;
- oldheight = vidinfo->drawbuffer.height_allocated;
- oldpitch = vidinfo->drawbuffer.rowbytes;
- oldgenlock = init_genlock_data;
- oldburst = row_map_color_burst_buffer ? 1 : 0;
-}
-
static void init_aspect_maps(void)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
+ struct vidbuffer *vb = vidinfo->inbuffer;
int i, maxl, h;
linedbld = linedbl = currprefs.gfx_vresolution;
visible_top_start = 0;
visible_bottom_stop = MAX_STOP;
- h = vidinfo->drawbuffer.height_allocated;
+ h = vb->height_allocated;
if (h == 0)
/* Do nothing if the gfx driver hasn't initialized the screen yet */
return;
}
}
+void init_row_map(void)
+{
+ struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
+ struct vidbuffer *vb = vidinfo->inbuffer;
+ static uae_u8 *oldbufmem;
+ static int oldheight, oldpitch;
+ static bool oldgenlock, oldburst;
+ int i, j;
+
+ if (vb->height_allocated > max_uae_height) {
+ write_log(_T("Resolution too high, aborting\n"));
+ abort();
+ }
+ if (!row_map) {
+ row_map = xmalloc(uae_u8 *, max_uae_height + 1);
+ row_map_genlock = xmalloc(uae_u16 *, max_uae_height + 1);
+ }
+
+ if (oldbufmem && oldbufmem == vb->bufmem &&
+ oldheight == vb->height_allocated &&
+ oldpitch == vb->rowbytes &&
+ oldgenlock == init_genlock_data &&
+ oldburst == (row_map_color_burst_buffer ? 1 : 0))
+ return;
+ xfree(row_map_genlock_buffer);
+ row_map_genlock_buffer = NULL;
+ if (init_genlock_data) {
+ row_map_genlock_buffer = xcalloc(uae_u16, vb->width_allocated * (vb->height_allocated + 2));
+ }
+ xfree(row_map_color_burst_buffer);
+ row_map_color_burst_buffer = NULL;
+ if (currprefs.cs_color_burst) {
+ row_map_color_burst_buffer = xcalloc(uae_u8, vb->height_allocated + 2);
+ }
+ for (i = 0, j = 0; i < vb->height_allocated; i++, j += vb->rowbytes) {
+ if (i < vb->outheight) {
+ row_map[i] = vb->bufmem + j;
+ } else {
+ row_map[i] = row_tmp8;
+ }
+ if (init_genlock_data) {
+ row_map_genlock[i] = row_map_genlock_buffer + vb->width_allocated * (i + 1);
+ } else {
+ row_map_genlock[i] = NULL;
+ }
+ }
+ while (i < max_uae_height + 1) {
+ row_map[i] = row_tmp8;
+ row_map_genlock[i] = row_tmp16;
+ i++;
+ }
+ oldbufmem = vb->bufmem;
+ oldheight = vb->height_allocated;
+ oldpitch = vb->rowbytes;
+ oldgenlock = init_genlock_data;
+ oldburst = row_map_color_burst_buffer ? 1 : 0;
+
+ init_aspect_maps();
+}
+
static void center_image (void)
{
struct amigadisplay *ad = &adisplays[0];
int prev_x_adjust = visible_left_border;
int prev_y_adjust = thisframe_y_adjust;
- int w = vidinfo->drawbuffer.inwidth;
- int ew = vidinfo->drawbuffer.extrawidth;
+ if (!vidinfo->inbuffer) {
+ return;
+ }
+
+ int w = vidinfo->inbuffer->inwidth;
+ int ew = vidinfo->inbuffer->extrawidth;
int maxdiw = denisehtotal;
if (currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN && currprefs.gfx_xcenter && !fd->gfx_filter_autoscale && max_diwstop > 0) {
// normal
visible_left_border = maxdiw - w;
} else {
- if (vidinfo->drawbuffer.inxoffset < 0) {
+ if (vidinfo->inbuffer->inxoffset < 0) {
visible_left_border = 0;
} else {
- visible_left_border = vidinfo->drawbuffer.inxoffset << currprefs.gfx_resolution;
+ visible_left_border = vidinfo->inbuffer->inxoffset << currprefs.gfx_resolution;
}
}
visible_left_border = 0;
visible_left_border &= ~((xshift (1, lores_shift)) - 1);
- //write_log (_T("%d %d %d %d %d\n"), max_diwlastword, vidinfo->drawbuffer.width, lores_shift, currprefs.gfx_resolution, visible_left_border);
+ //write_log (_T("%d %d %d %d %d\n"), max_diwlastword, vidinfo->inbuffer->width, lores_shift, currprefs.gfx_resolution, visible_left_border);
linetoscr_x_adjust_pixels = visible_left_border;
- linetoscr_x_adjust_pixbytes = linetoscr_x_adjust_pixels * vidinfo->drawbuffer.pixbytes;
+ linetoscr_x_adjust_pixbytes = linetoscr_x_adjust_pixels * vidinfo->inbuffer->pixbytes;
visible_right_border = maxdiw + w + ((ew > 0 ? ew : 0) << currprefs.gfx_resolution);
if (visible_right_border > maxdiw + ((ew > 0 ? ew : 0) << currprefs.gfx_resolution))
visible_right_border = maxdiw + ((ew > 0 ? ew : 0) << currprefs.gfx_resolution);
int max_drawn_amiga_line_tmp = max_drawn_amiga_line;
- if (max_drawn_amiga_line_tmp > vidinfo->drawbuffer.inheight)
- max_drawn_amiga_line_tmp = vidinfo->drawbuffer.inheight;
+ if (max_drawn_amiga_line_tmp > vidinfo->inbuffer->inheight)
+ max_drawn_amiga_line_tmp = vidinfo->inbuffer->inheight;
max_drawn_amiga_line_tmp >>= linedbl;
thisframe_y_adjust = minfirstline - 1;
max_diwstop = 0;
min_diwstart = MAX_STOP;
- vidinfo->drawbuffer.xoffset = visible_left_border << (RES_MAX - currprefs.gfx_resolution);
- vidinfo->drawbuffer.yoffset = thisframe_y_adjust << VRES_MAX;
+ vidinfo->inbuffer->xoffset = visible_left_border << (RES_MAX - currprefs.gfx_resolution);
+ vidinfo->inbuffer->yoffset = thisframe_y_adjust << VRES_MAX;
if (center_reset > 0) {
center_reset--;
struct vidbuf_description *vidinfo = &adisplays[monid].gfxvidinfo;
int y;
- y = line - (vidinfo->drawbuffer.outheight - TD_TOTAL_HEIGHT);
- xlinebuffer = vidinfo->drawbuffer.linemem;
+ y = line - (vidinfo->inbuffer->outheight - TD_TOTAL_HEIGHT);
+ xlinebuffer = vidinfo->inbuffer->linemem;
if (xlinebuffer == 0)
xlinebuffer = row_map[line];
xlinebuffer_genlock = row_map_genlock[line];
if (!buf)
return;
if (statusy < 0)
- statusline_render(monid, buf, vidinfo->drawbuffer.pixbytes, vidinfo->drawbuffer.rowbytes, vidinfo->drawbuffer.outwidth, TD_TOTAL_HEIGHT, xredcolors, xgreencolors, xbluecolors, NULL);
+ statusline_render(monid, buf, vidinfo->inbuffer->pixbytes, vidinfo->inbuffer->rowbytes, vidinfo->inbuffer->outwidth, TD_TOTAL_HEIGHT, xredcolors, xgreencolors, xbluecolors, NULL);
else
- draw_status_line_single(monid, buf, vidinfo->drawbuffer.pixbytes, statusy, vidinfo->drawbuffer.outwidth, xredcolors, xgreencolors, xbluecolors, NULL);
+ draw_status_line_single(monid, buf, vidinfo->inbuffer->pixbytes, statusy, vidinfo->inbuffer->outwidth, xredcolors, xgreencolors, xbluecolors, NULL);
}
static void draw_debug_status_line(int monid, int line)
{
struct vidbuf_description *vidinfo = &adisplays[monid].gfxvidinfo;
- xlinebuffer = vidinfo->drawbuffer.linemem;
+ xlinebuffer = vidinfo->inbuffer->linemem;
if (xlinebuffer == 0)
xlinebuffer = row_map[line];
xlinebuffer_genlock = row_map_genlock[line];
- debug_draw(xlinebuffer, vidinfo->drawbuffer.pixbytes, line, vidinfo->drawbuffer.outwidth, vidinfo->drawbuffer.outheight, xredcolors, xgreencolors, xbluecolors);
+ debug_draw(xlinebuffer, vidinfo->inbuffer->pixbytes, line, vidinfo->inbuffer->outwidth, vidinfo->inbuffer->outheight, xredcolors, xgreencolors, xbluecolors);
}
#define LIGHTPEN_HEIGHT 12
int color1 = onscreen ? (lpnum ? 0x0ff : 0xff0) : (lpnum ? 0x0f0 : 0xf00);
int color2 = (color1 & 0xeee) >> 1;
- xlinebuffer = vidinfo->drawbuffer.linemem;
+ xlinebuffer = vidinfo->inbuffer->linemem;
if (xlinebuffer == 0)
xlinebuffer = row_map[line];
xlinebuffer_genlock = row_map_genlock[line];
p = lightpen_cursor + y * LIGHTPEN_WIDTH;
for (int i = 0; i < LIGHTPEN_WIDTH; i++) {
int xx = x + i - LIGHTPEN_WIDTH / 2;
- if (*p != '-' && xx >= 0 && xx < vidinfo->drawbuffer.outwidth) {
- putpixel(xlinebuffer, xlinebuffer_genlock, vidinfo->drawbuffer.pixbytes, xx, *p == 'x' ? xcolors[color1] : xcolors[color2]);
+ if (*p != '-' && xx >= 0 && xx < vidinfo->inbuffer->outwidth) {
+ putpixel(xlinebuffer, xlinebuffer_genlock, vidinfo->inbuffer->pixbytes, xx, *p == 'x' ? xcolors[color1] : xcolors[color2]);
}
p++;
}
if (lightpen_x[lpnum] < -extra)
lightpen_x[lpnum] = -extra;
- if (lightpen_x[lpnum] >= vidinfo->drawbuffer.inwidth + extra)
- lightpen_x[lpnum] = vidinfo->drawbuffer.inwidth + extra;
+ if (lightpen_x[lpnum] >= vidinfo->inbuffer->inwidth + extra)
+ lightpen_x[lpnum] = vidinfo->inbuffer->inwidth + extra;
if (lightpen_y[lpnum] < -extra)
lightpen_y[lpnum] = -extra;
- if (lightpen_y[lpnum] >= vidinfo->drawbuffer.inheight + extra)
- lightpen_y[lpnum] = vidinfo->drawbuffer.inheight + extra;
+ if (lightpen_y[lpnum] >= vidinfo->inbuffer->inheight + extra)
+ lightpen_y[lpnum] = vidinfo->inbuffer->inheight + extra;
if (lightpen_y[lpnum] >= max_ypos_thisframe1)
lightpen_y[lpnum] = max_ypos_thisframe1;
if (lightpen_x[lpnum] < 0 || lightpen_y[lpnum] < 0) {
out = true;
}
- if (lightpen_x[lpnum] >= vidinfo->drawbuffer.inwidth) {
+ if (lightpen_x[lpnum] >= vidinfo->inbuffer->inwidth) {
out = true;
}
if (lightpen_y[lpnum] >= max_ypos_thisframe1) {
int line = lightpen_y[lpnum] + i - LIGHTPEN_HEIGHT / 2;
if (line >= 0 && line < max_ypos_thisframe1) {
if (lightpen_active & (1 << lpnum)) {
- draw_lightpen_cursor(vb->monitor_id, lightpen_x[lpnum], i, line, cx > 0, lpnum);
+ if (denise_lock()) {
+ draw_lightpen_cursor(vb->monitor_id, lightpen_x[lpnum], i, line, cx > 0, lpnum);
+ }
}
}
}
color2 = refresh_indicator_colors[pixel - 5];
}
for (int x = 0; x < 8; x++) {
- putpixel(xlinebuffer, NULL, vidinfo->drawbuffer.pixbytes, x, xcolors[color1]);
+ putpixel(xlinebuffer, NULL, vidinfo->inbuffer->pixbytes, x, xcolors[color1]);
}
for (int x = 8; x < 16; x++) {
- putpixel(xlinebuffer, NULL, vidinfo->drawbuffer.pixbytes, x, xcolors[color2]);
+ putpixel(xlinebuffer, NULL, vidinfo->inbuffer->pixbytes, x, xcolors[color2]);
}
}
}
static void draw_frame_extras(struct vidbuffer *vb, int y_start, int y_end)
{
if (debug_dma > 1 || debug_heatmap > 1) {
- for (int i = 0; i < vb->outheight; i++) {
- int line = i;
- draw_debug_status_line(vb->monitor_id, line);
+ if (denise_lock()) {
+ for (int i = 0; i < vb->outheight; i++) {
+ int line = i;
+ draw_debug_status_line(vb->monitor_id, line);
+ }
}
}
lightpen_update(vb, 1);
}
}
- if (refresh_indicator_buffer)
- refresh_indicator_update(vb);
+ if (refresh_indicator_buffer) {
+ if (denise_lock()) {
+ refresh_indicator_update(vb);
+ }
+ }
}
extern bool beamracer_debug;
static void setnativeposition(struct vidbuffer *vb)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
- vb->inwidth = vidinfo->drawbuffer.inwidth;
- vb->inheight = vidinfo->drawbuffer.inheight;
- vb->inwidth2 = vidinfo->drawbuffer.inwidth2;
- vb->inheight2 = vidinfo->drawbuffer.inheight2;
- vb->outwidth = vidinfo->drawbuffer.outwidth;
- vb->outheight = vidinfo->drawbuffer.outheight;
+ vb->inwidth = vidinfo->inbuffer->inwidth;
+ vb->inheight = vidinfo->inbuffer->inheight;
+ vb->inwidth2 = vidinfo->inbuffer->inwidth2;
+ vb->inheight2 = vidinfo->inbuffer->inheight2;
+ vb->outwidth = vidinfo->inbuffer->outwidth;
+ vb->outheight = vidinfo->inbuffer->outheight;
}
static void setspecialmonitorpos(struct vidbuffer *vb)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
- vb->extrawidth = vidinfo->drawbuffer.extrawidth;
- vb->xoffset = vidinfo->drawbuffer.xoffset;
- vb->yoffset = vidinfo->drawbuffer.yoffset;
- vb->inxoffset = vidinfo->drawbuffer.inxoffset;
- vb->inyoffset = vidinfo->drawbuffer.inyoffset;
+ vb->extrawidth = vidinfo->inbuffer->extrawidth;
+ vb->xoffset = vidinfo->inbuffer->xoffset;
+ vb->yoffset = vidinfo->inbuffer->yoffset;
+ vb->inxoffset = vidinfo->inbuffer->inxoffset;
+ vb->inyoffset = vidinfo->inbuffer->inyoffset;
+}
+
+static void vbcopy(struct vidbuffer *vbout, struct vidbuffer *vbin)
+{
+
+ for (int h = 0; h < vbout->outheight; h++) {
+ memcpy(vbout->bufmem + h * vbout->rowbytes, vbin->bufmem + h * vbin->rowbytes, vbout->outwidth * vbout->pixbytes);
+ }
}
static void finish_drawing_frame(bool drawlines)
int monid = 0;
struct amigadisplay *ad = &adisplays[monid];
struct vidbuf_description *vidinfo = &ad->gfxvidinfo;
- struct vidbuffer *vb = &vidinfo->drawbuffer;
-
- vidinfo->outbuffer = vb;
- vb->last_drawn_line = 0;
+ struct vidbuffer *vbout = vidinfo->outbuffer;
+ struct vidbuffer *vbin = vidinfo->inbuffer;
- if (!drawlines) {
+ if (!drawlines || !vbout || !vbin) {
return;
}
- if (!lockscr(vb, false, true, display_reset > 0)) {
- notice_screen_contents_lost(monid);
- return;
- }
-
- draw_frame_extras(vb, -1, -1);
+ vbout->last_drawn_line = 0;
+ draw_frame_extras(vbin, -1, -1);
// video port adapters
if (currprefs.monitoremu) {
+ if (!denise_lock()) {
+ return;
+ }
struct vidbuf_description *outvi = &adisplays[currprefs.monitoremu_mon].gfxvidinfo;
- struct vidbuffer *out = &outvi->drawbuffer;
+ struct vidbuffer *m_out = &outvi->drawbuffer;
+ struct vidbuffer *m_in = &outvi->tempbuffer;
if (init_genlock_data != specialmonitor_need_genlock()) {
init_genlock_data = specialmonitor_need_genlock();
init_row_map();
bool locked = true;
bool multimon = currprefs.monitoremu_mon != 0;
if (multimon) {
- locked = lockscr(out, false, true, display_reset > 0);
+ locked = lockscr(m_out, false, display_reset > 0);
outvi->xchange = vidinfo->xchange;
outvi->ychange = vidinfo->ychange;
} else {
- out = &vidinfo->tempbuffer;
+ m_out = vbout;
}
- setspecialmonitorpos(out);
- if (locked && emulate_specialmonitors(vb, out)) {
- if (!multimon) {
- vb->tempbufferinuse = true;
- vb = vidinfo->outbuffer = out;
- }
- if (out->nativepositioning) {
- setnativeposition(out);
+ setspecialmonitorpos(m_out);
+ if (locked && emulate_specialmonitors(m_in, m_out)) {
+ if (m_out->nativepositioning) {
+ setnativeposition(m_out);
}
if (!ad->specialmonitoron) {
need_genlock_data = specialmonitor_need_genlock();
}
} else {
need_genlock_data = false;
- if (ad->specialmonitoron || out->tempbufferinuse) {
- out->tempbufferinuse = false;
+ if (ad->specialmonitoron) {
ad->specialmonitoron = false;
compute_framesync();
}
+ vbcopy(vbout, vbin);
}
if (multimon && locked) {
- unlockscr(out, -1, -1);
- render_screen(out->monitor_id, 1, true);
- show_screen(out->monitor_id, 0);
+ unlockscr(m_out, -1, -1);
+ render_screen(m_out->monitor_id, 1, true);
+ show_screen(m_out->monitor_id, 0);
}
}
// genlock
if (currprefs.genlock_image && (currprefs.genlock || currprefs.genlock_effects) && !currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated) {
- setspecialmonitorpos(&vidinfo->tempbuffer);
+ if (!denise_lock()) {
+ return;
+ }
+ setspecialmonitorpos(vbout);
if (init_genlock_data != specialmonitor_need_genlock()) {
need_genlock_data = init_genlock_data = specialmonitor_need_genlock();
init_row_map();
lts_request = true;
}
- emulate_genlock(vb, &vidinfo->tempbuffer, aga_genlock_features_zdclken);
- vb = vidinfo->outbuffer = &vidinfo->tempbuffer;
- if (vb->nativepositioning)
- setnativeposition(vb);
- vidinfo->drawbuffer.tempbufferinuse = true;
+ emulate_genlock(vbin, vbout, aga_genlock_features_zdclken);
+ if (vbout->nativepositioning) {
+ setnativeposition(vbout);
+ }
}
#ifdef CD32
// cd32 fmv
if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated && currprefs.cs_cd32fmv) {
+ if (!denise_lock()) {
+ return;
+ }
if (cd32_fmv_active) {
- cd32_fmv_genlock(vb, &vidinfo->tempbuffer);
- vb = vidinfo->outbuffer = &vidinfo->tempbuffer;
- setnativeposition(vb);
- vidinfo->drawbuffer.tempbufferinuse = true;
+ cd32_fmv_genlock(vbin, vbout);
+ setnativeposition(vbout);
} else {
- vidinfo->drawbuffer.tempbufferinuse = false;
+ vbcopy(vbout, vbin);
}
}
#endif
// grayscale
if (!currprefs.monitoremu && vidinfo->tempbuffer.bufmem_allocated &&
((!currprefs.genlock && (!bplcolorburst_field && currprefs.cs_color_burst)) || currprefs.gfx_grayscale)) {
- setspecialmonitorpos(&vidinfo->tempbuffer);
- emulate_grayscale(vb, &vidinfo->tempbuffer);
- vb = vidinfo->outbuffer = &vidinfo->tempbuffer;
- if (vb->nativepositioning)
- setnativeposition(vb);
- vidinfo->drawbuffer.tempbufferinuse = true;
+ if (!denise_lock()) {
+ return;
+ }
+ setspecialmonitorpos(vbout);
+ emulate_grayscale(vbin, vbout);
+ if (vbout->nativepositioning)
+ setnativeposition(vbout);
}
- unlockscr(vb, display_reset ? -2 : -1, -1);
+ if (denise_locked) {
+ unlockscr(vbout, display_reset ? -2 : -1, -1);
+ denise_locked = false;
+ }
}
void check_prefs_picasso(void)
bool redraw = false;
struct amigadisplay *ad = &adisplays[monid];
struct vidbuf_description *vidinfo = &adisplays[monid].gfxvidinfo;
- if (vidinfo->drawbuffer.height_allocated && amiga2aspect_line_map) {
+ if (vidinfo->inbuffer && vidinfo->inbuffer->height_allocated && amiga2aspect_line_map) {
notice_screen_contents_lost(monid);
if (!ad->picasso_on) {
redraw_frame();
int changed = check_prefs_changed_gfx();
if (changed > 0) {
reset_drawing();
- init_row_map();
- init_aspect_maps();
notice_screen_contents_lost(monid);
notice_new_xcolors();
} else if (changed < 0) {
reset_drawing();
- init_row_map();
- init_aspect_maps();
notice_screen_contents_lost(monid);
notice_new_xcolors();
}
denise_sprite_blank_active = false;
delayed_sprite_vblank_ecs = false;
- init_aspect_maps ();
-
- init_row_map ();
-
last_redraw_point = 0;
notice_screen_contents_lost(monid);
if (currprefs.gfx_overscanmode < OVERSCANMODE_OVERSCAN) {
denise_vblank_extra = (OVERSCANMODE_OVERSCAN - currprefs.gfx_overscanmode) * 5;
}
- no_denise_lol = !currprefs.cpu_memory_cycle_exact && !currprefs.chipset_hr;
+ no_denise_lol = !currprefs.cpu_memory_cycle_exact; // && !currprefs.chipset_hr;
}
static void gen_direct_drawing_table(void)
struct amigadisplay *ad = &adisplays[monid];
struct vidbuf_description *vidinfo = &ad->gfxvidinfo;
+ if (!denise_thread_state) {
+ uae_sem_init(&read_sem, 0, 1);
+ uae_sem_init(&write_sem, 0, 1);
+ denise_thread_state = 1;
+ uae_start_thread(_T("denise"), denise_thread, NULL, NULL);
+ }
+
refresh_indicator_init();
gen_pfield_tables();
gfx_set_picasso_state(0, 0);
}
#endif
- xlinebuffer = vidinfo->drawbuffer.bufmem;
+ xlinebuffer = NULL;
+ xlinebuffer2 = NULL;
xlinebuffer_genlock = NULL;
ad->inhibit_frame = 0;
static void set_strlong(void)
{
+ denise_strlong_detected = true;
if (no_denise_lol) {
denise_strlong = false;
+ denise_strlong_fast = true;
+ denise_lol_shift_enable = false;
+ denise_lol_shift_prev = 0;
return;
}
denise_strlong = true;
static void copy_strlong(void)
{
lol = denise_strlong ? 1 : 0;
+ lol_fast = denise_strlong_fast ? 1 : 0;
if (denisea1000) {
memset(dtbuf, 0, sizeof(dtbuf));
}
static void reset_strlong(void)
{
denise_strlong = false;
+ denise_strlong_fast = false;
}
void denise_reset(bool hard)
static int dummyint = 0;
static struct dma_rec dummydrec = { 0 };
+ draw_denise_line_queue_flush();
dummyint = 0;
memset(&dummydrec, 0, sizeof(dummydrec));
memset(chunky_out, 0, sizeof(chunky_out));
debug_dma_ptr = &dummydrec;
denise_cycle_half = 0;
denise_strlong = false;
+ denise_strlong_fast = false;
rga_denise_fast_read = rga_denise_fast_write = 0;
+ rga_queue_write = rga_queue_read = 0;
+ denise_lol_shift_enable = false;
+ denise_lol_shift_prev = 0;
if (hard) {
strlong_emulation = false;
denise_res = 0;
agnus_lol = (rd->flags & DENISE_RGA_FLAG_LOL_ON) != 0;
if (no_denise_lol) {
agnus_lol = false;
+ denise_lol_shift_enable = false;
+ denise_lol_shift_prev = 0;
+ return;
}
- if (!agnus_lol && !denise_lol_shift_prev) {
+ if (!agnus_lol && (!denise_lol_shift_prev || denise_lol_shift_enable)) {
int add = 1 << hresolution;
buf1 += add;
buf2 += add;
gbuf += add;
}
denise_lol_shift_prev = add;
- } else if (agnus_lol && denise_lol_shift_prev) {
+ denise_lol_shift_enable = true;
+ } else if (agnus_lol && denise_lol_shift_prev > 0) {
buf1 -= denise_lol_shift_prev;
buf2 -= denise_lol_shift_prev;
buf_d -= denise_lol_shift_prev;
gbuf -= denise_lol_shift_prev;
}
denise_lol_shift_prev = 0;
+ denise_lol_shift_enable = true;
}
}
}
hstart_new();
}
-
// fix strobe position after fast mode
-void denise_handle_quick_strobe(uae_u16 strobe, int offset)
+static void denise_handle_quick_strobe(uae_u16 strobe, int offset, int vpos)
{
struct denise_rga rd = { 0 };
rd.rga = strobe;
denise_hcounter_new += maxhpos * 2;
denise_hcounter_new &= 511;
denise_hcounter = denise_hcounter_new;
+
+ //write_log("%d %04x %d %d\n", vpos, strobe, offset, denise_hcounter_new);
+
handle_strobes(&rd);
if (denise_hcounter_new == 1 * 2) {
// 3 = refresh offset, 2 = pipeline delay
struct vidbuffer *vb = &vidinfo->drawbuffer;
vidinfo->outbuffer = vb;
- if (!lockscr(vb, false, false, display_reset > 0)) {
+
+ if (!lockscr(vb, false, display_reset > 0)) {
return false;
}
+ if (vidinfo->tempbuffer.bufmem) {
+ vidinfo->inbuffer = &vidinfo->tempbuffer;
+ } else {
+ vidinfo->inbuffer = &vidinfo->drawbuffer;
+ }
+
+ if (vidinfo->outbuffer != vidinfo->inbuffer) {
+ vidinfo->inbuffer->locked = vidinfo->outbuffer->locked;
+ }
+
+ init_row_map();
+
denise_y_start = 0;
denise_y_end = -1;
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
struct vidbuffer *vb = &vidinfo->drawbuffer;
+ draw_denise_line_queue_flush();
+ denise_mark_last_line();
+
unlockscr(vb, denise_y_start, denise_y_end);
+
+ if (vidinfo->outbuffer != vidinfo->inbuffer) {
+ vidinfo->inbuffer->locked = vidinfo->outbuffer->locked;
+ }
}
// emulate black level calibration (vb and hb)
static int prevline;
static int prev_last_line;
+static int highestline;
static bool prev_last_line_req;
void denise_mark_last_line(void)
static void get_line(int gfx_ypos, enum nln_how how)
{
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
- struct vidbuffer *vb = &vidinfo->drawbuffer;
+ struct vidbuffer *vb = vidinfo->inbuffer;
- // clear remaining lines if mode height is now smaller than previously
- if (prev_last_line_req) {
- struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
- struct vidbuffer *vb = &vidinfo->drawbuffer;
- int l = prev_last_line;
+ xlinebuffer = NULL;
+ xlinebuffer2 = NULL;
- while (l < prevline && l < vb->inheight) {
- uae_u8 *b = row_map[l];
- memset(b, 0, vb->inwidth * vb->pixbytes);
- l++;
- }
- prev_last_line_req = false;
+ denise_pixtotal_max = denise_pixtotalv - denise_pixtotalskip2;
+ denise_pixtotal = -denise_pixtotalskip;
+
+ if (!vb->locked) {
+ denise_pixtotal_max = -0x7fffffff;
+ return;
}
- xlinebuffer = NULL;
- xlinebuffer2 = NULL;
+ if (gfx_ypos < prevline - 1) {
+
+ if (!denise_strlong_detected && strlong_emulation) {
+ strlong_emulation = false;
+ write_log("STRLONG strobe emulation deactivated.\n");
+ select_lts();
+ denise_lol_shift_enable = false;
+ denise_lol_shift_prev = 0;
+ }
+ denise_strlong_detected = false;
+
+ // clear remaining lines if mode height is now smaller than previously
+ struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
+ if (prevline != highestline) {
+ int l = prevline;
+ while (l < highestline && l < vb->inheight) {
+ uae_u8 *b = row_map[l];
+ memset(b, 0, vb->inwidth * vb->pixbytes);
+ l++;
+ }
+ highestline = prevline;
+ }
+ }
+ if (gfx_ypos > prevline && gfx_ypos >= 0) {
+ prevline = gfx_ypos;
+ }
if (currprefs.gfx_overscanmode < OVERSCANMODE_ULTRA) {
gfx_ypos -= minfirstline_linear << currprefs.gfx_vresolution;
}
}
- denise_pixtotal_max = denise_pixtotalv - denise_pixtotalskip2;
- denise_pixtotal = -denise_pixtotalskip;
-
if ((denise_pixtotal_max << (1 + hresolution)) > vb->inwidth) {
denise_pixtotal_max = vb->inwidth >> (1 + hresolution);
}
buf2 = debug_buf;
}
+ if (!row_map) {
+ return;
+ }
+
get_line(gfx_ypos, how);
hbstrt_offset = -1;
}
if (buf1 && gbuf && denise_pixtotal_max > 0) {
- memset(gbuf, 0xff, ((2 * denise_pixtotal_max) << hresolution) * sizeof(uae_u16));
+ memset(gbuf, 0, ((2 * denise_pixtotal_max) << hresolution) * sizeof(uae_u16));
}
} else {
}
}
#endif
-#if 0
- uae_u32 *hbstrt_ptr2 = buf2 ? buf2t + (hbstrt_ptr1 - buf1t) : NULL;
- uae_u32 *hbstop_ptr2 = buf2 ? buf2t + (hbstop_ptr1 - buf1t) : NULL;
+ int rshift = RES_MAX - hresolution;
+ int hbstrt_offset2 = (hbstrt_offset - internal_pixel_start_cnt) >> rshift;
+ int hbstop_offset2 = (hbstop_offset - internal_pixel_start_cnt) >> rshift;
+ uae_u32 *hbstrt_ptr1 = hbstrt_offset >= 0 ? buf1t + hbstrt_offset2 : NULL;
+ uae_u32 *hbstop_ptr1 = hbstop_offset >= 0 ? buf1t + hbstop_offset2 : NULL;
+ uae_u32 *hbstrt_ptr2 = buf2 && hbstrt_offset >= 0 ? buf2t + hbstrt_offset2 : NULL;
+ uae_u32 *hbstop_ptr2 = buf2 && hbstop_offset >= 0 ? buf2t + hbstop_offset2 : NULL;
// blank last pixel row if normal overscan mode, it might have NTSC artifacts
if (denise_pixtotal_max != -0x7fffffff && hbstrt_ptr1 && currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN && !ecs_denise) {
int add = 1 << hresolution;
uae_u32 *p1 = hbstrt_ptr1 - denise_lol_shift_prev;
uae_u32 *p2 = hbstrt_ptr2 - denise_lol_shift_prev;
for (int i = 0; i < add * 2; i++) {
- *p1++ = 0x000000;
- *p2++ = 0x000000;
+ *p1++ = BLANK_COLOR;
+ *p2++ = BLANK_COLOR;
}
}
- if (no_denise_lol && denise_pixtotal_max != -0x7fffffff && hbstrt_ptr1 && !lol) {
+ if (1 && no_denise_lol && denise_pixtotal_max != -0x7fffffff && hbstrt_ptr1 && !lol_fast && denise_strlong_detected) {
int add = 1 << hresolution;
- uae_u32 *p1 = hbstrt_ptr1 - denise_lol_shift_prev * 2;
- uae_u32 *p2 = hbstrt_ptr2 - denise_lol_shift_prev * 2;
+ uae_u32 *p1 = hbstrt_ptr1 - 2 * add;
+ uae_u32 *p2 = hbstrt_ptr2 - 2 * add;
for (int i = 0; i < add * 2; i++) {
- *p1++ = 0x000000;
- *p2++ = 0x000000;
+ *p1++ = BLANK_COLOR;
+ *p2++ = BLANK_COLOR;
}
}
if (currprefs.gfx_overscanmode < OVERSCANMODE_OVERSCAN) {
if (bufg) {
uae_u16 *gp1 = (p1 - ptr2) + bufg;
if (i >= 2) {
- memset(gp1, 0xff, w * sizeof(uae_u16));
+ memset(gp1, 0, w * sizeof(uae_u16));
} else {
- memset(gp1 - w, 0xff, w * sizeof(uae_u16));
+ memset(gp1 - w, 0, w * sizeof(uae_u16));
}
}
}
}
}
-#endif
if (currprefs.display_calibration && xlinebuffer) {
emulate_black_level_calibration(buf1t, buf2t, bufdt, total, calib_start, calib_len);
#include "linetoscr_ecs_shres.cpp"
#include "linetoscr_ecs_fast.cpp"
#include "linetoscr_aga_fast.cpp"
+#include "linetoscr_ecs_genlock_fast.cpp"
+#include "linetoscr_aga_genlock_fast.cpp"
// select linetoscr routine
static void select_lts(void)
}
// draw border from hb to hb
-bool draw_denise_border_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls)
+void draw_denise_border_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls)
{
get_line(gfx_ypos, how);
if (!buf1) {
- return false;
+ return;
}
uae_u32 *buf1p = buf1;
}
}
- return true;
}
-static int previous_c_len;
-
-bool draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls)
+void draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls)
{
get_line(gfx_ypos, how);
if (!buf1) {
- return false;
+ return;
}
uae_u32 *buf1p = buf1;
int fmode = 16 << (((ls->fmode & 3) == 3 ? 2 : (ls->fmode & 3)));
if (ls->ltsidx < 0) {
- bool ehb = planecnt == 6 && !bplham && !dpf && (!ecs_denise || !(ls->bplcon0 & 1) || !(ls->bplcon2 & 0x200));
+ bool ehb = planecnt == 6 && !ham && !dpf && (!ecs_denise || !(ls->bplcon0 & 1) || !(ls->bplcon2 & 0x200));
int mode = CMODE_NORMAL;
if (ham) {
mode = CMODE_HAM;
LINETOSRC_FUNCF ltsf;
if (aga_mode) {
- ltsf = linetoscr_aga_fast_funcs[ls->ltsidx];
+ if (need_genlock_data) {
+ ltsf = linetoscr_aga_genlock_fast_funcs[ls->ltsidx];
+ } else {
+ ltsf = linetoscr_aga_fast_funcs[ls->ltsidx];
+ }
} else {
- ltsf = linetoscr_ecs_fast_funcs[ls->ltsidx];
+ if (need_genlock_data) {
+ ltsf = linetoscr_ecs_genlock_fast_funcs[ls->ltsidx];
+ } else {
+ ltsf = linetoscr_ecs_fast_funcs[ls->ltsidx];
+ }
}
uae_u32 *cstart = chunky_out + 1024;
int len = (ls->bpllen + 3) / 4;
- if (currprefs.cpu_memory_cycle_exact) {
+ if (0 && currprefs.cpu_memory_cycle_exact) {
if (fmode == 16) {
pfield_doline_16(planecnt, len, (uae_u8*)cstart, ls);
} else if (fmode == 32) {
//write_log("%03d %03d %03d %03d %03d %03d %03d\n", vpos, hbstop_offset, hbstrt_offset, hstrt_offset, hstop_offset, bpl1dat_trigger_offset, delayoffset);
uae_u8 bxor = ls->bplcon4 >> 8;
- uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
- uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
buf1 = buf1p;
buf2 = buf2p;
// int cpadd = doubling < 0 ? (doubling < -1 ? 4 : 2) : 1;
#if 1
ltsf(draw_start, draw_end, draw_startoffset, hbstrt_offset, hbstop_offset, hstrt_offset, hstop_offset, bpl1dat_trigger_offset,
- planecnt, bgcol, cp, cp2, cpadd, cpadds, bufadd, bxor, ls->linecolorstate);
+ planecnt, bgcol, cp, cp2, cpadd, cpadds, bufadd, ls);
#else
cnt += bufadd;
}
#endif
- return true;
+
}
#define RB restore_u8()
return src;
}
+
+static bool waitqueue(void)
+{
+ while (((rga_queue_write + 1) & DENISE_RGA_SLOT_CHUNKS_MASK) == (rga_queue_read & DENISE_RGA_SLOT_CHUNKS_MASK)) {
+ uae_sem_trywait_delay(&read_sem, 500);
+ }
+ return true;
+}
+static void addtowritequeue(void)
+{
+ atomic_inc(&rga_queue_write);
+
+ uae_sem_post(&write_sem);
+}
+
+void draw_denise_border_line_fast_queue(int gfx_ypos, enum nln_how how, struct linestate *ls)
+{
+ if (MULTITHREADED_DENISE) {
+
+ if (!waitqueue()) {
+ return;
+ }
+
+ struct denise_rga_queue *q = &rga_queue[rga_queue_write & DENISE_RGA_SLOT_CHUNKS_MASK];
+ q->gfx_ypos = gfx_ypos;
+ q->how = how;
+ q->ls = ls;
+ q->type = 2;
+ q->vpos = vpos;
+
+ addtowritequeue();
+
+ } else {
+
+ draw_denise_border_line_fast(gfx_ypos, how, ls);
+
+ }
+}
+
+void draw_denise_bitplane_line_fast_queue(int gfx_ypos, enum nln_how how, struct linestate *ls)
+{
+ if (MULTITHREADED_DENISE) {
+
+ if (!waitqueue()) {
+ return;
+ }
+
+ struct denise_rga_queue *q = &rga_queue[rga_queue_write & DENISE_RGA_SLOT_CHUNKS_MASK];
+ q->gfx_ypos = gfx_ypos;
+ q->how = how;
+ q->ls = ls;
+ q->type = 1;
+ q->vpos = vpos;
+
+ addtowritequeue();
+
+ } else {
+
+ draw_denise_bitplane_line_fast(gfx_ypos, how, ls);
+
+ }
+}
+
+void quick_denise_rga_queue(int linecnt, int startpos, int endpos)
+{
+ if (MULTITHREADED_DENISE) {
+
+ if (!waitqueue()) {
+ return;
+ }
+
+ struct denise_rga_queue *q = &rga_queue[rga_queue_write & DENISE_RGA_SLOT_CHUNKS_MASK];
+ q->linecnt = linecnt;
+ q->startpos = startpos;
+ q->endpos = endpos;
+ q->type = 3;
+ q->vpos = vpos;
+
+ addtowritequeue();
+
+ } else {
+
+ quick_denise_rga(linecnt, startpos, endpos);
+
+ }
+}
+
+void denise_handle_quick_strobe_queue(uae_u16 strobe, int strobe_pos, int endpos)
+{
+ if (MULTITHREADED_DENISE) {
+
+ if (!waitqueue()) {
+ return;
+ }
+
+ struct denise_rga_queue *q = &rga_queue[rga_queue_write & DENISE_RGA_SLOT_CHUNKS_MASK];
+ q->strobe = strobe;
+ q->strobe_pos = strobe_pos;
+ q->endpos = endpos;
+ q->type = 4;
+ q->vpos = vpos;
+
+ addtowritequeue();
+
+ } else {
+
+ denise_handle_quick_strobe(strobe, strobe_pos, endpos);
+
+ }
+}
+
+
+void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int endpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls)
+{
+ if (MULTITHREADED_DENISE) {
+
+ if (!waitqueue()) {
+ return;
+ }
+
+ struct denise_rga_queue *q = &rga_queue[rga_queue_write & DENISE_RGA_SLOT_CHUNKS_MASK];
+ q->type = 0;
+ q->gfx_ypos = gfx_ypos;
+ q->how = how;
+ q->linecnt = linecnt;
+ q->startpos = startpos;
+ q->endpos = endpos;
+ q->total = total;
+ q->skip = skip;
+ q->skip2 = skip2;
+ q->dtotal = dtotal;
+ q->calib_start = calib_start;
+ q->calib_len = calib_len;
+ q->lol = lol;
+ q->ls = ls;
+ q->vpos = vpos;
+
+ addtowritequeue();
+
+ } else {
+
+ draw_denise_line(gfx_ypos, how, linecnt, startpos, total, skip, skip2, dtotal, calib_start, calib_len, lol, ls);
+
+ }
+}
+
+void draw_denise_line_queue_flush(void)
+{
+ if (MULTITHREADED_DENISE) {
+ for (;;) {
+ if (rga_queue_read == rga_queue_write) {
+ return;
+ }
+ uae_sem_trywait_delay(&read_sem, 500);
+ }
+ }
+}
static bool gen_fasthead(void)
{
char funcname[200];
- sprintf(funcname, "lts_%s_%s_i%s_d%s_%s",
+ sprintf(funcname, "lts_%s_%s_i%s_d%s_%s%s",
aga ? "aga" : "ecs",
modes == 0 ? "n" : (modes == 1 ? "dpf" : (modes == 2 ? "ehb" : (modes == 4 ? "kehb" : "ham"))),
res == 0 ? "lores" : (res == 1 ? "hires" : "shres"),
outres == 0 ? "lores" : (outres == 1 ? "hires" : "shres"),
- isbuf2 ? "b2" : "b1");
+ isbuf2 ? "b2" : "b1",
+ genlock ? "_genlock" : "");
strcpy(funcnamep, funcname);
funcnamep += strlen(funcnamep) + 1;
*funcnamep = 0;
outf("static void %s(int draw_start, int draw_end, int draw_startoffset, int hbstrt_offset, int hbstop_offset, int hstrt_offset, int hstop_offset,"
- "int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, uae_u8 bxor, void *colors)", funcname);
+ "int bpl1dat_trigger_offset, int planes, uae_u32 bgcolor, uae_u8 *cp, uae_u8 *cp2, int cpadd, int *cpadds, int bufadd, struct linestate *ls)", funcname);
outf("{");
return true;
}
} else {
outf("c = *cp;");
if (off == total - 1) {
- outf("cp += 1 << cpadd;");
+ outf("cp += cpaddv;");
}
if (modes == CMODE_DUALPF) {
outf("{");
if (isbuf2) {
outf("*buf2++ = col;");
}
+ if (genlock) {
+ outf("gpix = get_genlock_transparency_fast(col);");
+ outf("*gbuf++ = gpix;");
+ }
}
static void gen_fastdraw(void)
int doubling = outres - res;
if (aga) {
- outf("uae_u32 *colors_aga = (uae_u32*)colors;");
+ outf("uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;");
} else {
- outf("uae_u16 *colors_ocs = (uae_u16*)colors;");
+ outf("uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;");
+ }
+ if (aga) {
+ outf("uae_u8 bxor = ls->bplcon4 >> 8;");
+ }
+ outf("int bufaddv = 1 << bufadd;");
+ outf("int cpaddv = 1 << cpadd;");
+ if (genlock) {
+ outf("uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);");
}
outf("int cnt = draw_start;");
if (isbuf2) {
outf("*buf2++ = bgcolor;");
}
+ if (genlock) {
+ outf("*gbuf++ = gpix;");
+ }
} else if (doubling == 1) {
outf("*buf1++ = bgcolor;");
outf("*buf1++ = bgcolor;");
outf("*buf2++ = bgcolor;");
outf("*buf2++ = bgcolor;");
}
+ if (genlock) {
+ outf("*gbuf++ = gpix;");
+ outf("*gbuf++ = gpix;");
+ }
} else if (doubling == 2) {
outf("*buf1++ = bgcolor;");
outf("*buf1++ = bgcolor;");
outf("*buf2++ = bgcolor;");
outf("*buf2++ = bgcolor;");
}
+ if (genlock) {
+ outf("*gbuf++ = gpix;");
+ outf("*gbuf++ = gpix;");
+ outf("*gbuf++ = gpix;");
+ outf("*gbuf++ = gpix;");
+ }
}
outf("} else {");
outf("bpl = true;");
}
outf("}");
outf("if (cnt >= bpl1dat_trigger_offset && !bpl) {");
- outf(" cp += 1 << cpadd;");
+ outf(" cp += cpaddv;");
outf("}");
- outf("cnt += 1 << bufadd;");
+ outf("cnt += bufaddv;");
outf("}");
}
}
// fast drawing
+ genlock = 0;
+
set_outfile("../../linetoscr_ecs_fast.cpp");
aga = 0;
bplfmode = 3;
}
write_funcs_fast("linetoscr_aga_fast_funcs");
+ genlock = 1;
+
+ set_outfile("../../linetoscr_ecs_genlock_fast.cpp");
+ aga = 0;
+ bplfmode = 3;
+ planes = 1;
+ for (isbuf2 = 0; isbuf2 < 2; isbuf2++) {
+ for (outres = 0; outres < 3; outres++) {
+ for (res = 0; res < 3; res++) {
+ for (modes = 0; modes < 5; modes++) {
+ if (gen_fasthead()) {
+ gen_fastdraw();
+ } else {
+ gen_null();
+ }
+ gen_tail();
+ }
+ }
+ }
+ }
+ write_funcs_fast("linetoscr_ecs_genlock_fast_funcs");
+
+ set_outfile("../../linetoscr_aga_genlock_fast.cpp");
+ aga = 1;
+ for (isbuf2 = 0; isbuf2 < 2; isbuf2++) {
+ for (outres = 0; outres < 3; outres++) {
+ for (res = 0; res < 3; res++) {
+ for (modes = 0; modes < 5; modes++) {
+ if (gen_fasthead()) {
+ gen_fastdraw();
+ } else {
+ gen_null();
+ }
+ gen_tail();
+ }
+ }
+ }
+ }
+ write_funcs_fast("linetoscr_aga_genlock_fast_funcs");
+
closefile();
extern uae_u16 htotal, vtotal, beamcon0, new_beamcon0;
extern uae_u16 bemcon0_hsync_mask, bemcon0_vsync_mask;
-// 100 words give you 1600 horizontal pixels. Should be more than enough for superhires.
-// Extreme overscan superhires needs more.
-// must be divisible by 8
-#ifdef CUSTOM_SIMPLE
-#define MAX_WORDS_PER_LINE 56
-#else
#define MAX_WORDS_PER_LINE 112
-#endif
#ifdef AGA
/* AGA mode color lookup tables */
struct denise_rga
{
- uae_u64 v64;
- uae_u32 v;
+ union {
+ uae_u64 v64;
+ uae_u32 v;
+ };
uae_u16 rga;
uae_u32 line;
uae_u32 flags;
#endif
};
-#define DENISE_RGA_SLOT_TOTAL 512
+#define DENISE_RGA_SLOT_CHUNKS 8
+#define DENISE_RGA_SLOT_CHUNKS_MASK (DENISE_RGA_SLOT_CHUNKS - 1)
+#define DENISE_RGA_SLOT_TOTAL (512 * DENISE_RGA_SLOT_CHUNKS)
#define DENISE_RGA_SLOT_MASK (DENISE_RGA_SLOT_TOTAL - 1)
extern struct denise_rga rga_denise[DENISE_RGA_SLOT_TOTAL];
struct denise_fastsprite
{
- uae_u64 data64[2];
- uae_u32 data[2];
+ union {
+ uae_u64 data64[2];
+ uae_u32 data[2];
+ };
uae_u16 pos, ctl;
bool active;
};
#include "uae/types.h"
-#define SMART_UPDATE 1
-
-#ifdef SUPPORT_PENGUINS
-#undef SMART_UPDATE
-#define SMART_UPDATE 1
-#endif
-
#ifdef AGA
#define MAX_PLANES 8
#else
#endif
return ce->color_regs_ecs[c];
}
-STATIC_INLINE void color_reg_set (struct color_entry *ce, int c, int v)
-{
-#ifdef AGA
- if (aga_mode)
- ce->color_regs_aga[c] = v;
- else
-#endif
- ce->color_regs_ecs[c] = v;
-}
-/* 440 rather than 880, since sprites are always lores. */
-#ifdef UAE_MINI
-#define MAX_PIXELS_PER_LINE 880
-#else
#define MAX_PIXELS_PER_LINE 2304
-#endif
/* Functions in drawing.c. */
extern int coord_native_to_amiga_y (int);
int fetchmode_size, fetchstart_mask;
int ltsidx;
bool vb;
+ uae_u16 strobe;
+ int strobe_pos;
};
extern struct color_entry denise_colors;
void draw_denise_line(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls);
-bool draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);
-bool draw_denise_border_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);
+void draw_denise_line_queue(int gfx_ypos, nln_how how, uae_u32 linecnt, int startpos, int endpos, int total, int skip, int skip2, int dtotal, int calib_start, int calib_len, bool lol, struct linestate *ls);
+void draw_denise_bitplane_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);
+void draw_denise_bitplane_line_fast_queue(int gfx_ypos, enum nln_how how, struct linestate *ls);
+void draw_denise_border_line_fast(int gfx_ypos, enum nln_how how, struct linestate *ls);
+void draw_denise_border_line_fast_queue(int gfx_ypos, enum nln_how how, struct linestate *ls);
bool start_draw_denise(void);
void end_draw_denise(void);
void denise_update_reg(uae_u16 reg, uae_u16 v);
void denise_restore_registers(void);
void denise_set_line(int gfx_ypos);
void denise_mark_last_line(void);
-void denise_handle_quick_strobe(uae_u16 strobe, int offset);
bool denise_is_vb(void);
+void draw_denise_line_queue_flush(void);
+void quick_denise_rga_queue(int linecnt, int startpos, int endpos);
+void denise_handle_quick_strobe_queue(uae_u16 strobe, int strobe_pos, int endpos);
#endif /* UAE_DRAWING_H */
extern void show_screen(int monid, int mode);
extern bool show_screen_maybe(int monid, bool);
-extern int lockscr(struct vidbuffer*, bool, bool, bool);
+extern int lockscr(struct vidbuffer*, bool, bool);
extern void unlockscr(struct vidbuffer*, int, int);
extern bool target_graphics_buffer_update(int monid, bool force);
extern float target_adjust_vblank_hz(int monid, float);
uae_u8 *realbufmem;
uae_u8 *bufmem_allocated;
bool bufmem_lockable;
+ bool locked;
+ bool vram_buffer;
int rowbytes; /* Bytes per row in the memory pointed at by bufmem. */
int pixbytes; /* Bytes per pixel. */
/* size of this buffer */
int inheight2;
/* use drawbuffer instead */
bool nativepositioning;
- /* tempbuffer in use */
- bool tempbufferinuse;
/* extra width, chipset hpos extra in right border */
int extrawidth, extraheight;
* This file was generated by genlinetoscr. Don't edit.
*/
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_n_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_n_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_dpf_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_dpf_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_ehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_ehb_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_ham_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_ham_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_kehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_kehb_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_n_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_n_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_dpf_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_dpf_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_ehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_ehb_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_ham_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_ham_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_aga_kehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_aga_kehb_ishres_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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u32 *colors_aga = (uae_u32*)ls->linecolorstate;
+ uae_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
static LINETOSRC_FUNCF linetoscr_aga_fast_funcs[] = {
--- /dev/null
+/*
+* UAE - The portable Amiga emulator.
+*
+* This file was generated by genlinetoscr. Don't edit.
+*/
+
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_n_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_dpf_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_ehb_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_ham_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_kehb_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_n_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_dpf_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_ehb_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_ham_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_aga_kehb_ishres_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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[2];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[3];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpadds[1];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ if (dpf_lookup_no[c]) {
+ dpval += dblpfofs[bpldualpf2of];
+ }
+ dpval ^= bxor;
+ col = colors_aga[dpval];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ if (c & 0x20) {
+ uae_u32 v = (colors_aga[c & 31] >> 1) & 0x7f7f7f;
+ col = CONVERT_RGB(v);
+ } else {
+ col = colors_aga[c];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ col = decode_ham_pixel_aga_fast(c, planes, bxor, colors_aga);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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_u8 bxor = ls->bplcon4 >> 8;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpadds[0];
+ c ^= bxor;
+ col = colors_aga[c & 31];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static LINETOSRC_FUNCF linetoscr_aga_genlock_fast_funcs[] = {
+ lts_aga_n_ilores_dlores_b1_genlock,
+ lts_aga_dpf_ilores_dlores_b1_genlock,
+ lts_aga_ehb_ilores_dlores_b1_genlock,
+ lts_aga_ham_ilores_dlores_b1_genlock,
+ lts_aga_kehb_ilores_dlores_b1_genlock,
+ lts_aga_n_ihires_dlores_b1_genlock,
+ lts_aga_dpf_ihires_dlores_b1_genlock,
+ lts_aga_ehb_ihires_dlores_b1_genlock,
+ lts_aga_ham_ihires_dlores_b1_genlock,
+ lts_aga_kehb_ihires_dlores_b1_genlock,
+ lts_aga_n_ishres_dlores_b1_genlock,
+ lts_aga_dpf_ishres_dlores_b1_genlock,
+ lts_aga_ehb_ishres_dlores_b1_genlock,
+ lts_aga_ham_ishres_dlores_b1_genlock,
+ lts_aga_kehb_ishres_dlores_b1_genlock,
+ lts_aga_n_ilores_dhires_b1_genlock,
+ lts_aga_dpf_ilores_dhires_b1_genlock,
+ lts_aga_ehb_ilores_dhires_b1_genlock,
+ lts_aga_ham_ilores_dhires_b1_genlock,
+ lts_aga_kehb_ilores_dhires_b1_genlock,
+ lts_aga_n_ihires_dhires_b1_genlock,
+ lts_aga_dpf_ihires_dhires_b1_genlock,
+ lts_aga_ehb_ihires_dhires_b1_genlock,
+ lts_aga_ham_ihires_dhires_b1_genlock,
+ lts_aga_kehb_ihires_dhires_b1_genlock,
+ lts_aga_n_ishres_dhires_b1_genlock,
+ lts_aga_dpf_ishres_dhires_b1_genlock,
+ lts_aga_ehb_ishres_dhires_b1_genlock,
+ lts_aga_ham_ishres_dhires_b1_genlock,
+ lts_aga_kehb_ishres_dhires_b1_genlock,
+ lts_aga_n_ilores_dshres_b1_genlock,
+ lts_aga_dpf_ilores_dshres_b1_genlock,
+ lts_aga_ehb_ilores_dshres_b1_genlock,
+ lts_aga_ham_ilores_dshres_b1_genlock,
+ lts_aga_kehb_ilores_dshres_b1_genlock,
+ lts_aga_n_ihires_dshres_b1_genlock,
+ lts_aga_dpf_ihires_dshres_b1_genlock,
+ lts_aga_ehb_ihires_dshres_b1_genlock,
+ lts_aga_ham_ihires_dshres_b1_genlock,
+ lts_aga_kehb_ihires_dshres_b1_genlock,
+ lts_aga_n_ishres_dshres_b1_genlock,
+ lts_aga_dpf_ishres_dshres_b1_genlock,
+ lts_aga_ehb_ishres_dshres_b1_genlock,
+ lts_aga_ham_ishres_dshres_b1_genlock,
+ lts_aga_kehb_ishres_dshres_b1_genlock,
+ lts_aga_n_ilores_dlores_b2_genlock,
+ lts_aga_dpf_ilores_dlores_b2_genlock,
+ lts_aga_ehb_ilores_dlores_b2_genlock,
+ lts_aga_ham_ilores_dlores_b2_genlock,
+ lts_aga_kehb_ilores_dlores_b2_genlock,
+ lts_aga_n_ihires_dlores_b2_genlock,
+ lts_aga_dpf_ihires_dlores_b2_genlock,
+ lts_aga_ehb_ihires_dlores_b2_genlock,
+ lts_aga_ham_ihires_dlores_b2_genlock,
+ lts_aga_kehb_ihires_dlores_b2_genlock,
+ lts_aga_n_ishres_dlores_b2_genlock,
+ lts_aga_dpf_ishres_dlores_b2_genlock,
+ lts_aga_ehb_ishres_dlores_b2_genlock,
+ lts_aga_ham_ishres_dlores_b2_genlock,
+ lts_aga_kehb_ishres_dlores_b2_genlock,
+ lts_aga_n_ilores_dhires_b2_genlock,
+ lts_aga_dpf_ilores_dhires_b2_genlock,
+ lts_aga_ehb_ilores_dhires_b2_genlock,
+ lts_aga_ham_ilores_dhires_b2_genlock,
+ lts_aga_kehb_ilores_dhires_b2_genlock,
+ lts_aga_n_ihires_dhires_b2_genlock,
+ lts_aga_dpf_ihires_dhires_b2_genlock,
+ lts_aga_ehb_ihires_dhires_b2_genlock,
+ lts_aga_ham_ihires_dhires_b2_genlock,
+ lts_aga_kehb_ihires_dhires_b2_genlock,
+ lts_aga_n_ishres_dhires_b2_genlock,
+ lts_aga_dpf_ishres_dhires_b2_genlock,
+ lts_aga_ehb_ishres_dhires_b2_genlock,
+ lts_aga_ham_ishres_dhires_b2_genlock,
+ lts_aga_kehb_ishres_dhires_b2_genlock,
+ lts_aga_n_ilores_dshres_b2_genlock,
+ lts_aga_dpf_ilores_dshres_b2_genlock,
+ lts_aga_ehb_ilores_dshres_b2_genlock,
+ lts_aga_ham_ilores_dshres_b2_genlock,
+ lts_aga_kehb_ilores_dshres_b2_genlock,
+ lts_aga_n_ihires_dshres_b2_genlock,
+ lts_aga_dpf_ihires_dshres_b2_genlock,
+ lts_aga_ehb_ihires_dshres_b2_genlock,
+ lts_aga_ham_ihires_dshres_b2_genlock,
+ lts_aga_kehb_ihires_dshres_b2_genlock,
+ lts_aga_n_ishres_dshres_b2_genlock,
+ lts_aga_dpf_ishres_dshres_b2_genlock,
+ lts_aga_ehb_ishres_dshres_b2_genlock,
+ lts_aga_ham_ishres_dshres_b2_genlock,
+ lts_aga_kehb_ishres_dshres_b2_genlock,
+ NULL
+};
* This file was generated by genlinetoscr. Don't edit.
*/
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_n_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_n_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_dpf_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_dpf_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_ehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_ehb_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_ham_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_ham_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_kehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_kehb_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
}
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
}
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
}
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
}
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
}
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
}
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_n_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_n_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_dpf_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_dpf_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_ehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_ehb_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_ham_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_ham_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-static void lts_ecs_kehb_ishres_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, uae_u8 bxor, void *colors)
+static void lts_ecs_kehb_ishres_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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
*buf1++ = col;
*buf2++ = col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
{
uae_u8 dpval = dpf_lookup[c];
col = xcolors[colors_ocs[dpval]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
c &= bplehb_mask;
if (c <= 31) {
col = xcolors[colors_ocs[c]];
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = decode_ham_pixel_fast(c, colors_ocs);
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
-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, uae_u8 bxor, void *colors)
+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*)colors;
+ uae_u16 *colors_ocs = (uae_u16*)ls->linecolorstate;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
int cnt = draw_start;
if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
uae_u8 c;
uae_u32 col;
c = *cp;
- cp += 1 << cpadd;
+ cp += cpaddv;
col = xcolors[colors_ocs[c & 31]];
*buf1++ = col;
*buf2++ = col;
}
if (cnt >= bpl1dat_trigger_offset && !bpl) {
- cp += 1 << cpadd;
+ cp += cpaddv;
}
- cnt += 1 << bufadd;
+ cnt += bufaddv;
}
}
static LINETOSRC_FUNCF linetoscr_ecs_fast_funcs[] = {
--- /dev/null
+/*
+* UAE - The portable Amiga emulator.
+*
+* This file was generated by genlinetoscr. Don't edit.
+*/
+
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_n_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_dpf_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_ehb_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_ham_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_kehb_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_n_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_dpf_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_ehb_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_ham_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static void lts_ecs_kehb_ishres_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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ {
+ uae_u8 dpval = dpf_lookup[c];
+ col = xcolors[colors_ocs[dpval]];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ c &= bplehb_mask;
+ if (c <= 31) {
+ col = xcolors[colors_ocs[c]];
+ } else {
+ col = xcolors[(colors_ocs[c - 32] >> 1) & 0x777];
+ }
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = decode_ham_pixel_fast(c, colors_ocs);
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+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;
+ int bufaddv = 1 << bufadd;
+ int cpaddv = 1 << cpadd;
+ uae_u16 gpix = get_genlock_transparency_border_fast(ls->bplcon3);
+ int cnt = draw_start;
+ if (draw_startoffset > cnt && bpl1dat_trigger_offset > cnt) {
+ cnt = draw_startoffset > bpl1dat_trigger_offset ? bpl1dat_trigger_offset : draw_startoffset;
+ if (cnt > hbstop_offset) {
+ cnt = hbstop_offset;
+ }
+ }
+ int end = draw_end;
+ if (end > hbstrt_offset) {
+ end = hbstrt_offset;
+ }
+ if (cnt < draw_startoffset) {
+ int d = (draw_startoffset - cnt) >> bufadd;
+ cp += d << cpadd;
+ cnt = draw_startoffset;
+ }
+ if (cnt < hbstop_offset) {
+ int d = (hbstop_offset - cnt) >> bufadd;
+ buf1 += d << bufadd;
+ buf2 += d << bufadd;
+ cnt = hbstop_offset;
+ }
+ while (cnt < end) {
+ bool bpl = false;
+ if (cnt < bpl1dat_trigger_offset || cnt < hstrt_offset || cnt >= hstop_offset) {
+ *buf1++ = bgcolor;
+ *buf2++ = bgcolor;
+ *gbuf++ = gpix;
+ } else {
+ bpl = true;
+ uae_u8 c;
+ uae_u32 col;
+ c = *cp;
+ cp += cpaddv;
+ col = xcolors[colors_ocs[c & 31]];
+ *buf1++ = col;
+ *buf2++ = col;
+ gpix = get_genlock_transparency_fast(col);
+ *gbuf++ = gpix;
+ }
+ if (cnt >= bpl1dat_trigger_offset && !bpl) {
+ cp += cpaddv;
+ }
+ cnt += bufaddv;
+ }
+}
+static LINETOSRC_FUNCF linetoscr_ecs_genlock_fast_funcs[] = {
+ lts_ecs_n_ilores_dlores_b1_genlock,
+ lts_ecs_dpf_ilores_dlores_b1_genlock,
+ lts_ecs_ehb_ilores_dlores_b1_genlock,
+ lts_ecs_ham_ilores_dlores_b1_genlock,
+ lts_ecs_kehb_ilores_dlores_b1_genlock,
+ lts_ecs_n_ihires_dlores_b1_genlock,
+ lts_ecs_dpf_ihires_dlores_b1_genlock,
+ lts_ecs_ehb_ihires_dlores_b1_genlock,
+ lts_ecs_ham_ihires_dlores_b1_genlock,
+ lts_ecs_kehb_ihires_dlores_b1_genlock,
+ lts_ecs_n_ishres_dlores_b1_genlock,
+ lts_ecs_dpf_ishres_dlores_b1_genlock,
+ lts_ecs_ehb_ishres_dlores_b1_genlock,
+ lts_ecs_ham_ishres_dlores_b1_genlock,
+ lts_ecs_kehb_ishres_dlores_b1_genlock,
+ lts_ecs_n_ilores_dhires_b1_genlock,
+ lts_ecs_dpf_ilores_dhires_b1_genlock,
+ lts_ecs_ehb_ilores_dhires_b1_genlock,
+ lts_ecs_ham_ilores_dhires_b1_genlock,
+ lts_ecs_kehb_ilores_dhires_b1_genlock,
+ lts_ecs_n_ihires_dhires_b1_genlock,
+ lts_ecs_dpf_ihires_dhires_b1_genlock,
+ lts_ecs_ehb_ihires_dhires_b1_genlock,
+ lts_ecs_ham_ihires_dhires_b1_genlock,
+ lts_ecs_kehb_ihires_dhires_b1_genlock,
+ lts_ecs_n_ishres_dhires_b1_genlock,
+ lts_ecs_dpf_ishres_dhires_b1_genlock,
+ lts_ecs_ehb_ishres_dhires_b1_genlock,
+ lts_ecs_ham_ishres_dhires_b1_genlock,
+ lts_ecs_kehb_ishres_dhires_b1_genlock,
+ lts_ecs_n_ilores_dshres_b1_genlock,
+ lts_ecs_dpf_ilores_dshres_b1_genlock,
+ lts_ecs_ehb_ilores_dshres_b1_genlock,
+ lts_ecs_ham_ilores_dshres_b1_genlock,
+ lts_ecs_kehb_ilores_dshres_b1_genlock,
+ lts_ecs_n_ihires_dshres_b1_genlock,
+ lts_ecs_dpf_ihires_dshres_b1_genlock,
+ lts_ecs_ehb_ihires_dshres_b1_genlock,
+ lts_ecs_ham_ihires_dshres_b1_genlock,
+ lts_ecs_kehb_ihires_dshres_b1_genlock,
+ lts_ecs_n_ishres_dshres_b1_genlock,
+ lts_ecs_dpf_ishres_dshres_b1_genlock,
+ lts_ecs_ehb_ishres_dshres_b1_genlock,
+ lts_ecs_ham_ishres_dshres_b1_genlock,
+ lts_ecs_kehb_ishres_dshres_b1_genlock,
+ lts_ecs_n_ilores_dlores_b2_genlock,
+ lts_ecs_dpf_ilores_dlores_b2_genlock,
+ lts_ecs_ehb_ilores_dlores_b2_genlock,
+ lts_ecs_ham_ilores_dlores_b2_genlock,
+ lts_ecs_kehb_ilores_dlores_b2_genlock,
+ lts_ecs_n_ihires_dlores_b2_genlock,
+ lts_ecs_dpf_ihires_dlores_b2_genlock,
+ lts_ecs_ehb_ihires_dlores_b2_genlock,
+ lts_ecs_ham_ihires_dlores_b2_genlock,
+ lts_ecs_kehb_ihires_dlores_b2_genlock,
+ lts_ecs_n_ishres_dlores_b2_genlock,
+ lts_ecs_dpf_ishres_dlores_b2_genlock,
+ lts_ecs_ehb_ishres_dlores_b2_genlock,
+ lts_ecs_ham_ishres_dlores_b2_genlock,
+ lts_ecs_kehb_ishres_dlores_b2_genlock,
+ lts_ecs_n_ilores_dhires_b2_genlock,
+ lts_ecs_dpf_ilores_dhires_b2_genlock,
+ lts_ecs_ehb_ilores_dhires_b2_genlock,
+ lts_ecs_ham_ilores_dhires_b2_genlock,
+ lts_ecs_kehb_ilores_dhires_b2_genlock,
+ lts_ecs_n_ihires_dhires_b2_genlock,
+ lts_ecs_dpf_ihires_dhires_b2_genlock,
+ lts_ecs_ehb_ihires_dhires_b2_genlock,
+ lts_ecs_ham_ihires_dhires_b2_genlock,
+ lts_ecs_kehb_ihires_dhires_b2_genlock,
+ lts_ecs_n_ishres_dhires_b2_genlock,
+ lts_ecs_dpf_ishres_dhires_b2_genlock,
+ lts_ecs_ehb_ishres_dhires_b2_genlock,
+ lts_ecs_ham_ishres_dhires_b2_genlock,
+ lts_ecs_kehb_ishres_dhires_b2_genlock,
+ lts_ecs_n_ilores_dshres_b2_genlock,
+ lts_ecs_dpf_ilores_dshres_b2_genlock,
+ lts_ecs_ehb_ilores_dshres_b2_genlock,
+ lts_ecs_ham_ilores_dshres_b2_genlock,
+ lts_ecs_kehb_ilores_dshres_b2_genlock,
+ lts_ecs_n_ihires_dshres_b2_genlock,
+ lts_ecs_dpf_ihires_dshres_b2_genlock,
+ lts_ecs_ehb_ihires_dshres_b2_genlock,
+ lts_ecs_ham_ihires_dshres_b2_genlock,
+ lts_ecs_kehb_ihires_dshres_b2_genlock,
+ lts_ecs_n_ishres_dshres_b2_genlock,
+ lts_ecs_dpf_ishres_dshres_b2_genlock,
+ lts_ecs_ehb_ishres_dshres_b2_genlock,
+ lts_ecs_ham_ishres_dshres_b2_genlock,
+ lts_ecs_kehb_ishres_dshres_b2_genlock,
+ NULL
+};
unsigned int fpucontrol;
int extraframewait, extraframewait2;
int busywait;
+int multithread_enabled = 1;
static int noNtDelayExecution;
extern FILE *debugfile;
on_screen_keyboard = 1;
return 1;
}
+ if (!_tcscmp(arg, _T("nomt"))) {
+ multithread_enabled = 0;
+ return 1;
+ }
if (!np)
return 0;
uae_u8 r = 0, g = 0, b = 0;
for (y = ystart; y < yend; y++) {
int yoff = (((y * 2 + oddlines) - src->yoffset) >> vdbl);
- if (yoff < 0)
+ int dyoff = (((y * 2 + oddlines) - dst->yoffset) >> vdbl);
+ if (yoff < 0 || dyoff < 0)
continue;
- if (yoff >= src->inheight)
+ if (yoff >= src->inheight || dyoff >= dst->inheight)
continue;
uae_u8 *line = src->bufmem + yoff * src->rowbytes;
- uae_u8 *dstline = dst->bufmem + (((y * 2 + oddlines) - dst->yoffset) >> vdbl) * dst->rowbytes;
+ uae_u8 *dstline = dst->bufmem + dyoff * dst->rowbytes;
uae_u8 line_colorburst = currprefs.gfx_grayscale ? 0 : row_map_color_burst_buffer[yoff];
- for (x = 0; x < src->inwidth; x++) {
+ for (x = 0; x < src->inwidth && x < dst->inwidth; x++) {
uae_u8 *s = line + x * src->pixbytes;
uae_u8 *d = dstline + x * dst->pixbytes;
uae_u8 *s2 = s + src->rowbytes;