[Discussion] QEMU 3Dfx Virtualization

This is continue of disscussion of them Vogons Qemu 3Dfx thread…
https://www.vogons.org/viewtopic.php?f=24&t=60950

Here are projects github links:
https://github.com/kjliew/qemu-3dfx
https://github.com/kjliew/qemu-xtra

Here is our compatibility testing sheet with all info:
https://docs.google.com/spreadsheets/d/1…dit?usp=sharing


Edit by Fernando: Thread title shortened (can be re-edited by the opener)

I would like to heard, still some your options about my last question on Vogons…

BTW i tested even heavier stuff from point of performance Doom 3 patched for Win98 and got only 15 FPS, i excepted something better… Kjliew wrote that its project could be us better results than KVM… but for this even with faster CPU (9900K(95W, intel Core i gen 9) vs 6500T(35W intel Core i gen6 + Geforce 6600)), im getting much better results with KVM.
Geforce 6600LE + Core i5 6500T KVM : Windows 98SE on Modern Hardware (12) - Doom III 18(1600x1200)/38 (800x600) FPS in timedemo. 6600Le is not faster Windows 98 videocard, i later made 6600GT working with is maybe 2x faster, but it not re run benchmakrs with it, i wasnt successfull with Geforce 6800, but maybe someone will be.

But is only one benchmark, its hard to compare the rest, because other games are tested and it most of them, i got some vsynch or internal FPS cap even performance was max with KVM. There are few games, which not hit it and these need to retesting with Qemu 3Dfx to make comparision.

I added kjLiew results - all from videos to online sheet in special kjliew column, because there are only one from Linux which we have… it would be good for comparison with more machines later.
Ignored synthetic benchmarks, because it reduced scope and im not big fan of them. i like games more, but if someone want to invest time can add them himself.

@ruthan : Please shorten the thread title - it is too long.

@Fernando Done


Back when you did PCI Passthrough you were using Linux. QEMU is much better tested on Linux than Windows. Is possible than it works significantly better there, be it more performance or less bugs.

What these patchs seems to do is adding API Forwarding to QEMU, so that you can passthrough OpenGL calls to the host GPU Driver instead of having to process them on the emulated GPU (Hosts can’t natively process Glide, so I suppose they get converted to OpenGL by the wrapper?). That may put QEMU emulated GPU on parity with VirtualBox ones which supported API Forwarding since ages ago, and simplifies setups since you don’t need to do PCI Passthrough of an old Video Card supported by Drivers on the guest OS side.


Also, QEMU without CPU virtualization shouldn’t be better than PCem, since both pay the price for emulating the CPU, but QEMU is worse on the emulation of era-accurate Devices. If you use QEMU, you are using it precisely due to its CPU virtualization capabilities, or PCI Passthrough.


That you are wrote make sense, but lets but numbers besides, there could be many surprises.


Yeah on Windows wre are using dgVoodoo, i nGLide should be possible probably too, on Linux OpenGlide - there is something extra on github for it, as im using it with Windows i never studied it… original meant that its just patch for existing wrapper, but maybe KJVIew wrote it from the scrach.


Again that is forecast, but hard numbers would be better, there is stupid problem PCem has not inbuild FPS counter as far i know (i could be wrong and host machine is using only some external window refresh rate - 500 FPS), you can only measure games with inbuild benchmarks or at least inbuild FPS counter.

On Windows is really big boots when i enable WHPX acceleration - im getting in Windows virtual + 5 time more performance in games, there is also HAX for intel procesors, primary made for some Android device emulation and building apps, or something like that. Its not working with present Qemu Windows machine - crash when desktop should be loaded, its working in Dos, but a cant really test it because im using it on Beefy CPU and these games are mostly locked to 60 FPS and i haveit even without any accelerator.

BTW you are right person to write something about Linux acceleration options for Qemu, i few times tried to mess with these parameters and but never saw so Signiant boost and on windows with WHPX and Windows virtual.
In all my scrips i have this:

1
2
 
-machine type=pc,accel=kvm \
-cpu host,kvm=off \
 

KVM is here listed as accel and in second line, is kvm=off because of Nvidia cards i thing, but it looks strange. Are there any other alternatives or additional options?

