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

Schedules and announcements about program releases.

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

Postby hail-to-the-ryzen » 2019-5-14 @ 02:14

The reliability and performance of a video driver, whether an official version or an enthusiast build, may show a different result between emulation, as in qemu, and hardware.
hail-to-the-ryzen
Member
 
Posts: 330
Joined: 2017-3-09 @ 01:34

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

Postby kjliew » 2019-5-26 @ 07:17

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

Support DJGPP DXE for 3Dfx OpenGL through Mesa 3D library.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

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

Postby RaVeN-05 » 2019-5-26 @ 09:06

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

Support DJGPP DXE for 3Dfx OpenGL through Mesa 3D library.


It means Quake1 dos 3dfx , Quake II dos 3dfx and HeXen II dos 3dfx will work. I am Right? =)
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-6-09 @ 09:10

https://github.com/intel/haxm/releases
It looks haxm has been updated with:
Enabled some 32-bit Windows guests to boot under HAXM
They said Win 7 and 8.1 boot. While 10 doesn't. 9x, xp, vista not mentioned.
User avatar
robertmo
l33t
 
Posts: 4746
Joined: 2003-6-18 @ 10:35

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

Postby robertmo » 2019-6-25 @ 07:19

kjliew, Zeus asked some technical questions here:
http://www.zeus-software.com/forum/view ... 8612#p8612
User avatar
robertmo
l33t
 
Posts: 4746
Joined: 2003-6-18 @ 10:35

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

Postby alberthamik » 2019-9-10 @ 07:19

I'm rather curious, realizing the potential of this project, if it would be possible to add this pass-through feature to QEMU's PowerPC platform, specifically it's Mac99 emulation for Mac OS 9.X, which the voodoo cards technically worked on, but usually had to be run with a specific Macintosh release of voodoo card, or you could flash the GPU firmware. However, I'm unaware if Macintosh actually supported glide per se, or if it's support was mostly with just the GPU accelerating OpenGL or something. I've been glancing into other things if it falls into the latter, such as PCem's voodoo emulation.
alberthamik
Newbie
 
Posts: 17
Joined: 2017-7-09 @ 13:08

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

Postby ruthan » 2019-9-10 @ 15:45

MacOS its using OpenGL for sure, i dunno if Glide too.
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: 1093
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

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

Postby alberthamik » 2019-9-10 @ 17:49

I found one of those places with old macintosh files and they had drivers for voodoo cards and to paraphrase Glide and OpenGL were mentioned. So, apparently Glide actually made it to Mac OS? Hard to say because this isn't very well documented info, only classic Mac veterans would know.

There was also Quickdraw 3D, Apple's answer to D3D for Mac OS classic. This apparently was used a fair bit.
alberthamik
Newbie
 
Posts: 17
Joined: 2017-7-09 @ 13:08

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

Postby kjliew » 2019-9-10 @ 19:53

The reason that I think MacOS can be supported is because it has a matured Glide wrapper, a fork of OpenGlide and much improved by the community. And, QEMU is fully supported under MacOS including the new HVF accelerator. No sure though, if HVF would work for PowerPC variants, likely not. However, QEMU TCG should work and that is a significant magnitude faster than any existing x86 emulation that I am aware of.
https://sourceforge.net/projects/macglide/

Personally, I have never owned or played around with Mac hardware and software, so I would rely on community feedback to bring up this project when there is sufficient interests. When someone reported a build error on MacOS due to missing lib linkage, I fixed it, but the same folk did not reply or feedback on how things had progressed on his side, if he was able to run any 3Dfx Glide games.

alberthamik wrote:if it would be possible to add this pass-through feature to QEMU's PowerPC platform, specifically it's Mac99 emulation for Mac OS 9.X, which the voodoo cards technically worked on

The latest code should be architecture agnostic as far as I can tell after the transition to guest push model. Prior to the transition, the host pull model used to have an x86 specific implementation which was not implemented for other architecture. QEMU itself is highly portable, and I tried my best to retain that principle. The only issue that I did not pay a lot of attention is endianness, and this may or may not be an issue for PowerPC.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

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

Postby alberthamik » 2019-9-11 @ 04:16

I'm not sure if the first two paragraphs of the above reply were directed at me, but I'm not interested in the subject of getting this glide pass-through wrapper running in modern Macintosh OS. I'm simply wanting to run an emulated PPC core w/ Macintosh Classic OS w/ this glide pass-through feature. If what you're saying is true, then maybe it would be possible that little needs to be modified for emulated PPC Mac OS 9 or whatever to recognize the "voodoo card" in QEMU. From what I can see though, it'd require a separate compile and I'm not knowledgeable in that. mac99 emulates a PCI graphics card though, but I have no clue how it worked with later voodoo cards, if it also required a separate PCI slot to be available or whatever.

