Skip to content

Instantly share code, notes, and snippets.

@joergschultzelutter
Last active March 10, 2024 19:03
Show Gist options
  • Save joergschultzelutter/cd7fa34a26e64f8b1bcca1f26cf30bbf to your computer and use it in GitHub Desktop.
Save joergschultzelutter/cd7fa34a26e64f8b1bcca1f26cf30bbf to your computer and use it in GitHub Desktop.
AmigaOS 4.1 on MacOS via qemu

AmigaOS 4.1 on QEmu MacOS

External Resources

  • Pegasos2InstallCD-53.54.iso (can be downloaded from the Hyperion web site AFTER physical product registration of the AmigaOS PegasOs 4.1 CD)
  • AmigaOS4.1FinalEditionUpdate2-53.14 (can be downloaded from the Hyperion web site AFTER physical product registration of the AmigaOS PegasOs 4.1 CD)
  • bboot 0.6 or later (download here). Download the tar.xz file - this is the only archive that contains the binaries!
  • SiliconMotion 502 video driver (download here)

External documentation

  • Balaton Zolan's documentation: LINK
  • Falke 34's documentation: LINK
  • Generic AmigaOS 4.1 installation instructions from Amedia: LINK

Installation assumptions

  • target directory is amiga
  • hdd name is amiga.img
  • AmigaOS CD ISO name is Pegasos2InstallCD.iso
  • you have Macports installed

Install qemu on Macports

This installs qemu along with the ppc emulation

sudo port -v install qemu +target_ppc

Install setup files

mkdir amiga
unzip contents from bboot06.tar.xz and move all contents to the 'amiga' directory

The amiga directory should look like this:

drwxr-xr-x 8 jsl  staff  256 Mar  9 17:25 ..
-rw-r--r--@  1 jsl  staff 6148 Mar  9 17:25 .DS_Store
-rw-r--r--@  1 jsl  staff  17992 Feb 16 21:43 COPYING
-rw-r--r--@  1 jsl  staff  708 Feb 16 21:43 ChangeLog
-rw-r--r--@  1 jsl  staff 1925 Feb 16 21:43 Makefile
-rw-r--r--@  1 jsl  staff 6038 Feb 16 21:43 README.rst
-rw-r--r--@  1 jsl  staff 3481 Feb 16 21:43 bboot.c
-rw-r--r--@  1 jsl  staff  606 Feb 16 21:43 bboot.fth
-rw-r--r--@  1 jsl  staff  746 Feb 16 21:43 bboot.lds
-rw-r--r--@  1 jsl  staff 6628 Feb 16 21:43 boot_aos.c
-rw-r--r--@  1 jsl  staff 7217 Feb 16 21:43 brd_amigaone.c
-rw-r--r--@  1 jsl  staff 9195 Feb 16 21:43 brd_pegasos2.c
-rw-r--r--@  1 jsl  staff 1460 Feb 16 21:43 cfg.c
drwxr-xr-x@ 11 jsl  staff  352 Feb 16 21:43 drivers
drwxr-xr-x@ 12 jsl  staff  384 Feb 16 21:43 include
drwxr-xr-x@  7 jsl  staff  224 Feb 16 21:43 libc
drwxrwxr-x@  7 jsl  staff 238 Feb 16 19:19 zip

Generate a 2 GB hdd image. Name is amiga.img

qemu-img create -f amiga.img 2G

Mount the Pegasos2InstallCD.iso, then move to its System directory which holds a folder called Kickstart. Careful - do not use the Kickstart folder from the ISO's root directory - this is not the one we want

move to the ISO's 'System' folder
Copy the 'Kickstart' folder to your 'amiga' folder
unmount the ISO (important!)

The amiga directory should look like this:

