VOGONS


QEMU 3Dfx Glide Pass-Through

Topic actions

Reply 180 of 231, by mr.cat

User metadata
Rank Member
Rank
Member

Nope I don't think I've encountered that particular one.
But if you're using vmware-svga, then you do need to install a virtual USB mouse.
(nusb36e.exe from vogonsdrivers, and the switches "-usb -device usb-mouse" for qemu)

Also note, the SDL/Glide window is a separate thing from the actual desktop (I suppose this can potentially cause some menu breakage). Not sure if that's obvious...

Reply 181 of 231, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

@kjliew: do you remember the versions of Xquartz you had installed on your M1? Looks like 2.8.1 (latest) has performance issues, where 2.7.11 does not.

2.8.2 is not coming soon to fix this.

https://github.com/XQuartz/XQuartz/issues/166

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

List of ALL Android vulnerabilities

Reply 182 of 231, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

Mine is XQuartz 2.8.1 installed using the DMG from the official website. No tinkering. I don't have any performance issue with XQuartz on the M1. It is the same concept as XWayland for modern Linux other than capping OpenGL at 2.1.

Reply 183 of 231, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

Anyone know how can I fix Windows XP Guest keyboard and mouse in QEMU? Both devices do not respond to my input, no matter what I do... It's a VMware image that I have sucessfully converted to qcow2 (after removing VMware Tools and a few other devices) and booted in QEMU. However, I can't get past the login screen because there is no keyboard or mouse input. Bummer.

EDIT: Also, @kjliew, did you manage to compile a version with SPICE support? This would mean that I could use the SPICE tools and install the QXL VGA driver with XP and later. Unless you have a reason for not using it (like, performance reasons). But TBH I have reasons to think that QXL works better? VBEMP has some serious performance issues even with DOSBox-X, where it is used together with some configuration settings to have higher resolutions, albeit with less colors. Cirrus and vmware svga II are probably better choices, but if my memory serves well, last time I booted a XP VM under QEMU I had QXL VGA and did not have issues with keyboard and mouse. But then, I did not use your patch or -display SDL. *thinking...*

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

List of ALL Android vulnerabilities

Reply 184 of 231, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

