int linear_vpos, linear_vpos_vb_start, linear_vpos_vb_end, linear_hpos, linear_vpos_prev[3], linear_hpos_prev[3];
static int linear_vb_offset;
static int linear_vpos_vsync;
+int vsync_start_offset;
int linear_display_vpos;
int current_linear_vpos, current_linear_hpos;
static int current_linear_hblen, current_linear_hblen_temp;
if (currprefs.cs_hvcsync >= HVSYNC_SYNCPOS) {
vblines = LINES_AFTER_VSYNC;
}
- int maxv = current_linear_vpos - (vblines - display_vblankstart_skip) + display_vblankend_skip + 1;
+ int hiddentopv = (vblines - display_vblankstart_skip);
+ int hiddenbottomv = display_vblankend_skip;
+ int maxv = current_linear_vpos - (hiddentopv + hiddenbottomv) + 1;
linear_vpos_vb_end = current_linear_vpos_vb_end - display_vblankstart_skip - 1;
if (currprefs.gfx_overscanmode >= OVERSCANMODE_ULTRA) {
maxv = current_linear_vpos;
static int calculate_linetype(int vp)
{
- int lineno = vp - (currprefs.cs_hvcsync >= HVSYNC_SYNCPOS ? LINES_AFTER_VSYNC : linear_vb_offset);
+ int off = currprefs.cs_hvcsync >= HVSYNC_SYNCPOS ? LINES_AFTER_VSYNC : linear_vb_offset;
+ int lineno = vp - off;
nextline_how = nln_normal;
if (doflickerfix_active()) {
lineno *= 2;
if (!vb_end_detect) {
vb_detect_cnt++;
if (vb_detect_cnt >= 4) {
- // if VB does not exists
+ // if VB does not exist
linear_vpos_vblank_end = LINES_AFTER_VSYNC;
linear_vpos_vblank_start = linear_vpos;
linear_vpos_vblank_lines = LINES_AFTER_VSYNC;
}
vb_end_detect = false;
linear_vpos = 0;
+
+ int off = currprefs.cs_hvcsync >= HVSYNC_SYNCPOS ? LINES_AFTER_VSYNC : linear_vb_offset;
+ vsync_start_offset = -off;
+
}
}
}
vidinfo->inbuffer->xoffset = visible_left_border << (RES_MAX - currprefs.gfx_resolution);
- vidinfo->inbuffer->yoffset = thisframe_y_adjust << VRES_MAX;
+ vidinfo->inbuffer->yoffset = (-vsync_start_offset) << VRES_MAX;
int linedbl = currprefs.gfx_vresolution;
if (doublescan > 0 && interlace_seen <= 0) {
vb->yoffset = vidinfo->inbuffer->yoffset;
vb->inxoffset = vidinfo->inbuffer->inxoffset;
vb->inyoffset = vidinfo->inbuffer->inyoffset;
+ vb->outwidth = vidinfo->inbuffer->outwidth;
+ vb->outheight = vidinfo->inbuffer->outheight;
}
static void vbcopy(struct vidbuffer *vbout, struct vidbuffer *vbin)
extern int hdisplay_left_border, denisehtotal;
extern int vsync_startline;
extern int video_recording_active;
+extern int vsync_start_offset;
#define AMIGA_WIDTH_MAX (754 / 2)
#define AMIGA_HEIGHT_MAX_PAL (576 / 2)
+/*
+* UAE - The Un*x Amiga Emulator
+*
+* Video port display adapters using digital RGBI signals
+*
+*/
+
+
#include "sysconfig.h"
#include "sysdeps.h"
#include "arcadia.h"
#include "uae/attributes.h"
-// We have this in sysconfig.h
-//#define VIDEOGRAB 1
-
const TCHAR *specialmonitorfriendlynames[] =
{
_T("A2024"),
doff = ((dxoff << RES_MAX) / avidinfo->xchange) * src->pixbytes;
found = false;
- int idlinestart = 21;
+ int idlinestart = 18;
for (idline = idlinestart; idline <= idlinestart + 8; idline += 8) {
if (src->yoffset > (idline << VRES_MAX))
continue;
return false;
}
- srcbuf = src->bufmem + (((44 << VRES_MAX) - src->yoffset) / avidinfo->ychange) * src->rowbytes + (srcxoffset / avidinfo->xchange) * src->pixbytes;
+ int ystart = 82 - src->yoffset;
+ if (ystart < 0) {
+ return false;
+ }
+ srcbuf = src->bufmem + (ystart / avidinfo->ychange) * src->rowbytes + (srcxoffset / avidinfo->xchange) * src->pixbytes;
dstbuf = dst->bufmem + py * (panel_height / avidinfo->ychange) * dst->rowbytes + px * ((panel_width * 2) / avidinfo->xchange) * dst->pixbytes;
for (y = 0; y < (panel_height / (dbl == 1 ? 1 : 2)) / avidinfo->ychange; y++) {