drwxr-xr-x@ 18 jsl  staff  576 Mar  9 17:26 .
drwxr-xr-x 8 jsl  staff  256 Mar  9 17:25 ..
-rw-r--r--@  1 jsl  staff 6148 Mar  9 17:25 .DS_Store
-rw-r--r--@  1 jsl  staff  17992 Feb 16 21:43 COPYING
-rw-r--r--@  1 jsl  staff  708 Feb 16 21:43 ChangeLog
-rw-r--r--@  1 jsl  staff 1925 Feb 16 21:43 Makefile
-rw-r--r--@  1 jsl  staff 6038 Feb 16 21:43 README.rst
-rw-r--r--@  1 jsl  staff 3481 Feb 16 21:43 bboot.c
-rw-r--r--@  1 jsl  staff  606 Feb 16 21:43 bboot.fth
-rw-r--r--@  1 jsl  staff  746 Feb 16 21:43 bboot.lds
-rw-r--r--@  1 jsl  staff 6628 Feb 16 21:43 boot_aos.c
-rw-r--r--@  1 jsl  staff 7217 Feb 16 21:43 brd_amigaone.c
-rw-r--r--@  1 jsl  staff 9195 Feb 16 21:43 brd_pegasos2.c
-rw-r--r--@  1 jsl  staff 1460 Feb 16 21:43 cfg.c
drwxr-xr-x@ 11 jsl  staff  352 Feb 16 21:43 drivers
drwxr-xr-x@ 12 jsl  staff  384 Feb 16 21:43 include
drwxr-xr-x@ 66 jsl  staff  2244 Mar  9 15:42 Kickstart
drwxr-xr-x@  7 jsl  staff  224 Feb 16 21:43 libc
drwxrwxr-x@  7 jsl  staff 238 Feb 16 19:19 zip

The Kickstart directory should look like this:

