Balaton's patches for the GPIO appear to have made it to the master, so only the qemu-mac99-cpus-v2.patch is needed for testing now.Just in case I attach files here, balaton1 and balaton2 should arrive at some time in main qemu tree, qemu-mac99-cpus-v2.patch should be applied with git apply (at least in my case). qemu tree is commit b69801dd6b1eb4d107f7c2f643adf0a4e3ec9124 and openbios tree from https://github.com/mcayland/openbios.
Note that you need -M mac99,via=pmu or may be via=adb-pmu otherwise patch will segfault with -smp 2.
Code:./qemu-system-ppc -M mac99,via=pmu -cpu g4 -smp 1 -m 256 -hda ~/QEMU/Mac-netbsd-2gb.qcow2 -bios ~/K38_sdcard1/Documents/openbios-qemu-smp.elf -accel tcg,thread=multi
a bit like this, I guess (NetBSD sadly regressed recently on qemu-system-ppc, so i can't log in into my macppc VM)
![]()
qemu-system-ppc no longer boots NetBSD/macppc (#2741) · Issues · QEMU / QEMU · GitLab
Host environment Operating system: Debian OS/kernel version: Linux gumbo 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux...gitlab.com
You might want qemu-system-ppc64, but for gdb debugging I needed 32-bit qemu, it seems.
GDB usage — QEMU documentation
qemu-project.gitlab.io
I used tips from that page, just running gdb in Debian ppc32 running in another qemu instance with networking (so target IP was 10.0.2.2 )For Linux you can add cmd arg "-nosmp" via -append "args" qemu switch.
Code:./qemu-system-ppc64 -M mac99,via=pmu -cpu 7450 -smp 2 -m 512 -kernel ~/boot/vmlinux -nographic -bios ~/K38_sdcard1/Documents/openbios-qemu-smp.elf -accel tcg,thread=multi -boot d -append "console=ttyPZ0"
I tried cpu g4 and cpu 7450 without any difference.
Kernel deb at
Браузер устарел / Облако Mail
cloud.mail.ru
MTCCG info at
Multi-threaded TCG — QEMU documentation
www.qemu.org
So if anyone wants to test, we really need tester, it's pretty easy to do now.
Install the needed dependancies with brew:
Building QEMU for macOS
The system requirements are:
Additional build requirements are:
- One of the two most recent versions of macOS (currently Ventura or Sonoma)
- The clang compiler shipped with the version of Xcode for that OS X. GCC might also work, but we recommend clang
As Qemu can now also run in SDL or GTK windows besides a Cocoa window, optionally you can install the SDL2 and./or gtk+3 devel packages.
make (when installed through brew, make is installed as gmake, so use gmake)
After downloading the QEMU source code, double-click it to expand it.
Then configure and make QEMU. The target-list option is used to build only the machine or machines you want. If you don't specify it, all machines would be built. Probably not what you want.
Pull the latest git repo of qemu:
Code:
git clone https://github.com/qemu/qemu.git
Then move the patch to the qemu directory and:
Code:
cd qemu
git apply mac99-cpus-v2.patch
mkdir build && cd build
../configure --target-list=ppc64-softmmu
mke -j8
If the build is successful, you should now have a qemu-system-ppc64 binary in the build directory, for testing you can run it from there:
Code:
./qemu-system-ppc64-unsigned \
-M mac99,via=pmu \
-m 1024 \
-hda <disk-img> \
-bios openbios-qemu-smp.elf \
-cpu 7450 \
-cdrom <install-img> \
-boot d \
-prom-env 'boot-args=-v' \
-smp 2,cores=1,threads=1,sockets=2 \
-accel tcg,thread=multi
Just adjust the <disk-img> and <install-img> with you paths to the image files.
Tested and working are OS X Tiger/Leopard/Snow Leopard, OS 9 will boot but freeze on access to the second CPU. Classic mode works fine under Tiger with SMP aware apps about to use the second CPU.
Questions, fire away!