hami
A from-scratch protected-mode OS and hypervisor for the 68060 Amiga — and the Raspberry Pi.
What it is
Hami is a new operating system kernel for the Amiga 4000 with a 68060, written from scratch. It is not an emulator and not an AmigaOS derivative: its own memory model, scheduler, capability system, drivers and filesystem stack. Legacy Amiga software runs natively in user mode inside sandboxed "Boxes" — the MMU traps chipset access and Hami emulates it, so games and Kickstart run on the real CPU without an interpreter.
The same kernel and native userland also run on the Raspberry Pi 400 (aarch64), sharing one architecture-neutral core.
Most of the code is written by Claude, Anthropic's model, under a written contract; the design, the hardware facts, the review and the taste are Philip's, and the verdict is the hardware's.
Run it!
The Amiga build of Hami, booting here in the page: the same ROM, kernel and card image as the downloads below, byte for byte, on a 68060 machine written for this purpose and compiled to WebAssembly. Nothing is installed and nothing is fetched until you press the button; the disk is read block by block as the system asks for it, and whatever you save stays in this browser.
Click the screen to give it the keyboard; the mouse is the page's
own. It boots to the desktop with a shell window: try
dir SYS:c, bench INFO or the icons. There
is sound, and no network. It is
an interpreter, so it is slower than the real machine.
Highlights
- Protected-mode kernel: MMU-isolated processes, capabilities, message ports and RPC, page grants and shared views, a preemptive scheduler with priority inheritance, and a write-back block cache over all free memory.
- Hypervisor tier: classic Amiga titles and Kickstart run natively in user mode on real hardware. WHDLoad installs start from the desktop. A game Box can be given the real chipset while the kernel stays protected behind the MMU: nothing is trapped, so the title runs at the machine's own speed.
- Native userland: a DOS layer with volumes and handlers, a shell with scripts and pipes, shared libraries, threads, a C library with a math library. Filesystems: OFS/FFS, PFS3 (the system volume), FAT12/16/32, a RAM disk.
- Desktop: a compositor with Amiga window gadgets and a screen-top menu bar, a toolkit, a desktop with drawers and icons (classic, NewIcons, OS 3.5 and PNG), a terminal, a text editor, a clipboard, preferences, TrueType fonts, picture thumbnails.
- Storage: IDE/ATA (Gayle and FastATA), SCSI (the CyberStorm MK3's controller, wide and synchronous; the A4092), SD on the Pi, floppy, USB mass storage.
- Networking: TCP/IP over the ZZ9000's Ethernet, PCI, and PCMCIA NICs and the Pi's Ethernet, a DHCP lease and NTP time at boot, TLS 1.3 with a real root store, HTTP. A running machine updates its own card from a build host over the LAN.
- Graphics: ZZ9000, S3 ViRGE, 3dfx Voodoo3 and ATI Radeon 9200 (on a Mediator), the Pi's framebuffer — behind one card contract; on a card with a 2D engine every window lives in video memory and the card draws it.
- Sound: a mixing daemon over Paula, PCI sound and the host's audio; MP3 and JPEG decoders written for the 68060.
- USB: OHCI, xHCI and DWC2 host controllers; keyboards, mice, mass storage, network adapters.
- Also runs as a macOS process and in a browser: the same kernel on a desktop for development, and the Amiga build on a 68060 machine of its own (above).
Status
Version 0.3. Early and moving fast. Boots on a real A4000TX / CyberStorm MK3, an A4000D / TF4060 with a Mediator, an A1200 / TF1260, and a Raspberry Pi 400. On the A4000TX it boots from the CyberStorm's SCSI or the IDE port to the desktop on a ZZ9000, and Banshee and State of the Art run there with the real chipset handed to the game, at the machine's own speed.
New in 0.3
Since the first images of late August:
- Games on the real chipset. A WHDLoad loader with Kickstart 1.3 and 3.1 installs, and a mode that gives a game Box the machine's own chipset. BansheeAGA and State of the Art run on the A4000TX.
- Runs in a browser and on a Mac. A 68060 machine of our own boots the unmodified Amiga build natively and as WebAssembly; the generic kernel also runs as a macOS process with a window, sound, network and a shared folder.
- One 68060 core. A single instruction engine serves the hypervisor, the unimplemented-instruction door and the machine above, checked against real silicon.
- Threads, floating point, a fuller C library. Threads with futexes and POSIX locks on every station, FPU context for native programs, a math library, text-to-number conversion; a JavaScript engine's own test suite passes on it.
- The desktop. Icons in every Amiga format with transparency, picture thumbnails, a file requester, the
edtext editor with syntax colouring, window depth and zoom gadgets, Alt+Tab, a terminal with scrollback and reflow, a clipboard, screen-mode and sound preferences, TrueType text. - Graphics. Windows in video memory drawn by the card's engine, the Radeon 9200's 2D engine and hardware cursor, 32-bit screens on the ZZ9000, monitor (EDID) reading.
- Sound and pictures. An audio daemon with a mixer, voices and exclusive mode; Paula sound from a Box; MP3 and JPEG decoders.
- Storage. The CyberStorm MK3's SCSI controller with wide and synchronous transfers on the real board, faster DMA cache handling on the 68060, a host folder as a volume on the Mac.
- Networking. The ZZ9000's Ethernet, USB network adapters, a shared-memory socket table in place of event messages.
- Tools.
bench, one measuring frame for CPU, memory, disk, filesystem, network and graphics, andbench INFO, the machine's own description.
Downloads
Pre-built images of version 0.3: the same bytes the test rigs boot
(make release). They boot into a shell on the screen — and into the
desktop with a shell window when a graphics card is present (ZZ9000;
ViRGE, Voodoo3 or Radeon 9200 on a Mediator). With a NIC the boot takes
a DHCP lease and sets the clock from NTP. The Amiga image needs a
68060 with fast RAM and a Kickstart 3.x ROM.
-
hami-amiga-hdf.zip
— CF / IDE card image (76 MB unpacked;
ddit onto a card of at least that size). Three partitions:CFBOOT:, a small FFS partition Kickstart boots to load the Hami kernel;SYS:, the PFS system volume with every command, handler and script;DH1:, 8 MB of blank scratch space —format DH1: Workin the shell. The same file boots as an IDE hardfile under FS-UAE or WinUAE (68060, MMU on, JIT off). -
hami-pi-sd.zip
— SD card image for the Raspberry Pi 400 (the only Pi it has been run
on; 107 MB unpacked): flash it with Raspberry Pi Imager, Etcher or
dd. A FAT boot partition (BOOT:on the Pi, withconfig.txtand the kernel), the PFS system volumeSYS:and an 8 MBDH1:. HDMI + the 400's own keyboard; serial console on GPIO 14/15 at 115200. - SHA256SUMS · manifest.json (release, build id and date of the current images).
Hami drives real, irreplaceable vintage hardware and writes to storage media. It can destroy data. Run it at your own risk.
Links
- Source: soon
- Documentation: soon
- Contact: philip AT hamios.org