/*
* UAE - The portable Amiga emulator.
*
* This file was generated by genlinetoscr. Don't edit.
*/

static void lts_ecs_fm0_n0_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p6_ilores_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p6_ilores_dlores_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p6_ilores_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 4;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p6_ilores_dlores_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dlores_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dlores_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dlores_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dlores_spr_ntsc_filtered_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dpix_val0 = filter_pixel(dpix_val0, dpix_val1);
				gpix0 = filter_pixel_genlock(gpix0, gpix1);
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p6_ilores_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p6_ilores_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p6_ilores_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			internal_pixel_cnt += 2;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p6_ilores_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p4_ihires_dhires_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dhires_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					dpix_val1 = denise_colors.acolors[pix1];
					gpix1 = get_genlock_transparency(pix1);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix1 = getbpl4();
					clxdat |= bplcoltable[pix1];
					uae_u8 val1 = dpf_lookup[pix1];
					dpix_val1 = denise_colors.acolors[val1];
					gpix1 = get_genlock_transparency(dpf_lookup[pix1]);
				}
				last_bpl_pix = pix1;
			}
			shiftbpl4();
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p4_ihires_dhires_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 2;
			uae_u8 pix1 = 0;
			uae_u8 gpix1 = 0xff;
			uae_u32 dpix_val1 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix1 = get_genlock_transparency_border();
				dpix_val1 = bordercolor;
			}
			internal_pixel_cnt += 2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 2);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dhires_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p6_ilores_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p6_ilores_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					pix0 &= bplehb_mask;
					if (pix0 <= 31) {
						dpix_val0 = denise_colors.acolors[pix0];
					} else {
						dpix_val0 = p_xcolors[(denise_colors.color_regs_ecs[pix0 - 32] >> 1) & 0x777];
					}
					gpix0 = get_genlock_transparency(pix0 & 31);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p6_ilores_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl6();
					clxdat |= bplcoltable[pix0];
					if (decode_specials) {
						pix0 = decode_denise_specials(pix0);
					}
					dpix_val0 = decode_ham_pixel(pix0);
					gpix0 = get_genlock_transparency(pix0 & 15);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl6();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val2 = dpix_val1;
			uae_u8 pix2 = pix1;
			uae_u8 gpix2 = gpix1;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

						dpix_val1 = dpix_val0;
						dpix_val2 = dpix_val0;
						dpix_val3 = dpix_val0;
					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 15) == bplcon1_shift[0]) { 
				copybpl6e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 15) == bplcon1_shift[1]) {
				copybpl6o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p6_ilores_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					dpix_val2 = denise_colors.acolors[pix2];
					gpix2 = get_genlock_transparency(pix2);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					dpix_val2 = denise_colors.acolors[pix2];
					gpix2 = get_genlock_transparency(pix2);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					uae_u8 val2 = dpf_lookup[pix2];
					dpix_val2 = denise_colors.acolors[val2];
					gpix2 = get_genlock_transparency(dpf_lookup[pix2]);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					uae_u8 val2 = dpf_lookup[pix2];
					dpix_val2 = denise_colors.acolors[val2];
					gpix2 = get_genlock_transparency(dpf_lookup[pix2]);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p4_ihires_dshres_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dshres_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n0_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					dpix_val2 = denise_colors.acolors[pix2];
					gpix2 = get_genlock_transparency(pix2);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				uae_u32 sv2 = sv0;
				if (sv2) {
					uae_u32 spix2 = denise_render_sprites2(pix2, sv2);
					if (spix2) {
						dpix_val2 = denise_colors.acolors[spix2];
						gpix2 = get_genlock_transparency(spix2);

					}
				}
				uae_u32 sv3 = sv0;
				if (sv3) {
					uae_u32 spix3 = denise_render_sprites2(pix3, sv3);
					if (spix3) {
						dpix_val3 = denise_colors.acolors[spix3];
						gpix3 = get_genlock_transparency(spix3);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n0_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_n1_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					dpix_val0 = denise_colors.acolors[pix0];
					gpix0 = get_genlock_transparency(pix0);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					dpix_val2 = denise_colors.acolors[pix2];
					gpix2 = get_genlock_transparency(pix2);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				uae_u32 sv2 = sv0;
				if (sv2) {
					uae_u32 spix2 = denise_render_sprites2(pix2, sv2);
					if (spix2) {
						dpix_val2 = denise_colors.acolors[spix2];
						gpix2 = get_genlock_transparency(spix2);

					}
				}
				uae_u32 sv3 = sv0;
				if (sv3) {
					uae_u32 spix3 = denise_render_sprites2(pix3, sv3);
					if (spix3) {
						dpix_val3 = denise_colors.acolors[spix3];
						gpix3 = get_genlock_transparency(spix3);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_n1_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf0_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					uae_u8 val2 = dpf_lookup[pix2];
					dpix_val2 = denise_colors.acolors[val2];
					gpix2 = get_genlock_transparency(dpf_lookup[pix2]);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				uae_u32 sv2 = sv0;
				if (sv2) {
					uae_u32 spix2 = denise_render_sprites2(pix2, sv2);
					if (spix2) {
						dpix_val2 = denise_colors.acolors[spix2];
						gpix2 = get_genlock_transparency(spix2);

					}
				}
				uae_u32 sv3 = sv0;
				if (sv3) {
					uae_u32 spix3 = denise_render_sprites2(pix3, sv3);
					if (spix3) {
						dpix_val3 = denise_colors.acolors[spix3];
						gpix3 = get_genlock_transparency(spix3);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf0_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_dpf1_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			matchsprites(cnt + 0);
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix0 = getbpl4();
					clxdat |= bplcoltable[pix0];
					uae_u8 val0 = dpf_lookup[pix0];
					dpix_val0 = denise_colors.acolors[val0];
					gpix0 = get_genlock_transparency(dpf_lookup[pix0]);
				}
				last_bpl_pix = pix0;
			}
			shiftbpl4();
			uae_u32 sv0 = 0;
			sprite_pixdata = 0;
			if (denise_spr_nr_armeds) {
				uae_u32 svt;
				svt = denise_render_sprites_lores();
				if (!denise_sprite_blank_active) {
					sprite_pixdata = svt;
					if (!sprites_hidden) {
						sv0 = svt;
					}
				}
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
				if (denise_hdiw && bpl1dat_trigger && !diw_disable) {
					pix2 = getbpl4();
					clxdat |= bplcoltable[pix2];
					uae_u8 val2 = dpf_lookup[pix2];
					dpix_val2 = denise_colors.acolors[val2];
					gpix2 = get_genlock_transparency(dpf_lookup[pix2]);
				}
				last_bpl_pix = pix2;
			}
			shiftbpl4();
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				if (sv0) {
					uae_u32 spix0 = denise_render_sprites2(pix0, sv0);
					if (spix0) {
						dpix_val0 = denise_colors.acolors[spix0];
						gpix0 = get_genlock_transparency(spix0);

					}
				}
				uae_u32 sv1 = sv0;
				if (sv1) {
					uae_u32 spix1 = denise_render_sprites2(pix1, sv1);
					if (spix1) {
						dpix_val1 = denise_colors.acolors[spix1];
						gpix1 = get_genlock_transparency(spix1);

					}
				}
				uae_u32 sv2 = sv0;
				if (sv2) {
					uae_u32 spix2 = denise_render_sprites2(pix2, sv2);
					if (spix2) {
						dpix_val2 = denise_colors.acolors[spix2];
						gpix2 = get_genlock_transparency(spix2);

					}
				}
				uae_u32 sv3 = sv0;
				if (sv3) {
					uae_u32 spix3 = denise_render_sprites2(pix3, sv3);
					if (spix3) {
						dpix_val3 = denise_colors.acolors[spix3];
						gpix3 = get_genlock_transparency(spix3);

					}
				}
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			if (bpldat_copy[0] && (denise_hcounter_cmp & 7) == bplcon1_shift[0]) { 
				copybpl4e();
			}
			if (bpldat_copy[1] && (denise_hcounter_cmp & 7) == bplcon1_shift[1]) {
				copybpl4o();
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_dpf1_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb0_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb0_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ehb1_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ehb1_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham0_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham0_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static void lts_ecs_fm0_ham1_p4_ihires_dshres_spr_ntsc_genlock(void)
{
	while (denise_cck < denise_endcycle) {
		do_denise_cck(denise_linecnt, denise_startpos, denise_cck);
		if (lts_changed) return;
		for (int h = 0; h < 2; h++) {
			if (h) {
				denise_hcounter_next = denise_hcounter_new;
			}
			int cnt = denise_hcounter << 2;
			if (checkhorizontal1_ecs(denise_hcounter, denise_hcounter_next, h)) continue;
			uae_u8 pix0 = 0;
			uae_u8 gpix0 = 0xff;
			uae_u32 dpix_val0 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix0 = get_genlock_transparency_border();
				dpix_val0 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u8 pix2 = 0;
			uae_u8 gpix2 = 0xff;
			uae_u32 dpix_val2 = BLANK_COLOR;
			if (!denise_blank_active) {
				gpix2 = get_genlock_transparency_border();
				dpix_val2 = bordercolor;
			}
			internal_pixel_cnt += 1;
			internal_pixel_cnt += 1;
			uae_u32 dpix_val1 = dpix_val0;
			uae_u8 pix1 = pix0;
			uae_u8 gpix1 = gpix0;
			uae_u32 dpix_val3 = dpix_val2;
			uae_u8 pix3 = pix2;
			uae_u8 gpix3 = gpix2;
			if (denise_pixtotal >= 0 && denise_pixtotal < denise_pixtotal_max) {
				dtbuf[h][0] = dpix_val0;
				dtgbuf[h][0] = gpix0;
				dtbuf[h][1] = dpix_val1;
				dtgbuf[h][1] = gpix1;
				dtbuf[h][2] = dpix_val2;
				dtgbuf[h][2] = gpix2;
				dtbuf[h][3] = dpix_val3;
				dtgbuf[h][3] = gpix3;
				uae_u32 t0 = 0;
				if (!extblank) {
					t0 = dtbuf[h ^ lol][0]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t0 = decode_denise_specials_debug(t0, cnt + 0);
				}
				#endif
				*buf1++ = t0;
				*buf2++ = t0;
				*gbuf++ = dtgbuf[h ^ lol][0];
				uae_u32 t1 = 0;
				if (!extblank) {
					t1 = dtbuf[h ^ lol][1]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t1 = decode_denise_specials_debug(t1, cnt + 1);
				}
				#endif
				*buf1++ = t1;
				*buf2++ = t1;
				*gbuf++ = dtgbuf[h ^ lol][1];
				uae_u32 t2 = 0;
				if (!extblank) {
					t2 = dtbuf[h ^ lol][2]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t2 = decode_denise_specials_debug(t2, cnt + 2);
				}
				#endif
				*buf1++ = t2;
				*buf2++ = t2;
				*gbuf++ = dtgbuf[h ^ lol][2];
				uae_u32 t3 = 0;
				if (!extblank) {
					t3 = dtbuf[h ^ lol][3]; 
				}
				#ifdef DEBUGGER
				if (decode_specials_debug) {
					t3 = decode_denise_specials_debug(t3, cnt + 3);
				}
				#endif
				*buf1++ = t3;
				*buf2++ = t3;
				*gbuf++ = dtgbuf[h ^ lol][3];
			}
			sprites_hidden = sprites_hidden2;
			#ifdef DEBUGGER
			*debug_dma_dhpos_odd = denise_hcounter;
			#endif
			denise_hcounter_cmp++;
			denise_hcounter_cmp &= 511;
			denise_hcounter++;
			denise_hcounter &= 511;
			denise_hcounter_next++;
			denise_hcounter_next &= 511;
			denise_pixtotal++;
		}
		if (denise_pixtotal == 0) {
			internal_pixel_start_cnt = internal_pixel_cnt;
		}
		denise_hcounter = denise_hcounter_new;
		if (denise_accurate_mode) {
			denise_hcounter_cmp = denise_hcounter_new;
		}
		denise_cck++;
	}
}
static void lts_ecs_fm0_ham1_p4_ihires_dshres_spr_ntsc_filtered_genlock(void)
{
	lts_null();
}
static LINETOSRC_FUNC linetoscr_ecs_ntsc_genlock_funcs[] = {
	lts_ecs_fm0_n0_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_n1_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_dpf0_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_dpf1_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_ehb0_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_ehb1_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_ham0_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_ham1_p6_ilores_dlores_ntsc_genlock,
	lts_ecs_fm0_n0_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_n1_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_dpf0_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_dpf1_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ehb0_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ehb1_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ham0_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ham1_p6_ilores_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_n0_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_n1_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dlores_ntsc_genlock,
	lts_ecs_fm0_n0_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_n1_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dlores_spr_ntsc_genlock,
	lts_ecs_fm0_n0_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_n1_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_dpf0_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_dpf1_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_ehb0_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_ehb1_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_ham0_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_ham1_p6_ilores_dhires_ntsc_genlock,
	lts_ecs_fm0_n0_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_n1_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_dpf0_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_dpf1_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ehb0_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ehb1_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ham0_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ham1_p6_ilores_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_n0_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_n1_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dhires_ntsc_genlock,
	lts_ecs_fm0_n0_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_n1_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dhires_spr_ntsc_genlock,
	lts_ecs_fm0_n0_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_n1_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_dpf0_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_dpf1_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_ehb0_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_ehb1_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_ham0_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_ham1_p6_ilores_dshres_ntsc_genlock,
	lts_ecs_fm0_n0_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_n1_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_dpf0_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_dpf1_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ehb0_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ehb1_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ham0_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ham1_p6_ilores_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_n0_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_n1_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dshres_ntsc_genlock,
	lts_ecs_fm0_n0_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_n1_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dshres_spr_ntsc_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dshres_spr_ntsc_genlock,
	NULL
};
static LINETOSRC_FUNC linetoscr_ecs_ntsc_genlock_funcs_filtered[] = {
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	lts_ecs_fm0_n0_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_n1_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dlores_ntsc_filtered_genlock,
	lts_ecs_fm0_n0_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_n1_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_dpf0_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_dpf1_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_ehb0_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_ehb1_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_ham0_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	lts_ecs_fm0_ham1_p4_ihires_dlores_spr_ntsc_filtered_genlock,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL
};