On Linux you have only two options, accel=tcg (TCG, Tiny Code Generation. CPU Emulation like PCem or MAME. If you don’t specify that you want KVM it uses TCG by default) or accel=kvm (KVM, Kernel Mode Virtualization, CPU Virtualization like any other VMM). kvm=off in -cpu is totally unnecessary UNLESS you are doing PCI Passthrough of a GeForce, it just hide some CPUID values.

PCem allows you to try to match the performance of what a specific Processor should be, as if it was aiming for cycle accurate emulation like MAME. QEMU has no such way to limit performance. If you provide a VM with a virtualized CPU you are actually giving it as much performance as a Core of a modern Processor may provide. And the difference between a Pentium 2 or K6-II core @ 300 MHz to a Intel Skylake or AMD Zen running @ 4 GHz should be like, 15-20 times more the raw performance?

this reminds me the times before XNA even released.when people were trying to boost up directx and its dynamics with opengl,either using .net or c++ etc simply put opengl/direct3d wrappers or injectors. now i cant event even remember most of their names.but it might help you or others in someway maybe,therefore i will add them as i recall since code already includes glide and dos wrappers

Emugen’s wrappers list from wine to d8tod9 dll wrappers
SharpDX .net wrapper of directx api
MonoGame XNA implementation for Linux
DXVK A Vulkan-based translation layer for Direct3D 9/10/11 which allows running 3D applications on Linux using Wine
dgVoodoo2 GoG also using the same code
ReShade dll and shader injection
DOSBox linux and windows opengl emulation
DirectX Tweaker
DirectX Legacy (3.0, 5.2, 6.1, 7.0, 8.0, 8.1, and 8.2)
Microsoft DirectX June 2010
Microsoft OpenCL and OpenGL Compatibility Pack
Custom Resolution Utility (CRU)
Windows Subsystem for Linux more on this topic dxgkrnl


This seems to source of one of present Qemu gaming problems, some games at least on Windows with HAX / WHPX or without run simply too slow or too fast, regardles of framerate - details are in my online sheet… Im not expert here but my quess that emulation of some cpu timers is bugged. There are some Qemu - machine options for cpu XY, but i never got how it actually working, if only about change of CPU name + it define possible instruction set, or something like that, except instruction set, i dont thing that is limiting speed.


These are the -cpu parameters, not machine. And yes, they work exactly like you described, they simply change the CPUID identification of the Processor and shows (Or not) the Bits associated with support for a specific Instruction Set. They don’t change emulation or virtualization speed. These are intended to be used for live migration purposes, so that if you had a Broadwell Server and move to a newer Skylake, you use static Processor CPUID data instead of letting it change if you migrate to a newer platform, or reboot, in case that the guest Software doesn’t like the changes.

Run QEMU with the only parameter being -cpu help to see all different CPUIDs supported. Try also -device help to see all emulated Devices and -device virtio-scsi-pci,help to see all the parameters that affects a single Device.
Also execute QEMU with the parameter -monitor stdio to have access to the QEMU Monitor on the terminal that you execute it from. My favourite command is info qdev so you see a Device tree. It is mostly used for adding or removing things (Hotplug and Hotunplug) when the VM is running: https://documentation.suse.com/sles/11-S…mu-monitor.html
Albeit you’re limited to what the guest OS supports, so don’t expect that you can do so with anything but USB (Mainly when you want to do USB Passthrough of a plugged in Device, but is easier if you do so as part of the VM launch script).

@zir_blazer Thanks for explanation, other issue what im not trying to solve is not good sound quality on Windows. If you look at author Linux view, sound quality seems to be better (clean i dont hear noise) even for old SB16:
https://www.youtube.com/channel/UCl8InhZ…rMDSWd0A/videos
I have lots noise in sound ouput, in both Dos and Win9x guess, it could be maybe just bad Windows implementation… but in Qemu 5.2 or 5 sound audio settings changed, i know that you are Linux guy, but you are cleary more fluent in searching documentations and parameters.

Im now using this for Dos:

1
2
3
 
-device sb16 ^
-device adlib ^
-machine pcspk-audiodev=pa,id=onboard ^
 

