Thanks again for this patch, its really awesome to see this working so well. Not being able to properly play heavy gear 2 was a hard part of my life, glad to see thats over now. So how do we buy you a beer for all this hard work?
Red Orb Prince of Persia 3D 1999
At young age, I enjoyed the first 2 games very much. When the 3rd game was released with hardware accelerated 3D engine, I had high anticipation but it played like shit on Voodoo1/2 at 640x480 without high-end CPUs back then. Reviews of the game were largely disappointed. I had actually kept the game without playing it. Now, it was restored to play perfectly on QEMU, Linux and Windows 10 alike.
It was my last game in the series, but the 1st one with Direct3D acceleration. It was probably a big mistake of not supporting Glide back in 1999 as I was hoping a patch could be released but quite disappointed that it never happened. With the addition of WGL_3DFX_gamma_control, WineD3D was patched up to take advantage of the exposed extension to enable host controlled gamma correction from Direct3D. This helps games such as this one, Clive Barker's Undying (potentially all games based on Unreal engine on Direct3D renderer) and all other Direct3D games that provide in-game brightness adjustment for more pleasant scene. Games based on id Quake3 engine will also recognize and use the GL extension through OpenGL, if the number of GL extensions did not blow up the buffer that the game used to store them.
Matrox G400Tech demo and Reef demo
G400Tech demo run from Win98 VM as-is, no patch, with the magic string appended to matrox.cfg.
Reef demo run from WinXP VM. This one has no vendor HW lock-down at all.
Playing 2 games at the same time ?!! No I can't do that 😀
It makes it possible to do multiplayer retro games on VMs with any CPUs and GPUs. Today, this was mostly done with PCI-passthrough, enterprise-class motherboards that support many x8/x16 PCI-E slots, GPUs with enterprise pricing and features (FireGL/SR-IOV & Quadro/GRiD) and commercial software VMware ESXi. Sure, this enables the best performance for contemporary modern PC multiplayer games. For vintage PC multiplayer games, QEMU KVM can offer multiplayer VM gaming with completely FOSS software stacks on consumer-grade motherboards and GPUs. Unlike PCI-passthrough, the GPUs no longer limit the number of possible sessions. An ultrawide 5k display can probably put 3~4 sessions on the same screen and the same CPU and GPU are time-shared by all VMs.
The host hardware is AMD FX8300/NVIDIA GT730-GK208, not exactly the type of PC for great gaming experience but should be able to obtain at least 30FPS running native with MedSpec for a 2007 AAA game. Both the CPU and GPU, though had aged, were still 5 years after the game at time of released. I wasn't able to run the demo native because it crashed at running AMD 3DNow! instructions for AMD CPUs that stopped supporting them, even though the game demo still works perfectly fine on Windows 10 x64. It was a known, documented bug for the game demo. An unofficial patch was available for the retailed full game. QEMU was able to get around that without patching.
MicroProse Mechwarrior 3 1999 nice and smooth 30FPS at 1024x768, the max supported by the game. The game was designed to run only on Win98. While the pieces and puzzles are there to get the game working on Windows 10, it is easier to just run it on QEMU with Win98 VM. Nothing fancy, just rip the CD, install, apply the last official 1.2 patch and good to go. The game also seems to require V-Sync to moderate the frame rate even with all graphics options max'ed out, otherwise QEMU KVM/WHPX would be too fast and the game controls turned crazy if V-Sync was disabled.
3DMark2003 Host vs Guest
How was it possible that the Guest had the Host beaten??! I guess WineD3D must be really, really good at translating Direct3D9. Or, there is always a modern Windows tax to pay for running old software for the previous Windows generation, especially Windows XP and prior. Or, Windows 10 "every Direct3D layered on top of Direct3D12" does not focus on performance. Or, Windows subsystem WoW simply incurs higher overhead than virtualization "Machine-on-Machine". Anyway, it is a known fact that 3Dmark03 scores are lower on Vista/Win7 on the exact same machine running Windows XP. I am pretty sure the Host will win if it had Windows XP.
Breaking down the individual game tests, Host had significant lead on GT1 while Guest had similar lead on GT4. GT1 is a Direct3D7 level API while GT4 has the most fancy Direct3D9 shaders. This is an indication that advanced shaders-based workloads are completely GPU bound and higher level DX APIs are more virtualization friendly. This is indeed true as from current QEMU scores at different 3DMark generations, 3DMark03 >> 3DMark01 >> 3DMark2000 >> 3DMark99. For bare-metal, the scores are always in reverse. It is still a puzzle why the Host failed to achieve similar performance at GT4.
Midtown Madness 1 (Chicago Edition) 1999
Direct3D acceleration working, gameplay was fine. No funky EXE renaming (and I didn't understand how it can make any difference). Just install the last official patch called XP compatibility pack regardless of which Windows VM used to play. It fixed the game startup issue. Rip the CD, install and have fun!
There are still issues with the Option configuration due to garbled text from pull-down GUI elements. The game called DDRAW_surface_GetDC to have some GUI elements drawn by GDI into DDRAW surface. Mixing GDI/DDRAW is always troublesome. Graphics option should not have any problem even if the text cannot be read. The Renderer and Resolution pull-down entries can be guessed from VIDEO.CFG. The only problem is control redefinition which has to be done in Software Renderer mode. After the controls are saved, exit the game, delete VIDEO.CFG and redetect video to get back to Direct3D hardware acceleration.
Otherwise, the game played great at High object details, ~35FPS at farthest view distance with high scene density and over 50FPS for most moderate scene density. Very High object details will cost another 6~8 FPS. WineD3D rendering of the game looks perfect.
Hi there!
I've compiled QEMU with this patch on Debian 10 (Debian 11 seems to have a pkg-config bug), but I can't find mesa gl guest wrapper libraries for windows anywhere on the net! I thought they were attached somewhere in this thread but they aren't! I'm lost now, can I have some help?
You'll have to compile them yourself. The guest and host must have matching code, and I suspect this is the reason they were removed in the first place.