iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
272 stars 23 forks source link

Hidden & Dangerous Deluxe #162

Open myself600 opened 11 months ago

myself600 commented 11 months ago

Description:

Game crashes after ESRB notice. It's almost playable with WineD3D, but lags when enemies are around.

System info:

Pinebook Pro RK3399 + T860 Linux kernel: 6.3.9-1-MANJARO-ARM Mesa version: 23.3~git2308020600.4de7e0~oibaf~m d3d8to9 version: 1.12.0 (needs d3dx9_43.dll & D3DCompiler_43.dll) Wine version: 8.0.2

Additional info:

MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage is needed on Mali-T860 with Panfrost since Mesa 22.3

Apitrace:

https://gitlab.freedesktop.org/mesa/mesa/uploads/36ef8c8d9989ec64820c7f7ee7c24310/hde.trace

Screenshot:

Screenshot_20230803_184943

Terminal:

[pbpro@manjaro-arm ~]$ MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage WINEDLLOVERRIDES=d3d8=n wine ~/'Software/Hidden and Dangerous Deluxe/bin/hde.exe'
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
002c:err:winediag:getaddrinfo Failed to resolve your host name IP
wine: failed to open L"C:\\windows\\system32\\winemenubuilder.exe": c0000135
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
0074:err:wineusb:DriverEntry Failed to initialize Unix library, status 0xc0000135.
0074:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000135
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 126
0094:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebus": c0000135
003c:fixme:service:scmdatabase_autostart_services Auto-start service L"winebus" failed to start: 126
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
00dc:fixme:imm:ImeSetActiveContext (00010026, 0): stub
00dc:fixme:imm:ImmReleaseContext (00010020, 00010026): stub
0024:fixme:imm:ImeSetActiveContext (00010064, 1): stub
0024:fixme:imm:ImmReleaseContext (0002005C, 00010064): stub
nine:adapter9:ctor: Your card is at the limit of Gallium Nine requirements. Some games may run into issues because requirements are too tight
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x534b08), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x534b08), stub!
0024:fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
[pbpro@manjaro-arm ~]$ 

Game download (264 MB):

https://www.bestoldgames.net/download/games/hidden-dangerous-deluxe/hidden-dangerous-deluxe.zip

Edit: Mentioned extra DLLs

axeldavy commented 11 months ago

A quick look at the trace, I see two possible issues: . The game attemps to create D3DFMT_P8 surfaces in system memory and fails (which is probably fine since supporting this format is not mandatory I think), but then attempts to create them in SCRATCH memory (which shouldn't fail, this memory should succeed for all format, but is rather useless). . It seems on the system you created the trace on, the format R8G8B8 was supported by your GPU, and the game decides to use it. GPUs usually don't support this, and thus its support might trigger a bad behaviour.

If you take a trace using wined3d, does it replay well with nine ?

myself600 commented 11 months ago

~No, the trace doesn't replay on nine:~

Screenshot_20230806_215812

Not really. It shows a black window for 15-20 seconds. (WineD3D has missing textures in the UI and 3D animations, no sound, different output)

d3d9.trace.gz

myself600 commented 11 months ago

~Also, I noticed the game is crashing right away when I try to create a trace with nine enabled this time:~

Screenshot_20230808_120924

[pbpro@manjaro-arm ~]$ export MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage WINEDLLOVERRIDES=d3d8,d3d9=n,b WINEDEBUG=fixme-all,+debugstr TRACE_FILE=d3d9.trace
[pbpro@manjaro-arm ~]$ wine ~/'Software/Hidden and Dangerous Deluxe/bin/hde.exe'
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
002c:err:winediag:getaddrinfo Failed to resolve your host name IP
wine: failed to open L"C:\\windows\\system32\\winemenubuilder.exe": c0000135
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (126).
0074:err:wineusb:DriverEntry Failed to initialize Unix library, status 0xc0000135.
0074:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000135
0094:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\winebus": c0000135
Box86 with Dynarec v0.3.1 e8d4ffc built on Jul 31 2023 13:43:04
0024:warn:debugstr:OutputDebugStringA "apitrace: loaded into Z:\\home\\pbpro\\Software\\Hidden and Dangerous Deluxe\\bin\\hde.exe\n"
apitrace: loaded into Z:\home\pbpro\Software\Hidden and Dangerous Deluxe\bin\hde.exe
0024:warn:debugstr:OutputDebugStringA "apitrace: tracing to d3d9.trace\n"
apitrace: tracing to d3d9.trace
nine:adapter9:ctor: Your card is at the limit of Gallium Nine requirements. Some games may run into issues because requirements are too tight
Native Direct3D 9 v0.9.0.396-release is active.
For more information visit https://github.com/iXit/wine-nine-standalone
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x53ab88), stub!
fixme:d3d9nine:DRIPresentGroup_GetMultiheadCount (0x53ab88), stub!
0024:warn:debugstr:OutputDebugStringA "apitrace: warning: caught exception 0xc0000005\n"
apitrace: warning: caught exception 0xc0000005
0024:warn:debugstr:OutputDebugStringA "apitrace: flushing trace\n"
apitrace: flushing trace
0024:warn:debugstr:OutputDebugStringA "apitrace: unloaded from Z:\\home\\pbpro\\Software\\Hidden and Dangerous Deluxe\\bin\\hde.exe\n"
apitrace: unloaded from Z:\home\pbpro\Software\Hidden and Dangerous Deluxe\bin\hde.exe
[pbpro@manjaro-arm ~]$ 

~I've changed my setup since I made the original trace about 5 months ago and I'm not sure what's causing this.~ https://github.com/ptitSeb/box86/commit/fe3419957ecaa1df2770db8ec128fe56a10f6034 is breaking apitrace

myself600 commented 10 months ago

Updated answer