Last line is for PC speaker, when i try this im getting that something is not right warning message, but sound is working. What is interesting im geting this only when HAX accel is enabled, without accel with line starting lines im not gettings this error, with WHPX is also without message, but WHPX for DOS is even less stable:
1
2
 
audio: Device sb16: audiodev default parameter is deprecated, please specify audiodev=sdl
audio: Device adlib: audiodev default parameter is deprecated, please specify audiodev=sdl
 

I dunno really understand how parameters to set to get rid off this message.

And this for Win9x:
1
 
 -device AC97 ^
 

For i dont see any working, Win9x are accel are only working with WHPX, otherwise (hx) crash at windows desktop

If you have any idea what to try to make sound better i would glady test it.

I also finally also with new builds and knowledge was able to complete all benchmarks with PCem and Qemu3Dfx(no CPU all accel, HAX, WHPX) for both SW rendering and Dos 3Dfx - Q1 shareware for this test was replaced by Q1DOS which have 3dfx version and in Q2Dos were used also 3Dfx Opengl api too.

So now we have hard numbers at least for Dos - all at the bottom of sheet:
https://docs.google.com/spreadsheets/d/1…dit?usp=sharing


I also made some quick Qemu3Dfx and PCem comparison table and added it too to original Qemu3Dfx sheet, here is just screenshot (my opinions):

Qemu3dxVsPCem.png

I made second iteration of my WIndows 98 demos testing package (234 demos). Ihave to upload it to Dropbox, because its 18.7 GB (in 5 parts), Mega and Google drive free have only free 15 GB now, as far i know Dropbox would probably later stop to working because of too much traffic…

These demos, are not easy to find… they are often on archive.org but, here download speed sucks and i found couple of them not working, they also need some data on cd which is not part of package, so i created supporting cd images (bin cue format ), some i had to search on some old game magazines cds. I tested 95% of installers from package myself and all working, only for some i had not right HW at the hand for quick testing.

Demos for 95% present for me why thing era was so great, you can quickly test lots of games, before you buy them on Gog, Steam… or you would try to convert their to packages to Win98 friend ones, or trying to get old physical copy.

Other addition is that in filename / folder name is now list of supported graphics API - SW (=2d,No 3d acc ), OpenGL, GLide and D3D, that is handy some cards, which have problem with some apis, but mainly for emulation as Qemu3Dfx (where working mainly Glide and OpenGL) etc. because of number of games, there are probably some mistakes, which you can report to me through PM etc (i will update spoiler list here). I tested it just by Fraps 1.9D (which not support Glide, not shown counter for Opengl + D3D) + searching of game folders for dlls and game setups and games options, pcgamingwiki, manuals etc.