I think one problem might be in how Macintosh Classic OS handled monitor output. I don't think it would have allowed for a voodoo card to output a secondary image. And if it did, that'd be news to me.
alberthamik
Newbie
 
Posts: 17
Joined: 2017-7-09 @ 13:08

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

Postby alberthamik » 2019-9-11 @ 09:16

I realized with that last post that I didn't specify my goal here wasn't so much just being able to play 3D accelerated Mac games (otherwise, there's many options out there as you noted already, and I own 2 PowerMac G4s so yeh), but to have specifically a potential method of reliable emulation of 3D accelerated graphics for an emulated Mac platform (for which QEMU is probably the best bet as Sheepshaver is dead effectively) in situations like speedrunning, but especially TAS work which I've been researching a bit on different emulators for that. Didn't mean to come off like I was being stubborn about it, I realize I hadn't explicitly stated that goal to begin with. I'm sure that this makes better sense when I put it like that.
alberthamik
Newbie
 
Posts: 17
Joined: 2017-7-09 @ 13:08

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

Postby kjliew » 2019-9-11 @ 11:58

alberthamik wrote:I'm simply wanting to run an emulated PPC core w/ Macintosh Classic OS w/ this glide pass-through feature. If what you're saying is true, then maybe it would be possible that little needs to be modified for emulated PPC Mac OS 9 or whatever to recognize the "voodoo card" in QEMU.

I see your point. Glide pass-through does not emulate any Voodoo PCI cards, it intercepts at the Glide API level and pass-through them onto the host. For DOS/Windows, this is done by the OVL/DXE/DLL libraries which aren't part of the QEMU code. My implementation includes this specialized guest libraries for DOS/Windows called the "guest wrappers".

Unfortunately, I am not familiar with MacOS/OSX software interface to 3Dfx Glide API, if they can directly make use of the API or they only speak OpenGL. For QEMU PPC emulation of a mac99 machine to support 3Dfx Glide API in MacOS guest, it needs the OS specific implementation of "guest wrappers". If we take Linux guest as a close example of MacOS, then the "guest wrappers" consist of kernel module /dev/3dfx, libglide2x.so and libglide3x.so. For Windows, 3Dfx provided OpenGL implementation simply translates the GL API to Glide API, so no need of guest specific OpenGL layer. If this is the same for Linux/MacOS, then OpenGL just work out-of-box.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

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

Postby alberthamik » 2019-9-11 @ 22:20

So from what I'm reading (it's not easy extracting macintosh .sit files on modern systems, even with official stuffit software), 3Dfx apparently did in fact translate the GL API to Glide. There was drivers released for all models of Voodoo cards made starting from voodoo 2 it seems. Also, I guess I was wrong about not supporting multi-monitor setups:

Code: Select all
If you are using a Voodoo3 in a multi-monitor configuration with an ATI card, you should not remove any of the ATI drivers. You should leave both them and the 3dfx drivers installed. By default, Quake3 will choose device 0 to run the game on. (Device 0 is the startup screen. You can change which monitor is the startup screen in the monitors control panel.)  If you are running with the Voodoo3 as a secondary monitor (i.e., not the startup screen), then you can make Quake3 choose to use other devices with the r_device command from the console. This command takes a single parameter, which is the number of the device to use, starting with 0. "r_device 1" would choose the 2nd monitor, etc.


If we want to take a stab at seeing if the mac99 ppc core will recognize a emulated voodoo card that would be cool, however one caveat is that normal voodoo cards needed to be flashed to work with Macintosh, and the files I've found for flashing the card contain that data. I'm not sure how that'd be factored into this pass-through feature, if it'd require a bit of rewriting.

EDIT: The flasher utilities I'm finding so far only provide flashed BIOS for voodoo 3. Would that be a problem?
alberthamik
Newbie
 
Posts: 17
Joined: 2017-7-09 @ 13:08

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

Postby alberthamik » 2019-9-11 @ 22:36

Dunno why I only just now found this post, but turns out I wasn't the first person with this idea: https://www.emaculation.com/forum/viewtopic.php?t=9197

EDIT: Oh wow: https://www.emaculation.com/forum/viewt ... 34&t=10265

