Wine Theory - kharovtobi/qemu-3dfx-arch GitHub Wiki
Wine-3dfx Passthrough theory
If you have read this, you may or may not have used wine binaries from kjliew. If you said about "its modified" your correct. The reason i created this is because some people to see the source code of it and wanted to compile it for themselves.
I had hopes that QEMU-3dfx will be an alternative to passthrough and Virtio, but it's limited to 32-bit and is used for gaming in 90s to early 2000s (̶a̶n̶d̶ ̶p̶l̶a̶y̶ ̶V̶a̶l̶k̶y̶r̶i̶a̶ ̶C̶h̶r̶o̶n̶i̶c̶l̶e̶s̶ ̶i̶n̶ ̶W̶i̶n̶d̶o̶w̶s̶ ̶7̶ )̶
After reading countless posts on the internet, I have a theory.
OpenGL Wrapper to WineD3D
This theory is that the wine wrapper calls from opengl32.dll
, It works because Wine9x works with slow fps, but if used with the vanilla Wine binaries especially latest versions causes one of the problems
WineD3D 1.87-1.9.7: Crash to desktop
WineD3D 2.0.5-5.0.5: GP3.exe Entry point not found - The procedure entry point D3DKMTCreateDCFromMemory could not be located in the dynamic link library gdi32.dIl.
WineD3D 6.0.5: GP3.exe Unable to locate component - This application has failed to start because ucrtbase.dll was not found. Re-installing the application may fix this problem.
"why does it not work?" Because dependencies, Even if you copied the dependencies it still don't work, worst case scenario, it crashes QEMU.
This means that kjliew modified the binaries that removes the dependencies.
This leaves the other question, "how does it work?" Simple, kjliew added a small code in wine source code presumably in wined3d.dll
and possibly the other dlls that calls to that dlls with some modifications.
Here is a simplified example of running DirectX 9 game calling to mesapt.
Guest Machine | Host Machine
DX9 Game -> d3d9.dll -> wined3d.dll -> opengl32.dll -> | -> mesapt -> QEMU -> GPU
|
I tried reverse engineering it, but I don't know what OpenGL stuff works so it definitely does'nt work so I gave up and used Looking Glass instead.
Credits