QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Schedules and announcements about program releases.

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby RaVeN-05 » 2019-1-31 @ 09:28

kjliew wrote:What's the system requirement for Pyl (Dust)?
- Blood 1, but has "slow-motion" effect. KVM is fine though, very fluid animation (Core-i3/Intel Graphics/OpenGlide).
- Redguard, but has "slow-motion" effect. Haven't tried this on KVM if the "slow-motion" would go away with KVM.
- Archimedean Dynasty, very fast and smooth 80~100fps, not sure if this would be too fast. TCG can sustain 25~35fps which is still highly playable.
WHPX works for Win98 on Intel CPU.


slow motion effect is on WinXP? at Win98 it seems ok.
slow motion can be fixed, it already fixed in Glidos, by changing value of PIT Timing.

i played Pyl on P2 350Mhz+Voodoo2 works faster than any other way i tried it.

dgVoodoo 2.x is future , its already great

P.S. How can i count fps on Pyl any dos or win98 apps that show fps on screen
User avatar
RaVeN-05
Member
 
Posts: 268
Joined: 2009-12-30 @ 13:32
Location: Ukraine

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby digger » 2019-1-31 @ 13:25

kjliew wrote:Patch and guest wrappers prebuilt binaries updated in 1st post.

Many thanks to robertmo for his courtesy for getting Pyl to run on QEMU. As a result, I am able to improve shared memory LFB mode to support AUX/DEPTH buffer, which is critical for QEMU acceleration. QEMU Glide pass-through issue with Intel HAXM is fixed. So far on Windows 10 x64, I had tested Intel HAXM with DOS and Win2k VM. Intel HAXM does not like Win98 at all.

I had only done minimum Intel HAXM testing opportunistically. if someone had done more thorough testing with Intel HAXM including older or 32-bit Windows, you are welcome to report back your results.


Wow, I really hope the QEMU developers will be willing to mainline your work into the official QEMU codebase once it's stable enough, so you or others won't have to maintain a fork. I know retrogaming isn't a mainstream use case, but for the sake of historic preservation and such I hope they will recognize the relevancy of it and accept your contributions with that in mind. :)

I know a lot of people here on Vogons and elsewhere always keep repeating the mantra "just use DOSBox or PCem, don't bother with virtualization", but that's ignoring the fact that a lot of later DOS(4GW) and Win9x games are still way too heavy to run at full speed in a fully emulated era-appropriate PC. Modern x86 processors allow us to run those games mostly natively through hardware-assisted virtualization. It's a shame if the retrogaming community doesn't take advantage of this functionality. Even if the latest PCs are fast enough to fully emulate a mid to late nineties PC for such games, it would still be a waste of the CPU cycles (and thus energy) when such games could also be run virtualized with at least the same performance.
User avatar
digger
Member
 
Posts: 220
Joined: 2010-2-12 @ 18:15
Location: Amsterdam, the Netherlands

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby DosFreak » 2019-1-31 @ 13:53

For good reason. Alot of things break when using virtualization and troubleshooting that for old software is a pain and then try explaining that to a regular user. Good luck. For games that need it then virtualization is fine but I'd rather it be the exception than the rule for old games especially since virtualization requires support in the emulator, host and hardware which is yet something else to troubleshoot and fix.

Of couse none of the above matters in the end. All people care about is shiny so if it's fast (300+FPS in Quake 2 in DOS!!) and looks pretty for a couple of minutes for a youtube video then that is what will win out.
User avatar
DosFreak
l33t++
 
Posts: 10426
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby RaVeN-05 » 2019-1-31 @ 15:33

at least 60 fps max limit is okay =)
its like approaching of hybrid workaround for games:
part virtualization, part emulation, part wrapping.
if all that combined good = modern PC will able to play heavy 90s heavy games like Pyl (Dust)
coz it shame hi-end Gaming Today PC can't run 90s lol
User avatar
RaVeN-05
Member
 
Posts: 268
Joined: 2009-12-30 @ 13:32
Location: Ukraine

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-31 @ 19:40

DosFreak wrote:For good reason. Alot of things break when using virtualization and troubleshooting that for old software is a pain and then try explaining that to a regular user. Good luck. For games that need it then virtualization is fine but I'd rather it be the exception than the rule for old games especially since virtualization requires support in the emulator, host and hardware which is yet something else to troubleshoot and fix.

Of couse none of the above matters in the end. All people care about is shiny so if it's fast (300+FPS in Quake 2 in DOS!!) and looks pretty for a couple of minutes for a youtube video then that is what will win out.

Well said, virtualization is indeed a complicated piece of art, but so does dynamic recompilation. I see this as an inevitable evolution in emulation when simple interpreter approach is running out of steam. In fact, modern state-of-the-art hardware assisted virtualization is designed to solve the ever increasing complexity of dynamic recompiler with diminishing returns. Today's modern CPUs are capable of maintaining the VM state machine on the HW and providing indication upon VMEXIT to simplify the SW side of device emulation, including the instruction boundary that triggered VMEXIT. I think this makes troubleshooting software easier than running on dynamic recompilers and dealing with the chained translated code blocks.

