VOGONS


QEMU 3Dfx Glide Pass-Through

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 161 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
kjliew wrote on 2021-07-17, 09:33:

Are you sure your Core i7-4558U can't handle games like FIFA98RTWC and NFS2SEA with QEMU TCG?

I just tried out both demos on AMD FX, they were well over 30 fps all-time. But it is a desktop CPU anyway, big fan & heatsink, and I could definitely hear the fan spinning like crazy. Windows 10 task manager showed CPU turbo'ed at over 4GHz throughout those games running. At idle, AMD FX clocked at 1.5GHz. QEMU TCG is also slower in Windows 10 compared to Linux which should be similar with macOS.

It is hard to tell for old mobile tech from 2013, maybe they just have to be thermally constrained. Core i3-4010U and Core m3-6Y30 both aren't as good as AMD FX at QEMU TCG, but Core i7-6600U is definitely better. I have the impression that Haswell desktop variants such as Core i7-4790 should also be faster than AMD FX.

MacBooks tend to be thermally constrained, yes, because Intel did not want to listen to Apple to improve it for them. So Apple was forced to constrain them for reliability.

Add the delays in production from Intel, add the users complaining about their Macs running hot, even though it was Intel not Apple to blame for (the M1 is damn cold compared to their Intel counterparts) and Apple booted them out to make their in house solution for Macs.

I am pretty sure about what I saw here on QEMU TCG with your patch. Software mode in vanilla QEMU, these games run pretty fast, but ugly. With Qemu 3dfx, its slow motion. I mean, really slow motion.

Well, you know JIT? UTM’s implementation of JIT with QEMU TCG makes it powerful enough to run in some more recent iPad Pros (I haven’t seen the M1 iPad yet), and still beat my Mac with both gaming in software mode. I have seen these iPads running Windows XP and play Half Life (software mode ofc).

I can try one more thing, an app to keep the mac running the turbo boost and fast cooling speed, but it has its disadvantages in the future. In theory, I could boost QEMUs speed a little bit more by doing that. I have done it before with PCem, and I had seen some noticeable changes.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 162 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote on 2021-07-17, 09:36:
Bruninho wrote on 2021-07-17, 06:04:

all my attempts to get HVF working with Windows 98 SE failed on boot

maybe try a vanilla qemu too

might be worth to just try that bare bone dosbox for the sound problem in gp3

I already have a vanilla Qemu running them in software mode. GP3 will never be faster in dosbox because it requires at least a Pentium 3, and dosbox caps at pentium 1 while dosbox-x caps at mmx 200. gp3 software mode is already faster in vanilla qemu.

And there is no sound problem in GP3.

Last edited by Bruninho on 2021-07-19, 13:19. Edited 1 time in total.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 164 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote on 2021-07-17, 09:54:

i mean if win 98se works in vanilla qemu with hvf acceleration

We already said it does not. I have been there, done that. I could only get HVF working for XP+ builds of Windows. But it doesn't matter; it's better to stick with VMware running XP for the time being, where the games do have 3d acceleration and are insanely faster, until I get a M(x) Mac (whatever generation comes next) and try out QEMU TCG again. From what I have seen on his youtube videos, kjliew has managed to have a very good performance for most games even without HVF.

I am actually wondering if a similar performance without HVF could be achieved with a RPi4. I can't see why not, though it would still be slower than the M1; The RPi4 is now known to be powerful enough to run Windows 10, Windows 11 insider builds and Ubuntu 20.04 natively, so there is definitely power to do that.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 165 of 258, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
Bruninho wrote on 2021-07-17, 20:16:

From what I have seen on his youtube videos, kjliew has managed to have a very good performance for most games even without HVF.

Outside of one video which I made for an imitation of so-called "performance humiliation demonstration", all of them made good use of WHPX/KVM. Some games will always work without HVF given the speed of latest & greatest CPUs. If that covers all the games you want to play, then good for you. If "other camp" weren't so obsessed with "everything got to be software rendered for accuracy & longevity", it may also be viable as alternative option. In fact for "everything got to be software rendered", CPU virtualization would have boosted the performance of software rendering tremendously.

Bruninho wrote on 2021-07-17, 20:16:

