]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
6000b14
authorToni Wilen <twilen@winuae.net>
Mon, 10 Mar 2025 18:07:25 +0000 (20:07 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 10 Mar 2025 18:07:25 +0000 (20:07 +0200)
gfxutil.cpp
midiemu.cpp
od-win32/direct3d11.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
pcem/vid_mga.cpp

index ff6e9a80f01fcab9fc7b84533dcaa6a831020db2..e80d3ac39bf4e3af9715fda0c848fcd3ac3aff25 100644 (file)
@@ -191,51 +191,6 @@ static void video_calc_gammatable(int monid)
        }
 }
 
-static uae_u32 limit256(int monid, float v)
-{
-       struct amigadisplay *ad = &adisplays[monid];
-       if (!gfx_hdr) {
-               v = v * (float)(currprefs.gf[ad->gf_index].gfx_filter_contrast + 1000) / 1000.0f + currprefs.gf[ad->gf_index].gfx_filter_luminance / 10.0f;
-       }
-       if (v < 0)
-               v = 0;
-       if (v > 255)
-               v = 255;
-       return (uae_u32)v;
-}
-static uae_s32 limit256rb(int monid, float v)
-{
-       struct amigadisplay *ad = &adisplays[monid];
-       if (!gfx_hdr) {
-               v *= (float)(currprefs.gf[ad->gf_index].gfx_filter_saturation + 1000) / 1000.0f;
-       }
-       if (v < -128)
-               v = -128;
-       if (v > 127)
-               v = 127;
-       return (uae_s32)v;
-}
-static float get_y(int r, int g, int b)
-{
-       return 0.2989f * r + 0.5866f * g + 0.1145f * b;
-}
-static uae_u32 get_yh(int monid, int r, int g, int b)
-{
-       return limit256(monid, get_y (r, g, b) * hf / 256);
-}
-static uae_u32 get_yl(int monid, int r, int g, int b)
-{
-       return limit256(monid, get_y (r, g, b) * lf / 256);
-}
-static uae_s32 get_cb(int monid, int r, int g, int b)
-{
-       return limit256rb(monid, -0.168736f * r - 0.331264f * g + 0.5f * b);
-}
-static uae_s32 get_cr(int monid, int r, int g, int b)
-{
-       return limit256rb(monid, 0.5f * r - 0.418688f * g - 0.081312f * b);
-}
-
 static uae_u32 lowbits (int v, int shift, int lsize)
 {
        v >>= shift;
index 8001a3a8fa139e5f9d7fc0cd482ae4fec3bb5bb1..a947b3002924743016872eb89bfdb82381f53615 100644 (file)
@@ -3,6 +3,8 @@
 #include "sysdeps.h"
 #include "options.h"
 
+#ifdef WITH_MIDIEMU
+
 #include "fsdb.h"
 #include "uae.h"
 #include "audio.h"
@@ -262,4 +264,6 @@ void midi_emu_reopen(void)
                        }
                }
        }
