From 4de30d75c53c7f256f34d19f85f2afc503d82941 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 6 Nov 2016 17:22:52 +0200 Subject: [PATCH] 3400b15 --- gayle.cpp | 2 +- main.cpp | 2 -- od-win32/direct3d.cpp | 9 +++++---- od-win32/resources/resource.h | 1 + od-win32/resources/winuae.rc | 9 +++++---- od-win32/srcrelease.cmd | 6 ++++-- od-win32/win32.h | 4 ++-- od-win32/win32gfx.cpp | 6 +++++- od-win32/win32gui.cpp | 21 ++++++++++++--------- od-win32/winuae_msvc14/winuae_msvc.vcxproj | 7 ------- od-win32/winuaechangelog.txt | 18 ++++++++++++++++++ 11 files changed, 53 insertions(+), 32 deletions(-) diff --git a/gayle.cpp b/gayle.cpp index 8b4bd649..293c10f2 100644 --- a/gayle.cpp +++ b/gayle.cpp @@ -955,7 +955,7 @@ static addrbank mbres_sub_bank = { mbres_lput, mbres_wput, mbres_bput, default_xlate, default_check, NULL, NULL, _T("Motherboard Resources"), dummy_lgeti, dummy_wgeti, - ABFLAG_IO, S_READ, S_WRITE, + ABFLAG_IO, S_READ, S_WRITE }; static struct addrbank_sub mbres_sub_banks[] = { diff --git a/main.cpp b/main.cpp index 226caef8..1b4f96f2 100644 --- a/main.cpp +++ b/main.cpp @@ -171,8 +171,6 @@ void fixup_prefs_dimensions (struct uae_prefs *prefs) // adaptive sync ap->gfx_vsyncmode = 0; ap->gfx_vflip = 0; - if (ap->gfx_backbuffers >= 2) - ap->gfx_backbuffers = 1; ap->gfx_strobo = prefs->lightboost_strobo; } else if (ap->gfx_vsync > 0) { if (ap->gfx_vsyncmode) { diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index dae06d1f..a42782dc 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -2368,6 +2368,8 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre xfree (s); } + variablerefresh = ap.gfx_vsync < 0; + memset (&dpp, 0, sizeof (dpp)); dpp.Windowed = isfullscreen () <= 0; dpp.BackBufferFormat = mode.Format; @@ -2376,7 +2378,7 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre dpp.Flags = D3DPRESENTFLAG_LOCKABLE_BACKBUFFER; dpp.BackBufferWidth = w_w; dpp.BackBufferHeight = w_h; - dpp.PresentationInterval = !ap.gfx_vflip ? D3DPRESENT_INTERVAL_IMMEDIATE : D3DPRESENT_INTERVAL_ONE; + dpp.PresentationInterval = variablerefresh ? D3DPRESENT_INTERVAL_DEFAULT : (!ap.gfx_vflip ? D3DPRESENT_INTERVAL_IMMEDIATE : D3DPRESENT_INTERVAL_ONE); modeex.Width = w_w; modeex.Height = w_h; @@ -2385,7 +2387,6 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre modeex.Format = mode.Format; vsync2 = 0; - variablerefresh = ap.gfx_vsync < 0; int hzmult = 0; if (isfullscreen () > 0) { dpp.FullScreen_RefreshRateInHz = getrefreshrate (modeex.Width, modeex.Height); @@ -2603,7 +2604,7 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre d3d_enabled = 1; wasstilldrawing_broken = true; - if (vsync < 0 && ap.gfx_vflip == 0) { + if ((vsync < 0 || variablerefresh) && ap.gfx_vflip == 0) { hr = d3ddev->CreateQuery(D3DQUERYTYPE_EVENT, &query); if (FAILED (hr)) write_log (_T("%s: CreateQuery(D3DQUERYTYPE_EVENT) failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); @@ -2619,7 +2620,7 @@ static const TCHAR *D3D_init2 (HWND ahwnd, int w_w, int w_h, int depth, int *fre if (forcedframelatency >= 0) hr = d3ddevex->SetMaximumFrameLatency (forcedframelatency); else if (dpp.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE && (v > 1 || !vsync)) - hr = d3ddevex->SetMaximumFrameLatency (vsync ? (hzmult < 0 && !ap.gfx_strobo && !variablerefresh ? 2 : 1) : 0); + hr = d3ddevex->SetMaximumFrameLatency ((vsync || variablerefresh) ? (hzmult < 0 && !ap.gfx_strobo && !variablerefresh ? 2 : 1) : 0); if (FAILED (hr)) write_log (_T("%s: SetMaximumFrameLatency() failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); } diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 08d2dbdc..7fb31c43 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -483,6 +483,7 @@ #define IDC_BLITIMM 1174 #define IDC_BLITWAIT 1175 #define IDC_LORES 1176 +#define IDC_KEYBOARD_CONNECTED 1176 #define IDC_RATE2BOX 1177 #define IDC_AUTORESOLUTIONSELECT 1178 #define IDC_LORES_SMOOTHED 1179 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 2b9a5a7c..8b2d6445 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -725,13 +725,13 @@ BEGIN 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,32,150,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,47,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,45,150,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,60,150,10 CONTROL "Genlock connected [] Allow boot sequence to detect genlock.",IDC_GENLOCK, "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,209,150,10 - LTEXT "Video port display hardware:",IDC_STATIC,237,62,117,15,SS_CENTERIMAGE - COMBOBOX IDC_MONITOREMU,237,80,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Video port display hardware:",IDC_STATIC,237,91,117,15,SS_CENTERIMAGE + COMBOBOX IDC_MONITOREMU,237,109,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Collision Level",IDC_STATIC,1,141,393,48 CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0, "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,47,157,101,10 @@ -750,6 +750,7 @@ BEGIN PUSHBUTTON "...",IDC_GENLOCKFILESELECT,375,240,10,15 CONTROL "Include alpha channel in screenshots and video captures.",IDC_GENLOCK_ALPHA, "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,226,214,10 + CONTROL "Keyboard connected",IDC_KEYBOARD_CONNECTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,15,150,10 END IDD_CHIPSET2 DIALOGEX 0, 0, 396, 305 diff --git a/od-win32/srcrelease.cmd b/od-win32/srcrelease.cmd index 6d09a436..2b889d46 100644 --- a/od-win32/srcrelease.cmd +++ b/od-win32/srcrelease.cmd @@ -192,7 +192,9 @@ cd .. copy winuaesrc.7z e:\amiga\winuaepackets\winuaesrc%1.7z move winuaesrc.7z e:\amiga cd c:\projects\winuae\src\od-win32 -7z a winuaedebug%1 winuae_msvc14\fullrelease\winuae.pdb winuae_msvc14\x64\fullrelease\winuae.pdb +7z a winuaedebug%1 winuae_msvc15\fullrelease\winuae.pdb winuae_msvc15\x64\fullrelease\winuae.pdb move winuaedebug%1.7z e:\amiga\winuaepackets\debug\ -copy winuae_msvc14\fullrelease\winuae.pdb winuae_msvc14\x64\fullrelease\winuae.pdb d:\amiga\dump +copy winuae_msvc15\fullrelease\winuae.pdb d:\amiga\dump\winuae.pdb +copy winuae_msvc15\x64\fullrelease\winuae.pdb d:\amiga\dump\winuae64.pdb copy d:\amiga\winuae.exe d:\amiga\dump +copy d:\amiga\winuae64.exe d:\amiga\dump diff --git a/od-win32/win32.h b/od-win32/win32.h index ccda6d49..8d7f1374 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("14") +#define WINUAEBETA _T("15") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2016, 10, 29) +#define WINUAEDATE MAKEBD(2016, 11, 6) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index ee18a0cc..4abb6cff 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -1177,6 +1177,7 @@ void show_screen_special (void) } static frame_time_t strobo_time; static volatile bool strobo_active; +static volatile bool strobo_active2; static void CALLBACK blackinsertion_cb( UINT uTimerID, @@ -1194,7 +1195,8 @@ static void CALLBACK blackinsertion_cb( break; } if (diff <= 0) { - show_screen_special(); + if (strobo_active2) + show_screen_special(); break; } if (diff > vsynctimebase / 4) { @@ -1224,6 +1226,7 @@ double target_adjust_vblank_hz(double hz) void show_screen (int mode) { strobo_active = false; + strobo_active2 = false; gfx_lock(); if (mode == 2) { if (currentmode->flags & DM_D3D) { @@ -1267,6 +1270,7 @@ void show_screen (int mode) } } D3D_showframe(); + strobo_active2 = true; #ifdef GFXFILTER } else if (currentmode->flags & DM_SWSCALE) { if (!dx_islost () && !picasso_on) diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index beb11be5..41843428 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -6690,7 +6690,7 @@ static void enable_for_chipsetdlg (HWND hDlg) workprefs.waiting_blits = 0; CheckDlgButton (hDlg, IDC_BLITWAIT, FALSE); } - ew (hDlg, IDC_BLITWAIT, workprefs.immediate_blits ? FALSE : TRUE); + ew(hDlg, IDC_BLITWAIT, workprefs.immediate_blits ? FALSE : TRUE); ew(hDlg, IDC_GENLOCKMODE, workprefs.genlock ? TRUE : FALSE); ew(hDlg, IDC_GENLOCKMIX, workprefs.genlock ? TRUE : FALSE); @@ -7674,14 +7674,15 @@ static void values_to_chipsetdlg (HWND hDlg) CheckRadioButton(hDlg, IDC_OCS, IDC_AGA, IDC_OCS + 4); break; } - CheckDlgButton (hDlg, IDC_NTSC, workprefs.ntscmode); - CheckDlgButton (hDlg, IDC_GENLOCK, workprefs.genlock); - CheckDlgButton (hDlg, IDC_BLITIMM, workprefs.immediate_blits); - 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); + CheckDlgButton(hDlg, IDC_NTSC, workprefs.ntscmode); + CheckDlgButton(hDlg, IDC_GENLOCK, workprefs.genlock); + CheckDlgButton(hDlg, IDC_BLITIMM, workprefs.immediate_blits); + CheckDlgButton(hDlg, IDC_BLITWAIT, workprefs.waiting_blits); + CheckDlgButton(hDlg, IDC_KEYBOARD_CONNECTED, workprefs.keyboard_connected); + 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); SendDlgItemMessage(hDlg, IDC_GENLOCKMIX, CB_SETCURSEL, workprefs.genlock_mix / 25, 0); @@ -7703,6 +7704,8 @@ static void values_from_chipsetdlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l workprefs.immediate_blits = ischecked (hDlg, IDC_BLITIMM); workprefs.waiting_blits = ischecked (hDlg, IDC_BLITWAIT) ? 1 : 0; + workprefs.keyboard_connected = ischecked(hDlg, IDC_KEYBOARD_CONNECTED) ? 1 : 0; + n2 = ischecked (hDlg, IDC_CYCLEEXACTMEMORY); n1 = ischecked (hDlg, IDC_CYCLEEXACT); if (workprefs.cpu_cycle_exact != n1 || workprefs.cpu_memory_cycle_exact != n2) { diff --git a/od-win32/winuae_msvc14/winuae_msvc.vcxproj b/od-win32/winuae_msvc14/winuae_msvc.vcxproj index 176d4e5e..98440859 100644 --- a/od-win32/winuae_msvc14/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc14/winuae_msvc.vcxproj @@ -1,6 +1,5 @@  - Debug @@ -1121,10 +1120,4 @@ - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - \ No newline at end of file diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index e49a54e0..5e7a7ea0 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -5,6 +5,24 @@ JIT Direct current rules are less complex now. It automatically switches off onl Note that in 64-bit version RTG VRAM must be inside of reserved natmem space. (Outside = error message and return back to GUI) +Beta 15: + +- GUI created pre-formatted DD disks had wrong root block allocation in bitmap. (b7 or somewhere close) +- Enabling Quickstart mode didn't reset all new memory parameters (autoconfig etc), only size. +- Fixed WASAPI sound hang if sound device disappeared/changed modes when emulation was waiting for too full buffer to empty. +- Handle AUDCLNT_E_INVALID_DEVICE_PERIOD and AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED, do not disable sound. +- WASAPI sound attempts to re-open automatically if for example Windows sound control panel parameters have been changed. +- Changing CPU config during reset (for example using reset input event) didn't always re-initialize all required CPU settings. +- Added RAM to UAESND board. (8M if Z3, 32k if Z2) Can be used for 1:1 physical/logical mapped sample set or sample data storage. +- UAESND sample type variable added, unused for now but if/when there needs to be compressed format support that can + be transparently uncompressed using Windows codecs. (mp3 etc..). Sample set structure is not compatible with old version anymore. +- Added keyboard connected chipset option. Inserting keyboard on the fly does usual powerup keycode sequence like any real + removable keyboard (for example A1000). Logica diagnostics ROM uses this to detect connected keyboard. +- Sprite to bitplane collision optimization, skip the collision calculation if collision bit(s) are already set + (=program does not use collisions), previous fix removed (bad) optimization and unnecessarily increased CPU power requirements + when program uses lots of sprites and does not care about collisions. +- Replaced Vector Falcon 8000 v7.1 ROM with correctly odd/even split version and added v7.6. + Beta 14: - Ariadne network adapter emulation added. (Am79c960 based, improved Am79c90) -- 2.47.3