static int not_safe_mode;
static bool dmal_next;
-#define MAX_SCANDOUBLED_LINES 1000
-static uae_u32 scandoubled_bpl_ptr[MAX_SCANDOUBLED_LINES][8][2];
+#define MAX_SCANDOUBLED_LINES 1200
+static uae_u32 scandoubled_bpl_ptr[MAX_SCANDOUBLED_LINES][2][MAX_PLANES];
static evt_t blitter_dma_change_cycle, copper_dma_change_cycle, sprite_dma_change_cycle_on, sprite_dma_change_cycle_off;
ddf_enable_on = 1;
if (currprefs.gfx_scandoubler && vpos < MAX_SCANDOUBLED_LINES) {
for (int i = 0; i < MAX_PLANES; i++) {
- scandoubled_bpl_ptr[vpos][i][lof_store] = bplpt[i];
+ scandoubled_bpl_ptr[vpos][lof_store][i] = bplpt[i];
}
}
}
ddfstrt_match = true;
if (currprefs.gfx_scandoubler && vpos < MAX_SCANDOUBLED_LINES) {
for (int i = 0; i < MAX_PLANES; i++) {
- scandoubled_bpl_ptr[vpos][i][lof_store] = bplpt[i];
+ scandoubled_bpl_ptr[vpos][lof_store][i] = bplpt[i];
}
}
} else {
if (rd->rga >= 0x110 && rd->rga < 0x120) {
int plane = (rd->rga - 0x110) / 2;
if (vp < MAX_SCANDOUBLED_LINES) {
- uaecptr l1 = scandoubled_bpl_ptr[vp][plane][l];
- uaecptr l2 = scandoubled_bpl_ptr[vp][plane][l ^ 1];
+ uaecptr l1 = scandoubled_bpl_ptr[vp][l][plane];
+ uaecptr l2 = scandoubled_bpl_ptr[vp][l ^ 1][plane];
rga.pv = rd->pt - l1 + l2;
if (fetchmode_fmode_bpl == 3) {
rd->v64 = fetch64(&rga);
do_scandouble();
denise_restore_registers();
lof_display ^= 1;
+ scandoubled_line = 1;
draw_line(linear_hpos);
+ scandoubled_line = 0;
lof_display ^= 1;
} else {
draw_line(linear_hpos);
#define AUTOSCALE_SPRITES 1
#define LOL_SHIFT_COLORS 0
+int scandoubled_line;
+
struct amigadisplay adisplays[MAX_AMIGADISPLAYS];
typedef enum
}
static uae_u16 s_bplcon0, s_bplcon1, s_bplcon2, s_bplcon3, s_bplcon4, s_fmode;
+static int denise_hcounter_s;
void denise_store_registers(void)
{
+ denise_hcounter_s = denise_hcounter;
s_bplcon0 = bplcon0_denise;
s_bplcon1 = bplcon1_denise;
s_bplcon2 = bplcon2_denise;
}
void denise_restore_registers(void)
{
+ denise_hcounter = denise_hcounter_s;
expand_bplcon0(s_bplcon0);
expand_bplcon1(s_bplcon1);
expand_bplcon2(s_bplcon2);
}
// clear lines if mode height is now smaller than previously
- if (gfx_ypos >= 0 && gfx_ypos < prevline) {
+ if (gfx_ypos >= 0 && gfx_ypos < prevline && !scandoubled_line) {
struct vidbuf_description *vidinfo = &adisplays[0].gfxvidinfo;
struct vidbuffer *vb = &vidinfo->drawbuffer;
if (prevline > vb->inheight) {
get_line(gfx_ypos, how);
hbstrt_ptr1 = NULL;
-
if (denise_pixtotal_max == -0x7fffffff || ((linear_vpos >= denise_vblank_extra_vbstop || linear_vpos < denise_vblank_extra_vbstrt) && currprefs.gfx_overscanmode < OVERSCANMODE_ULTRA)) {
// don't draw vertical blanking if not ultra extreme overscan