It is true that performance is the key motivation behind of all this, otherwise trading simplicity without gaining anything in return is stupid.

Believe it or not, I actually worked on this with the intention to replay all the Mechwarrior 2 series, the games I used to play 20 years ago but not having the luxury playing all of them with 3D acceleration. The GBL expansion had no 3D accelerated version until the Titanium series. Somehow I just couldn't stop working on this, and I ended up writing more codes than playing the games. :lol:
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-31 @ 21:13

RaVeN-05 wrote:How can i count fps on Pyl any dos or win98 apps that show fps on screen

If you run the game on QEMU, then QEMU console will display FPS stats every 5 seconds based on the freq of _grBufferSwap called. Yeah, I don't know if the game would support native benchmark mode to show the real-time FPS during game play. I would be interested to see how it would perform on real machine. Judging from philscomputerlap benchmark data for games such as GLQuake, Quake2 and Unreal 1, QEMU acceleration/dgVoodoo2 competes very well against the high-ends of Pentium 3/Voodoo2 SLI.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby digger » 2019-1-31 @ 23:52

DosFreak wrote:For good reason. Alot of things break when using virtualization and troubleshooting that for old software is a pain and then try explaining that to a regular user. Good luck. For games that need it then virtualization is fine but I'd rather it be the exception than the rule for old games especially since virtualization requires support in the emulator, host and hardware which is yet something else to troubleshoot and fix.


Well, to be fair, the host and hardware parts are becoming less of a problem these days, since all modern x86 CPUs going back almost a decade support hardware-assisted virtualization and virtualization software has gotten a lot better over the years. The one thing I'm still disappointed about is that open source virtualization solutions like QEMU and VirtualBox don't regularly port and reuse the high quality sound card emulation code from the DOSBox project. They support Sound Blaster emulation (and QEMU even supports GUS emulation), but not nearly at the same quality as what DOSBox is capable of, at least from what I have understood. They all use the GPLv2 license, so I really don't understand why there's not more sharing and joint development going on w.r.t. device emulation. But other than sound emulation, I don't see any remaining challenges. The VGA compatibility of the emulated graphics cards in QEMU and VirtualBox is already proven and in good condition. And since Vesa VBE already provided a convenient high level hardware abstraction that was supported by all later DOS games that offered any graphics modes higher than regular VGA (640x480 at 16 colors), it even makes is possible to run such games on a paravirtualized graphics adapter without having to emulate any graphics chipsets. And now kjliew even got Glide pass-through to work, so pretty much all the ingredients are there.

Once everything is merged, it will be possible for average users to simply install QEMU on a modern OS, just like they've been installing and using DOSBox. And then they can run their old games, even the later ones from the mid 90s and onward.

I do agree with you however, that in the long run full emulation will win out. This is simply because x86 won't be the dominant PC architecture forever. Eventually everyone will likely switch to desktop PCs and laptops based on ARM or hopefully even RISC-V CPUs, or perhaps some other superior future architecture that none of us have even heard about yet. And at that point virtualization will of course no longer be an option for running DOS games. And since such systems will be powerful enough to emulate even the most demanding DOS and early Windows 9x games fluently, that will no longer be an issue either. But until then, I do believe virtualization can be a powerful and performant tool in the arsenal of retrogaming, and so far, an undervalued and underutilized one, at least for this purpose.

Of couse none of the above matters in the end. All people care about is shiny so if it's fast (300+FPS in Quake 2 in DOS!!) and looks pretty for a couple of minutes for a youtube video then that is what will win out.


True. Most retrogamers indeed won't care about the details, as long as they can play all their favourite classic games the way they remember playing them.
User avatar
digger
Member
 
Posts: 220
Joined: 2010-2-12 @ 18:15
Location: Amsterdam, the Netherlands

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby digger » 2019-2-01 @ 00:06

kjliew wrote:Believe it or not, I actually worked on this with the intention to replay all the Mechwarrior 2 series, the games I used to play 20 years ago but not having the luxury playing all of them with 3D acceleration. The GBL expansion had no 3D accelerated version until the Titanium series. Somehow I just couldn't stop working on this, and I ended up writing more codes than playing the games. :lol:


I love how an obsession like that can lead to such a fun and challenging project that ends up benefitting a lot of fellow retrogamers. :lol: Again, kudos, and thanks for your hard work on this.

