dxwrapper icon indicating copy to clipboard operation
dxwrapper copied to clipboard

Help: Streets of Rage Remake 5.2 promotion to dx9 for Reshade

Open Hexaae opened this issue 7 months ago • 11 comments

I tried hard an entire day promoting "Streets of Rage Remake 5.2" to dx9 (Dd7to9 option + ddraw.dll wrapper), and then use Reshade in dx9 mode to apply retro-arcade look...

Please. can you help me (and many other users desperately trying to apply Reshade to this game) promoting the game to dx9 in a way compatible with Reshade? The game to me seems to open a DX11 task window, and then opens a resized custom screen using ddraw... (?!) Seems to do strange things and your knowledge in this field of APIs emulation and screen promotion could really help... 🙏🏻

Thanks in advance

Hexaae avatar Apr 19 '25 16:04 Hexaae

Is the reshade part working?

RustyShacklefordIII avatar Apr 19 '25 16:04 RustyShacklefordIII

No (is my goal)... I'm not even sure it runs promoted to dx9. It seems it does but Reshade or SweetFX won't work, and fps monitor overlay appears in the launching CMD window and not on the game screen itself (!!?). It's a strange case...

This is the log:

11104 00:16:16.420 Starting DxWrapper v1.3.7700.25
11104 00:16:16.420 Running from: C:\Users\Luca\RetroGames\SORR\dxwrapper.dll (56E10000)
11104 00:16:16.420 Reading config file: C:\Users\Luca\RetroGames\SORR\dxwrapper.ini
11104 00:16:16.420 ASUSTeK COMPUTER INC. ROG Strix G834JY_G834JY 1.0 (Notebook)
11104 00:16:16.420 ASUSTeK COMPUTER INC. G834JY 1.0 (Notebook)
11104 00:16:16.420 Intel(R) UHD Graphics
11104 00:16:16.421 Windows 10 Home 64-bit (10.0.26100)
11104 00:16:16.421 SorR.exe (PID:40576)
11104 00:16:16.431 Environment variable __COMPAT_LAYER = "DWM8And16BitMitigation 8And16BitAggregateBlts"
11104 00:16:16.432 Windows is newer than, Windows Vista: 1 Windows 7: 1 Windows 8: 1
11104 00:16:16.432 Disabling High DPI Scaling...
11104 00:16:16.432 Loaded library: user32.dll
11104 00:16:16.432 Loaded library: shcore.dll
11104 00:16:16.432 Loading 'ddraw.dll'...
11104 00:16:16.432 Hooking ddraw.dll APIs...
11104 00:16:16.436 Loaded library: d3d9.dll
11104 00:16:16.436 Enabling d3d9 wrapper
11104 00:16:16.436 Loading 'd3d9.dll'...
11104 00:16:16.436 Loaded library: C:\WINDOWS\system32\d3d9.dll
11104 00:16:16.436 Loaded library: winmm.dll
11104 00:16:16.436 Installing memory management hooks
11104 00:16:16.436 Installing messaging hooks
11104 00:16:16.436 Installing version hooks
11104 00:16:16.436 Installing display mode hooks
11104 00:16:16.437 Installing registry hooks
11104 00:16:16.437 Installing Win32 hooks
11104 00:16:16.437 Installing GDI & User32 hooks
11104 00:16:16.437 Installing Kernel32 hooks
11104 00:16:16.437 DxWrapper loaded!
11104 00:16:16.437 dd_DirectDrawCreate
11104 00:16:16.437 Redirecting 'DirectDrawCreate' to --> 'Direct3DCreate9'
11104 00:16:16.437 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0
11104 00:16:16.437 Creating interface m_IDirectDrawX::m_IDirectDrawX (00843570) converting interface from v1 to v9
11104 00:16:16.437 dd_AcquireDDThreadLock
11104 00:16:16.437 d9_Direct3DCreate9
11104 00:16:16.437 Redirecting 'Direct3DCreate9' ...
11104 00:16:16.675 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (0DAB92E8) IID_IDirect3D9
11104 00:16:16.678 m_IDirect3D9Ex::LogAdapterNames Adapter: 0 \\.\DISPLAY1 Intel(R) UHD Graphics
11104 00:16:16.678 dd_ReleaseDDThreadLock
11104 00:16:19.643 m_IDirectDrawX::CreateD9Device Direct3D9 device! 1280x720 refresh: 0 format: D3DFMT_UNKNOWN wnd: null params: {1280,720,D3DFMT_UNKNOWN,1,0,0,1,null,1,0,D3DFMT_UNKNOWN,0x0,0,0x80000000} flags: 0x44
11104 00:16:19.670 Creating interface m_IDirect3DDevice9Ex::m_IDirect3DDevice9Ex (0DAB8D70) IID_IDirect3DDevice9
11104 00:16:19.672 Utils::BusyWaitYield::<lambda_19aa9478ee1e14303c8165a9798bae05>::operator () SSE2 CPU support: 1
52844 00:18:28.317 Quiting DxWrapper
52844 00:18:28.317 Unloading libraries...
52844 00:18:28.317 DxWrapper terminated!