drwxr-xr-x@ 66 jsl  staff     2244 Mar  9 15:42 .
drwxrwxr-x@ 26 jsl  staff      884 Mar  9 16:10 ..
-rwxr-xr-x@  1 jsl  staff    27844 Oct  9  2014 3DLabsPermedia2.chip
-rwxr-xr-x@  1 jsl  staff    96836 Oct  9  2014 3dfxVoodoo.chip
-rwxr-xr-x@  1 jsl  staff   171240 Oct  9  2014 ATIRadeon.chip
-rwxr-xr-x@  1 jsl  staff    77576 Oct  9  2014 CDFileSystem
-rwxr-xr-x@  1 jsl  staff   159852 Oct  9  2014 FastFileSystem
-rwxr-xr-x@  1 jsl  staff     4848 Oct  9  2014 FileSystem.resource.kmod
-rwxr-xr-x@  1 jsl  staff   207448 Oct 11  2014 JXFileSystem
-rwxr-xr-x@  1 jsl  staff     3241 Mar  9 15:43 Kicklayout
-rwxr-xr-x@  1 jsl  staff    80380 Oct  9  2014 PCIGraphics.card
-rwxr-xr-x@  1 jsl  staff   202976 Oct 12  2014 SmartFilesystem
-rwxr-xr-x@  1 jsl  staff     5528 Oct 13  2014 battclock.resource.kmod
-rwxr-xr-x@  1 jsl  staff    66864 Oct  9  2014 biosversion.resource.kmod
-rwxr-xr-x@  1 jsl  staff    79632 Oct  9  2014 bootimage
-rwxr-xr-x@  1 jsl  staff    14652 Oct  9  2014 bootkeyboard.usbfd
-rwxr-xr-x@  1 jsl  staff    61044 Oct  9  2014 bootmenu.kmod
-rwxr-xr-x@  1 jsl  staff    10824 Oct  9  2014 bootmouse.usbfd
-rwxr-xr-x@  1 jsl  staff    77468 Oct  9  2014 con-handler.kmod
-rwxr-xr-x@  1 jsl  staff   163876 Oct  9  2014 console.device.kmod
-rwxr-xr-x@  1 jsl  staff      442 Oct  9  2014 diskboot.config
-rwxr-xr-x@  1 jsl  staff    28272 Oct  9  2014 diskboot.kmod
-rwxr-xr-x@  1 jsl  staff    18500 Oct  9  2014 diskcache.library.kmod
-rwxr-xr-x@  1 jsl  staff   554028 Oct  9  2014 dos.library.kmod
-rwxr-xr-x@  1 jsl  staff    67388 Oct  9  2014 ehci.usbhcd
-rwxr-xr-x@  1 jsl  staff    53568 Oct  9  2014 elf.library.kmod
-rwxr-xr-x@  1 jsl  staff    23912 Oct  9  2014 env-handler.kmod
-rwxr-xr-x@  1 jsl  staff    64392 Oct  9  2014 gadtools.library.kmod
-rwxr-xr-x@  1 jsl  staff     9504 Oct 13  2014 gameport.device.kmod
-rwxr-xr-x@  1 jsl  staff  1082668 Oct  9  2014 graphics.library.kmod
-rwxr-xr-x@  1 jsl  staff    28368 Oct  9  2014 hub.usbfd
-rwxr-xr-x@  1 jsl  staff    67264 Oct 19  2014 hunk.library.kmod
-rwxr-xr-x@  1 jsl  staff    14412 Oct  9  2014 input.device.kmod
-rwxr-xr-x@  1 jsl  staff   851556 Oct 11  2014 intuition.library.kmod
-rwxr-xr-x@  1 jsl  staff    84288 Oct  9  2014 it8212ide.device.kmod
-rw-r--r--@  1 jsl  staff   736564 Jan  6  2021 kernel
-rwxr-xr-x@  1 jsl  staff  1190608 Oct 16  2014 kernel.debug
-rwxr-xr-x@  1 jsl  staff    18000 Oct  9  2014 keyboard.device.kmod
-rwxr-xr-x@  1 jsl  staff    68892 Oct  9  2014 keymap.library.kmod
-rwxr-xr-x@  1 jsl  staff    65708 Oct 12  2014 loader.of
-rwxr-xr-x@  1 jsl  staff    83016 Oct  9  2014 lsi53c8xx.device.kmod
-rwxr-xr-x@  1 jsl  staff   157964 Oct  9  2014 massstorage.usbfd
-rwxr-xr-x@  1 jsl  staff    61064 Oct  9  2014 mounter.library
-rwxr-xr-x@  1 jsl  staff   574912 Oct  9  2014 newlib.library.kmod
-rwxr-xr-x@  1 jsl  staff    10900 Oct  9  2014 nonvolatile.library.kmod
-rwxr-xr-x@  1 jsl  staff       35 Oct 12  2014 nvram.config
-rwxr-xr-x@  1 jsl  staff     4668 Oct 13  2014 nvram.resource.kmod
-rwxr-xr-x@  1 jsl  staff       35 Oct 12  2014 nvram_nodma.config
-rwxr-xr-x@  1 jsl  staff    67940 Oct  9  2014 ohci.usbhcd
-rwxr-xr-x@  1 jsl  staff    85740 Oct 12  2014 peg2ide.device.kmod
-rwxr-xr-x@  1 jsl  staff  1164004 Oct  9  2014 petunia.library.kmod
-rwxr-xr-x@  1 jsl  staff     2592 Oct 13  2014 ps2.resource.kmod
-rwxr-xr-x@  1 jsl  staff    42300 Oct 19  2014 ram-handler.kmod
-rwxr-xr-x@  1 jsl  staff    10744 Oct  9  2014 ramdrive.device.kmod
-rwxr-xr-x@  1 jsl  staff    16792 Oct  9  2014 ramlib.kmod
-rwxr-xr-x@  1 jsl  staff   129164 Oct  9  2014 shell.kmod
-rwxr-xr-x@  1 jsl  staff    86136 Oct  9  2014 sii0680ide.device.kmod
-rwxr-xr-x@  1 jsl  staff    85128 Oct  9  2014 sii3112ide.device.kmod
-rwxr-xr-x@  1 jsl  staff    85908 Oct  9  2014 sii3114ide.device.kmod
-rwxr-xr-x@  1 jsl  staff    85128 Oct  9  2014 sii3512ide.device.kmod
-rw-r--r--@  1 jsl  staff  24424 Jul 22  2023 siliconmotion502.chip
-rwxr-xr-x@  1 jsl  staff    19476 Oct  9  2014 strap.kmod
-rwxr-xr-x@  1 jsl  staff    68636 Oct  9  2014 timer.device.kmod
-rwxr-xr-x@  1 jsl  staff    55636 Oct  9  2014 uhci.usbhcd
-rwxr-xr-x@  1 jsl  staff    11032 Oct  9  2014 usbresource.library
-rwxr-xr-x@  1 jsl  staff   110736 Oct  9  2014 usbsys.device

