Skip to content

PowerPC Mac displays: Mac OS 9 hardware cursor, ATI Radeon 7000/9000/9700 - #8236

Open
brunocastello wants to merge 4 commits into
utmapp:mainfrom
brunocastello:pr/ppc-graphics
Open

brunocastello wants to merge 4 commits into
utmapp:mainfrom
brunocastello:pr/ppc-graphics

Conversation

@brunocastello

Copy link
Copy Markdown

UTM settings for the PowerPC Mac display work in utmapp/qemu:

Display names show only the card, e.g. "ATI Radeon 9000 (ati-radeon-9000)".

Testing

Mac OS 9 (VGA and Radeon 7000), Tiger and Leopard (Radeon 9700/9000) in my UTM builds on Apple Silicon. This branch is rebased onto current main and hasn't been built by itself.

To be upfront: I built this with Claude (Anthropic) through Claude Code. The code and analysis are largely Claude's work; I directed it and tested it in my own VMs. Please review it with that in mind, and I'm happy to change anything.

The qemu_vga.ndrv for Mac OS 9 can hand the Mac OS cursor to the host
through the VGA device's mac-accel extension, so moving the mouse no
longer redraws guest VRAM. Turn it on for the VGA device on mac99.

Needs a QEMU with the mac-accel property (utmapp/qemu#34).

Signed-off-by: Bruno Castelló <bfcastello@gmail.com>
Assisted-by: Claude:claude-opus-5-5
QEMU's ATI Radeon 9000/9700 device (utmapp/qemu#37) translates the guest's
vertex and fragment programs to GLSL, compiles them to SPIR-V with shaderc
and converts that to MSL with SPIRV-Cross. Pin both and build them
statically for macOS, so the app does not depend on anything outside the
sysroot.

Only libshaderc_combined.a is kept from the shaderc install: it embeds
glslang and SPIRV-Tools, and the rest would add shared libraries to the app
and headers that shadow MoltenVK's own SPIRV copies.

Signed-off-by: Bruno Castelló <bfcastello@gmail.com>
Assisted-by: Claude:claude-opus-5-5
The "ATI Radeon 7000" display card on mac99 emits QEMU's ati-vga in R100
mode (32 MiB VRAM by default, guest_hwcursor=off, xres/yres from the
host's full-screen size, 60 Hz), selects the openbios-ppc-r100-retail
firmware, and uses no qemu_vga NDRV: ATI's own Mac OS 9 drivers drive the
card. VGA RAM size is offered for all ATI Radeon cards.

Needs a QEMU with the R100 model of ati-vga (utmapp/qemu#35).

Signed-off-by: Bruno Castelló <bfcastello@gmail.com>
Assisted-by: Claude:claude-opus-5-5
…C guests

Two display cards on mac99 for Mac OS X, driven by Apple's own drivers:

- "ATI Radeon 9700" (R300) for Mac OS X 10.3 to 10.5. OpenBIOS has no
  node for the card, so the boot-command adds the properties the driver
  looks for (VRAM,totalsize, ATY,R300, model, ...). The card sits in PCI
  slot 0xE, which is where those properties and OpenBIOS expect it, so the
  display is emitted before the network device.
- "ATI Radeon 9000" (RV250) for Mac OS X 10.2 Jaguar, which has no R300
  driver; it only needs the VRAM size property.

Both use the openbios-ppc-r300 / openbios-ppc-rv250 firmware, an AGP
capable uni-north bridge, the Metal renderer and no ROM.

Mac OS X guests also get:

- the hardware-cursor NDRV (qemu_vga_hwc.ndrv) and the osx-nvram machine
  property, so nvram and bless (the last step of an install) work;
- a USB tablet instead of the virtio one (Mac OS X has no virtio-input
  driver), with usb-tablet abs-scale undoing the stretch Mac OS X 10.4
  applies to absolute pointer input;
- a 1 GiB translation cache by default on PowerPC Macs, since Mac OS X
  fills a few hundred MiB with translated code on boot and desktop alone
  and a full cache throws all of it away.

Needs QEMU with the ATI Radeon 9000/9700 devices, the ndrv machine option
and the OpenBIOS images (utmapp/qemu#37), and the osx-nvram machine option
and the usb-tablet abs-scale property (utmapp/qemu#33).

Signed-off-by: Bruno Castelló <bfcastello@gmail.com>
Assisted-by: Claude:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant