"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,114,31,86,10
CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,47,86,10
- CONTROL "Cycle-exact [] The most compatible A500/A1200 emulation mode. Very fast PC recommended.",IDC_CYCLEEXACT,
- "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,69,170,10
- RTEXT "Chipset Extra:",IDC_STATIC,72,89,71,15,SS_CENTERIMAGE
- COMBOBOX IDC_CS_EXT,148,90,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Cycle-exact (DMA/Memory accesses)",IDC_CYCLEEXACTMEMORY,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,14,69,194,10
+ RTEXT "Chipset Extra:",IDC_STATIC,72,108,71,15,SS_CENTERIMAGE
+ COMBOBOX IDC_CS_EXT,148,109,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Options",IDC_STATIC,221,0,173,137
CONTROL "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,16,150,10
LTEXT "Genlock emulation mode",IDC_STATIC,237,59,117,15,SS_CENTERIMAGE
COMBOBOX IDC_GENLOCKMODE,237,77,103,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_GENLOCKMIX,346,77,38,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Cycle-exact (Full) [] The most compatible A500/A1200 emulation mode.",IDC_CYCLEEXACT,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,82,194,10
END
IDD_CHIPSET2 DIALOGEX 0, 0, 396, 305
HMODULE m = NULL;
TCHAR *newname;
DWORD err = -1;
-#ifdef CPU_64_BIT
- TCHAR *p;
-#endif
int round;
newname = xmalloc (TCHAR, _tcslen (name) + 1 + 10);
TCHAR s[MAX_DPATH], dir[MAX_DPATH], dir2[MAX_DPATH];
_tcscpy (newname, name);
#ifdef CPU_64_BIT
+ TCHAR *p = NULL;
switch(round)
{
case 0:
break;
case 1:
p = _tcschr (newname, '.');
- _tcscpy (p, _T("_x64"));
- _tcscat (p, _tcschr (name, '.'));
+ if (p) {
+ _tcscpy(p, _T("_x64"));
+ _tcscat(p, _tcschr(name, '.'));
+ }
break;
case 2:
p = _tcschr (newname, '.');
- _tcscpy (p, _T("x64"));
- _tcscat (p, _tcschr (name, '.'));
+ if (p) {
+ _tcscpy(p, _T("x64"));
+ _tcscat(p, _tcschr(name, '.'));
+ }
break;
case 3:
p = _tcschr (newname, '.');
- _tcscpy (p, _T("_64"));
- _tcscat (p, _tcschr (name, '.'));
+ if (p) {
+ _tcscpy(p, _T("_64"));
+ _tcscat(p, _tcschr(name, '.'));
+ }
break;
case 4:
p = _tcschr (newname, '.');
- _tcscpy (p, _T("64"));
- _tcscat (p, _tcschr (name, '.'));
+ if (p) {
+ _tcscpy(p, _T("64"));
+ _tcscat(p, _tcschr(name, '.'));
+ }
break;
}
+ if (!p)
+ continue;
#endif
get_plugin_path (s, sizeof s / sizeof (TCHAR), NULL);
_tcscat (s, newname);
{
TCHAR tmp[MAX_DPATH];
+ if (name == NULL || name[0] == 0)
+ return;
tmp[0] = 0;
GetFullPathName (name, sizeof tmp / sizeof (TCHAR), tmp, NULL);
if (os_win7) {
eject_cd ();
} else {
workprefs.floppyslots[n].df[0] = 0;
+ // no disk in drive when GUI was entered
+ // make sure possibly disks inserted after GUI was entered
+ // are removed.
+ if (changed_prefs.floppyslots[n].df[0] == 0)
+ disk_insert(n, _T(""));
}
}
ew (hDlg, IDC_SCREENMODE_RTG2, rtg);
ew (hDlg, IDC_XCENTER, TRUE);
ew (hDlg, IDC_YCENTER, TRUE);
- ew (hDlg, IDC_FRAMERATE, !workprefs.cpu_cycle_exact);
+ ew (hDlg, IDC_FRAMERATE, !workprefs.cpu_memory_cycle_exact);
ew (hDlg, IDC_LORES, !workprefs.gfx_autoresolution);
ew(hDlg, IDC_AUTORESOLUTIONVGA, workprefs.gfx_resolution >= RES_HIRES && workprefs.gfx_vresolution >= VRES_DOUBLE);
static void enable_for_chipsetdlg (HWND hDlg)
{
- int enable = workprefs.cpu_cycle_exact ? FALSE : TRUE;
+ int enable = workprefs.cpu_memory_cycle_exact ? FALSE : TRUE;
#if !defined (CPUEMU_13)
ew (hDlg, IDC_CYCLEEXACT, FALSE);
+#else
+ ew (hDlg, IDC_CYCLEEXACTMEMORY, workprefs.cpu_model >= 68020);
#endif
#if 0
ew (hDlg, IDC_BLITIMM, enable);
ew (hDlg, IDC_RATE2TEXT, selectcr->locked != 0);
ew (hDlg, IDC_FRAMERATE2, selectcr->locked != 0);
- v = workprefs.cpu_cycle_exact ? 1 : workprefs.gfx_framerate;
+ v = workprefs.cpu_memory_cycle_exact ? 1 : workprefs.gfx_framerate;
SendDlgItemMessage (hDlg, IDC_FRAMERATE, TBM_SETPOS, TRUE, (int)v);
CheckRadioButton (hDlg, IDC_LM_NORMAL, IDC_LM_PDOUBLED3, IDC_LM_NORMAL + (workprefs.gfx_vresolution ? 1 : 0) + workprefs.gfx_pscanlines);
CheckDlgButton (hDlg, IDC_BLITWAIT, workprefs.waiting_blits);
CheckRadioButton (hDlg, IDC_COLLISION0, IDC_COLLISION3, IDC_COLLISION0 + workprefs.collision_level);
CheckDlgButton (hDlg, IDC_CYCLEEXACT, workprefs.cpu_cycle_exact);
+ CheckDlgButton (hDlg, IDC_CYCLEEXACTMEMORY, workprefs.cpu_memory_cycle_exact);
SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_SETCURSEL, workprefs.cs_compatible, 0);
SendDlgItemMessage(hDlg, IDC_MONITOREMU, CB_SETCURSEL, workprefs.monitoremu, 0);
SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_SETCURSEL, workprefs.genlock_image, 0);
{
BOOL success = FALSE;
int nn;
- bool n;
+ bool n1, n2;
+ int id = LOWORD(wParam);
workprefs.genlock = ischecked (hDlg, IDC_GENLOCK);
workprefs.immediate_blits = ischecked (hDlg, IDC_BLITIMM);
workprefs.waiting_blits = ischecked (hDlg, IDC_BLITWAIT) ? 1 : 0;
- n = ischecked (hDlg, IDC_CYCLEEXACT);
- if (workprefs.cpu_cycle_exact != n) {
- workprefs.cpu_cycle_exact = workprefs.blitter_cycle_exact = n;
- if (n) {
+ n2 = ischecked (hDlg, IDC_CYCLEEXACTMEMORY);
+ n1 = ischecked (hDlg, IDC_CYCLEEXACT);
+ if (workprefs.cpu_cycle_exact != n1 || workprefs.cpu_memory_cycle_exact != n2) {
+ if (id == IDC_CYCLEEXACTMEMORY) {
+ if (n2) {
+ // n2: f -> t
+ if (workprefs.cpu_model < 68020) {
+ n1 = true;
+ CheckDlgButton (hDlg, IDC_CYCLEEXACT, n1);
+ }
+ } else {
+ // n2: t -> f
+ n1 = false;
+ CheckDlgButton (hDlg, IDC_CYCLEEXACT, n1);
+ }
+ } else if (id == IDC_CYCLEEXACT) {
+ if (n1) {
+ // n1: f -> t
+ n2 = true;
+ CheckDlgButton (hDlg, IDC_CYCLEEXACTMEMORY, n2);
+ } else {
+ // n1: t -> f
+ if (workprefs.cpu_model < 68020) {
+ n2 = false;
+ CheckDlgButton (hDlg, IDC_CYCLEEXACTMEMORY, n2);
+ }
+ }
+ }
+ workprefs.cpu_cycle_exact = n1;
+ workprefs.cpu_memory_cycle_exact = workprefs.blitter_cycle_exact = n2;
+ if (n2) {
if (workprefs.cpu_model == 68000)
workprefs.cpu_compatible = 1;
if (workprefs.cpu_model <= 68030)
: ischecked (hDlg, IDC_ECS_DENISE) ? CSMASK_ECS_DENISE
: ischecked (hDlg, IDC_ECS) ? CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE
: CSMASK_AGA | CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
- n = ischecked (hDlg, IDC_NTSC);
- if (workprefs.ntscmode != n) {
- workprefs.ntscmode = n;
+ n1 = ischecked (hDlg, IDC_NTSC);
+ if (workprefs.ntscmode != n1) {
+ workprefs.ntscmode = n1;
}
nn = SendDlgItemMessage (hDlg, IDC_CS_EXT, CB_GETCURSEL, 0, 0);
if (nn != CB_ERR) {
BOOL enable = FALSE, jitenable = FALSE;
BOOL cpu_based_enable = FALSE;
- ew(hDlg, IDC_SPEED, !workprefs.cpu_cycle_exact);
+ ew(hDlg, IDC_SPEED, !workprefs.cpu_memory_cycle_exact);
ew(hDlg, IDC_COMPATIBLE24, workprefs.cpu_model <= 68030);
//ew(hDlg, IDC_CS_HOST, !workprefs.cpu_cycle_exact);
//ew(hDlg, IDC_CS_68000, !workprefs.cpu_cycle_exact);
ew (hDlg, IDC_CS_CACHE_TEXT, enable);
ew (hDlg, IDC_CACHE, enable);
ew (hDlg, IDC_JITENABLE, jitenable);
- ew (hDlg, IDC_COMPATIBLE, !workprefs.cpu_cycle_exact);
+ ew (hDlg, IDC_COMPATIBLE, !workprefs.cpu_memory_cycle_exact);
ew (hDlg, IDC_COMPATIBLE_FPU, workprefs.fpu_model > 0);
ew (hDlg, IDC_FPU_UNIMPLEMENTED, workprefs.fpu_model && !workprefs.cachesize);
ew (hDlg, IDC_CPU_UNIMPLEMENTED, workprefs.cpu_model == 68060 && !workprefs.cachesize);
int newcpu, oldcpu, newfpu, newtrust, oldcache, jitena, idx;
static int cachesize_prev, trust_prev;
- workprefs.cpu_compatible = workprefs.cpu_cycle_exact | (ischecked (hDlg, IDC_COMPATIBLE) ? 1 : 0);
+ workprefs.cpu_compatible = workprefs.cpu_memory_cycle_exact | (ischecked (hDlg, IDC_COMPATIBLE) ? 1 : 0);
workprefs.fpu_strict = ischecked (hDlg, IDC_COMPATIBLE_FPU) ? 1 : 0;
workprefs.fpu_no_unimplemented = ischecked (hDlg, IDC_FPU_UNIMPLEMENTED) ? 0 : 1;
workprefs.int_no_unimplemented = ischecked (hDlg, IDC_CPU_UNIMPLEMENTED) ? 0 : 1;
case 68000:
case 68010:
workprefs.fpu_model = newfpu == 0 ? 0 : (newfpu == 2 ? 68882 : 68881);
- if (workprefs.cpu_compatible || workprefs.cpu_cycle_exact)
+ if (workprefs.cpu_compatible || workprefs.cpu_memory_cycle_exact)
workprefs.fpu_model = 0;
if (newcpu != oldcpu)
workprefs.address_space_24 = 1;
} else if (jitena && !oldcache) {
workprefs.cachesize = 8192;
workprefs.cpu_cycle_exact = false;
+ workprefs.cpu_memory_cycle_exact = false;
if (!cachesize_prev)
trust_prev = 0;
if (cachesize_prev) {