dxwrapper
dxwrapper copied to clipboard
Anarchy Online game crashes on launch
Trying to get directx9 support for an old directx 7 game (Anarchy Online). Tried many combinations of options but with directx7-9 enabled I always get the following errors.
16176 07:54:44.124 Starting DxWrapper v1.1.7062.22 16176 07:54:44.124 Running from: E:\Anarchy Online\dxwrapper.dll 16176 07:54:44.124 Reading config file: E:\Anarchy Online\dxwrapper.ini 16176 07:54:44.125 Gigabyte Technology Co., Ltd. X470 AORUS GAMING 7 WIFI Default string (Desktop) 16176 07:54:44.125 Gigabyte Technology Co., Ltd. X470 AORUS GAMING 7 WIFI-CF Default string (Desktop) 16176 07:54:44.125 NVIDIA GeForce RTX 2080 SUPER 16176 07:54:44.126 Windows 10 Enterprise 64-bit (10.0.19041) 16176 07:54:44.126 anarchyonline.exe (PID:34980) 16176 07:54:44.164 Environment variable __COMPAT_LAYER = "" 16176 07:54:44.164 Disabling High DPI Scaling... 16176 07:54:44.164 Loaded library: user32.dll 16176 07:54:44.169 Loaded library: shcore.dll 16176 07:54:44.170 Loading 'ddraw.dll'... 16176 07:54:44.170 Hooking ddraw.dll APIs... 16176 07:54:44.170 Installing GDI & User32 hooks 16176 07:54:44.170 Loaded library: gdi32.dll 16176 07:54:44.170 Loaded library: kernel32.dll 16176 07:54:44.176 Loaded library: d3d9.dll 16176 07:54:44.176 Enabling ddraw wrapper 16176 07:54:44.176 Enabling d3d9 wrapper 16176 07:54:44.177 Loading 'd3d9.dll'... 16176 07:54:44.177 Loaded library: C:\WINDOWS\system32\d3d9.dll 16176 07:54:44.177 Loaded library: winmm.dll 16176 07:54:44.177 Installing memory management hooks 16176 07:54:44.210 Installing messaging hooks 16176 07:54:44.210 Installing display mode hooks 16176 07:54:44.214 Installing registry hooks 16176 07:54:44.214 Installing Win32 hooks 16176 07:54:44.215 DxWrapper loaded! 16176 07:54:44.347 dd_DirectDrawCreate 16176 07:54:44.347 dd_DirectDrawCreateEx 16176 07:54:44.347 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:44.347 Redirecting 'DirectDrawCreate' IID_IDirectDraw to --> 'Direct3DCreate9' 16176 07:54:44.347 Creating interface m_IDirectDrawX::m_IDirectDrawX (00A926C8) converting interface from v1 to v9 16176 07:54:44.347 d9_Direct3DCreate9 16176 07:54:44.347 Redirecting 'Direct3DCreate9' ... 16176 07:54:44.441 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (00AD3CC8) 16176 07:54:44.441 m_IDirect3D9Ex::LogAdapterNames Adapter: 0 \.\DISPLAY1 NVIDIA GeForce RTX 2080 SUPER 16176 07:54:44.441 m_IDirectDrawX::~m_IDirectDrawX (00A926C8) deleting interface! 16176 07:54:44.448 m_IDirect3D9Ex::~m_IDirect3D9Ex (00AD3CC8) deleting interface! 16176 07:54:44.448 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces! 16176 07:54:44.448 dd_DirectDrawEnumerateExA 16176 07:54:44.448 Redirecting 'Direct3DCreate9' ... 16176 07:54:44.538 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (00AA8030) 16176 07:54:44.538 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:44.538 Redirecting 'DirectDrawCreate' IID_IDirectDraw7 to --> 'Direct3DCreate9' 16176 07:54:44.538 Creating interface m_IDirectDrawX::m_IDirectDrawX (00A92C08) converting interface from v7 to v9 16176 07:54:44.538 Redirecting 'Direct3DCreate9' ... 16176 07:54:44.543 Creating interface m_IDirect3D9Ex::m_IDirect3D9Ex (00AA7E80) 16176 07:54:44.710 Creating interface m_IDirect3DX::m_IDirect3DX (00A9BB60) converting interface from v7 to v9 16176 07:54:44.725 m_IDirect3DX::~m_IDirect3DX (00A9BB60) deleting interface! 16176 07:54:44.725 m_IDirectDrawX::~m_IDirectDrawX (00A92C08) deleting interface! 16176 07:54:44.725 m_IDirect3D9Ex::~m_IDirect3D9Ex (00AA7E80) deleting interface! 16176 07:54:44.725 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces! 16176 07:54:44.726 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:44.726 Redirecting 'DirectDrawCreate' IID_IDirectDraw7 to --> 'Direct3DCreate9' 16176 07:54:44.726 Creating interface m_IDirectDrawX::m_IDirectDrawX (00A926C8) converting interface from v7 to v9 16176 07:54:44.835 Creating interface m_IDirect3DX::m_IDirect3DX (00A9BB60) converting interface from v7 to v9 16176 07:54:44.843 m_IDirect3DX::~m_IDirect3DX (00A9BB60) deleting interface! 16176 07:54:44.843 m_IDirectDrawX::~m_IDirectDrawX (00A926C8) deleting interface! 16176 07:54:44.843 m_IDirect3D9Ex::~m_IDirect3D9Ex (02B23390) deleting interface! 16176 07:54:44.843 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces! 16176 07:54:44.945 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:45.040 Creating interface m_IDirect3DX::m_IDirect3DX (00A9BB60) converting interface from v7 to v9 16176 07:54:45.044 m_IDirect3DX::~m_IDirect3DX (00A9BB60) deleting interface! 16176 07:54:45.045 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces! 16176 07:54:45.045 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:45.155 m_IDirectDrawSurfaceX::CleanupSharedEmulatedMemory Deleting 0 emulated surfaces! 16176 07:54:45.157 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Primary surface 0x0 dwFlags: 0x1 ddsCaps: 0x200, 0x0, 513 16176 07:54:45.246 Creating interface m_IDirectDrawSurfaceX::m_IDirectDrawSurfaceX (02B55198) converting interface from v7 to v9 16176 07:54:45.246 Creating interface m_IDirectDrawSurfaceX::m_IDirectDrawSurfaceX (00AB28D0) converting interface from v7 to v9 16176 07:54:45.246 Creating interface m_IDirectDrawClipper::m_IDirectDrawClipper (05437FE0) 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Error: non-supported pixel format! 2 D3DFMT_D32->D3DFMT_D32 {0x400,0,32,0x0,0xffffffff,0x0,0x0} 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Found Stencil surface: D3DFMT_D24S8 16176 07:54:45.246 Creating interface m_IDirectDrawSurfaceX::m_IDirectDrawSurfaceX (00AAC0D0) converting interface from v7 to v9 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Error: non-supported pixel format! 2 D3DFMT_D32->D3DFMT_D32 {0x400,0,32,0x0,0xffffffff,0x0,0x0} 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Found Stencil surface: D3DFMT_D24S8 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Warning: Creating a second depth stencil surface! {0x1007,8,8,0,0,0,0,0,00000000,{0x0,0x0},{0x0,0x0},{0x0,0x0},{0x0,0x0},{0x4400,0,32,0x8,0xffffff00,0xff,0x0},32,{{ DDSCAPS_VIDEOMEMORY DDSCAPS_ZBUFFER },0x0,0x0,0x1},0} 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Error: non-supported pixel format! 2 D3DFMT_D32->D3DFMT_D32 {0x400,0,32,0x0,0xffffffff,0x0,0x0} 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Found Stencil surface: D3DFMT_D24S8 16176 07:54:45.246 m_IDirectDrawX::CreateSurface2 Warning: Creating a second depth stencil surface! {0x1007,8,8,0,0,0,0,0,00000000,{0x0,0x0},{0x0,0x0},{0x0,0x0},{0x0,0x0},{0x4400,0,32,0x8,0xffffff00,0xff,0x0},32,{{ DDSCAPS_VIDEOMEMORY DDSCAPS_ZBUFFER },0x0,0x0,0x1},0} 16176 07:54:45.252 Creating interface m_IDirect3DDeviceX::m_IDirect3DDeviceX (00AAC348) converting interface from v7 to v9 16176 07:54:45.252 m_IDirectDrawX::SetD3DDevice Setting 3D Device Surface: 00AB28D0 16176 07:54:45.301 m_IDirectDrawX::CreateD3D9Device Direct3D9 device! 1920x1080 refresh: 0 format: D3DFMT_UNKNOWN wnd: null params: {1920,1080,D3DFMT_UNKNOWN,1,0,0,1,null,1,0,D3DFMT_UNKNOWN,0x0,0,0x80000000} flags: 0x44 16176 07:54:45.552 Creating interface m_IDirect3DDevice9Ex::InitDirect3DDevice (09D00780) 16176 07:54:45.553 Creating interface m_IDirect3DSurface9::m_IDirect3DSurface9 (09DEE210) 16176 07:54:45.554 Direct3D9SetSwapEffectUpgradeShim Calling 'Direct3D9SetSwapEffectUpgradeShim' ... 0 16176 07:54:45.554 m_IDirect3DDeviceX::GetDirect3D Error: missing Direct3D wrapper! 16176 07:54:45.625 Quiting DxWrapper 16176 07:54:45.626 Unloading libraries... 16176 07:54:45.626 DxWrapper terminated!
Please advise.
Can you try with the debug version of dxwrapper and send me the logs?
Can you try with the debug version of dxwrapper and send me the logs?
I apologise for my ignorance but could you tell me where to find that?
Nevermind, I figured it out.
https://pastebin.com/kYLcCxZp
I put in a fix for the crash. You can give it a try. It should be downloadable here.
https://pastebin.com/b145uv1n
It doesn't crash with release binaries, but it only loads to a black screen. This is the output of running the debug binary, which resulted in a crash that stated the following:
"
Microsoft Visual C++ Runtime Library X Assertion failed! Program: E:\Anarchy Online\dxwrapper.dll File: D:\a\dxwrapper\dxwrapper\External....\imgui_i...n32.cpp Line: 302 Expression: bd-> hWnd != 0 For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the application - JIT must be enabled)"
Don't worry about the crash with the debug build. That is just a debug issue.
As far as the black screen issue, I will need to test it myself. The logs don't have enough data in them.
Hi there, I tested your latest build and there appears to be a new error.
https://pastebin.com/ENQzpavm
The only error I see in the logs is the game requesting for MipMap surfaces from a surface that has no MipMaps, which is normally a benign error. You could try with the update below to see if that helps. I added a check for that case and returned a handle to the current surface, when request. If that does not I would need to test the game myself or debug log to know what is going on. The error could be just a red-herring.
Here is an updated build: dxwrapper.zip
Is the blank log line significant in any way? I notice there's less of them then last time I tested. Haven't tested the version you attached yet though.
Game now launches and loads fine. Crashes on alt tabbing, only runs in full screen but is functional. Doesn't work with rtx remix but thanks for the effort you've put in to get it this far.
Game now launches and loads fine.
Ok, let me see if I can find a generic fix. I just gave you a hack for this.
Crashes on alt tabbing
That should not happen. I put some changes that made most games work with Alt+Tab. Not all of these older games support Alt+Tab. Does Alt+Tab work without dxwrapper?
One potential fix is to enable the FullscreenWindowMode or EnableWindowMode. Windowed mode usually works fine when Alt+Tabbing.
Doesn't work with rtx remix
There is nothing I can do about this. I'll let Nvidia fix this. They have a whole team working on it. I am trying to do this dxwrapper tool in my spare time and it's just me.
Game now launches and loads fine.
Ok, let me see if I can find a generic fix. I just gave you a hack for this.
I put in a generic fix that I think will work on all games. Can you test this and see if it loads up and plays?
-
Here is an update where I add single MipMap support: dxwrapper.zip
-
Here is an update where I disable MipMap when game is set to only a single MipMap: dxwrapper.zip
Please let me know which one of these work and which one does not work.
After testing, both seem to provide equal functionality. However I've realised after testing that my previous statement was wrong: login screen works fine, the first zone I logged into works fine, a few other zones work fine, however many/most zones will trigger a crash on login/load. Thanks again for your hard work and I really appreciate any progress you make! I'm a hobby coder but I'm punching well above my weight trying to identify what the problem is let alone how to fix it, so I apologise I can't contribute to your project and if there's any way I can help please let me know.
However I've realised after testing that my previous statement was wrong: [...] many/most zones will trigger a crash on login/load.
Does this happen with all of the builds here? Can you send me a log when the crash happens?
It happens with both builds, logs contain nothing of signifigance from what I can see. I'd need a debug version with the fix applied.
https://pastebin.com/dQn8UCqt
On testing the latest version, it appears that all zones I've tested so far have loaded. I'm happy for you to close this issue as until I encounter a more specific one it would seem that compatibility is fairly good for this game now.
Closing this for now.