Hexaae avatar Apr 19 '25 22:04 Hexaae

Are you using the d3d9.dll file from reshade? Because that's what you need to use reshade. The d3d9.dll file that comes with dxwrapper won't do it.

RustyShacklefordIII avatar Apr 19 '25 23:04 RustyShacklefordIII

Of course.

Hexaae avatar Apr 20 '25 08:04 Hexaae

Maybe the problem is here: m_IDirect3D9Ex::LogAdapterNames Adapter: 0 \\.\DISPLAY1 Intel(R) UHD Graphics and redirects to iGPU, while it should output to dGPU (it's an Advanced Optimus system). Under Windows 11 Graphics settings I already set to force dGPU for SorR.exe...

Double checked this... and forced again dGPU. The results (but Reshade's d3d9.dll or SweetFX still don't work):

55744 17:34:51.188 Starting DxWrapper v1.3.7700.25
55744 17:34:51.188 Running from: C:\Users\Luca\RetroGames\SORR\dxwrapper.dll (568C0000)
55744 17:34:51.188 Reading config file: C:\Users\Luca\RetroGames\SORR\dxwrapper.ini
55744 17:34:51.188 ASUSTeK COMPUTER INC. ROG Strix G834JY_G834JY 1.0 (Notebook)
55744 17:34:51.188 ASUSTeK COMPUTER INC. G834JY 1.0 (Notebook)
55744 17:34:51.188 Intel(R) UHD Graphics
55744 17:34:51.189 Windows 10 Home 64-bit (10.0.26100)
55744 17:34:51.189 SorR.exe (PID:56920)
55744 17:34:51.200 Environment variable __COMPAT_LAYER = "DWM8And16BitMitigation 8And16BitAggregateBlts"
55744 17:34:51.201 Windows is newer than, Windows Vista: 1 Windows 7: 1 Windows 8: 1
55744 17:34:51.201 Disabling High DPI Scaling...
55744 17:34:51.201 Loaded library: user32.dll
55744 17:34:51.201 Loaded library: shcore.dll
55744 17:34:51.202 Loading 'ddraw.dll'...
55744 17:34:51.202 Hooking ddraw.dll APIs...
55744 17:34:51.551 Loaded library: d3d9.dll
55744 17:34:51.551 Enabling d3d9 wrapper
55744 17:34:51.551 Loading 'd3d9.dll'...
55744 17:34:51.554 Loaded library: C:\WINDOWS\system32\d3d9.dll
55744 17:34:51.554 Loaded library: winmm.dll
55744 17:34:51.554 Installing memory management hooks
55744 17:34:51.554 Installing messaging hooks
55744 17:34:51.554 Installing version hooks
55744 17:34:51.554 Installing display mode hooks
55744 17:34:51.554 Installing registry hooks
55744 17:34:51.555 Installing Win32 hooks
55744 17:34:51.555 Installing GDI & User32 hooks
55744 17:34:51.555 Installing Kernel32 hooks
55744 17:34:51.555 DxWrapper loaded!
55744 17:34:51.555 dd_DirectDrawCreate
55744 17:34:51.555 Redirecting 'DirectDrawCreate' to --> 'Direct3DCreate9'
55744 17:34:51.555 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0
55744 17:34:51.555 Creating interface m_IDirectDrawX::m_IDirectDrawX (007EC448) converting interface from v1 to v9
55744 17:34:51.555 dd_AcquireDDThreadLock
55744 17:34:51.555 d9_Direct3DCreate9
55744 17:34:51.555 Redirecting 'Direct3DCreate9' ...
55744 17:34:51.848 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (0AAE8808) IID_IDirect3D9
55744 17:34:51.849 m_IDirect3D9Ex::LogAdapterNames Adapter: 0 \\.\DISPLAY1 NVIDIA GeForce RTX 4090 Laptop GPU
55744 17:34:51.849 dd_ReleaseDDThreadLock
55744 17:34:54.663 m_IDirectDrawX::CreateD9Device Direct3D9 device! 1280x720 refresh: 0 format: D3DFMT_UNKNOWN wnd: null params: {1280,720,D3DFMT_UNKNOWN,1,0,0,1,null,1,0,D3DFMT_UNKNOWN,0x0,0,0x80000000} flags: 0x44
55744 17:34:55.138 Creating interface m_IDirect3DDevice9Ex::m_IDirect3DDevice9Ex (041BEAB8) IID_IDirect3DDevice9
55744 17:34:55.140 Utils::BusyWaitYield::<lambda_19aa9478ee1e14303c8165a9798bae05>::operator () SSE2 CPU support: 1
55744 17:35:02.496 m_IDirectDrawX::~m_IDirectDrawX (007EC448) deleting interface!
55744 17:35:02.529 m_IDirect3DDevice9Ex::~m_IDirect3DDevice9Ex (041BEAB8) deleting interface!
55744 17:35:02.530 m_IDirect3D9Ex::~m_IDirect3D9Ex (0AAE8808) deleting interface!
55744 17:35:02.530 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces!
55744 17:35:04.019 Quiting DxWrapper
55744 17:35:04.019 Unloading libraries...
55744 17:35:04.019 DxWrapper terminated!

Tried also advanced ini options under [Dd7to9], [d3d9], but nothing worked...

Hexaae avatar Apr 20 '25 15:04 Hexaae

... it would be great if dxwrapper could also inject common retro shaders (e.g. from Retro-Arch or other repositories...), with no need of double patching with Reshade/SweetFX/ShaderGlass... If technically possible, would be great and a killer feature all-in-one!

Hexaae avatar Apr 20 '25 15:04 Hexaae

I am trying to follow this thread. Does this game work with dxwrapper without ReShade?

For dxwrapper you will want to use the ddraw.dll stub as well as the dxwrapper.dll and dxwrapper.ini files.

Maybe the problem is here: m_IDirect3D9Ex::LogAdapterNames Adapter: 0 \\.\DISPLAY1 Intel(R) UHD Graphics and redirects to iGPU, while it should output to dGPU (it's an Advanced Optimus system).

To use the dGPU you can enable the GraphicsHybridAdapter option in the dxwrapper.ini file.

... it would be great if dxwrapper could also inject common retro shaders (e.g. from Retro-Arch or other repositories...), with no need of double patching with Reshade/SweetFX/ShaderGlass...

No plans to do this. I would just be duplicating ReShade. If ReShade has an issue it is better to just have crosire fix it rather then me trying to replicate the whole software. Besides, I don't have that kind of time to replicate this software.

elishacloud avatar Apr 21 '25 16:04 elishacloud

Thank you. From the later post: 55744 17:34:51.849 m_IDirect3D9Ex::LogAdapterNames Adapter: 0 \\.\DISPLAY1 NVIDIA GeForce RTX 4090 Laptop GPU ... so dxwrapper seems to do its job on the dGPU this time, but there's something strange in this game and no d3d9.dll based gfx filter like Reshade etc. work... The game seems to open first a console window which then starts the real game in a "fake fullscreen" resized (!?). At default runs in forced borderless fullscreen, but you can re-enable ghosted video options editing SORR\mod\system.txt as follows:

// FULL SCREEN WIDE: AUTO, DESKTOP, BORDERLESS, BORDERLESS_SYNC (Default is BORDERLESS_SYNC)
AUTO

If you'd mind to figure out why it fails after dx9 promoted screen, it's free, fan-made, and easy to find googling for "Streets of Rage Remake 5.2"

Hexaae avatar Apr 21 '25 16:04 Hexaae

dxwrapper only works with DirectX games. This game doesn't appear to be DirectX, at least not DirectX7 or older. You could try using d3d8to9 but I suspect that this game is using GDI rather than DirectX. I don't know if there is any tool that can convert GDI to DirectX.

elishacloud avatar Apr 21 '25 17:04 elishacloud

Indeed I didn't find any trace in the exe from an hex-editor... But doesn't the above log show ddraw.dll (dxwrapper) being loaded and converted to dx9? Or could the game continue to use GDI as the output surface even then?

The only possible solution at this point would be using ShaderGlass applied fullscreen.

Hexaae avatar Apr 21 '25 19:04 Hexaae

The log shows a DirectDraw device created but no surfaces are created. Without a surface there is nothing being drawn with DirectDraw. The game could be just using DirectDraw to change the display's resolution. But it is not drawing anything on the screen with DirectDraw.

elishacloud avatar Apr 21 '25 20:04 elishacloud