#define BLANK_COLOR_EDGE 0x000000
#if 0
-#define DEBUG_TVOVERSCAN_H_GRAYSCALE 0x22
-#define DEBUG_TVOVERSCAN_V_GRAYSCALE 0x44
+#define DEBUG_TVOVERSCAN_H_GRAYSCALE_LEFT 0x22
+#define DEBUG_TVOVERSCAN_H_GRAYSCALE_RIGHT 0x44
+#define DEBUG_TVOVERSCAN_V_GRAYSCALE 0x88
#define DEBUG_LOL_COLOR 0x006600
#else
#define DEBUG_TVOVERSCAN_H_GRAYSCALE_LEFT 0x0
static bool denise_strlong_unalign, strlong_emulation;
static int denise_phbstrt, denise_phbstop, denise_phbstrt_lores, denise_phbstop_lores;
static int linear_denise_vbstrt, linear_denise_vbstop;
-static int linear_denise_hbstrt, linear_denise_hbstop;
static int linear_denise_frame_hbstrt, linear_denise_frame_hbstop;
static int linear_denise_frame_hbstrt_tmp, linear_denise_frame_hbstop_tmp;
static int linear_denise_frame_hbstrt_sel, linear_denise_frame_hbstop_sel;
if (w == 0 || h == 0)
return 0;
-#if 1
+#if 0
if (doublescan <= 0 && programmedmode != 1) {
if ((w >> currprefs.gfx_resolution) < MIN_DISPLAY_W) {
dx += (w - (MIN_DISPLAY_W << currprefs.gfx_resolution)) / 2;
}
do_hb();
hstart_new();
- linear_denise_hbstrt = internal_pixel_cnt;
// hstop was not matched?
if (!diwlastword_total && bpl1dat_trigger_offset >= 0) {
diwlastword_total = internal_pixel_cnt;
delayed_vblank_ecs = 0;
}
do_hb();
- linear_denise_hbstop = internal_pixel_cnt;
}
#ifdef DEBUGGER
if (debug_dma) {
denise_blank_active = denise_blank_enabled ? denise_blank_active2 : false;
}
hstart_new();
- linear_denise_hbstrt = internal_pixel_cnt;
do_exthblankon_aga();
copy_strlong();
denise_sprite_blank_active = denise_blank_active;
}
do_exthblankon_aga();
denise_sprite_blank_active = denise_blank_active;
- linear_denise_hbstop = internal_pixel_cnt;
}
}
}
hstart_new();
do_exthblankon_ecs();
- linear_denise_hbstrt = internal_pixel_cnt;
}
}
static void do_phbstop_ecs(int cnt)
denise_sprite_blank_active = denise_blank_active;
}
do_exthblankon_ecs();
- linear_denise_hbstop = internal_pixel_cnt;
}
}
int hbstrt_offset2 = (hbstrt_offset - internal_pixel_start_cnt) >> rshift;
int hbstop_offset2 = (hbstop_offset - internal_pixel_start_cnt) >> rshift;
uae_u32 *hbstrt_ptr1 = buf1t && hbstrt_offset2 >= 0 ? buf1t + hbstrt_offset2 : NULL;
- uae_u32 *hbstop_ptr1 = buf1t && hbstop_offset2 >= 0 ? buf1t + hbstop_offset2 : NULL;
+ uae_u32 *hbstop_ptr1 = buf1t && hbstop_offset2 >= 0 ? buf1t - hbstop_offset2 : NULL;
uae_u32 *hbstrt_ptr2 = buf2t && hbstrt_offset2 >= 0 ? buf2t + hbstrt_offset2 : NULL;
- uae_u32 *hbstop_ptr2 = buf2t && hbstop_offset2 >= 0 ? buf2t + hbstop_offset2 : NULL;
+ uae_u32 *hbstop_ptr2 = buf2t && hbstop_offset2 >= 0 ? buf2t - hbstop_offset2 : NULL;
// blank last pixel row if normal overscan mode, it might have NTSC artifacts
if (strlong_seen && hbstrt_ptr1) {
int add = 1 << hresolution;
bpl1dat_trigger_offset = -1;
internal_pixel_cnt = 0;
internal_pixel_start_cnt = 0;
- linear_denise_hbstrt = -1;
- linear_denise_hbstop = -1;
buf1t = buf1;
buf2t = buf2;
// detect horizontal blanking
if (!denise_vblank_active) {
- linear_denise_frame_hbstrt = linear_denise_hbstrt;
- linear_denise_frame_hbstop = linear_denise_hbstop;
+ linear_denise_frame_hbstrt = hbstrt_offset;
+ linear_denise_frame_hbstop = hbstop_offset;
//write_log("%d %d\n", linear_denise_frame_hbstrt, linear_denise_frame_hbstop);
if (linear_denise_frame_hbstrt == linear_denise_frame_hbstrt_tmp && linear_denise_frame_hbstop == linear_denise_frame_hbstop_tmp) {
if (hbstrt_offset && ww2 > 0) {
*hbstrt_offset -= ww2;
}
+ int hbstop_left = *hbstop_offset - ls->internal_pixel_start_cnt;
+ if (hbstop_left > 0) {
+ ww1 -= hbstop_left;
+ }
if (hbstop_offset && ww1 > 0) {
*hbstop_offset += ww1;
}