I am definitely limited by my 2013 rMBP CPU power ... Even with HVF a brand new Windows XP SP3 VM struggles a bit be usable. Right now trying to get NFS2SE to play so I can compare with the 98 install. (the 98 install is much more smoother but games aren't).

Mamma Mia, NFS2SE is totally unplayable even using the HVF acceleration. 5.4 FPS. Worse than Win98 without HVF where it was at least somewhat playable. Well, blame it on Intel. I guess that I will have to wait until I get a M1.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

List of ALL Android vulnerabilities

Reply 185 of 231, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

Okay, I tried again with QEMU 6.1.0 rc3, hoping for some little improvement, and I saw that you made a few updates to your patch so I went for it again.

Turns out, this time was a bit faster to compile and build everything. All clear. However, performance under windows 98SE without HVF remains the same.

I tried to run with HVF, but before reaching the desktop (logon screen), the VM crashes and closes. Probably an ACPI issue? Does Windows 98 really not like HVF at all?

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

List of ALL Android vulnerabilities

Reply 186 of 231, by CybeREX

User metadata
Rank Newbie
Rank
Newbie

Hello, new version don't work? Aug 11 2021 build
Use all steps as before (when I complete compile qemu 3dfx and it's run on Ubuntu 20.04LTS)

Today after compile new version when I run NFSIISE 3dfx version exe
error appear - file glide2x.dll must be installed....
and no more activiti in terminal when glide.dll loads...

./qemu-system-i386 -version
QEMU emulator version 5.2.0
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
featuring qemu-3dfx@c95e466-02:30:42 Aug 11 2021 build
/usr/local/lib$ ls | grep glide
libglide2x.a
libglide2x.la
libglide2x.so
libglide2x.so.0
libglide2x.so.0.0.0
libglide3x.a
libglide3x.la
libglide3x.so
libglide3x.so.0
libglide3x.so.0.0.0

Reply 187 of 231, by mr.cat

User metadata
Rank Member
Rank
Member

Hmm isn't that the exact same problem as on the previous page a few weeks ago?
Check the location of glide2x.dll in the guest and make sure their stamp matches to qemu.

On a Linux host, the stamp in glide*.dll files can be checked with something like this (try not to puke):

objdump -d glide3x.dll |grep -A20 grGlideInit@0.: |grep movl.*edx |head -n2 |tac - |tr "," "$" |cut -d "$" -f 2 |sed 's/^0x//g' |tr -d "\n" |xxd -r -p |rev && echo

NB: Use with caution. That will probably be prone to breaking in interesting ways. Better methods for doing this would be welcome 😁
Well one way is to check the version string of qemu (the "featuring..." part) and then just search for that.

Reply 188 of 231, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

When you rebuilt QEMU, you just got to remember to rebuild all the guest wrappers, too. How difficult was that?

On Linux, it is also possible to script up everything -- build QEMU, wrappers, mount OS images with qemu-nbd, detect types of Guest OS images (98/2K/ME/XP) and replace the DLLs in the Guest OS images -- all in one-shot. The Glide DLLs are easier because they go into a fixed location. For OpenGL, it requires the scripts to search for OPENGL32.DLL into every games and replace the copy. It would be simpler to have all games gathered in, for eg. C:\GAMES, and the scripts just scan and replace OPENGL32.DLL within that folder. Consider all these an introductory course in DevOps. 😉

OpenGlide, both Host & Guest side binaries, and WineD3D addons are fully standalone and they require less frequent replacement as the QEMU/wrappers progress in GitHub. WineD3D addons, a donor's privilege 😉, have been quite stable for some time. Many games/demos just work 😁 Those ripped ISO/CUE/BIN would be filling up 256GB SSD pretty quickly. 😜

Reply 189 of 231, by CybeREX

User metadata
Rank Newbie
Rank
Newbie
kjliew wrote on 2021-08-12, 03:20:

When you rebuilt QEMU, you just got to remember to rebuild all the guest wrappers, too. How difficult was that?

Yes I know it and I rebuild it. And you need to copy new glide files to win98.
Copy FXMEMMAP.VXD to C:\WINDOWS\SYSTEM
Copy GLIDE.DLL, GLIDE2X.DLL and GLIDE3X.DLL to C:\WINDOWS\SYSTEM
Copy GLIDE2X.OVL to C:\WINDOWS
Copy OPENGL32.DLL to Game Installation folders

My steps is:
STEP1. Get dependencies and install it.
STEP2. Compile QEMU-3Dfx.
STEP3. Get dependencies for wrappers.
STEP4. Compile guest wrappers. (glide.dll, glide2x.dll, glide3x.dll, fxmemmap.vxd, fxptl.sys instdrv.exe).
STEP5. Compile guest wrappers. (opengl32.DLL).
STEP6. Compile guest drivers (glide2x.ovl) Just for DOS games
STEP7. Compile OpenGLide. From QEMU Extras. (libglide2x.la and libglide3x.la put in /usr/local/lib/)
STEP8. Prepare QemuVM and Win98.
STEP9. Run Qemu-3dfx Win98 VM

kjliew wrote on 2021-08-12, 03:20:

On Linux, it is also possible to script up everything -- build QEMU, wrappers

I write such script (for build Qemu & wrappers with all dependencies and commands for compile it right) This script was used before all work and same script used now.
Today I try clean build in Ubuntu 20.04 and post reply later =)

kjliew wrote on 2021-08-12, 03:20:

mount OS images with qemu-nbd, detect types of Guest OS images (98/2K/ME/XP) and replace the DLLs in the Guest OS images -- all in one-shot.

Thank you for info! Need add this to my script =)

