Running Amiga like OSes on QEMU

Disclaimer

Unless another version is listed, this needs at least QEMU 3.0 and does not work with older versions. Latest changes may only be in QEMU sources from git and require building it yourself, sometimes with additional patches. See developer introduction for instructions. I don't provide binaries or help building it. These patches get in official QEMU releases eventually so these should become more widely available in the future but sometimes that may take some time to reach your source of binaries.

All PPC machines are emulated by the ppc-softmmu target in QEMU so you only need to build that ( configure --target-list=ppc-softmmu ). Building with --enable-debug makes emulation considerably slower so if you want performance don't enable this option. The sam460ex machine should run all of these OSes but MorphOS currently does not work with it so the mac99 Macintosh emulation can be used for that instead.

News

Further info by category:

AROS

sam440-ppc-boot-iso from the qemu-system-ppc -machine sam460ex -rtc base=localtime \ -drive if=none,id=cd,file=aros-sam440-ppc.iso,format=raw \ -device ide-cd,drive=cd,bus=ide.1 Minimum required QEMU version: v2.12.0. Known problems Screen is 640x480 and no other modes are available. (Not sure if this is something missing from emulation or an AROS problem.) Sometimes seems to hang during boot at a grey screen. (This may be a race condition in AROS, booting again helps.) Only the -device ne2k_pci network card emulation seems to work with the prm-rtl8029.device AROS driver. Other cards don't seem to work but not sure if it's AROS driver or QEMU problem but I think those AROS drivers are x86 only and don't work on big endian machine like PPC. Thefrom the AROS Nightly Build Downloads (ABI-v1) page should boot and mostly work but it's not well tested on real hardware so when a problem is found I'm not sure what is an AROS bug or an emulation bug. Start it as:Minimum required QEMU version: v2.12.0.

AmigaOS