Age Of Empires 2 demo-SW
Age Of Wonder I demo-SW
Age of Wonders2 demo-SW
Age-of-empire-3trial-Win98-SW
AgeOfEmpiresDemo-SW
alien vs predator 2sp demo-D3D
Alien vs Predator-MarineDemo-D3D
Anachronox-Demo-SW-OpenGL
Anno1602Demo-SWonly
Arx_Fatalis-demo-D3D-GlideProbably
Asghan-demo-SW-D3D-Glide
BALDURs-Gate-demo-NonPlayble-SWonly
BeyondGood&Evil-DX9-D3D
Blood2-demoD3D
braveheart-demo-Glide
Carmageddon TDR2000 demo-D3D
Carmageddon2Demo-D3D-Glide
claw-Monolith-Platformer-1997-SWonly
CnC-Red Alert Demo-SW
CnC-TiberianSUn-ts_demo-SW
CnCgenerals-435MB-D3D
ColinMcRay-Rally3_pcdemo-D3D
commandos-demo-SWonly
Conan cauldron-DX9-D3D
croc dem6-SW-3dfx-NeedsGlideFileReplacementForV3
Croc2DemoSW-D3D
CrusaderOfMightAndMagicD3D
Daikatana-demo-OpenGL-SW
Daikatana-MultiplayerDemo-OpenGL-SW
Dark Reign-SWonlyProbablyMaybeD3D
DarkColony-MagDemo-SW
DarkstoneDemo-D3D
Dark_Earth_demo-NeedMountedCD
DaytonaUSA Deluxe-SWonly
Delta Force-SWonly
Descent-Freespace-sdemo10-SW-Glide
Descent3demo10-OpenGL-D3D-Glide
Descent3demo2-OpenGL-D3D-Glide
DeusEx Invisible War-D3D
Deusex1-Demo-SW-Glide-OpenGL-D3D
Diablo-prereleasedemo-SW
Diablo1_demo-SW-only
Diablo2demo-SW-D3D-Glide
Die by the sword demo-SW+Glide
Diehard nacatomi demoD3D
Discipless2_demo-D3D
DrakanOrderOfTheFlameDemoD3D
Driver-Demo-Glide-D3D
Dungeon Keeper Demo-SWonly
Dungeon Lords-Demo1.5-Win98-D3Dprobably
DungeonSiege-demo-D3D
DungeonSiegelegendsofaranna_demo-D3D
Earth2140demo-SW-AlsoDos
Earth2150Demo-Glide-D3D-OpenGL
EmpireEarth-DemoD3D
Evolva-demoD3D
Expendable_demo-D3D
Fallout Demo-SW-Only
FarcryDemo-D3D-GLexperimental
fifa99demo-SW-D3D
Final-Fantasy-8-demo-D3D-SW
FinalFantasyViiDemo-D3D-SW
FlatOut2-Demo-DX9-D3D
FORSAKEN-Demo-SW-3dfx-D3D-PowerVR
Freelancer_demo-D3D
Get Medieval demoSW
giants-citizen-kabutor-demo-D3D
Gothic1demo-EN-D3D
Gothic2-demo-D3D
GTA2 demo-Glide-D3D
Half-Life Opossing force demo-SW-OpenGL-D3D
Half-life-1_Demo 1-SW-OpenGL-Glide
Halo-Demo-Win98-DX9-D3D
HARDWAR demo-D3D-Glide-SW-PowerVR
Heavy Gear demo-D3D-Glide
Heavy-Metal-fakk2demo102-OpenGL
Heretic2_demo_us-SW-GLide-OpenGL
Heroes-Of MaM-Demo-SW
Hexen 2 demo-SW-OpenGL
hexplore-demo-SW
HiddenAndDangerousDemo-D3D
HomeWorld-Demo-SW-OpenGL
Hulk_demo-Win98-DX81-D3D
IGNITION demo-SW
IncomingDemo-Glide-TooFastProblemOnFasterMachines
IncubationDemo-SW-3Dfx
Interstate 76 - Arsenal Demo D3D
Interstate-82-demo-D3D
Interstate76 demo-SW
JediKnight-D3D
Kingdom-Under-Fire_Demo_Win_EN-SW-only
Kingpin-DEMO-OpenGL
Kings Quest VIII Mask demo-SW-D3D-Glide
kiss psycho circuss 1a-D3D
KKNDdemo-SW
Knights of the temple I demo-OpenGL
knights-of-the-temple-2_demo-Win98-StarforceInc-D3D
KnigtsandMerchants-DEMO-SW
kohan_demo-SW
Legacy Of Kain-Soul Reaver-D3D-SW
Legacy-Ofkain-Demo-SW
LORDofMagicDemoSW
LostPlanetTrialDx9SetupD3D
Mafia demo Win98-D3D
MageSlayer demo-SW-D3D
MajestyDemo-SW
Maxpayne-demo-D3D
MaxPayne2DemoSetup-Win98-DX9-D3D
MDK1demo-SW-AlsoDOs
MDK2Demo-OpenGL
MechCommander 2 demoD3D
MechCommander-RunSetup-D3D
MechWarrior 2 Mercenaries SWonly
MechWarrior3Demo-D3D
Mechwarrior4 demo-D3D
Medal of Honour Allied Assault SP demo-OpenGL
Messiah-demo-Win9x-D3D-Glide
Metal gear 1 trial-SW-D3D
midnight-club-ii-1.0-Win98-DX9-D3D-32bitColorsOnly
Midnight_racing-NonPlayble-Glide
Monter-Trucks-Madness-2-demo-SW-D3D-Glide
MotoRacerDemo-D3D
MotorHead-1998-demo-SW-maybeD3DnotSure
mountandblade-0903-beta-demo-D3D
Myth2-Demo-180-D3D-OpenGl-Glide-SW
MYTHDEMO-GlideSW
Nascar Revolution-D3D
nascar2003-demo-D3D-OpenGL
NBA Live 2001-D3D
nbalive99demoSW-D3D
Need for speed 2–Glide
Need For Speed Porsche Unleashed-D3D
need-for-speed-iii-hot-pursuit_1.0-D3D-SW
NeverWinterNights1-Demo-D3D
Newman Haas demo-Glide
NHL-98-SW-GLide
nhl1999demo-SW-D3D
NHL2000demoSW-D3D
NHL2001Demo-D3D
nhl2002demoD3D
nhl2003demoD3D
no-lfife-forever-2_demo-D3D
no-life-forever-demoD3D
Nox-demo-D3D
operation-flashpoint-demo-Glide-D3D
Original War-D3D
Outcast_demo-SW
Painkiller_SP_Demo_3_Setup-D3D
pandemonium 2 demo-Glide
pandemonium-demo-SW-Glide
Pod-demo-3dfx-Voodoo1
Pool of radiance_DEMO-D3D
Populous3-Demo-SW-D3D
Postal2_ShareThePain_Demo-D3D-OpenGLmaybeThroughCfgFiles
punisher_demo-Win98-DX81-D3D
Pyl-demo-SW-3Dfx-Win+Dos
Quake 2 Demo-SW-OpenGL
quake 3 arena demo-OpenGL
Quake II Demo older-SW-OpenGL
quake wars demo final-KernelEXOnly-OpenGL
QuestForGlory-V-Demo-SWonly
Rage of Mages Demo-SW
rageofmages2demo-SW
Rayman2Demo-Glide
RedFactionInternationalDemo-Win98-D3D
Redguard demo-Glide-SW-DosAlso
Redline-FPS+CAR-Demo-Glide-D3D-GLide
Redline-moto-demo-D3D
Requiem avenging angel Sneek peak demo-Glide
requirem avenging angel demo2-SW-D3D-3dfx
Resident Evil 2 demo-SW-OpenGL
return-to-castle-wolfenstein_demo-1.0-OpenGL
Revenant-demo-SW-D3D
Rollcage demo-GlideD3D
Rollcage2demo-GlideAndD3D
RuneDemo-SW-OpenGL-GLide-D3D
Sacrifice-D3D
Sega-RALLY-SW
Sega-RALLY2DEMO-SW
Septerra Core-D3D
SeriousSam-2-demoOpenGL-D3D
SeriousSam1Demo-OpenGL
Seven Kingdoms 2-D3D
SevenKINGDOMs-SWonly
Severeance Blade of Darkness Demo-D3D
shadowman-demo-D3D
ShogoDemo-SW-only
Silver-D3D-MountInstallCDAndKeepMounted
Simcity3000Demo-SW
SinDemo-OpenGL-SW
SlaveZeroDemo-D3D-Glide
Soldier-of-FortuneDemo-SW-OpenGL
Speed Busters DEMO-D3D-Glide
Speed Busters-DEMO-GLide-D3D
Star-track-EliteForce Demo-OpengGL
StarcraftCDEMO-SW
StarTrek-EliteForce-2-sp_demo-OpenGL
StarWars-Racer-demo-D3D
summoner-demo101-Glide-D3D
system shock 2 demo-D3D
Teracide demo-D3D-SW
Test Drive 5DEMO-D3D-GLide
Test-drive-4demo_Glide
TestDrive6_demo-D3D
Thief-2DemoD3D
thiefdemoSW-D3D
Toshinden Demo Dos 3dfx-tested
Toshinden Demo-Dos-SW
Total Annihilation-Demo-SWonly
Total-Anhilation-kingdoms-demo-SW-Glide-D3D
tresspasser-demo-SW-D3D
TUROK-Demo-GlideOnly
turok2-demo-Glide-D3D
UltimaIXdemo-D3DAndGlide
undying-demoGlide-D3D-Glide-SW
Unreal2-MP-demoD3D
unreal2-sp-demoD3D
UPRISING-Demo-SWonly
UT2003Demo2206-D3D-GLthroughIni
ut2004-demo3334-D3D-SW-GL-ThroughIni
utdemo338-Glide-D3D
utdemo348-Glide-D3D
v-rally demo-Glide
v-rally-2-expert-edition_1.0-demo-D3D
Vampire_masquerade-demo-DX7-OpenGL
Vietcong demo-D3D
warcrafft 2demo-SW-alsoDOS
Warcraft-3DemoDX81-D3D
warlordsbattlecry2demo-SW
WarlordsBattlecryDemo-SW
Wheel of Time DemoGlideD3D
Wizzardry8-NetDemo-Glide-D3D-OpenGL-SW
XII-Demo-D3D



