elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.15k stars 82 forks source link

Game Ragnarok Online crashes when Dd7to9 is enabled #167

Closed Leemonn closed 1 year ago

Leemonn commented 1 year ago

Hello, the game crashes at start saying "cannot init d3d". Here are the logs:

5404 09:55:49.387 Starting DxWrapper v1.0.6542.21
5404 09:55:49.387 Running from: C:\Users\matia\Desktop\asd\dxwrapper.dll
5404 09:55:49.387 Reading config file: C:\Users\matia\Desktop\asd\dxwrapper.ini
5404 09:55:49.387 ASUSTeK COMPUTER INC. ASUS TUF Gaming F15 FX507ZM_FX507ZM 1.0 (Notebook)
5404 09:55:49.387 ASUSTeK COMPUTER INC. FX507ZM 1.0 (Notebook)
5404 09:55:49.387 NVIDIA GeForce RTX 3060 Laptop GPU
5404 09:55:49.388 Windows 10 Enterprise 64-bit (10.0.22000)
5404 09:55:49.388 "ragexe.exe" (PID:9168)
5404 09:55:49.392 Environment variable __COMPAT_LAYER = "Installer"
5404 09:55:49.392 Disabling High DPI Scaling...
5404 09:55:49.392 Loaded library: user32.dll
5404 09:55:49.392 Loaded library: shcore.dll
5404 09:55:49.392 Disabling Microsoft Game Explorer...
5404 09:55:49.392 Hooking 'CreateProcess' API...
5404 09:55:49.392 Enabling dinputto8 wrapper
5404 09:55:49.392 Loading 'dinput.dll'...
5404 09:55:49.393 Hooking dinput.dll APIs...
5404 09:55:49.393 Enabling dinput8 wrapper
5404 09:55:49.393 Loading 'dinput8.dll'...
5404 09:55:49.394 Hooking dinput8.dll APIs...
5404 09:55:49.394 Loading 'ddraw.dll'...
5404 09:55:49.394 Hooking ddraw.dll APIs...
5404 09:55:49.394 Enabling ddraw wrapper
5404 09:55:49.394 Enabling d3d9 wrapper
5404 09:55:49.394 Loading 'd3d9.dll'...
5404 09:55:49.396 Loaded library: gdi32.dll
5404 09:55:49.396 DxWrapper loaded!
5404 09:55:49.403 dd_DirectDrawEnumerateExA
5404 09:55:49.403 d9_Direct3DCreate9
5404 09:55:49.403 Redirecting 'Direct3DCreate9' ...
5404 09:55:49.427 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (0152D730)
5404 09:55:49.428 dd_DirectDrawCreateEx
5404 09:55:49.428 Redirecting 'DirectDrawCreate' IID_IDirectDraw7 to --> 'Direct3DCreate9'
5404 09:55:49.428 Creating interface m_IDirectDrawX::m_IDirectDrawX (01582968) converting interface from v7 to v9
5404 09:55:49.428 Redirecting 'Direct3DCreate9' ...
5404 09:55:49.430 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (0152D940)
5404 09:55:49.430 Creating interface m_IDirect3DX::m_IDirect3DX (0154E770) converting interface from v7 to v9
5404 09:55:49.443 m_IDirect3DX::~m_IDirect3DX (0154E770) deleting interface!
5404 09:55:49.443 m_IDirectDrawX::~m_IDirectDrawX (01582968) deleting interface!
5404 09:55:49.443 m_IDirect3D9Ex::~m_IDirect3D9Ex (0152D940) deleting interface!
5404 09:55:49.443 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces!
5404 09:55:49.444 Redirecting 'DirectDrawCreate' IID_IDirectDraw7 to --> 'Direct3DCreate9'
5404 09:55:49.444 Creating interface m_IDirectDrawX::m_IDirectDrawX (01582E90) converting interface from v7 to v9
5404 09:55:49.444 Redirecting 'Direct3DCreate9' ...
5404 09:55:49.446 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (0152D970)
5404 09:55:49.446 Creating interface m_IDirect3DX::m_IDirect3DX (0154E9B0) converting interface from v7 to v9
5404 09:55:49.457 m_IDirect3DX::~m_IDirect3DX (0154E9B0) deleting interface!
5404 09:55:49.457 m_IDirectDrawX::~m_IDirectDrawX (01582E90) deleting interface!
5404 09:55:49.457 m_IDirect3D9Ex::~m_IDirect3D9Ex (0152D970) deleting interface!
5404 09:55:49.457 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces!
5404 09:55:49.457 m_IDirect3D9Ex::~m_IDirect3D9Ex (0152D730) deleting interface!
5404 09:55:50.032 Redirecting 'DirectDrawCreate' IID_IDirectDraw7 to --> 'Direct3DCreate9'
5404 09:55:50.032 Creating interface m_IDirectDrawX::m_IDirectDrawX (0E0365F8) converting interface from v7 to v9
5404 09:55:50.048 Creating interface m_IDirectDrawSurfaceX::m_IDirectDrawSurfaceX (0F074998) converting interface from v7 to v9
5404 09:55:50.048 Creating interface m_IDirectDrawClipper::m_IDirectDrawClipper (1042C990)
5404 09:55:50.048 m_IDirectDrawX::CreateSurface2 Warning: non-supported ddsCaps! 0x0 0x0 513
5404 09:55:50.048 Creating interface m_IDirectDrawSurfaceX::m_IDirectDrawSurfaceX (0EF22688) converting interface from v7 to v9
5404 09:55:50.048 Creating interface m_IDirectDrawSurfaceX::m_IDirectDrawSurfaceX (0EF22878) converting interface from v7 to v9
5404 09:55:50.048 Creating interface m_IDirect3DX::m_IDirect3DX (106278A8) converting interface from v7 to v9
5404 09:55:50.048 Creating interface m_IDirect3DDeviceX::m_IDirect3DDeviceX (1066FC00) converting interface from v7 to v9
5404 09:55:50.092 Creating interface m_IDirect3DDevice9Ex::InitDirect3DDevice (1021ADD8)
5404 09:55:50.092 m_IDirectDrawX::CreateSurface2 Warning: z-buffer not Implemented.
5404 09:55:50.092 Creating interface m_IDirect3DTexture9::m_IDirect3DTexture9 (10454FF0)
5404 09:55:50.092 m_IDirect3DDeviceX::SetRenderTarget Error: d3d9 surface does not exist!
5404 09:55:50.092 m_IDirect3DDeviceX::~m_IDirect3DDeviceX (1066FC00) deleting interface!
5404 09:55:50.092 m_IDirectDrawSurfaceX::~m_IDirectDrawSurfaceX (0EF22688) deleting interface!
5404 09:55:50.092 m_IDirectDrawSurfaceX::~m_IDirectDrawSurfaceX (0F074998) deleting interface!
5404 09:55:50.092 m_IDirect3DX::~m_IDirect3DX (106278A8) deleting interface!
5404 09:55:50.092 m_IDirectDrawSurfaceX::~m_IDirectDrawSurfaceX (0EF22878) deleting interface!
5404 09:55:50.095 m_IDirect3DDevice9Ex::~m_IDirect3DDevice9Ex (1021ADD8) deleting interface!
5404 09:55:50.095 m_IDirect3DTexture9::~m_IDirect3DTexture9 (10454FF0) deleting interface!
5404 09:55:50.095 m_IDirectDrawX::~m_IDirectDrawX (0E0365F8) deleting interface!
5404 09:55:50.096 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces!
5404 09:55:51.084 Quiting DxWrapper
5404 09:55:51.084 Unloading libraries...
5404 09:55:51.084 Reseting screen resolution
5404 09:55:51.126 Reseting font smoothing
5404 09:55:51.129 DxWrapper terminated!
elishacloud commented 1 year ago

Yes, this is a known issue. So far Dd7to9 only supports 2D graphics (i.e. DirectDraw). This game is trying to use Direct3D.

Try setting the game up to use software rendering or disable Direct3D, if you can with this game.