Expand the siliconmotion502_chip.lha file. Copy file siliconmotion502_chip/KickstartSam460/siliconmotion502.chip to the Kickstart directory.

Expand the AmigaOS4.1FinalEditionUpdate2-53.14 file. Copy file AmigaOS4.1FinalEditionUpdate2-53.14/AmigaOS 4.1 Final Edition Update 2/Content/KickstartPeg2/kernel to the Kickstart directory

Go back to your amiga directory, then go to the kickstart subfolder

Edit the Kicklayout file. At the bottom of the file, add a new entry MODULE Kickstart/siliconmotion502.chip.

Original file:

MODULE Kickstart/massstorage.usbfd
MODULE Kickstart/uhci.usbhcd
MODULE Kickstart/ohci.usbhcd
MODULE Kickstart/ehci.usbhcd

File after modification:

MODULE Kickstart/massstorage.usbfd
MODULE Kickstart/uhci.usbhcd
MODULE Kickstart/ohci.usbhcd
MODULE Kickstart/ehci.usbhcd
MODULE Kickstart/siliconmotion502.chip

Save the file.

Move one directory level up. You should now be in the amiga directory.

Zip the Kickstart directory. Ensure that all subdirectory structures are kept intact. Use MacOS' Finder in case you don't know how to do this.

Directory should now look like this:

drwxrwxr-x@ 26 jsl  staff         884 Mar  9 16:10 .
drwxrwxr-x  38 jsl  staff        1360 Mar  9 17:46 ..
-rw-r--r--@  1 jsl  staff       10244 Mar  9 15:43 .DS_Store
-rw-r--r--@  1 jsl  staff       17992 Jul 10  2023 COPYING
-rw-rw-r--@  1 jsl  staff        1037 Feb 16 19:18 Depend
drwxr-xr-x@ 66 jsl  staff        2244 Mar  9 17:54 Kickstart
-rw-r--r--   1 jsl  staff     3506495 Mar  9 15:43 Kickstart.zip
-rw-rw-r--@  1 jsl  staff        1925 Dec  3 00:27 Makefile
-rw-r--r--@  1 jsl  staff   561731584 Oct 28  2014 Pegasos2InstallCD.iso
drwxrwxr-x@  4 jsl  staff         136 Mar  9 15:37 Qemu_Helper
-rw-r--r--@  1 jsl  staff        9125 Mar  9 15:36 Qemu_Helper.zip
-rw-rw-r--@  1 jsl  staff        6038 Dec  3 00:23 README.rst
-rw-r--r--   1 jsl  staff  2147483648 Mar  9 16:09 amiga.img
-rwxrwxr-x@  1 jsl  staff       27592 Feb 16 19:19 bboot
-rw-rw-r--@  1 jsl  staff        3481 Nov 30 17:50 bboot.c
-rw-r--r--@  1 jsl  staff         606 Jul 24  2023 bboot.fth
-rw-r--r--@  1 jsl  staff         746 Jul 19  2023 bboot.lds
-rw-rw-r--@  1 jsl  staff        6628 Nov 30 17:50 boot_aos.c
-rw-rw-r--@  1 jsl  staff        7217 Dec 24 19:53 brd_amigaone.c
-rw-rw-r--@  1 jsl  staff        9195 Nov 30 17:50 brd_pegasos2.c
-rw-rw-r--@  1 jsl  staff        1460 Jul 23  2023 cfg.c
drwxrwxr-x@ 11 jsl  staff         374 Feb 16 19:19 drivers
drwxrwxr-x@ 12 jsl  staff         408 Nov 30 17:50 include
drwxrwxr-x@  7 jsl  staff         238 Feb 16 19:19 libc
-rw-r--r--   1 jsl  staff         644 Mar  9 16:10 start.sh
drwxrwxr-x@  7 jsl  staff         238 Feb 16 19:19 zip