-}
\ No newline at end of file
+}
+
+#endif
index 6c3bacc769b3a8c5d956d80f9c980f70221cc470..592812c1f6d8035490936573cd278994de100b1d 100644 (file)
@@ -1023,6 +1023,7 @@ static bool psEffect_LoadEffect(struct d3d11struct *d3d, const TCHAR *shaderfile
        int layout = 0;
        char *fx;
        int size;
+       bool hlsl = false;
 
        if (!pD3DCompileFromFile || !ppD3DCompile) {
                write_log(_T("D3D11 No shader compiler available (D3DCompiler_46.dll or D3DCompiler_47.dll).\n"));
@@ -1049,6 +1050,9 @@ static bool psEffect_LoadEffect(struct d3d11struct *d3d, const TCHAR *shaderfile
        _tcscat(tmp, shaderfile);
        write_log(_T("Direct3D11: Attempting to load '%s'\n"), tmp);
        _tcscpy(s->loadedshader, shaderfile);
+       if (_tcslen(tmp) > 5 && !_tcsicmp(tmp + _tcslen(tmp) - 5, _T(".hlsl"))) {
+               hlsl = true;
+       }
 
        ID3DX11Effect *g_pEffect = NULL;
        ID3DBlob *errors = NULL;
@@ -1070,7 +1074,7 @@ static bool psEffect_LoadEffect(struct d3d11struct *d3d, const TCHAR *shaderfile
        z = NULL;
 
        fx = fx1;
-       if (fxneedconvert(fx1)) {
+       if (!hlsl && fxneedconvert(fx1)) {
                static const char *converts1[] = { "technique", "vs_3_0", "vs_2_0", "vs_1_1", "ps_3_0", "ps_2_0", NULL };
                static const char *converts2[] = { "technique10", "vs_4_0_level_9_3", "vs_4_0_level_9_3", "vs_4_0_level_9_3", "ps_4_0_level_9_3", "ps_4_0_level_9_3", NULL };
                fxconvert(fx1, fx2, converts1, converts2);
@@ -1084,19 +1088,27 @@ static bool psEffect_LoadEffect(struct d3d11struct *d3d, const TCHAR *shaderfile
        }
 
        SetCurrentDirectory(tmp2);
-       hr = D3DX11CompileEffectFromMemory(fx, strlen(fx), name, NULL, D3D_COMPILE_STANDARD_FILE_INCLUDE, dwShaderFlags, 0, d3d->m_device, &g_pEffect, &errors);
-
-#if 0
-       hr = D3DX11CompileEffectFromFile(tmp, nullptr, D3D_COMPILE_STANDARD_FILE_INCLUDE, dwShaderFlags, 0, d3d->m_device, &g_pEffect, &errors);
-#endif
-
-       if (FAILED(hr)) {
-               write_log(_T("Direct3D11: D3DX11CompileEffectFromMemory('%s') failed: %08x\n"), tmp, hr);
-               void *p = errors->GetBufferPointer();
-               TCHAR *s = au((char*)p);
-               write_log(_T("Effect compiler errors:\n%s\n"), s);
-               xfree(s);
-               goto end;
+       if (hlsl) {
+               ID3DBlob *ppCode = NULL;
+               hr = D3DCompileFromFile(tmp, NULL, D3D_COMPILE_STANDARD_FILE_INCLUDE, "main", "ps_5_0", 0, 0, &ppCode, &errors);
+               if (FAILED(hr)) {
+                       write_log(_T("Direct3D11HLSL: D3DCompileFromFile('%s') failed: %08x\n"), tmp, hr);
+                       void *p = errors->GetBufferPointer();
+                       TCHAR *s = au((char *)p);
+                       write_log(_T("Effect compiler errors:\n%s\n"), s);
+                       xfree(s);
+                       goto end;
+               }
+       } else {
+               hr = D3DX11CompileEffectFromMemory(fx, strlen(fx), name, NULL, D3D_COMPILE_STANDARD_FILE_INCLUDE, dwShaderFlags, 0, d3d->m_device, &g_pEffect, &errors);
+               if (FAILED(hr)) {
+                       write_log(_T("Direct3D11FX: D3DX11CompileEffectFromMemory('%s') failed: %08x\n"), tmp, hr);
+                       void *p = errors->GetBufferPointer();
+                       TCHAR *s = au((char *)p);
+                       write_log(_T("Effect compiler errors:\n%s\n"), s);
+                       xfree(s);
+                       goto end;
+               }
        }
 
        if (errors) {
index e798aff3bba6eae71c4e1f74fdf65f53ab3eb9f3..99f52a44800de0eb02da22ed0f6ed20c22aa48d8 100644 (file)
 #define LANG_DLL_FULL_VERSION_MATCH 1
 
 #if WINUAEPUBLICBETA
-#define WINUAEBETA _T("13")
+#define WINUAEBETA _T("14")
 #else
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2025, 3, 7)
+#define WINUAEDATE MAKEBD(2025, 3, 10)
 
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")
@@ -51,22 +51,22 @@ extern TCHAR start_path_exe[MAX_DPATH];
 extern TCHAR start_path_data[MAX_DPATH];
 extern TCHAR start_path_plugins[MAX_DPATH];
 
-extern bool my_kbd_handler (int, int, int, bool);
-extern void clearallkeys (void);
-extern int getcapslock (void);
-
-void releasecapture (struct AmigaMonitor*);
-int WIN32_RegisterClasses (void);
-int WIN32_InitLibraries (void);
-void WIN32_HandleRegistryStuff (void);
-extern void setup_brkhandler (void);
-extern void remove_brkhandler (void);
-extern void disablecapture (void);
+extern bool my_kbd_handler(int, int, int, bool);
+extern void clearallkeys(void);
+extern int getcapslock(void);
+
+void releasecapture(struct AmigaMonitor*);
+int WIN32_RegisterClasses(void);
+int WIN32_InitLibraries(void);
+void WIN32_HandleRegistryStuff(void);
+extern void setup_brkhandler(void);
+extern void remove_brkhandler(void);
+extern void disablecapture(void);
 extern int isfocus(void);
-extern void gui_restart (void);
+extern void gui_restart(void);
 extern bool quit_ok(void);
-int timebegin (void);
-int timeend (void);
+int timebegin(void);
+int timeend(void);
 
 extern void setmouseactive(int monid, int active);
 extern void minimizewindow(int monid);
@@ -82,7 +82,7 @@ extern void unsetminimized (int monid);
 extern void setminimized(int monid);
 extern int getfocusedmonitor(void);
 
-void finishjob (void);
+void finishjob(void);
 void init_colors(int monid);
 
 extern int pause_emulation;
index 8e866c314e909a5a4cee97b4b34819676627f63c..d12ff5129303fe3361b130884008a433a55fdfa7 100644 (file)
@@ -20797,26 +20797,38 @@ static void values_to_hw3ddlg (HWND hDlg, bool initdialog)
        if (workprefs.gfx_api && D3D_canshaders ()) {
                bool gotit = false;
                HANDLE h;
-               WIN32_FIND_DATA wfd;
                TCHAR tmp[MAX_DPATH];
-               get_plugin_path (tmp, sizeof tmp / sizeof (TCHAR), _T("filtershaders\\direct3d"));
-               _tcscat (tmp, _T("*.fx"));
-               h = FindFirstFile (tmp, &wfd);
-               while (h != INVALID_HANDLE_VALUE) {
-                       if (wfd.cFileName[0] != '_') {
-                               TCHAR tmp2[MAX_DPATH];
-                               _stprintf (tmp2, _T("D3D: %s"), wfd.cFileName);
-                               tmp2[_tcslen (tmp2) - 3] = 0;
-                               xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp2);
-                               if (workprefs.gfx_api && !_tcscmp (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], wfd.cFileName)) {
-                                       fltnum = j;
-                                       gotit = true;
-                               }
-                               j++;
+               for (int fx = 0; fx < 2; fx++) {
+                       get_plugin_path (tmp, sizeof tmp / sizeof (TCHAR), _T("filtershaders\\direct3d"));
+                       if (fx) {
+                               _tcscat (tmp, _T("*.fx"));
+                       } else {
+                               _tcscat(tmp, _T("*.hlsl"));
                        }
-                       if (!FindNextFile (h, &wfd)) {
-                               FindClose (h);
-                               h = INVALID_HANDLE_VALUE;
+                       WIN32_FIND_DATA wfd;
+                       h = FindFirstFile (tmp, &wfd);
+                       while (h != INVALID_HANDLE_VALUE) {
+                               if (wfd.cFileName[0] != '_') {
+                                       TCHAR tmp2[MAX_DPATH];
+                                       _stprintf (tmp2, _T("D3D: %s"), wfd.cFileName);
+#if 0
+                                       if (!fx) {
+                                               tmp2[_tcslen(tmp2) - 5] = 0;
+                                       } else {
+                                               tmp2[_tcslen(tmp2) - 3] = 0;
+                                       }
+#endif
+                                       xSendDlgItemMessage (hDlg, IDC_FILTERMODE, CB_ADDSTRING, 0, (LPARAM)tmp2);
+                                       if (workprefs.gfx_api && !_tcscmp (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], wfd.cFileName)) {
+                                               fltnum = j;
+                                               gotit = true;
+                                       }
+                                       j++;
+                               }
+                               if (!FindNextFile (h, &wfd)) {
+                                       FindClose (h);
+                                       h = INVALID_HANDLE_VALUE;
+                               }
                        }
                }
        }
@@ -21143,7 +21155,7 @@ static void filter_handle (HWND hDlg)
                if (item2 != CB_ERR)
                        workprefs.gf[filter_nativertg].gfx_filter_filtermodev = (int)item2;
                if (item > 0) {
-                       _stprintf (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], _T("%s.fx"), tmp + 5);
+                       _stprintf (workprefs.gf[filter_nativertg].gfx_filtershader[filterstackpos], _T("%s"), tmp + 5);
                        cfgfile_get_shader_config(&workprefs, full_property_sheet ? 0 : filter_nativertg);
                        if (of != workprefs.gf[filter_nativertg].gfx_filter ||
                                offh != workprefs.gf[filter_nativertg].gfx_filter_filtermodeh ||
index 35e264e2b1f0cf523835b8cb28270f72a4c286f1..0de9d8f2266924c1dbda423ead80a31717517b68 100644 (file)
@@ -1,4 +1,23 @@
 
+
+Beta 14:
+
+- Left side of display had corruption if horizontal resolution was small enough.
+- Make sure drawing thread has finished before exit or config change.
+- Fixed bad D3D surface lock/unlock functions.
+- Keyboard reset without keyboard low level emulation didn't force CPU to reset state while reset keys are being kept pressed. CPU kept executing, possibly random instructions because ROM overlay is already active and autoconfig boards are deactivated, possibly causing random illegal memory accesses being logged.
+- Matrox emulation blitter background thread support re-enabled.
+- Remaining software filter support removed.
+- Fixed slirp bug (has been since it was added) that didn't seem to affect WinUAE but affected other UAE ports.
+- GDI mode didn't free all resources when native<>RTG mode switched.
+- Closing last open configuration tree node didn't update registry/ini.
+- Debugger command H DMA debugger listing support is back. Now only listed if D is appended (HD).
+- CPU KS ROM accesses are listed in DMA debugger. 68000/010 only because 68020+ can have faster ROM access time than chipset. Uses CIA DMA debugger line but because there is not enough space, only R/W state, size and address is shown.
+- -nomt skipped RGA buffering start/end overlap handling, for example copper color writes near the start of scanline were skipped.
+- Genlock display had vertical wobble effect in threaded mode. Genlock, grayscale and CD32FMV are working. Other display port adapters should not be used yet.
+- Non-CE fast mode subpixel scroll fix. (May not be perfect yet)
+- TV overscan modes didn't affect fast draw mode horizontal blanking.
+
 Beta 13:
 
 Major performance improvement! Finally faster than older versions!
index f895c138723e7029de36f8c23f424bc61d81bddd..bf0a978f06099d588fcd6249c5d7d14cbe5543bd 100644 (file)
@@ -35,7 +35,7 @@
 
 #if 1
 
-#define THREADED_QUEUE 0
+#define THREADED_QUEUE 1
 
 extern void activate_debugger(void);