Sam460InstallCD-53.58.iso ) is expected to boot, other machines are not emulated. Start it as: qemu-system-ppc -machine sam460ex -rtc base=localtime \ -drive if=none,id=cd,file=Sam460InstallCD-53.58.iso,format=raw \ -device ide-cd,drive=cd,bus=ide.1 Minimum required QEMU version: v3.0.0 (at least v5.0.0-rc2 recommended). Known problems Initial graphics mode is incorrect which results in strange blue white colors For some reason AmigaOS may not select the right graphics mode on boot and falls back to PAL LowRes which results in strange color dithering. Workaround is to select the last option to boot into LiveCD and select a better board specific mode from System / Prefs / ScreenMode. (ScreenMode prefs may take a long time to launch so wait some time like a minute or so after you've double clicked on it before trying again.) See screen shots showing the problem and workaround steps. Alternatively, you can patch the boot iso to change screenmode.prefs to use only a 16 bit mode so the selected mode and colors will be correct. This can be done by this binary patch kindly provided by Sebastian Bauer. This patch applies to iso with MD5 sum a9be88ab08c5883d6a6f14a12cd5b32f and should result in iso with MD5 sum 06ce410a7fc5f7dc236488f8ee76ad47 . One can use bspatch Sam460InstallCD-53.58.iso Sam460InstallCD-53.58-patched.iso Sam460InstallCD-53.58.iso.bsdiff to apply the patch. Please note that you are responsible to confirm to the license of AmigaOS and you're not allowed to distribute the iso. Crash while or after installing Update1 The libstdc++ included in Update1 has a bug that it uses lwsync instruction which is invalid on embedded PPC but only causes exception on e500 cores on real hardware. There's a patch to QEMU to allow this to work which is included in QEMU v4.0.0 so you should not see lwsync related crashes with newer QEMU versions. Some programs randomly crash Some programs may crash sometimes when QEMU is compiled without --enable-debug option. This happens less frequently in QEMU v5.0.0-rc2 so at least this version is recommended for AmigaOS. This seems to depend on speed of emulated CPU and only happens on fast systems but the exact cause is not yet known so it couldn't be fixed. Disk fills up quickly during install You may have too big block size set for the file system. This can be changed during partitioning in "select filesystem / edit defaults". Not sure why it seems to default to a large value such as 32k (maybe it depends on partition size) but if you expect to write many small files 1k or 512 bytes block size will use less space. Graphics operations are slow and there may be some glitches AmigaOS uses the hardware features of Sam460EX more fully than other OSes which means more needs to be emulated but this is not optimised yet and some features are not implemented yet. This may be improved in the future or if you have a CLGD driver (not on the Sam460 boot CD by default) it may work better with the cirrus vga emulation in QEMU but I haven't tested that. Only the AmigaOS 4.1 Final Edition install CD for the Sam460 (tested) is expected to boot, other machines are not emulated. Start it as:Minimum required QEMU version: v3.0.0 (at least v5.0.0-rc2 recommended).

MorphOS

qemu-system-ppc -machine mac99,via=pmu -m 512 \ -vga none -device sm501 \ -cdrom morphos-3.13.iso -boot d \ -prom-env "boot-device=cd:,\mac_ppc32\boot.img" \ -bios openbios-qemu.elf -serial stdio Minimum required QEMU version: v3.0.0. Since QEMU v4.1.0-rc0 you can also use -device ati-vga,guest_hwcursor=true instead of -device sm501 . See At least MorphOS version 3.8 is required, latest (tested 3.13) is recommended. Start it as:Minimum required QEMU version: v3.0.0. Since QEMU v4.1.0-rc0 you can also useinstead of. See What about better graphics emulation? FAQ entry for limitations. See problem 1. below for openbios-qemu.elf . Make sure you type or copy&paste the above command correctly. The prom-env parameter has to be exactly like above with all the backslashes, quotes around it and without any additional spaces. If you see an error and it's not booting and screen remains blank a typo in this option is the most common reason so check your command line carefully. Known problems USB devices don't work on mac99 The OpenBIOS firmware does not correctly describe PCI buses of the emulated machine which makes MorphOS try to access devices on the wrong PCI bus. This OpenBIOS patch provides a workaround, a patched OpenBIOS binary is here. Mouse movement periodically jumps and CPU usage is high on mac99 This is caused by a high priority temperature.sensor task which presumably tries to access temperature sensors over I2C but this is not emulated by QEMU so this hangs waiting for an interrupt which is not delivered so it has to time out. You can see this in Applications / LogTool / LogTool. Workaround is to lower priority of this task from Utilities / Task Manager until this is implemented in QEMU which helps with mouse freezing but does not avoid possible performance impact of this. The sensor task can also be stopped by ikill temperature.sensor from a shell command window or some start up script. I have collected some information on what is needed to emulate this I2C bus in QEMU here so if someone wants to help implementing it this is open for contribution. Network problems The preferred network card for the mac99 machine is sungem (emulating the on-board ethernet port of PowerMacs) which is supported by MorphOS but its DHCP client does not work well with the default user/slirp network backend of QEMU. Symptoms are hang during boot (especially booting from HD) or network not working. Better results may be achieved using tap networking and static IP address assignment. Some people found that resetting network config after installation by booting from CD and copying the relevant configs to EnvArc may fix this. See in Comments below. MorphOS does not boot on sam460ex For some reason it cannot find PCI devices and cannot boot because of that. It either won't find SATA controller and thus boot CD or HD or if booting from usb-storage with the SD card image (which is prevented by a bug in Sam460EX's U-Boot firmware anyway) it won't find display device so there will be no output. This problem may actually exist on real hardware too according to this forum thread, where similar issues are reported but I don't have real hardware to test. It looks like MorphOS tries to access PCI registers with an offset of 2 for some reason. This may not happen on real hardware or may wrap in some way and provide different results with some devices working and others failing or people just use PCIe graphics and avoid PCI devices on real Sam460EX.

If you have a real Sam460EX can you please share output of MOSSYS:C/PCIScan and/or test it with booting from a CD drive connected to a PCI card and without any graphics card using only the on-board SM502 graphics and let us know if it works?

FAQ