int maxvpos = MAXVPOS_PAL;
int maxvpos_nom = MAXVPOS_PAL; // nominal value (same as maxvpos but "faked" maxvpos in fake 60hz modes)
int maxvpos_display = MAXVPOS_PAL; // value used for display size
-static int maxhpos_display = AMIGA_WIDTH_MAX;
+int maxhpos_display = AMIGA_WIDTH_MAX;
int maxvpos_display_vsync; // extra lines from top visible in bottom
static int vblank_extraline;
static int maxhposm1;
autoscale_bordercolors = 0;
}
-static void hautoscale_check(void)
+static void hautoscale_check(int vp)
{
+ int vp_start = vp;
+ int vp_end = vp + 1;
// border detection/autoscale
if (GET_PLANES(bplcon0) > 0 && dmaen(DMA_BITPLANE) && !vb_state && !vb_end_line && !vb_start_line) {
if (first_bplcon0 == 0) {
first_bplcon0 = bplcon0;
}
- if (vpos > last_planes_vpos) {
- last_planes_vpos = vpos;
+ if (vp_end > last_planes_vpos) {
+ last_planes_vpos = vp_end;
}
- if (vpos >= minfirstline && first_planes_vpos == 0) {
- first_planes_vpos = vpos;
- } else if (vpos >= current_maxvpos() - 1) {
+ if (vp_start >= minfirstline && first_planes_vpos == 0) {
+ first_planes_vpos = vp_start;
+ } else if (vp_end >= current_maxvpos() - 1) {
last_planes_vpos = current_maxvpos();
}
}
if (diw_change == 0) {
- if (vpos >= first_planes_vpos && vpos <= last_planes_vpos) {
+ if (vp_start >= first_planes_vpos && vp_end <= last_planes_vpos) {
int diwlastword_lores = diwlastword;
int diwfirstword_lores = diwfirstword;
if (diwlastword_lores > diwlastword_total) {
ddflastword_total = plfstop + 2 * f;
}
}
- if ((plffirstline < plffirstline_total || (plffirstline_total == minfirstline && vpos > minfirstline)) && plffirstline < maxvpos / 2) {
+ if ((plffirstline < plffirstline_total || (plffirstline_total == minfirstline && vp_start > minfirstline)) && plffirstline < maxvpos / 2) {
firstword_bplcon1 = bplcon1;
if (plffirstline < minfirstline) {
plffirstline_total = minfirstline;
notice_resolution_seen(GET_RES_AGNUS(bplcon0), interlace_seen != 0);
- hautoscale_check();
+ hautoscale_check(vposh);
int lineno = calculate_lineno(vposh);
next_lineno = lineno;
}
vposh++;
+
hpos_hsync_extra = 0;
estimate_last_fetch_cycle(hpos);
#define OCS_DENISE_HBLANK_DISABLE_HPOS 0x2d
extern int maxhpos, maxhposm0, maxhpos_short;
-extern int maxvpos, maxvpos_nom, maxvpos_display, maxvpos_display_vsync;
+extern int maxvpos, maxvpos_nom, maxvpos_display, maxvpos_display_vsync, maxhpos_display;
extern int hsyncstartpos_hw, hsyncendpos_hw;
extern int minfirstline, vblank_endline, numscrlines;
extern float vblank_hz, fake_vblank_hz;
if (programmedmode && native) {
cw = avidinfo->outbuffer->outwidth << (RES_MAX - currprefs.gfx_resolution);
} else {
- cw = native ? AMIGA_WIDTH_MAX << RES_MAX : avidinfo->outbuffer->outwidth;
+ if (currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN) {
+ // keep old version compatibility
+ cw = native ? AMIGA_WIDTH_MAX << RES_MAX : avidinfo->outbuffer->outwidth;
+ } else {
+ cw = native ? maxhpos_display << RES_MAX : avidinfo->outbuffer->outwidth;
+ }
}
} else {
cw = v;
if (v <= 0) {
if (programmedmode && native) {
ch = avidinfo->outbuffer->outheight << (VRES_MAX - currprefs.gfx_vresolution);
- } else {
+ } else if (currprefs.gfx_overscanmode <= OVERSCANMODE_OVERSCAN) {
+ // keep old version compatiblity
ch = native ? AMIGA_HEIGHT_MAX << VRES_MAX : avidinfo->outbuffer->outheight;
+ } else {
+ ch = native ? (maxvpos_display + maxvpos_display_vsync - minfirstline) << VRES_MAX : avidinfo->outbuffer->outheight;
}
} else {
ch = v;