Page 1 of 1

Playing 3D games via QEMU and Mac OS X emulation....

Posted: Sun Oct 03, 2021 4:11 pm
by perk8j
I'm trying to play a game that uses hardware acceleration, but receive this message when launching the game:

Image

I'm assuming this is because the game uses openGL and not software mode?

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Sun Oct 03, 2021 4:23 pm
by Cat_7
Yes, real 3d hardware acceleration or emulation are missing from Qemu and SheepShaver.

Best,
Cat_7

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Sun Oct 03, 2021 4:31 pm
by perk8j
That's what I figured. Thanks

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Mon Nov 08, 2021 9:57 pm
by Nowhere Man
This raises the question. Some emulators do implement 3D acceleration. PCem, for instance, can emulate 3Dfx hardware. VirtualBox implements 3D in a different way that I don't really understand.

Could QEMU support 3D emulation or virtualization at some point? Is it feasible to virtualize a GPU the way CPUs are virtualized and could this be done in QEMU (for modern systems)? Could ATI and/or Nvidia hardware be emulated for older platforms, especially mac99 and x86? Would it be very difficult for this feature to be developed and added?

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Tue Nov 09, 2021 8:26 pm
by mcayland
Nowhere Man wrote: Mon Nov 08, 2021 9:57 pm This raises the question. Some emulators do implement 3D acceleration. PCem, for instance, can emulate 3Dfx hardware. VirtualBox implements 3D in a different way that I don't really understand.