Create a new file called start.sh. Contents:

#!/bin/bash
qemu-system-ppc -M pegasos2 -m 2048 -kernel BBoot -initrd Kickstart.zip -vga none -device sm501 -device rtl8139,netdev=net0 -netdev user,id=net0 -rtc base=localtime -display cocoa -serial stdio -drive format=raw,file=Pegasos2InstallCD.iso,index=2,media=cdrom -drive format=raw,file=amiga.img,index=0,media=disk

Directory should now look like this:

drwxrwxr-x@ 26 jsl  staff         884 Mar  9 16:10 .
drwxrwxr-x  38 jsl  staff        1360 Mar  9 17:46 ..
-rw-r--r--@  1 jsl  staff       10244 Mar  9 15:43 .DS_Store
-rw-r--r--@  1 jsl  staff       17992 Jul 10  2023 COPYING
-rw-rw-r--@  1 jsl  staff        1037 Feb 16 19:18 Depend
drwxr-xr-x@ 66 jsl  staff        2244 Mar  9 17:54 Kickstart
-rw-r--r--   1 jsl  staff     3506495 Mar  9 15:43 Kickstart.zip
-rw-rw-r--@  1 jsl  staff        1925 Dec  3 00:27 Makefile
-rw-r--r--@  1 jsl  staff   561731584 Oct 28  2014 Pegasos2InstallCD.iso
drwxrwxr-x@  4 jsl  staff         136 Mar  9 15:37 Qemu_Helper
-rw-r--r--@  1 jsl  staff        9125 Mar  9 15:36 Qemu_Helper.zip
-rw-rw-r--@  1 jsl  staff        6038 Dec  3 00:23 README.rst
-rw-r--r--   1 jsl  staff  2147483648 Mar  9 16:09 amiga.img
-rwxrwxr-x@  1 jsl  staff       27592 Feb 16 19:19 bboot
-rw-rw-r--@  1 jsl  staff        3481 Nov 30 17:50 bboot.c
-rw-r--r--@  1 jsl  staff         606 Jul 24  2023 bboot.fth
-rw-r--r--@  1 jsl  staff         746 Jul 19  2023 bboot.lds
-rw-rw-r--@  1 jsl  staff        6628 Nov 30 17:50 boot_aos.c
-rw-rw-r--@  1 jsl  staff        7217 Dec 24 19:53 brd_amigaone.c
-rw-rw-r--@  1 jsl  staff        9195 Nov 30 17:50 brd_pegasos2.c
-rw-rw-r--@  1 jsl  staff        1460 Jul 23  2023 cfg.c
drwxrwxr-x@ 11 jsl  staff         374 Feb 16 19:19 drivers
drwxrwxr-x@ 12 jsl  staff         408 Nov 30 17:50 include
drwxrwxr-x@  7 jsl  staff         238 Feb 16 19:19 libc
-rw-r--r--   1 jsl  staff         644 Mar  9 16:10 start.sh
drwxrwxr-x@  7 jsl  staff         238 Feb 16 19:19 zip

Execute start.sh

source start.sh

QEmu should now open a window and you should see the AmigaOS 4.1 installer screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment