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

About Qemu-system-m68k, a m68k Mac emulator for Windows, macOS and Linux that can run MacOS 7.1 to 8.1, AUX 3.x and NetBSD

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: 5545
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: 12
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
Granny Smith
Posts: 123
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
Space Cadet
Posts: 8
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: 3555
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
Space Cadet
Posts: 8
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: 12
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.
Post Reply