Sorry for the double posts, felt this needed to be highlighted as this is some surprising discoveries. Also it looks as though that 2nd link, which mentions work to emulate the Rage 128 in Qemu, didn't get further than emulating the 2D side of things. This was also only less than 2 years ago, so not sure if work stalled on that or if people are still trying to figure it out independent of this project. I feel like given the info I'm finding concerning Glide on Macs, it will be potentially easier than what these folks were trying to do.

I feel as though you should maybe reach out to some of these people, kjliew. They probably know alot more about QEMU's PPC emulation than any of us here. They might also know how to provide the info needed in the probable case we can't just drop in the code you have currently for the PPC core to work with.
alberthamik
Newbie
 
Posts: 17
Joined: 2017-7-09 @ 13:08

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

Postby kjliew » 2019-9-11 @ 23:45

It really depends on how prevalent Glide API outside of DOS/Windows. If there isn't any games/apps directly speak Glide API, then translating GL API to Glide API seemed redundant. QEMU's recent work on virgil3d/virglrenderer/virtio-gpu already support accelerated OpenGL by passing GL calls from guest to host, and proven to work with Linux guest on Linux host. Though, I haven't tried any actual games such as QuakeGL or Quake2 Linux ports to check out if the performance is similar with QEMU 3Dfx Glide pass-through on DOS/Windows guests. I only tried glxgears and glmark2, and they have a nice performance boost on Linux guests with accelerated OpenGL through virtio-gpu.

Upstream QEMU recently received codes for emulating ATI graphic hardware. Emulating real hardware will always have issues with performance, no matter how perfect the emulation can be. No sure why QEMU folks would still spend efforts in this direction rather than improving existing virgil3d/virglrenderer/virtio-gpu.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

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

Postby ruthan » 2019-9-11 @ 23:58

I spend quite a lot of time, 2 years ago with Qemu MacOS and it was bad, im still checking Qemu changelog and didnt saw any breakthrough in Mac OS emulated HW support section, for good virtualization you need much more than such CPU,MB and storage emulation, you need good virtual device drivers / emulation.

Sound cards are now working? I thing that main problem was that there werent even good videocard emulation for 2D and that performance was as its for Qemu quite typical not good enough even with very fast cpu, but its could be now better when you can get 8 cores with normal desktop board, but QEMU for such old system would be probably mainly using single core.

When i saw situation i got for 70 dolars real iMac G5, screen is still quite good, only annoying things are its noisy and need space.. and also PowerPC Linux means no game at all and PowerPC Linux videocard drivers sucks too.. even if game would be here. I never really tried Windows with PPC support, i saw some NT for it, i dunno if there was Windows 2000 port, but i doubt it.

Best info about this is probably here:
https://www.emaculation.com/doku.php/qemu
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: 1093
Joined: 2013-3-07 @ 04:01
Location: Schwarz Wald-from France to Ukraine, from Denmark to Austria. Celts+German+Slavs melting pot.

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

Postby robertmo » 2019-9-12 @ 06:02

kjliew what do you think about adding a parameter in glide.cfg so that fire no longer shines through closed door in Pyl.
User avatar
robertmo
l33t
 
Posts: 4746
Joined: 2003-6-18 @ 10:35

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

Postby kjliew » 2019-9-12 @ 06:24

robertmo wrote:kjliew what do you think about adding a parameter in glide.cfg so that fire no longer shines through closed door in Pyl.

Using "LfbHandler,1" will solve that visual artifacts, but then KVM/WHPX/HAXM accelerators stop working or become too slow. I think I observed the same in Nightmare Creatures where objects in boxes can be seen. Well, the shared memory model of LFB/Depth locks is an approximation of how the original semantics supposed to be, so it is not perfect. LfbHandler model is more accurate in term of original semantics.

I am no 3D programmer, so I don't have the right knowledge to understand what could have caused such artifacts. If someone more knowledgeable in the field can share his thoughts and explain the potential causes and solutions, then I am more than happy to understand, implement and verify the potential solutions.
Last edited by kjliew on 2019-9-12 @ 07:15, edited 1 time in total.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

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

Postby robertmo » 2019-9-12 @ 07:07

[quote=Zeus]
My suggestion to kjliew would be to leave "LfbNoAux=0" unoptimized
[/quote]
User avatar
robertmo
l33t
 
Posts: 4746
Joined: 2003-6-18 @ 10:35

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

Postby kjliew » 2019-9-12 @ 07:14

robertmo wrote:My suggestion to kjliew would be to leave "LfbNoAux=0" unoptimized

"LfbNoAux,0" is already the default.
kjliew
Member
 
Posts: 478
Joined: 2004-1-08 @ 03:03

PreviousNext

Return to Release Announcements

Who is online

Users browsing this forum: No registered users and 2 guests