I am actually wondering if a similar performance without HVF could be achieved with a RPi4. I can't see why not, though it would still be slower than the M1; The RPi4 is now known to be powerful enough to run Windows 10, Windows 11 insider builds and Ubuntu 20.04 natively, so there is definitely power to do that.

The folks from Pi Labs had done it here, but they were doing this before I made OpenGlide optimized for QEMU Glide pass-through available. They also called it "Very Slow". I think your Core i7-4558U should have been better for NFS2SEA. The Core m3-6Y30 managed between 17~22 fps in race trying to imitate what they were doing using only QEMU TCG on Arch Linux. I thought RPi4 or RockPi64 (RK3399) would have achieved similar performance with Core m3-6Y30. Maybe RPi4 OpenGL driver sucked compared to Intel UHD 515.

Feel free to repeat the fun they were doing and OpenGlide is much better now compared to what they used.

Reply 166 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

An overclocked RPi4 with a good cooling system + ubuntu 20.04 will probaby perform a lot better now. That video is from 1 year ago. Probably a lot of things - including drivers - have improved by now. With OpenGlide, things can be better now too, so yes, in a way, you're right.

vanilla QEMU TCG running games without 3dfx (software mode) is pretty fast. Grand Prix 3 in software mode needs a bit of graphics settings (disable a few things for car mirrors for example, helps a LOT. Since Grand Prix 1 I'm used to seeing only the cars on mirrors, no more details except car and track tarmac, so it's not a problem for me) tweaks to keep it under "100% Processor Occupancy" (Press O or P, I can't remember, to see it when in race) so the game can keep running fluid in race.

Windows 98 is also very responsive. But when using X11/XQuartz and Glide Pass-Through, Windows 98 has some slow down moments (mouse movements, for sure, are HARD to point and click for most of the time) and 3dfx games are played in slow-motion.

The best I could do for you now to find out why, is to recompile everything but this time create logfiles for each compilation/build (openglide, qemu, wrappers) so you can see if I missed something or if something wasn't correct for my Intel Mac platform. Would that help?

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 167 of 258, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Well, if it is slow then so be it, not surprising for TCG on mobile CPUs anyway. I don't think you could have missed anything, it is what it is. I am just a nice guy to help Apple to sell one more M1. 😁

I am also not the cry babies who complained to Moderator God that someone & someone mentioned constantly their perceived issues with Qemu ad nauseum. "*Ban them all* for the sake of what a wonderful world." 🤣

Reply 168 of 258, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
Bruninho wrote on 2021-07-17, 21:43:

... if something wasn't correct for my Intel Mac platform. Would that help?

If there is something useful for me, if you will, then I would be interested if you could monitor the CPU sustained clock speed with an app while running the game without tinkering to force artificial turbo boost. Part of the research is to understand "the thing" called "overhead" in virtualization or just API pass-through. For net performance gain, the time it takes for work accomplished must be smaller than time taken for "overhead". I think this is a simple concept that everyone can understand. Even for WHPX/KVM, there is a threshold for sustained CPU clock for effective speed up, otherwise one would perceive the "Matrix" slow-motion when the games perceived time quantum was messed up. I found that threshold to be around 1.5GHz and it also depends on the games and type of VMs, DOS/Win9x/WinXP, that presented different patterns of overhead for virtualization/pass-through.

The Core i7-4558U has the base clock at 2.8GHz, nothing shabby at all. Intel could have redefined what "base clock" really meant. For example, Core i3-4010U has the base clock at 1.7GHz and no Turbo Boost, it is the guaranteed performance at nominal condition. It relies on external cooling mechanism to sustain nominal condition or start throttling to cool down itself. Core m3-6Y30 has the base clock at 900MHz but it runs at 1.5GHz at nominal condition. It supports fan-less designs so I guess 900MHz is the clock that the CPU is capable of cooling itself without catastrophic shutdown at the thermal design profile. Perhaps it was also Intel Legal maneuvering to avoid any litigation for claimed performance.

Reply 169 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

Just coming here to report a few tidbits...

NFS2SEA: Game does run, although log says the race has 30fps, the speed feeling really was slower all around, even tough at various moments I was at 100/150/200kph. It felt like a road car in real life doing 40kph. I could even look around the scenery like a walk in the park. Geez.

FIFA 98 RTWC and FIFA 99: Slow-motion. Log reports 30 but feels like 15 fps or less.

Also, in menus on FIFA 98 the mouse leaves a trail when moving. When playing a match, if I pause, the menu shows a green background behind instead of being a nearly transparent background as it should be in original game.

Grand Prix 3 under software mode (I do not know how to make it benefit from pass-through) is slightly slower than it does on vanilla QEMU. I nearly did not feel a speed difference, but I can feel some hiccups when going through slow corners.

My weekend is over and I have a week full of work ahead, but when I have some time, I'll try converting my VMware Windows XP machine hard disk to qcow2 or raw and use it with QEMU and try to enable HVF for that. I believe that removing all the devices before shutting down the VMware machine (ofc I will have a backup in case it goes wrong) will allow me to boot on QEMU and re-detect everything.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 170 of 258, by CybeREX

User metadata
Rank Newbie
Rank
Newbie

Hello again 🤣
Here is what I complete =)