Download links:
https://www.dropbox.com/s/8d12h82ie190i7…kageA-D.7z?dl=0
https://www.dropbox.com/s/jd3s2whgf86shk…kageE-J.7z?dl=0
https://www.dropbox.com/s/nk10ls4jmpi7nk…kageK-O.7z?dl=0
https://www.dropbox.com/s/x9741jrwx6jg7c…kageP-S.7z?dl=0
https://www.dropbox.com/s/8rp7pulk7sl2ba…kageT-Z.7z?dl=0


Packages moved to Mega and Vogons Drivers library, links above are dead.
4.03 GB file on MEGA
2.82 GB file on MEGA
3.47 GB file on MEGA
3.21 GB file on MEGA
Password to all archives:
gustav

Here is demonstration biggest Qemu + 3dfx patch problem, after you manage to make some graphical api working… and that is wrong game speed, regardless of high framerate, it has to be some Qemu bug… Afaik, i every book / tutorial about game engines is chapter how to design proper timer and probably some implantations are hitting some Qemu design flaw / bugs, so timing is not right.

Here is video Unreal Tournament 99 where it is working right:

Hi,

Perhaps it’s too old but i’m interested by this version

I tried to compile QEMU and success after several days of bug and problems, but i still to have problem to compile wrappers currently.

