Installing NetBSD on an Amiga 1200

I wanted to get into Unix when I was studying computer science, but Linux never really clicked with me. I tried a few distributions back then, but none felt quite right. Slackware was too hardcore, while SUSE and Mandrake felt too casual and undefined. Every year was supposed to be “the year of the Linux desktop,” but that year never seemed to arrive.

Thankfully, Linux has changed a lot since then. But at the time I started looking for alternatives and found NetBSD. I have never been particularly hardcore about NetBSD, or interested in the BSD vs Linux politics, but the sales copy on netbsd.org around the year 2000 really convinced me that this was the operating system to choose if you wanted to grow a beard and learn Unix.

I never grew the beard, and I never really learned Unix on a beard-level either, but setting up NetBSD back then was a great mix of frustration, success and leveling up. There was frustration, vi. There was success, wow, it actually works, you just type in :q!. And there was the feeling that you were learning something a little deeper: this was Unix, “real Unix.”

Anyway, NetBSD is famous for running on a huge number of hardware platforms, and one of them is the 68k Amiga. For years I had wanted to install it on one of my Amigas and see what NetBSD was actually like on real 68k hardware and so this weekend project started.

I decided to install NetBSD/68k on my Amiga 1200 with a TF1260. One of the main reasons was that I was curious about how fast X would be on the AGA chipset. Teaser: it is slow.

The first thing I did was add a Compact Flash adapter to the Amiga 1200’s internal IDE port. My normal Workbench CF card is connected to the IDE port on the Terrible Fire 1260, so this gave me two separate CF cards: one dedicated to NetBSD and one for Workbench 3.1.

Using HDtoolbox to set up the NetBSD CF card on the Amiga 1200

The first step was to set up the CF card in HDToolBox.

NetBSD on the Amiga uses a custom file system

As NetBSD uses its own filesystem, the partition should be set up as a Custom File System. I don’t plan to boot the A1200 directly into NetBSD, so there is no need to make the partition bootable.

I ended up with three partitions, /, Swap and a FFS partition for NetBSD installation files

I’m using a large partition for the NetBSD root filesystem and a smaller one for swap. I also went back and added an FFS partition for the NetBSD installation files, since I didn’t have a NIC that worked with NetBSD on 68k Amiga hardware.

I placed a NetBSD drawer on the sys: partition

An interesting detail I didn’t know before starting this project is that, when launching NetBSD from AmigaOS, the kernel itself sits on the Workbench partition.

It may work differently if you configure NetBSD to boot directly, but I wanted to start it from Workbench, so I created a NetBSD drawer on the SYS: partition and placed the kernel and boot tools there.

Here are the installation files for NetBSD Amiga 68k

Then I copied the NetBSD/68k Amiga installation files to the FFS installation partition, which I called Temp:.

Having the Amiga 1200 access a shared folder on my workstation over the network made this part really smooth. I could download and prepare everything on my PC, then simply drag and drop the files into the right folder in Workbench on the Amiga.

Starting up the NetBSD installation

Then it was time to actually start the installation. It didn’t work at first, so I had to boot into a clean Workbench environment. After quite a bit of troubleshooting, I traced the problem to Roadshow and some of the 060-related settings in my user-startup.

Lots of text flashing by

Finally, some progress. Things were scrolling by on the screen, and the actual installation process could finally begin.

Unpacking the installation files

Those .tgz files from the previous window are being unpacked here. I think this part of the installation took around two hours on the Amiga.

Installation of NetBSD 68k on the Amiga 1200 is finished

And after a few more configuration steps, we are finally greeted with a successful installation message!

And don’t tell the Unix greybeards that I’m logged into NetBSD as root when I don’t actually need root access.

It’s up and running. At this point it’s still pretty much raw Unix, with only the base system installed, but that’s a milestone reached!

X and *TWM is so nostalgic

X was actually smoother to set up than I expected. I just had to use a kernel with wscons support, and after that it started up without much trouble. Performance is another story though, it is really slow on AGA. I want to compare it with my graphics card-equipped Amiga 4000 at some point, since that setup should be quite a bit faster.

Still, even if it is slow, it is very cool to see X running on an Amiga with a basic window manager. I think it is some variant of TWM.

Halting NetBSD to get back into Amiga Workbench

And that’s it for now. The next step is to get networking working, install the usual shell tools and utilities, and maybe set up a service or two.

Creating a startup script and icon to boot into NetBSD

But before I could call this little weekend project finished, I had to make it feel a bit more integrated with Workbench. Since I’m starting NetBSD from AmigaOS rather than booting directly into it, I created a proper icon for the startup script.

The script first shuts down the Amiga networking setup, which turned out to be necessary to avoid problems when handing the machine over to NetBSD. It then launches loadbsd and starts the NetBSD kernel. So now, instead of opening a Shell and typing commands manually, I can simply double-click the NetBSD icon in Workbench and let the script take care of the transition.