1. Building OpenGLide - done in /home/myxtra/ (got libglide2x.la and libglide3x.la)

2. Building QEMU - done in /home/myqemu/

./qemu-system-i386 --version
QEMU emulator version 5.2.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
featuring qemu-3dfx@0cce1fa-16:51:05 Jul 16 2021 build

3. Building Guest Wrappers - done (got fxmemmap.vxd; fxptl.sys; glide.dll; glide2x.dll; glide3x.dll; instdrv.exe; opengl32.dll)

4. Installing Guest Wrappers -done (Wrappers copied to Win98 VM and I run instdrv.exe)

When I run ./qemu-system-i386 with win98VM and try run NFSIISE (nsf2sea.exe 3dfx exe file) I got error - Sorry, the file glide2x.dll must be installed for NFSIISE for 3Dfx to run.
(in Win98VM files already in C:\WINDOWS\SYSTEM & C:\WINDOWS\)
Should I place in specific folder files (libglide2x.la and libglide3x.la) ?

Reply 171 of 258, by mr.cat

User metadata
Rank Member
Rank
Member
CybeREX wrote on 2021-07-19, 08:58:

When I run ./qemu-system-i386 with win98VM and try run NFSIISE (nsf2sea.exe 3dfx exe file) I got error - Sorry, the file glide2x.dll must be installed for NFSIISE for 3Dfx to run.
(in Win98VM files already in C:\WINDOWS\SYSTEM & C:\WINDOWS\)

Hi, that simply means the glide2x.dll stub wasn't found.
If you have the old glide*.dll files lingering in the directory where the .exe is launched, it's probably trying to load those (you can just rename or delete them).

The other thing to check is that your wrappers should be stamped with the same version as your custom qemu.
For the qemu binary, you can use --version to see the stamp (hey, that's git issue #9 in action!).
I don't know how the stamp in the dll stubs can be checked inside the guest, but just some hex editor will probably do nicely.
In Linux I just use xxd (the stamp is located somewhere around 0x29f0, well in my files anyway).
Maybe kjliew has some better tricks for that.
GL

Reply 172 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
CybeREX wrote on 2021-07-19, 08:58:
Hello again lol Here is what I complete =) […]
Show full quote

Hello again 🤣
Here is what I complete =)

1. Building OpenGLide - done in /home/myxtra/ (got libglide2x.la and libglide3x.la)

2. Building QEMU - done in /home/myqemu/

./qemu-system-i386 --version
QEMU emulator version 5.2.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
featuring qemu-3dfx@0cce1fa-16:51:05 Jul 16 2021 build

3. Building Guest Wrappers - done (got fxmemmap.vxd; fxptl.sys; glide.dll; glide2x.dll; glide3x.dll; instdrv.exe; opengl32.dll)

4. Installing Guest Wrappers -done (Wrappers copied to Win98 VM and I run instdrv.exe)

When I run ./qemu-system-i386 with win98VM and try run NFSIISE (nsf2sea.exe 3dfx exe file) I got error - Sorry, the file glide2x.dll must be installed for NFSIISE for 3Dfx to run.
(in Win98VM files already in C:\WINDOWS\SYSTEM & C:\WINDOWS\)
Should I place in specific folder files (libglide2x.la and libglide3x.la) ?

fxptl.sys and instdrv.exe are only needed for 2K/XP machines. For 9x machines you only need fxmemmap.vxd and the three glide dlls inside windows\system, while opengl32.dll has to stick inside the game's directory, next to the executable.
the libglide libraries have be to be installed in specific folders, yes. I believe you can issue a make install or sudo make install after building them.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!

