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

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
perk8j
Space Cadet
Posts: 8
Joined: Fri Oct 01, 2021 9:01 pm

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

Post 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?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

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

Post by Cat_7 »

Yes, real 3d hardware acceleration or emulation are missing from Qemu and SheepShaver.

Best,
Cat_7
perk8j
Space Cadet
Posts: 8
Joined: Fri Oct 01, 2021 9:01 pm

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

Post by perk8j »

That's what I figured. Thanks
User avatar
Nowhere Man
Student Driver
Posts: 19
Joined: Sun Sep 30, 2018 4:38 am

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

Post 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?
mcayland
Mac Mechanic
Posts: 152
Joined: Sun Nov 01, 2015 10:33 pm

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

Post 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.
User avatar
SolraBizna
Inquisitive Elf
Posts: 32
Joined: Mon Sep 27, 2021 1:39 am

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

Post 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.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

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

Post 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.
User avatar
SolraBizna
Inquisitive Elf
Posts: 32
Joined: Mon Sep 27, 2021 1:39 am

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

Post 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.
User avatar
Nowhere Man
Student Driver
Posts: 19
Joined: Sun Sep 30, 2018 4:38 am

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

Post 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.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

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

Post by adespoton »

This thread should be moved to PPC Mac Emulation > QEMU.
Bruninho
Tinkerer
Posts: 43
Joined: Sun May 16, 2021 11:24 pm

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

Post 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.
Post Reply