It is a small detail, but somehow it makes the whole setup feel much more complete since I do not need to boot into WB without any startup sequence to kick off NetBSD to boot.

Turning My Linux PC Into a Retro Gaming Monitor for My Amiga

I have a fairly cramped home office at the moment. That will for sure change in the future, but as it is now there is no space for a second monitor or a permanent Amiga setup next to my workstation.

Since my workstation is powered on most of the time when I am at home, I got the idea of looking for some kind of hardware device that would let me open the screen from another computer directly on my workstation desktop.

I researched different capture devices and quickly came to the conclusion that there are several problems to consider: price, latency, and what types of video signals the devices will actually accept.

As a proof of concept, I bought a second-hand Elgato Cam Link 4K. The Cam Link is basically a small USB stick with an HDMI input. It accepts standard video modes such as 1080p60, 720p60, 576p50 and 480p60. And this is where the first problem appears, since the Amiga uses all kinds of different resolutions and video timings. More on that later.

Installation and problems with lag

I run Linux Mint on my workstation. The Cam Link 4K was detected automatically as a standard UVC/V4L2 video device, so no proprietary drivers were needed.

I initially used mpv to display the incoming HDMI signal in a window. It worked, but the default playback pipeline introduced enough latency to make it unsuitable for actually playing games through the capture window.

I later moved to FFplay, which is part of the FFmpeg suite, and used it as a more direct video preview. By keeping buffering to a minimum, FFplay gave noticeably lower latency and made the Cam Link much more practical as a live input device rather than simply a recording device.

I tested the latency by playing Pinball Fantasies. With mpv the lag was noticeable. With FFplay, much less so and Pinball Fantasies played great! There is still a tiny amount of lag, but it does not bother me much at all. In Workbench it basically feels like a direct connection.

What Amigas do I use with the capture device?

I have two main systems in use. One is my Amiga 1200 with an Indivision MK3 scandoubler, and the other is my A4000TX with a ZZ9000.

A1200

Displaying my 64 color AGA A1200 desktop on my Linux Workstation (and recording it in the pic)

The A1200 with the Indivision MK3 can be configured to output the Amiga display as a standard 1080p HDMI signal, and this works really well with the Cam Link 4K. It did not work with the Indivision set to its default 800×600 mode. All the native Amiga screen modes I tested worked beautifully once changed to 1080p60.

Playing the new Gloom port GloomReforged in an AGA screen mode with keyboard and mouse, I could not really feel any lag at all (and I had a great time!!).

A4000TX

The A4000TX with the ZZ9000 can output Workbench at 1080p60 if I set the screen mode accordingly. Using Workbench at such a high resolution can be difficult, since the Amiga has no modern display scaling.

Display output from my A4000TX (1920×1080) running in full screen in a window on my Linux workstation

But this is actually where using a capture device has another advantage. The captured image can be freely scaled on the Linux desktop to use as much or as little of the monitor as I want. In the picture above, it is using the full desktop.

Same display output now scaled down and running besides other desktop windows

Since my workstation monitor is 3840×2160, a 1920×1080 Amiga desktop scales very nicely. Better yet, Linux workspaces make it possible to have one workspace dedicated to the Amiga and another for the workstation. Or I can simply shrink the Amiga display down and use it almost like a UAE window.

The problem with the A4000TX is any video mode outside those supported by the Cam Link 4K. The ZZ9000 has newer firmware that can display native Amiga graphics through a standard 1080p output, so that may be the way forward for native screen modes.

Problems and next steps

Overall, I am super happy with this setup. It was a very successful proof of concept, and it cost me no more than about 30 euros. Anything that makes it easier to get some actual use out of the real machines we have is a huge plus in my book.

The main issues I see are the small amount of lag in the system and the limited number of supported video modes. If there is no way to reduce the latency further, that is fine. I can live with it. But I would really like to be able to connect systems using more video modes than just the few currently supported by the Cam Link.

There is also a very slight hint of something almost analog-looking in the image. It is difficult to explain, but the picture can occasionally feel a little softer if you really look for differences. It does not bother me, but I think it is worth mentioning.

Oh and the final problem, I could not get my Sam440ep working with it, there is something with the display output that is non standard or not 60hz. This will solve itself if my Mirari prayer works!

Next steps

I have not decided on the next step yet. I may try an internal PCIe capture card, or I may simply keep using the Cam Link 4K. It would be awesome to have an internal card with effectively no latency at all, although I suspect completely eliminating capture latency is probably a dream.

The next experiment will be adding an OSSC to the chain. That should make it possible to feed RGB output from other retro systems into the capture device as standard HDMI, opening up the same setup to machines such as the SNES, Mega Drive and other vintage systems without their own HDMI output.