Before I got sidetracked by writing dozens of posts about the things I’d been posting to Twitter before I deleted my Twitter account because of Elon Musk, I was really excited about my plan to port AROS, the open-source clone of AmigaOS, to run on QEMU’s Mac Quadra 800 emulation, as a stepping-stone to running on Stefany Allaire’s extremely cool A2560K-040V retro computer.
First, I need to complain about a bug that may be specific to me, or it may not be. There are instructions on the Web for how to run various versions of Mac OS Classic for 680×0 on QEMU’s Mac Quadra 800 emulation, but I can’t even get the Mac Toolbox ROM to finish its self-test. Is the emulation simply too fast these days? Timing is the only explanation I can think of, and I’m wondering if the people who did get it running, whichever fork of QEMU they’re using, have slower PCs than I do. Any ideas?
So why is AROS cool and interesting? First, why is AmigaOS interesting? It’s a real-time preemptive-multitasking message-passing OS, which is ideal for multimedia and embedded applications, and also offered more power than competing OS’s with cooperative multitasking, such as Windows 3.x, RISC OS, and MacOS. The only downside is that there’s no separation of processes into separate address spaces (this only became possible when later 680×0 CPUs added memory-management units), so one badly-written app can crash the whole OS.
AROS is relatively easy to use. The only quirk compared to modern GUIs is that you have to hold down the right mouse button to display the pull-down menu at the top of the screen, and then release the button when you’ve highlighted the command you want. It’s still easier to explain and get used to than something like RISC OS, with its use of all three mouse buttons.
AROS, unlike Commodore’s AmigaOS, or the AmigaOS 4.x fork that runs on PowerPC “Amiga” systems, is both open-source (no Commodore code) and has been ported to ARM and x86 PCs (32-bit and 64-bit), as well as running on the original Amiga machines. It’s not a perfect substitute, but it can run the same apps, more or less. It’s only binary-compatible with m68k Amiga apps on the m68k version, so the PC and other versions of AROS need to have their own native versions of any apps you’d like to run. Fortunately, there’s a multi-platform cross-compilation system that I’ll need to learn how to use.
So far, I’ve created an “arch/m68k-mac” directory in my fork of the AROS repo, which I’m customizing to create a 1MB Mac ROM suitable for booting QEMU with. Since I can’t boot Apple’s Quadra 800 ROM, this will be an interesting test to see how well the emulation works from a cold start.
I’m not going to wait until I’m finished to commit to my GitHub AROS repo, but I do want to get to an important milestone before I make my first commit. I need to get the serial port output running so I can see debug output, and I believe I can wire up color palette index 0 to function in the same way as the Amiga changes the screen background color to indicate the progression of early boot.
I have successfully built and tested the Amiga m68k version of the code from my fork of the repo, so I’m confident that once I get the VIA IRQ and timer code running, the frame buffer wired up, and the ADB keyboard and mouse going, that will be exciting enough to motivate me to then get the floppy and SCSI drivers written so that I can boot AROS on my fake Mac Quadra 800.
The floppy driver will be customized to QEMU, because QEMU only supports a 1.44 MB PC-compatible disk format, and not the old proprietary 800KB Mac formats. Did you know that the original Macs changed the speed of the motor in order to fit more data on the outer tracks (which are longer, linearly, than the inner tracks)? Very strange. Amiga disks held 880KB, by using a proprietary disk layout that doesn’t have the inter-sector gaps that PC-compatible floppy controllers require. The Amiga is annoying because you have to encode/decode the MFM data yourself.
Writing the SCSI driver will be slightly annoying as well, but only because there aren’t any SCSI drivers in the AROS code base yet (if you use it on an Amiga with a SCSI controller, you have to supply your own scsi.device for it), and also because Apple’s goofy implementation doesn’t support the SCSI controller’s DMA feature, but instead something they call “pseudo-DMA”, where the CPU has to copy the data 32 bits at a time, just like you do with a non-DMA IDE controller. This is separate from the PIO (programmed I/O) mode that the SCSI controller supports: maybe it’s slightly faster than the PIO mode? Très bizarre.
I’m looking forward to writing more posts announcing my progress on this port.