kjliew wrote on 2021-08-12, 03:20:

WineD3D addons, a donor's privilege

Ah here it is... no free compilation quest from sources? =)

Reply 190 of 231, by CybeREX

User metadata
Rank Newbie
Rank
Newbie

Recompile all and after run NFSII qemu quit with error

glidept: DLL loaded - glide2x.dll
glidept: DLL unloaded
glidept: DLL loaded - glide2x.dll
trace: _grGlideInit@0 called
glidept: 15cf85f-13:45:41 Aug 6 2021 build WRAPFX32
wr2x_trace: _grSstQueryHardware@4
wr2x_trace: _grSstSelect@4
glidept: grSstWinOpen called, fmt 0 org 0 buf 2 aux 1 gLfb 0xcc8d1000
zsh: segmentation fault (core dumped) ./qemu-system-i386 -L pc-bios -rtc base=localtime -no-hpet -no-reboot -drive

PS I use "-display sdl"

Reply 191 of 231, by mr.cat

User metadata
Rank Member
Rank
Member

Hi, so that means the wrapper is trying to activate but something has gone wrong on the host side.
You could try to see if "sudo ldconfig" helps.
Also, see if anything is written to OpenGLid.log.

Reply 192 of 231, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

@CybeREX No issue at all running the same game on Apple M1. The macOS shares the same X11 code branch as Linux, so they are the same. So I don't know what exactly happen on your side. NFS2SEA is just plain simple. When the games work with OpenGlide, they are plain simple and the integration with QEMU is seamless.

Screen Shot 2021-08-12 at 2.12.52 PM.jpg
Filename
Screen Shot 2021-08-12 at 2.12.52 PM.jpg
File size
738.69 KiB
Views
388 views
File comment
NFS2SEA
File license
Fair use/fair dealing exception
CybeREX wrote on 2021-08-12, 08:14:
kjliew wrote on 2021-08-12, 03:20:

WineD3D addons, a donor's privilege

Ah here it is... no free compilation quest from sources? =)

The quest was always there, at winehq.org 😉. The donation pledge serves as a gauge to understand how serious anyone cares about retro games on Windows or everyone else would just move on with new games. There are other ways to play old games, for eg. building an old PC. One could already check out many, many great legendary 3Dfx Glide/OpenGL Windows games at no cost, just time & determination to build things up. For some, perhaps time & determination are something that they couldn't afford and the option to become project donors would be a sensible alternative.

Reply 193 of 231, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

The donation pledge will not gauge anything IMO, because the way I see the things, not everyone is interested in getting this to work with macOS for their retro games. I am, but we are a minority atm. Most linux users will go the easy route with dGPU passthrough, or VMWare Player, while Windows Users will resort to VMWare Player as well. The main question mark here is macOS users. Intel Macs will be fine with the free VMWare Player option like I am at the moment, but M1 Mac users only have UTM and your implementation as options. Even Parallels improved in their last v17 release the graphics performance for Windows 10/11 ARM installs only.

Meanwhile, latest UTM release now has GPU acceleration for OpenGL on Linux guests only. It is probably Akihiko Odaki's virgl or someone else's ANGLE/GL implementation. UTM also supports SPICE on all OSes, be it guests and hosts. I can see peformance improvements on Windows XP when using SPICE and VirtIO (viostor, virtio-net, qxl) drivers, but still, no 3D acceleration, sadly.

Have you thought about giving SPICE support for your QEMU 3Dfx implementation? I think it may improve performance. And it works on all OSes.

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

List of ALL Android vulnerabilities

Reply 194 of 231, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

