From 69081b580d594ae0c178296232b91837c9b2d01c Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 14 Oct 2015 20:15:17 +0300 Subject: [PATCH] 3200b16 --- od-win32/mman.cpp | 4 +++ od-win32/resources/resource.h | 1 + od-win32/resources/winuae.rc | 10 +++--- od-win32/win32.cpp | 32 +++++++++++------ od-win32/win32.h | 4 +-- od-win32/win32gui.cpp | 67 +++++++++++++++++++++++++++-------- od-win32/winuaechangelog.txt | 18 ++++++++++ 7 files changed, 104 insertions(+), 32 deletions(-) diff --git a/od-win32/mman.cpp b/od-win32/mman.cpp index 6fe32331..46e98496 100644 --- a/od-win32/mman.cpp +++ b/od-win32/mman.cpp @@ -426,6 +426,9 @@ static int doinit_shm (void) if (jit_direct_compatible_memory) { p96mem_offset = natmem_offset + p96base_offset; } else { + currprefs.rtgmem_size = changed_prefs.rtgmem_size = 0; + error_log(_T("RTG memory is not supported in this configuration.")); +#if 0 // calculate Z3 alignment (argh, I thought only Z2 needed this..) uae_u32 addr = Z3BASE_REAL; int z3off = cpuboards[currprefs.cpuboard_type].subtypes[currprefs.cpuboard_subtype].z3extra; @@ -448,6 +451,7 @@ static int doinit_shm (void) p96mem_offset = natmem_offset + p96base_offset; } } +#endif } } diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index b484027a..ce31ee12 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -1248,6 +1248,7 @@ #define IDC_CPUBOARDMEM 1843 #define IDC_Z3MAPPING 1844 #define IDC_CPUBOARD_SUBTYPE 1845 +#define IDC_CYCLEEXACTMEMORY 1846 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index e08bc54c..856e9d3c 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -671,10 +671,10 @@ BEGIN "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 @@ -696,6 +696,8 @@ BEGIN 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 diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index a6ba7f13..5cd0c6ed 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -6280,9 +6280,6 @@ HMODULE WIN32_LoadLibrary_2 (const TCHAR *name, int expand) HMODULE m = NULL; TCHAR *newname; DWORD err = -1; -#ifdef CPU_64_BIT - TCHAR *p; -#endif int round; newname = xmalloc (TCHAR, _tcslen (name) + 1 + 10); @@ -6292,6 +6289,7 @@ HMODULE WIN32_LoadLibrary_2 (const TCHAR *name, int expand) TCHAR s[MAX_DPATH], dir[MAX_DPATH], dir2[MAX_DPATH]; _tcscpy (newname, name); #ifdef CPU_64_BIT + TCHAR *p = NULL; switch(round) { case 0: @@ -6303,25 +6301,35 @@ HMODULE WIN32_LoadLibrary_2 (const TCHAR *name, int expand) 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); @@ -6418,6 +6426,8 @@ void target_addtorecent (const TCHAR *name, int t) { 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) { diff --git a/od-win32/win32.h b/od-win32/win32.h index dc0c1ec2..52b22ed8 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -20,12 +20,12 @@ #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("15") +#define WINUAEBETA _T("16") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2015, 10, 3) +#define WINUAEDATE MAKEBD(2015, 10, 14) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 2a3d4476..b92ae450 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -2385,6 +2385,11 @@ static void ejectfloppy (int n) 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("")); } } @@ -6325,7 +6330,7 @@ static void enable_for_displaydlg (HWND hDlg) 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); @@ -6351,10 +6356,12 @@ static void enable_for_displaydlg (HWND hDlg) 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); @@ -6765,7 +6772,7 @@ static void values_to_displaydlg (HWND hDlg) 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); @@ -7302,6 +7309,7 @@ static void values_to_chipsetdlg (HWND hDlg) 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); @@ -7312,15 +7320,43 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l { 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) @@ -7338,9 +7374,9 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l : 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) { @@ -10300,7 +10336,7 @@ static void enable_for_cpudlg (HWND hDlg) 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); @@ -10334,7 +10370,7 @@ static void enable_for_cpudlg (HWND hDlg) 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); @@ -10432,7 +10468,7 @@ static void values_from_cpudlg (HWND hDlg) 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; @@ -10465,7 +10501,7 @@ static void values_from_cpudlg (HWND hDlg) 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; @@ -10515,6 +10551,7 @@ static void values_from_cpudlg (HWND hDlg) } 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) { diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index e949e959..5f63453c 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,22 @@ +Beta 16: + +- Added Mediator 1200SX autoconfig data. +- Added support for 68020+ CPU floating bus data when clock chip is not connected (Not yet correctly emulated, need + accurate CPU cycle sequence and more) +- SPS plugin was not searched from all supported directories. +- Don't add fake uae boot rom expansion board if "hide uae expansions" is enabled. +- FPU FPCR and FPIAR was swapped in disassembler. +- CIA-B TOD accurate cycle counting code used CIA-A "is tod on?" variable.. (2.7.x or somewhere close) +- Use official AD1848 crystal value in Toccata emulation (24.576MHz), it seems some Toccata boards have correct + crystals and some not exactly correct (For example 24.582MHz). Now 48000Hz output is exactly 48000Hz. (was 48011) +- 64-bit JIT FPU rounding mode fix and other 64-bit FPU fixes. (Frode) +- 64-bit QEMU PPC plugin fixed (Frode) +- Added memory accesses only -cycle-exact mode. In this mode CPU does not internally count cycles, only external + memory accesses are counted, including chipset DMA contention. (This was previously only used when 68040/060 and + cycle exact was enabled). 68020+ only, at least for now. More compatible (prefetch + caches) also required. +- GUI disk eject button worked unreliably if disk was inserted and then immediately ejected. + Beta 15: - KS1.2 boot hack improved, now also works with KS 1.1, KS 1.0 and even with 0.7 beta! -- 2.47.3