Now if only someone with the necessary knowledge and skills would look into porting the sound emulation code from DOSBox, PCem and possibly VDMSound to QEMU... ( Not that I want to burden you with that as well, kjliew. I'm sure there are other people with the knowledge and experience to do that on this forum. ;) )
User avatar
digger
Member
 
Posts: 220
Joined: 2010-2-12 @ 18:15
Location: Amsterdam, the Netherlands

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-2-01 @ 10:21

kjliew I wonder if this one works for you with WHPX too.
Attachments
qemu-system-i386.7z
(1.79 MiB) Downloaded 11 times
User avatar
robertmo
l33t
 
Posts: 4747
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-2-02 @ 01:34

robertmo wrote:kjliew I wonder if this one works for you with WHPX too.

On Intel or AMD CPU?
it works on my Intel Core i3 laptop with WHPX. I was able to run PCPBENCH.
Running Pyl, no, because the sound card detection would crash in similar way as "DIR" for Intel CPUs. If sound card was set to None, then Pyl would work. Though, I did not try it on AMD CPU, I believe AMD CPUs do not have this issue with WHPX.

One strange thing I found that your binary requires mingw-w64 DLLs to be in the same place as the EXE. It ignores the $PATH search for DLLs invoked from a full-fledged MSYS2 shell. My local QEMU build does not have this problem. I can run it from anywhere from MSYS2 shell and DLL search will reach /mingw64/bin by itself.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-2-03 @ 22:08

ok, got pyl working in dos with whpx and sound

it is just the screen scrolling in text mode that kills qemu.

So:
autoexec.bat only with:
PROMPT $P$G

config.sys only with:
DEVICE=C:\CTCM\CTCM.EXE
files=40

the rest you start later :)

use cls a lot.

------------------------------

whpx is twice faster than tcg
whpx is twice slower than haxm

------------------------------

nc has got ega lines with alt-f9 that gives twice lines on a screen

------------------------------

inserting:
@cls
at the beginning of and between every few lines of autoexec.bat may be the most convenient ;)

or
@pause
@cls
In norton commander use pgup/pgdn/home/end.

------------------------------

this even allows having
DEVICE=C:\CDROM\OAKCDROM.SYS /D:MSCD000
in config.sys

------------------------------

@echo off
cls
at the beginning of autoexec.bat is nice too ;)

------------------------------

you can dir to a file
dir>txt.txt
and read it with edit
edit
;)

or just use any file manager ;)

------------------------------

you can also:
driver.exe>file.txt
I have a mouse driver with whole screen ascii picture so none of the above helped ;)

------------------------------

I recall i already had this scrolling problem somewhere... many, many years ago....
Last edited by robertmo on 2019-2-04 @ 14:33, edited 1 time in total.
User avatar
robertmo
l33t
 
Posts: 4747
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby RaVeN-05 » 2019-2-03 @ 23:39

other great titles to test is redguard and lans of lore, they both heavy like Pyl. And also worth to play.
User avatar
RaVeN-05
Member
 
Posts: 268
Joined: 2009-12-30 @ 13:32
Location: Ukraine

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-2-04 @ 02:40

if you have any of the games running in virtualbox you can just use it's hdd image with qemu and boot to comand prompt (dos) mode:
qemu-system-i386.exe hddimage
User avatar
robertmo
l33t
 
Posts: 4747
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-2-04 @ 14:35

added one more tip to the previous long post
User avatar
robertmo
l33t
 
Posts: 4747
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-2-04 @ 16:18

I noticed that when trying to boot win98 with step-by-step confirmation, both haxm and whpx quit qemu at the exactly same moment - immediately after answering (doesn't matter if yes or no) question about msmouse driver. Both quit qemu at the moment of pressing the key just with a different console message. VBEMP9X is installed.
User avatar
robertmo
l33t
 
Posts: 4747
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby RaVeN-05 » 2019-2-04 @ 16:57

maybe try mouse com driver from free dos?
User avatar
RaVeN-05
Member
 
Posts: 268
Joined: 2009-12-30 @ 13:32
Location: Ukraine

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-2-04 @ 17:29

nothing to do with mouse, it is just the last windows question.
User avatar
robertmo
l33t
 
Posts: 4747
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-2-04 @ 17:35

Patch updated in 1st post. No change to guest wrappers.

Added option to support fake LFB locks for AUX/DEPTH buffer without passing through into Glide wrappers, especially for Glide wrappers that do not support it.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-2-04 @ 17:47

robertmo wrote:I noticed that when trying to boot win98 with step-by-step confirmation, both haxm and whpx quit qemu at the exactly same moment - immediately after answering (doesn't matter if yes or no) question about msmouse driver. Both quit qemu at the moment of pressing the key just with a different console message. VBEMP9X is installed.

I use a blank CONFIG.SYS and almost blank AUTOEXEC.BAT (just doskey, PATH and DIRCMD) for Win98. No real-mode mouse and CD-ROM drivers for Win98 even if I plan to run DOS games from Win98 DOS prompt. Win98 has its own protected-mode drivers which work much better than any real-mode drivers for DOS sessions.

And, use "Logo=0" in MSDOS.SYS to remove the startup logo.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby ruthan » 2019-2-04 @ 18:03

Its possible to have on one machine nGLide and dgVooodoo 2? Because tutorial is for dgVoodoo.. and im really happy nGlide wrapper for Win 10 not virtualized stuff, but not sure if install of dgVooodoo for Qemu would not mess with nGlide for games outside of Qemu?

BTW some tutorial, or genered configs for make Dos / Win98 machine would be nice, i made few Qemu machines to run, but im not daily user.

So qemu64-3dfx-20190204.tar.gz is source code only and i can ignore it and just download prebuild binaries?
Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough HW.
User avatar
ruthan
Oldbie
 
Posts: 1094
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

PreviousNext

Return to Release Announcements

Who is online

Users browsing this forum: No registered users and 1 guest