I’d like to know if it’s useful to continue to this way. I 'm on w10 x64 then except if i’m wrong, there is no 3D support. My purpose is to play to games under windows98, i tried for 2d games and it works well.

I use ShaderGlass in addition to make shaders on all the desktop it looks great.

Best regards.

Check vogons.org, there are several thread lots of compiling guides or just pay KJLiew his $60 bucks for binaries with Direct3D as bonus.

I got my last working builds from robertmo , compilation of this project is nightmare.

Thanks for your advice, i will try.

I successfull compiled wrappers except for a file: glide2x.ovl
I tried with croc, p.o.d, half life and it doesn’t work, i will try with some games i saw on youtube. If it fail i will try with the files from vogon.

Windows 10 host, compilation with qemu 6.0.2.0

For the while i can’t pay (need to work before, long sickness) but in all case if i can run it i will pay as soon as i can because it’s important to support projects.

For the while i just want to see by myself if it will work, i will promote it on forums of my country.

I looked Unreal Tournament on your youtube channel it’s quiet impressive.

Cya

edit:
I understand why you say it’s a nightmare, i lost near more seven days to compiling everything, i never used mingw before, i tried cross compilation and a lot of thing, there is a lack of information the most of time. like to say you need dll from mingw package to run by the explorer. I was sure to could run something today but for the while absolutely nothing i launched, run. i remember you did a compalibility list, i think it was you i will check it to find a game already tested to see if it’s because my own compilation or just it’s not compatible. I was very enthousiast and i want to go further … I’ve alreay tested vmware, virtualbox, pcem, 86box, dosbox-x, Bochs… Qemu is perfect to play with 2d games but for the while i’m stuck with 3d games :confused: at least, under windows 10. And for the while i didn’t find something like ShaderGlass under ubuntu. Add i’m French to all my problems to understand how to do

edit2:
Ok it’s over for me, i see at the end, i need a recent cpu, mine is a 4770K i can try with my compilation it’s sad, i made with the 6.xx

Well i spent whole day compile Hexen 2 source code with VS 2005 and im still stuck on:
1>LINK : fatal error LNK1181: cannot open input file ‘libc.obj’
C++ Hell, its fast, but thats all…

Well i would send you my old version, but its not that easy, i forgot which files you exactly need… its complicated stuff, its not just one exe file.