Could QEMU support 3D emulation or virtualization at some point? Is it feasible to virtualize a GPU the way CPUs are virtualized and could this be done in QEMU (for modern systems)? Could ATI and/or Nvidia hardware be emulated for older platforms, especially mac99 and x86? Would it be very difficult for this feature to be developed and added?
QEMU already supports 3D emulation/virtualisation with virtio-gpu (see https://www.kraxel.org/blog/2021/05/vir ... cs-update/) which provides a way for the client to call 2D/3D APIs on the host. As always there are a couple of things required:
  • The host OS needs a driver for mapping the virtual 2D/3D calls to the real display
The NDRV updates need someone with experience writing MacOS graphics drivers for PCI devices which perhaps someone can help with in this forum. For the host driver if you're using Linux then you're in luck as it is already available; otherwise for Windows/MacOS hosts you'll need someone with experience writing graphics device drivers on these OSs to render the final result. There is some more information at https://wiki.archlinux.org/title/QEMU/G ... celeration but be warned that both of these tasks will require quite some effort.

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Tue Nov 09, 2021 8:50 pm
by SolraBizna
Curses, beaten to the punch.

If you don't try to share the GPU between the host and guest OS, modern systems allows you to isolate a GPU from the host OS and expose it to the guest OS "natively". This is incredibly inconvenient to set up and use, but it's often used by people who want to run Linux for everything-but-games and Windows for games. In this case, the only thing QEMU is virtualizing is the PCI interface. I keep trying to get my friends who possess PCI Macintosh graphics cards to try this with a QEMU-simulated Power Mac but nobody takes me up on it. :(
Nowhere Man wrote: Mon Nov 08, 2021 9:57 pm Could ATI and/or Nvidia hardware be emulated for older platforms, especially mac99 and x86? Would it be very difficult for this feature to be developed and added?
In order: Yes, and yes. :)

On a serious note, QEMU recently added very preliminary support for an emulated Rage 128 Pro, and also a Radeon RV100. When I tried them, they weren't yet working very well, but it seems that somebody is working on this, and they may be planning to support their full 3D feature sets.

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Wed Nov 10, 2021 9:55 pm
by adespoton
SolraBizna wrote: Tue Nov 09, 2021 8:50 pm Curses, beaten to the punch.

If you don't try to share the GPU between the host and guest OS, modern systems allows you to isolate a GPU from the host OS and expose it to the guest OS "natively". This is incredibly inconvenient to set up and use, but it's often used by people who want to run Linux for everything-but-games and Windows for games. In this case, the only thing QEMU is virtualizing is the PCI interface. I keep trying to get my friends who possess PCI Macintosh graphics cards to try this with a QEMU-simulated Power Mac but nobody takes me up on it. :(
Nowhere Man wrote: Mon Nov 08, 2021 9:57 pm Could ATI and/or Nvidia hardware be emulated for older platforms, especially mac99 and x86? Would it be very difficult for this feature to be developed and added?
In order: Yes, and yes. :)

On a serious note, QEMU recently added very preliminary support for an emulated Rage 128 Pro, and also a Radeon RV100. When I tried them, they weren't yet working very well, but it seems that somebody is working on this, and they may be planning to support their full 3D feature sets.
AFAIK, that Rage and Radeon support is *very* preliminary -- that is, so far, they've got as far as presenting an appropriate set of values to the OS so that it thinks there's a card available during boot. I haven't heard of any progress in actually emulating either card, nor in providing a translation layer that will emit OpenGL or Metal API calls based on the Rage or Radeon hardware calls.

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Fri Nov 12, 2021 1:24 am
by SolraBizna
adespoton wrote: Wed Nov 10, 2021 9:55 pm AFAIK, that Rage and Radeon support is *very* preliminary -- that is, so far, they've got as far as presenting an appropriate set of values to the OS so that it thinks there's a card available during boot. I haven't heard of any progress in actually emulating either card, nor in providing a translation layer that will emit OpenGL or Metal API calls based on the Rage or Radeon hardware calls.
I've tried it with Mac OS 9.2 and got a hang, then tried it with a contemporary release of Yellow Dog Linux and got a working fbcon but no working X. So... yeah, super preliminary. Still, the potential is exciting. The Rage 128 is my personal favorite fixed-function graphical architecture, and it has great compatibility and feature set for mid-to-late-90's games.

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Sun Jan 09, 2022 12:06 am
by Nowhere Man
mcayland wrote: Tue Nov 09, 2021 8:26 pm
Nowhere Man wrote: Mon Nov 08, 2021 9:57 pm This raises the question. Some emulators do implement 3D acceleration. PCem, for instance, can emulate 3Dfx hardware. VirtualBox implements 3D in a different way that I don't really understand.

Could QEMU support 3D emulation or virtualization at some point? Is it feasible to virtualize a GPU the way CPUs are virtualized and could this be done in QEMU (for modern systems)? Could ATI and/or Nvidia hardware be emulated for older platforms, especially mac99 and x86? Would it be very difficult for this feature to be developed and added?
QEMU already supports 3D emulation/virtualisation with virtio-gpu (see https://www.kraxel.org/blog/2021/05/vir ... cs-update/) which provides a way for the client to call 2D/3D APIs on the host. As always there are a couple of things required:
  • The host OS needs a driver for mapping the virtual 2D/3D calls to the real display
The NDRV updates need someone with experience writing MacOS graphics drivers for PCI devices which perhaps someone can help with in this forum. For the host driver if you're using Linux then you're in luck as it is already available; otherwise for Windows/MacOS hosts you'll need someone with experience writing graphics device drivers on these OSs to render the final result. There is some more information at https://wiki.archlinux.org/title/QEMU/G ... celeration but be warned that both of these tasks will require quite some effort.
Oh, very nice! I am hoping to run this well on my M1 Mini. So far, UTM is still kind of janky with Mac emulation, which of course stems from the state of QEMU's Mac emulation capabilities, but at least it's all looking promising.

I wish I could fix up the driver to work, but sadly I'm not at all a programmer.

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Sat Jan 22, 2022 4:05 am
by adespoton
This thread should be moved to PPC Mac Emulation > QEMU.

Re: Playing 3D games via QEMU and Mac OS X emulation....

Posted: Sun Jan 23, 2022 8:03 pm
by Bruninho
Im using a qemu fork called qemu-3dfx to play dos/windows glide and opengl games.

when it comes to direct3d games, zero luck. I need a working WineD3D library for this to work. I tried many but they don’t work. The fork developer does not want to give them free, asks for a hefty donation, $60, to enable it for three games of your choice.

He is holding back the development of 3d gaming under qemu because of his greedy behavior. And uh, don’t expect him to develop it for mac ppc games. Years ago someone developed a version of OpenGlide for mac, called MacGlide. Doesn’t work for qemu too.

However, his methods are based on passthrough of guest api calls to host. Very different than emulating a gpu.