@kas1e What the fastest possible x64 emulation way of OS4 today ?
QEMU v8!
Moved out of curiosity after I watched the videos by Rene Engel (
https://www.youtube.com/@reneengel2258) I have order a copy of AmigaOS 4.1 FE for Pegasos 2 at (
https://www.amiga-shop.net/en/Amiga-So ... 1-Final-Edition::689.html).
After trying a few times, I succeed running AmigaOS 4.1 FE on QEMU 8.0 rc1 emulating a Pegasos 2 and I must admint I am quite impressed by its performance.
The overall speed is so good that the system is quite usable, light years ahead of the sluggish experience I obtain when emulating a Sam460ex running AmigaOS 4.1 FE on the same linux x86_64 laptop.
Is still slower than running AmigaOS on my real Sam460ex, particularly true when writing on the HD, but it might be due to the fact that I was forced to format the HD with FFS and not SFS, because I am unable to mount any partition formatted SFS.
At the moment the ISO with AmigaOS 4.1 FE for Pegasos 2 cannot be launched directly, because the ATI Radeon emulation on QEMU is not mature enough.
So, in order to launch AmigaOS, I had to manually copy the SM501 video drivers from the AmigaOS ISO for my Sam460, as the AmigaOS ISO for the Pegasos 2 does not contain these drivers. In order to modify the original ISO image I installed the UltraISO app for Windows (
https://www.ultraiso.com/), and these are the list of files I added:
System/Devs/AHI/sm502.audio
System/Devs/AudioModes/sm502.audio
System/Monitors/SM502
System/Monitors/SM502.info
System/Kickstart/siliconmotion502.chip
In order to load the SM501 driver (“siliconmotion502.chip”) when booting AmigaOS, I had to edit and modify two files:
Kickstart/Kicklayout
System/Kickstart/Kicklayout
I then turned to my Ubuntu 22.04 linux laptop and compiled the v8.0 rc1 of QEMU following
$ wget https://download.qemu.org/qemu-8.0.0-rc1.tar.xz
$ tar xvJf qemu-8.0.0-rc1.tar.xz
$ cd qemu-8.0.0-rc1
$ ./configure
$ make
$ sudo make install
Prior to being able to build qemu, I had to install some additional packages on Ubuntu
$ sudo apt install libdw-dev liburing-dev libfwtsiasl1 libnfs-dev libibumad-dev libcacard-dev libusbredirparser-dev acpica-tools libkeyutils-dev libfuse3-dev libbpf-dev libgvnc-1.0-dev libsphinxbase-dev slirp libdaxctl-dev libfdt-dev libcapstone-dev ninja-build libiscsi-dev libssh-dev git-email libaio-dev libbluetooth-dev libbrlapi-dev libbz2-dev libcap-dev libcap-ng-dev libcurl4-gnutls-dev libgbm-dev libgtk-3-dev libibverbs-dev libiscsi7 libiscsi-bin libjemalloc-dev libjpeg8-dev liblzo2-dev libncurses5-dev libnuma-dev libpmem-dev librbd-dev librdmacm-dev libsasl2-dev libsdl1.2-dev libsdl2-dev libsdl2-image-dev libseccomp-dev libsnappy-dev libspice-server-dev libssh2-1-dev libusb-1.0-0-dev libusb-dev libvde-dev libvdeplug-dev libvirglrenderer-dev libvirglrenderer0 libvmmalloc-dev libvte-2.91-dev libvte-dev libxen-dev libxml2-dev multipath-tools rdma-core valgrind xfslibs-dev
Once QEMU was compiled and installed, I then created an 20GB HD image file entering
qemu-img create -f qcow2 AmigaOS4.1FE_Pegasos2.qcow2 20G
As the Pegasos openfirmware ROM is closed source, it does not comes with QEMU, so I had to retrieve it manually. On the Linux terminal I used these commands to download a BPlan firmware update file, a script to extract the ROM and then execute the script to obtain the "pegasos2.rom" file
$ wget http://web.archive.org/web/20071021223056/http://www.bplan-gmbh.de/up050404/up050404
$ wget https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2/attach/extract_rom_from_updater
$ chmod u+x extract_rom_from_updater
$ ./extract_rom_from_updater up050404
I then launched QEMU with the following command
qemu-system-ppc -L pc-bios -M pegasos2 -bios pegasos2.rom -m 1024 -serial stdio \
-vga none -device sm501 \
-drive if=none,id=hd,file=AmigaOS4.1FE_Pegasos2.qcow2,format=qcow2 \
-device ide-hd,drive=hd,bus=ide.0 \
-drive if=none,id=cd,file=Pegasos2InstallCD-53.54_modified_with_drivers_for_sm501.iso,format=raw \
-device ide-cd,drive=cd,bus=ide.1 \
-device rtl8139,netdev=network00 -netdev user,id=network00
At the openfirmware prompt I entered
boot cd amigaboot.of
At the first boot I partitioned the HD with two partitions, a DH0 partition with FFS (could not make SFS work so far), and DH1 partition for SWAP.
At the second boot, I proceed into Workbench, quick formatted DH0, and then I could install AmigaOS on it.
I then switched off QEMU and re-launched but this time without the cdrom with the following command
qemu-system-ppc -L pc-bios -M pegasos2 -bios pegasos2.rom -m 1024 -serial stdio \
-vga none -device sm501 \
-drive if=none,id=hd,file=AmigaOS4.1FE_Pegasos2.qcow2,format=qcow2 \
-device ide-hd,drive=hd,bus=ide.0 \
-device rtl8139,netdev=network00 -netdev user,id=network00
At the openfirmware prompt I entered
boot hd:0 amigaboot.of
and you are good to go.
I am very much grateful to Balaton Zoltan, it is thanks to his huge work that we will be able to enjoy this great performance increase emulating AmigaOS 4.1!! More info at
http://zero.eik.bme.hu/~balaton/qemu/amiga/and
https://lists.gnu.org/archive/html/qemu-ppc/Some additional infos are available in a
post on amiga-news.de also.