Reply 174 of 258, by mr.cat

User metadata
Rank Member
Rank
Member

They can & they haven't.
It's not impossible, but as I said the wrappers do come with some extra maintenance burden (mismatching wrappers won't work at all).
In the old thread there actually were some binaries on offer for a while, but they ceased to work if you only update the main qemu binary.
You're welcome to try though 😁

Reply 175 of 258, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

At least, I am not making listFoes++; on any nice folk who's been Heavenly enlightened, stepped up and did it for everyone, or into the path of chasing down and censoring "hostile forks", or accusing forks of not contributing "a slap in my face". It is childish, isn't it? If I had forked, then I would just laugh at main if they don't know how to cherry-pick what they wanted. Stop bothering me, GPL does not work in that way. One shouldn't have GPL'ed if one didn't want to or know how to cherry-pick.

I think they are all very nice folks indeed who love to see the project continue having fun and attracting more donors to fund for games preservation which they also benefitted without making donation themselves.

Don't you see how all these have been working all along?! 😉

Reply 176 of 258, by CybeREX

User metadata
Rank Newbie
Rank
Newbie

When I run NFSIISE (3dfx version) in Win98 on host Ubuntu 20.04 I got this:

glidept: DLL loaded - glide2x.dll
glidept: DLL unloaded
glidept: DLL loaded - glide2x.dll
trace: _grGlideInit@0 called
glidept: 0cce1fa-06:06:22 Jul 19 2021 build WRAPFX32
wr2x_trace: _grSstQueryHardware@4
wr2x_trace: _grSstSelect@4
glidept: grSstWinOpen called, fmt 0 org 0 buf 2 aux 1 gLfb 0xcc88a000
Segmentation fault (core dumped)

and Qemu quit... any help?

Reply 177 of 258, by mr.cat

User metadata
Rank Member
Rank
Member
CybeREX wrote on 2021-07-20, 10:45:
When I run NFSIISE (3dfx version) in Win98 on host Ubuntu 20.04 I got this: […]
Show full quote

When I run NFSIISE (3dfx version) in Win98 on host Ubuntu 20.04 I got this:

glidept: DLL loaded - glide2x.dll
glidept: DLL unloaded
glidept: DLL loaded - glide2x.dll
trace: _grGlideInit@0 called
glidept: 0cce1fa-06:06:22 Jul 19 2021 build WRAPFX32
wr2x_trace: _grSstQueryHardware@4
wr2x_trace: _grSstSelect@4
glidept: grSstWinOpen called, fmt 0 org 0 buf 2 aux 1 gLfb 0xcc88a000
Segmentation fault (core dumped)

and Qemu quit... any help?

Hi, OK so the wrappers did activate.
See github issue #15, this crash could be related to that gtk quirk that kjliew talks about there.
In short, you may need to enable sdl on the qemu command line.

Reply 178 of 258, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie
mr.cat wrote on 2021-07-20, 14:40:
Hi, OK so the wrappers did activate. See github issue #15, this crash could be related to that gtk quirk that kjliew talks about […]
Show full quote
CybeREX wrote on 2021-07-20, 10:45:
When I run NFSIISE (3dfx version) in Win98 on host Ubuntu 20.04 I got this: […]
Show full quote

When I run NFSIISE (3dfx version) in Win98 on host Ubuntu 20.04 I got this:

glidept: DLL loaded - glide2x.dll
glidept: DLL unloaded
glidept: DLL loaded - glide2x.dll
trace: _grGlideInit@0 called
glidept: 0cce1fa-06:06:22 Jul 19 2021 build WRAPFX32
wr2x_trace: _grSstQueryHardware@4
wr2x_trace: _grSstSelect@4
glidept: grSstWinOpen called, fmt 0 org 0 buf 2 aux 1 gLfb 0xcc88a000
Segmentation fault (core dumped)

and Qemu quit... any help?

Hi, OK so the wrappers did activate.
See github issue #15, this crash could be related to that gtk quirk that kjliew talks about there.
In short, you may need to enable sdl on the qemu command line.

issue a

export SDL_VIDEODRIVER=x11

before running qemu.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.
READ: Right to Repair sucks and is illegal!