}
}
-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;
#include "sysdeps.h"
#include "options.h"
+#ifdef WITH_MIDIEMU
+
#include "fsdb.h"
#include "uae.h"
#include "audio.h"
}
}
}
-}
\ No newline at end of file
+}
+
+#endif
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"));
_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;
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);
}
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) {
#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")
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);
extern void setminimized(int monid);
extern int getfocusedmonitor(void);
-void finishjob (void);
+void finishjob(void);
void init_colors(int monid);
extern int pause_emulation;
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;
+ }
}
}
}
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 ||
+
+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!
#if 1
-#define THREADED_QUEUE 0
+#define THREADED_QUEUE 1
extern void activate_debugger(void);