elliotnunn / classicvirtio

Virtio drivers for Classic Mac OS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Virtio for Classic

QEMU is a good way to experiment with the "Classic" Mac OS. The Virtio devices make it even more fun to use!

Building

The Retro68 compilers are used. (Make sure that your checkout is from 2023-12-16 or later -- there was an important bugfix.)

Update your $PATH to include the Retro68 toolchain (powerpc-apple-macos-gcc etc).

Then:

git clone https://github.com/elliotnunn/classicvirtio.git
cd classicvirtio
make

Command-line args for qemu-system-ppc

-device loader,addr=0x4000000,file=/PATH/TO/classicvirtio/build/ndrv/ndrvloader
-prom-env "boot-command=init-program go"

Command-line args for qemu-system-m68k

-device nubus-virtio-mmio,romfile=/PATH/TO/classicvirtio/build/classic/declrom

Tablet input

Lets the mouse cursor move seamlessly in and out of the virtual machine window

  • bug: scroll wheel support unreliable, and on Mac OS 9 only

PowerPC: works out of the box

-device virtio-tablet-pci

68k: requires virtio-mmio patch to QEMU

-device virtio-tablet-device

9P device

Presents a folder on the host computer as a bootable hard drive on the guest computer

  • default resource forks and type/creator code format is a work in progress
  • append _1 to mount_tag to use the native fork format on a macOS host (needs patches)
  • bug: some filesystem operations (e.g. CatMove) unimplemented
  • bug: booting qemu-system-m68k requires hacks to PRAM

PowerPC: works out of the box

-device virtio-9p-pci,fsdev=UNIQUENAME,mount_tag="Macintosh HD"
-fsdev local,id=UNIQUENAME,security_model=none,path=/PATH/TO/HOST/FOLDER
# Use this option to boot from the device:
-device loader,addr=0x4400000,file="/PATH/TO/HOST/FOLDER/System Folder/Mac OS ROM"

68k: requires virtio-mmio patch to QEMU

-device virtio-9p-device,fsdev=UNIQUENAME,mount_tag="Macintosh HD"
-fsdev local,id=UNIQUENAME,security_model=none,path=/PATH/TO/HOST/FOLDER

GPU

Displays video at any resolution up to 4K

  • bug: client-side gamma correction
  • bug: misses direct (non-QuickDraw) framebuffer access when interrupts are off

PowerPC: patches required to QEMU and OpenBIOS

-device virtio-vga

68k: not working yet

About

Virtio drivers for Classic Mac OS

License:MIT License


Languages

Language:C 97.2%Language:Assembly 1.4%Language:Python 0.8%Language:Makefile 0.5%Language:Lua 0.2%