http://bugs.winehq.org/show_bug.cgi?id=58731
Bug ID: 58731 Summary: Using newer versions of dgVoodoo2 to play older games fail to initialize. Product: Wine-staging Version: 10.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: nosferatu.arucard.1983@gmail.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
This is a year old bug around the Steam and later Lutris gaming community when notice the dgVoodoo2 wrapper after version 2.80 fail to work on Wine, either Proton or Proton-GE or any forks. Since Proton always uses DXVK for Direc3D 11 rendering (the dgVoodoo2 output), it was common to combine dgVoodoo2 with DXVK to wrap old DirectX and 3dfx Glide code to Direct3D 11, leaving DXVK to translate to Vulkan.
As the time goes around, Dege was wary the fact that the last version of this own creation is now 2.86.2 at the time of writing and Lutris never update beyond 2.80 or a modded version called 2.8.2
After some testing and a rare game called Montezuma's Return which have a 3dfx version, I discovery that using dgVoodoo2 over Wine's vanilla DirectX 11 implementation also had the same problems like Proton or Wine-GE (modded versions) with DXVK.
This old Glide game works with the lastest dgVoodoo2 without problems, while DirectDraw games like Omikron or Carmageddon TDR2000 fail to work using the lastest dgVoodoo2, but older versions worked fine.
But the latter games had GPU diagnose tools and a pattern was found. If the dgVoodoo2 wrapper works, then the virtual dgVoodoo DirectX wrapper appears on devices list. If not, it displays the Wine's safe mode software renderer (DirectDraw HAL). Forcing playing the game, makes them crash or running at slowest speeds. After all testing, the issue happens either using DXVK or Wine's DirectX implementation, meaning that the problem should be found on Wine's code.
Computers with Mesa drivers at certain games could start dgVoodoo2 2.86.2 on games like Omikron, which means that this open-source drivers code had an unintended workaround to force dgVoodoo2 to work, but this is rare and not always work.
The test with Montezuma Return shows that the emulation code from Glide to DirectX works on Wine, along the DirectDraw emulation that work on certain cases. However the real issue is the initialization routine (that was changed) caused this huge regression, and it is not be handled by Wine.
http://bugs.winehq.org/show_bug.cgi?id=58731
tinozzo123@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tinozzo123@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=58731
Le Gluon du Net legluondunet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |legluondunet@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #1 from Le Gluon du Net legluondunet@gmail.com --- I can confirm that dgVoodoo2 is unusable since 2.8x version, I can no more launch a game with newer versions. The last version that works for me on Linux with Wine is 2.79.1.
http://bugs.winehq.org/show_bug.cgi?id=58731
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #2 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
Please attach full, normal (=without WINEDEBUG) terminal output. Instructions to get a log can be found there: https://gitlab.winehq.org/wine/wine/-/wikis/FAQ#how-can-i-get-a-debugging-lo...
Also, this bug targets wine-staging. Are you sure that the issue only affects wine-staging and that the cause lies in the wine-staging code? Retest with upstream wine if in doubt.
Regards.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #3 from Vasco Manteigas nosferatu.arucard.1983@gmail.com --- Created attachment 79353 --> http://bugs.winehq.org/attachment.cgi?id=79353 Log output when dgVoodoo2 uses DXVK to output DirectX 11 to Vulkan
My first log test using DXVK, since dgVoodoo2 performs more optimally when DXVK is enabled. dgVoodoo2 translates DirectDraw and Direct3D 7,8 and 9 to the Direct3D 11. Due to performance issues, DXVK acts as a middleware to translate DirectX 11 code to native Linux Vulkan code.
It appears that the log catches the api calls that triggers the fail.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #4 from Vasco Manteigas nosferatu.arucard.1983@gmail.com --- Created attachment 79354 --> http://bugs.winehq.org/attachment.cgi?id=79354 Testing dgVoodoo2 using WineD3D for reference.
And I also made a test using dgVoodoo2 over WineD3D which is the standard mode on Wine, and appear to crash at the same api call which corroborates that the crash is independent of the Direct3D implementation.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #5 from Vasco Manteigas nosferatu.arucard.1983@gmail.com --- Created attachment 79355 --> http://bugs.winehq.org/attachment.cgi?id=79355 Lutris modded wine-8.26 managed to use dgVoodoo2 2.86.2
But the most intriguing thing is Lutris have a modded version of Wine (labelled 8.26-GE) that are capable to run the test game with the old or newer versions of dgVoodoo2! However this compability appears to happen on certain restrict cases and do not work very well.
I put this log as a reference for potential cross-versions.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #6 from Vasco Manteigas nosferatu.arucard.1983@gmail.com --- Created attachment 79356 --> http://bugs.winehq.org/attachment.cgi?id=79356 Testing Omikron using Lutris Wine version at second run
And the most intriguing part is this DX7 game (Omikron) runs with the last version of dgVoodoo2 only with Wine-8.26-GE and after been run with an older version of dgVoodoo2 !
http://bugs.winehq.org/show_bug.cgi?id=58731
master.nosferatu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |master.nosferatu@gmail.com
--- Comment #7 from master.nosferatu@gmail.com --- When I last looked versions past 2.80.2 beta (marked 2.8.2) are crashing *inside* dgvoodoo2's ddraw.dll. It happens when application is requesting to create a primary surface e.g. via LPDIRECTDRAW7->CreateSurface and dgvoodoo2 is doing some manipulations with objects whose seems related to d3d11. One of them is NULL pointer but it dereferences it without check and so just crashes.
This issue has been reported multiple times to dege over the years and all we got back are responses like "dgVoodoo has no business on non-Windows platforms anyway". It is proprietary, there are no debug symbols and dlls are additionally packed with UPX packer with wiped headers (special effort made to hurdle unpacking?). I don't think dgvoodoo2 even deserves time and effort for digging why that happens and implementing a workaround with authors attitude and his recent pursuits to also wipe old versions from all over internet knowingly that they are in active use for a reason on non-windows platforms...
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #8 from Vasco Manteigas nosferatu.arucard.1983@gmail.com --- In fact all logs I made had an unhandled crash, and the cause is a bad manipulation of a NULL pointer, means that at least a patch should be made.
At least the Lutris team would like to patch their own versions of Wine to proper handle dgVoodoo2 since they wanted to use it for certain old games.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #9 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
This may or may not be an application bug, but if it works under Windows it should work under Wine.
Now, please retest with plain wine and without DVXK and provide terminal output.
Regards.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #10 from Vasco Manteigas nosferatu.arucard.1983@gmail.com --- Created attachment 79361 --> http://bugs.winehq.org/attachment.cgi?id=79361 The crash on dgVoodoo2 is an unhandled exception
The core issue is the crash due to an unhandled exception.
http://bugs.winehq.org/show_bug.cgi?id=58731
--- Comment #11 from NoSFeRaTU master.nosferatu@gmail.com --- Created attachment 79369 --> http://bugs.winehq.org/attachment.cgi?id=79369 dgVoodoo v2.86.2(dbg variant) crash debugging details
If that will be any help I've looked again and seems my previous statement was a bit off due to fuzzy memory as I've previously looked at that problem about two years ago. Excluding beta versions the latest working version was actually 2.81.3 and 2.82 is the first version which broke.
In the attachment I've placed my debugging findings during debugging dgvoodoo's ddraw.dll.
Note: I've debugged on wine 10.15 AND dxvk + vkd3d-proton as they were more easy to produce PDB symbols from as I prefer x96dbg over winedbg. But for pure wine without wrappers underlying issue is the same.