QEMU is a good way to experiment with the "Classic" Mac OS. The Virtio devices make it even more fun to use!
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
-device loader,addr=0x4000000,file=/PATH/TO/classicvirtio/build/ndrv/ndrvloader
-prom-env "boot-command=init-program go"
-device nubus-virtio-mmio,romfile=/PATH/TO/classicvirtio/build/classic/declrom
Lets the mouse cursor move seamlessly in and out of the virtual machine window
PowerPC: works out of the box
-device virtio-tablet-pci
68k: requires virtio-mmio patch to QEMU
-device virtio-tablet-device
Lets QEMU use unpartitioned disk images, like Basilisk II or Mini vMac
PowerPC: not working yet 68k: works out of the box
-blockdev driver=file,read-only=on,node-name=FOO,filename=DISK.IMG
-device virtio-blk,drive=FOO
Presents a folder on the host computer as a bootable hard drive on the guest computer
_1
to mount_tag to use the native fork format on a macOS host (needs patches)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
Removed in favour of SolraBizna's QFB work in progress
Might be brought back in future as a 3D coprocessor, but not a display device
Append the following to your QEMU command line:
-device virtio-serial -device virtconsole,chardev=foo -chardev stdio,id=foo