SPICE is a VDI protocol, only RedHat QXL GPU requires it, the VirtIO peripherals don't, including virtio vga & gpu. It is possible to build QEMU with SPICE support for Windows, Linux and macOS and use RedHat QXL GPU without SPICE client and that also works with QEMU 3Dfx. QEMU native vigil3D/VirGL can render 3D on local SPICE client through unix socket, but not on remote SPICE client. Glide/MESAGL pass-through does not render through SPICE client, it is a very simple implementation concept that rides on QEMU as CPU infrastructure and forwards everything to host.

So as for the donation, it is a pledge not a sale and in return the donors got something extras. It's also called "an incentive to be a donor". Retro games community is always a minority, you're right. Playing on VMs, many would just laugh, they would rather build retro PCs. Trust me, dGPU passthrough is not an easy route but Linux geeks are mostly tech-savvy so many would go for it. It would just be a joke if anyone passed through a dGPU but yet not getting better performance in games playability compared to QEMU 3Dfx, wouldn't it 🤣?

I would truly welcome VMware/VirtualBox to bring on the competition for retro Windows games. If anyone was happy with VMware/VirtualBox for their games, good for them, they should just stick to it. Perhaps they would also gladly share their retro Windows games experience here at VOGONS or make YouTube videos and let the world know playing good old Windows games on VMs is a viable option.

Reply 195 of 231, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

I actually have a good experience with a XP VM on Vmware Fusion Player. I can even play Counter Strike 1.6, FIFA 98 runs 3dfx and Widescreen with Vmware SVGA 3D card, fills my entire 40” TV screen perfectly. But I know I won’t have that same thing when I get the Apple Silicon MacBook Pro/Air (whatever I can pay) next year @ Spain. So I have been looking for solutions since they announced the M1 macs last year. To be fair I thought that they would move to AMD when AMD cpu references were found in betas before the announcement and thought “ok I am safe for the future” but then M1 and its amazing power came in…

Maybe PCem v17 can handle it, there is a ARM build for mac. But I won’t know it until I try it. Would be useful for me to know it and have that data for decisions. I know dowsbox-x won’t be good enough because its cpu stops at Pentium MMX and can’t really handle Grand Prix 3 at all (and neither GP4) under Windows 98.

I think your solution is the only here available and viable for CS, FIFA 9x, NFS2SE and GP3. I will just leave GP4 out of equation for now until I can get a cheap mini pc and install a dual boot linux/windows on it, along with my (abandoned) G27 steering wheel for it. I remember that I had only bought my first MOMO steering wheel when I already had GP4 and played previous versions on keyboard back in my days.

Been looking for some old (cheap) intel mac minis that I know to be capable of handling that game, while I put my iPad Pro to be sold. Probably the 2009 Mac Mini with Nvidia GeForce mobile or the 2011 Mac Mini with an AMD Radeon, which is a hard to find model, both here in Brazil, for a cheap price. All I need is to get one and install XP or linux or just dual boot it. First I need to sell the iPad. Then I’ll go after it. For the other games I plan to use QEMU with your patch in my future new MacBook.

Parallels has improved the graphics in Windows 10/11 ARM virtual machines, so gaming seem to be possible there now even if translated from x86 thanks to the M1 amazing power. But I want the Windows 98 nostalgia on my mac when I travel for my kart races or work 🤷🏻‍♂️👀

For counter strike I might just move to CS:GO mac version 😑

"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

List of ALL Android vulnerabilities

Reply 196 of 231, by CybeREX

User metadata
Rank Newbie
Rank
Newbie

Found my problem why on Manjaro Qemu 3Dfx don't run correctly...
When compile QEMU Extras need add to line ../openglide/configure --disable-sdl && make --prefix=/usr

