static const TCHAR *unmapped[] = { _T("floating"), _T("zero"), _T("one"), 0 };
static const TCHAR *ciatype[] = { _T("default"), _T("391078-01"), 0 };
static const TCHAR *debugfeatures[] = { _T("segtracker"), _T("fsdebug"), 0 };
-static const TCHAR *hvcsync[] = { _T("hvcsync"), _T("csync"), _T("hvsync"), 0 };
+static const TCHAR *hvcsync[] = { _T("hvcsync"), _T("csync"), _T("hvsync"), _T("hvcsync_s"), _T("csync_s"), _T("hvsync_s"), 0 };
static const TCHAR *eclocksync[] = { _T("default"), _T("68000"), _T("Gayle"), _T("68000_opt"), 0 };
static const TCHAR *agnusmodel[] = { _T("default"), _T("velvet"), _T("a1000"), _T("ocs"), _T("ecs"), _T("aga"), 0 };
static const TCHAR *agnussize[] = { _T("default"), _T("512k"), _T("1m"), _T("2m"), 0 };
p->cs_ciatodbug = false;
p->cs_unmapped_space = 0;
p->cs_color_burst = false;
- p->cs_hvcsync = false;
+ p->cs_hvcsync = 0;
p->cs_ciatype[0] = 0;
p->cs_ciatype[1] = 0;
p->cs_memorypatternfill = true;
if (currprefs.gfx_extraheight > 0) {
vb->extraheight = currprefs.gfx_extraheight << vres2;
}
- if (currprefs.gfx_overscanmode >= OVERSCANMODE_EXTREME) {
- vb->extrawidth = -1;
+ int vblines = current_linear_vblank_lines;
+ if (currprefs.cs_hvcsync >= HVSYNC_SYNCPOS) {
+ vblines = LINES_AFTER_VSYNC;
}
- int maxv = current_linear_vpos - (current_linear_vblank_lines - display_vblankstart_skip) + display_vblankend_skip + 1;
+ int maxv = current_linear_vpos - (vblines - display_vblankstart_skip) + display_vblankend_skip + 1;
linear_vpos_vb_end = current_linear_vpos_vb_end - display_vblankstart_skip - 1;
if (currprefs.gfx_overscanmode >= OVERSCANMODE_ULTRA) {
maxv = current_linear_vpos;
}
beamcon0_pal = !isntsc;
- if (currprefs.cs_hvcsync == 0) {
+ if (currprefs.cs_hvcsync == HVSYNC_COMBINED || currprefs.cs_hvcsync == HVSYNC_COMBINED_SYNC) {
bemcon0_hsync_mask = BEAMCON0_VARHSYEN | BEAMCON0_VARCSYEN;
bemcon0_vsync_mask = BEAMCON0_VARVSYEN | BEAMCON0_VARCSYEN;
- } else if (currprefs.cs_hvcsync == 1) {
+ } else if (currprefs.cs_hvcsync == HVSYNC_CSYNC || currprefs.cs_hvcsync == HVSYNC_CSYNC_SYNC) {
bemcon0_hsync_mask = BEAMCON0_VARCSYEN;
bemcon0_vsync_mask = BEAMCON0_VARCSYEN;
} else {
maxvpos_nom = maxvpos;
maxvpos_display = vsync_lines;
- // get hblank start and end (relative to HSYNC start)
- int hbs = 0, hbe = 0, hblen = 0, total = 0;
- denise_get_hboffsets(&hbs, &hbe, &hblen, &total);
- // convert to lores pixels
- hblen /= 4;
- hbs /= 4;
- hbe /= 4;
- total /= 4;
+ int hbs = -1, hbe = -1, hblen = 0, total = 0;
+ if (currprefs.cs_hvcsync < HVSYNC_SYNCPOS && currprefs.gfx_overscanmode < OVERSCANMODE_EXTREME) {
+ // get hblank start and end (relative to HSYNC start)
+ denise_get_hboffsets(&hbs, &hbe, &hblen, &total);
+ // convert to lores pixels
+ hblen /= 4;
+ hbs /= 4;
+ hbe /= 4;
+ total /= 4;
+ }
int hsylen = current_agnus_hslen_cck;
hsylen += CCKS_AFTER_HSYNC;
hsylen *= 2;
} else {
maxvpos_display--;
}
- } else if (currprefs.gfx_overscanmode == OVERSCANMODE_EXTREME) {
- int ev = 42;
- int l = 0;
- if (hbe > ev) {
- l = hbe - ev;
- hbe = ev;
- hblen -= l;
- }
- maxhpos_display = hsync_ccks * 2 - hblen;
- hbs += 6 * 2;
- display_hstart_cyclewait_start = hbe / 2;
- display_hstart_cyclewait_end = -hbs / 2;
} else if (currprefs.gfx_overscanmode == OVERSCANMODE_BROADCAST) {
maxhpos_display += 7;
} else if (currprefs.gfx_overscanmode >= OVERSCANMODE_ULTRA) {
minfirstline = 0;
}
- minfirstline_linear = linear_vpos_vblank_end;
+ int vbstart = linear_vpos_vblank_end;
+ if (currprefs.cs_hvcsync >= HVSYNC_SYNCPOS) {
+ vbstart = LINES_AFTER_VSYNC;
+ minfirstline = vbstart;
+ }
+
+ minfirstline_linear = vbstart;
maxvpos_display_vsync = 0;
display_vblankstart_skip = 0;
display_vblankend_skip = 0;
} else if (currprefs.gfx_overscanmode == OVERSCANMODE_EXTREME) {
minfirstline_linear -= EXTRAHEIGHT_EXTREME / 2;
minfirstline -= EXTRAHEIGHT_EXTREME / 2;
- display_vblankstart_skip = linear_vpos_vblank_end;
+ display_vblankstart_skip = vbstart;
display_vblankend_skip = 3;
maxvpos_display_vsync += 2;
} else if (currprefs.gfx_overscanmode == OVERSCANMODE_BROADCAST) {
static int calculate_linetype(int vp)
{
- int lineno = vp - linear_vb_offset;
+ int lineno = vp - (currprefs.cs_hvcsync >= HVSYNC_SYNCPOS ? LINES_AFTER_VSYNC : linear_vb_offset);
nextline_how = nln_normal;
if (doflickerfix_active()) {
lineno *= 2;
nosignal_trigger = true;
}
// Inverted CSYNC
- if ((beamcon0 & BEAMCON0_CSYTRUE) && currprefs.cs_hvcsync == 1) {
+ if ((beamcon0 & BEAMCON0_CSYTRUE) && (currprefs.cs_hvcsync == HVSYNC_CSYNC || currprefs.cs_hvcsync == HVSYNC_CSYNC_SYNC)) {
nosignal_trigger = true;
}
// BLANKEN set: horizontal blanking is merged with CSYNC
- if ((beamcon0 & BEAMCON0_BLANKEN) && currprefs.cs_hvcsync == 1) {
+ if ((beamcon0 & BEAMCON0_BLANKEN) && (currprefs.cs_hvcsync == HVSYNC_CSYNC || currprefs.cs_hvcsync == HVSYNC_CSYNC_SYNC)) {
nosignal_trigger = true;
}
- if ((beamcon0 & BEAMCON0_CSCBEN) && currprefs.cs_hvcsync == 2) {
+ if ((beamcon0 & BEAMCON0_CSCBEN) && (currprefs.cs_hvcsync == HVSYNC_HVSYNC || currprefs.cs_hvcsync == HVSYNC_HVSYNC_SYNC)) {
nosignal_trigger = true;
}
if (beamcon0 & BEAMCON0_VARBEAMEN) {
}
// CSY output is invalid (no vsync part included) if HTOTAL is too small + hardwired CSYNC.
int csyh = (beamcon0 & 0x20) ? 0x8c : 0x8d;
- if (htotal < csyh && !(beamcon0 & BEAMCON0_VARCSYEN) && currprefs.cs_hvcsync == 1) {
+ if (htotal < csyh && !(beamcon0 & BEAMCON0_VARCSYEN) && (currprefs.cs_hvcsync == HVSYNC_CSYNC || currprefs.cs_hvcsync == HVSYNC_CSYNC_SYNC)) {
nosignal_trigger = true;
}
}
inputdevice_read_msg(true);
vsync_display_render();
vsync_display_rendered = false;
- if (currprefs.cs_hvcsync == 0) {
+ if ((currprefs.cs_hvcsync == HVSYNC_COMBINED || currprefs.cs_hvcsync == HVSYNC_COMBINED_SYNC)) {
if (beamcon0 & (BEAMCON0_VARVSYEN | BEAMCON0_VARCSYEN)) {
lof_display = lof_pdetect;
} else {
lof_display = lof_detect;
}
- } else if (currprefs.cs_hvcsync == 1) {
+ } else if (currprefs.cs_hvcsync == HVSYNC_CSYNC || currprefs.cs_hvcsync == HVSYNC_CSYNC_SYNC) {
if (beamcon0 & BEAMCON0_VARCSYEN) {
lof_display = lof_pdetect;
} else {
lof_display = lof_detect;
}
- } else if (currprefs.cs_hvcsync == 2) {
+ } else if (currprefs.cs_hvcsync == HVSYNC_HVSYNC || currprefs.cs_hvcsync == HVSYNC_HVSYNC_SYNC) {
if (beamcon0 & BEAMCON0_VARVSYEN) {
lof_display = lof_pdetect;
} else {
#define DISPLAY_OPTIMIZATIONS_PARTIAL 1
#define DISPLAY_OPTIMIZATIONS_NONE 2
+#define HVSYNC_COMBINED 0
+#define HVSYNC_CSYNC 1
+#define HVSYNC_HVSYNC 2
+#define HVSYNC_SYNCPOS 3
+#define HVSYNC_COMBINED_SYNC 3
+#define HVSYNC_CSYNC_SYNC 4
+#define HVSYNC_HVSYNC_SYNC 5
+
struct uae_prefs {
struct strlist *all_lines;
#define IDS_DISPLAY_OPTIMIZATION_NONE 450
#define IDS_KEYBOARD_DISCONNECTED 451
#define IDS_KEYBOARD_HIGHLEVEL 452
+#define IDS_SYNCMODE_COMBINED2 453
+#define IDS_SYNCMODE_CSYNC2 454
+#define IDS_SYNCMODE_HVSYNC2 455
#define IDS_QS_MODELS 1000
#define IDS_QS_MODEL_A500 1001
#define IDS_QS_MODEL_A500P 1002
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,23,150,10
CONTROL "Wait for Blitter [] Compatibility hack for programs that don't wait for the blitter correctly, causing graphics corruption if CPU is too fast.",IDC_BLITWAIT,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,35,150,10
- LTEXT "Monitor sync source:",IDC_STATIC,242,96,101,9
+ LTEXT "Monitor sync / positioning mode:",IDC_STATIC,242,96,101,9
COMBOBOX IDC_CS_HVCSYNC,237,108,147,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Video port display hardware:",IDC_STATIC,241,123,117,15,SS_CENTERIMAGE
COMBOBOX IDC_MONITOREMU,237,141,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
IDS_SCREEN_NATIVELACE "Native (Interlaced)"
IDS_PORT_AUTOFIRE_TOGGLENOAF "No autofire (toggle)"
IDS_DEFAULT_WINUAECUSTOM "Custom"
- IDS_SYNCMODE_COMBINED "Combined"
- IDS_SYNCMODE_CSYNC "Composite Sync"
- IDS_SYNCMODE_HVSYNC "H/V Sync"
+ IDS_SYNCMODE_COMBINED "Combined + Blanking"
+ IDS_SYNCMODE_CSYNC "Composite Sync + Blanking"
+ IDS_SYNCMODE_HVSYNC "H/V Sync + Blanking"
+ IDS_SYNCMODE_COMBINED2 "Combined + Sync"
+ IDS_SYNCMODE_CSYNC2 "Composite Sync + Sync"
+ IDS_SYNCMODE_HVSYNC2 "H/V Sync + Sync"
IDS_MEMINFO "Configured 32-bit address space: %dM, reserved: %dM, Z3 available: %dM (UAE), %dM (Real)"
IDS_INPUTINVERT "Invert"
IDS_BOARDTYPE "Type"
}
} else {
-skipcont:
+
int cw = avidinfo->drawbuffer.inwidth;
int ch = avidinfo->drawbuffer.inheight;
set_custom_limits(cw, ch, 0, 0, true);
xSendDlgItemMessage(hDlg, IDC_CS_HVCSYNC, CB_ADDSTRING, 0, (LPARAM)buffer);
WIN32GUI_LoadUIString(IDS_SYNCMODE_HVSYNC, buffer, sizeof buffer / sizeof(TCHAR));
xSendDlgItemMessage(hDlg, IDC_CS_HVCSYNC, CB_ADDSTRING, 0, (LPARAM)buffer);
+ WIN32GUI_LoadUIString(IDS_SYNCMODE_COMBINED2, buffer, sizeof buffer / sizeof(TCHAR));
+ xSendDlgItemMessage(hDlg, IDC_CS_HVCSYNC, CB_ADDSTRING, 0, (LPARAM)buffer);
+ WIN32GUI_LoadUIString(IDS_SYNCMODE_CSYNC2, buffer, sizeof buffer / sizeof(TCHAR));
+ xSendDlgItemMessage(hDlg, IDC_CS_HVCSYNC, CB_ADDSTRING, 0, (LPARAM)buffer);
+ WIN32GUI_LoadUIString(IDS_SYNCMODE_HVSYNC2, buffer, sizeof buffer / sizeof(TCHAR));
+ xSendDlgItemMessage(hDlg, IDC_CS_HVCSYNC, CB_ADDSTRING, 0, (LPARAM)buffer);
#ifndef AGA
ew(hDlg, IDC_AGA, FALSE);