../openglide/configure --prefix=/usr --disable-sdl && make -j
glidept: DLL loaded - glide2x.dll
glidept: DLL unloaded
glidept: DLL loaded - glide2x.dll
trace: _grGlideInit@0 called
glidept: 33295ea-10:12:37 Aug 13 2021 build WRAPFX32
wr2x_trace: _grSstQueryHardware@4
wr2x_trace: _grSstSelect@4
glidept: grSstWinOpen called, fmt 0 org 0 buf 2 aux 1 gLfb 0xcc79d000
FBConfig id 0x105 visual 0x021 swapNone
glidept: LFB mode is Shared Memory (fast), One-copy
window 1024x768 (scaled)
316 frames in 5.0 seconds, 63.1 FPS
kjliew wrote on 2021-08-17, 22:23:

I would truly welcome VMware/VirtualBox to bring on the competition for retro Windows games. If anyone was happy with VMware/VirtualBox for their games, good for them, they should just stick to it. Perhaps they would also gladly share their retro Windows games experience here at VOGONS or make YouTube videos and let the world know playing good old Windows games on VMs is a viable option.

Before I found Qemu-3Dfx I run games in VM like VMware and VBOX. Also Use a bit VirtualPC 2007 and DosBox-x
Compare performance in VMware (Windows XP with nglide wrapper and custom patch for NFSIISE)
I can confirm that normal version NFSIISEN.EXE (no glide) works mach smooth on Qemu (no delay / inputlag when you drive a car) in VMware you notice a bit delay when you drive and some 0.5 sec freeze sometimes in Race.
And also Qemu have nice fullscreen smooth pixels if you enable -display sdl, gl=on and use CTRL+ALT+F. Clear and nice picture with correct aspect ratio.
Now testing glide version, will write feedback later =)

Reply 197 of 231, by CybeREX

User metadata
Rank Newbie
Rank
Newbie

OK here is first feedback:
In Qemu I use -cpu pentium2 NFSIISEA.exe works perfect maybe too fast))

NFS Pentium2.png
Filename
NFS Pentium2.png
File size
876.93 KiB
Views
190 views
File license
Fair use/fair dealing exception

I decide to switch to -cpu pentium and NFSIISEA.exe start with error

NFS Pentium1.png
Filename
NFS Pentium1.png
File size
14.88 KiB
Views
190 views
File license
Fair use/fair dealing exception

I recheck again (switch to -cpu pentium2 and all works fine again and don't work with -cpu pentium)

Also no more fullscreen option in Qemu when you use glide (CTRL+ALT+F)?
And Qemu-3Dfx have option or some Qemu flag for lock FPS at 60 for example or 30 FPS?

Reply 198 of 231, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

It depends on the mingw32 cross toolchain used to build the guest wrappers. By default, I think it generates codes for i686 which includes the CMOV instructions. The fault is an invalid instruction, very likely to be CMOV. If you enable KVM, then just use -cpu host. Otherwise leave out that option, QEMU default is always good enough. QEMU won't slow down with different CPU types, it was designed to run codes as fast as it can. You should just use V-Sync to lock the game at 60 FPS. Read THIS

If you want fullscreen game play, then you will have to switch into fullscreen first (Ctrl-Alt-F) before launching the game.

Yeah, NFS2SEA is a simple 3D game, almost too fast with KVM if you have V-Sync Off. You can also play without KVM, that gives me around 40 FPS on my Ryzen 2500U. That also makes it playable on any laptops from the past 7 years, including Celeron 847 and AMD C-60 with KVM. This is not possible with other emulators. 😁

Last edited by kjliew on 2021-08-18, 08:54. Edited 1 time in total.

Reply 199 of 231, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie
CybeREX wrote on 2021-08-18, 08:12:

And Qemu-3Dfx have option or some Qemu flag for lock FPS at 60 for example or 30 FPS?

Yes, create a text file named glide.cfg in the same location where qemu-system-i386 is invoked.

FpsLimit,36

The limit is an approximate, so you will have to tune it. But NFS2SEA is good for 60 FPS locked, so you should just have V-Sync On. The option is good for other games, such as EA Nuclear Strike, Titanium Mechwarrior 2/Mercenaries to lock the game around 30 FPS so that something won't break due to insane FPS.