I've wanted to document the technical side of some hardware hacking for quite a while. Here it is, continuing from the less-nerdy first part.
The project: Turn a 286-based Compaq Portable III into something more modern.
The motivation: to be honest, my sole motivation here was to be able to haul it down to Cafe Prado, a thou-shalt-be-at-least-this-hipster-to-enter coffee shop on Commercial. Nobody's allowed in without at least a Macbook Pro and I wanted to plunk this beast down on a reinforced surface and see what happened.
The obvious problem is that a Compaq Portable III is a 286. This is state of the art circa 1982 -- far too old to run Linux. For a long time the Linux kernel needed the next generation, a 386, to run, though now I see that Damn Small Linux requires at least a 486 so it's possible that times have moved on.
This suggests a pretty thorough gutting and rebuild of the portable. At minimum I wanted to maintain the overall appearance of the machine -- the case and external appearance, but also the keyboard and inimitable orange screen. However, as with many portable devices, it's heavily integrated and the parts are custom-built. The keyboard uses a standard AT plug, but the display was going to be a problem -- it's not as simple as plugging a VGA connector into a different video card.
Getting it to boot
As it came to me (via Free Geek Vancouver, thank you very much) the machine displayed a POST error because its CMOS settings were long forgotten and COMPAQ didn't include a configuration program built into the BIOS as any modern PC-based system has. It also contained a 20MB hard drive, one of the first "modern" IDE drives, fortunately, which permitted me to remove and wipe it using our usual tools. (There is beauty in connecting a 25-year-old drive to the disk wipe station using the same connectors you use to hook up a run-of-the-mill 80GB drive -- that's 1600x the capacity running through the same old plugs.)
Machines without their own BIOS setup program built in typically use configuration floppies instead, meaning that you have to track down the specific setup program on a specific kind of media (5.25" floppy, in this case) in order to get the machine to boot. (Disks fail and replacements are hard to find. I remember fighting angrily with IBM's failed MicroChannel platform on this count.) Some searching online revealed, miraculously, that COMPAQ still has images of the configuration disks on their own FTP site, 25 years later! (Are you listening, Apple, who only grudgingly support anything older than last week?)
Getting this file off the Internet and onto a 5.25" floppy drive is trickier than it seems. The downloaded software itself includes a DOS tool to write the disk. I ended up using a chain of old machines -- my modern laptop for starters, then an old Pentium tower running FreeDOS from a CD to write the disk itself, then the Portable III to boot from the resulting 5.25" disk. (And where did I find 5.25" floppy disks in this day and age? Value Village, against all odds -- still sealed in plastic wrap, bagged with a stained purple change purse and a broken flashlight for $3.99.) I'll spare the full painful details of all this, but it also involved a 3.5" floppy disk, precision-applied electrician's tape, modified wiring, and a hazy recollection of X86 BIOS quirks.)
At the end of it all: the machine booted to FreeDOS from a clean hard drive. 20MB, 12MHz, and 640KB ought to be enough for anyone, right? Well, no, not in a world where a web browser can devour hundreds of megs all by itself. And that's RAM, never mind hard disk space.
Adding a second computer
Deciding to keep the built-in screen with all of its aesthetic joy imposed some real limits on the approach. If I wanted to keep the screen, I had to find a way to interact with it from some faster hardware. Could I cut in between the screen and the controller, by splicing into the ribbon cable? That would require a lot more technical mojo than I had to offer. Between the display controller and the motherboard? Probably a lot closer to standard, since I would imagine the display adapter (CGA-ish) would connect to the motherboard via the ISA bus standard, although of course there is no standardized card slot. But still very tricky.
The option I decided to pursue was to keep the whole shebang -- the entire 286 computer and all of its peripherals -- and use it as a serial terminal. There's a little pocket of space inside the chassis, probably for an optional modem to be installed into, and I happened to have an AAEON single-board computer
(SBC) that could fit into it once some of the structural plastic was removed from the internals of the chassis.
Here's the back of the unit with the case off:
You can see the full expanse of the 286 motherboard, complete with two populated 30-pin ram slots at the top of the picture. There is an expansion jack (with a black plastic cap currently in it) just above the midpoint of the right-hand side. The I/O jacks available from the back of the machine are at the top left: a parallel printer port, serial port, and CGA video jack.
You can also see the SBC jammed in diagonally. Here's a closer look:
The I/O ports of the SBC are set back far enough from the rear of the case that they are not externally visible. In fact, when installed, there is no visible difference at all after this modification. The SBC steals power from the built-in power supply, and takes its cooling from the built-in cooling fan.
It was a very tight fit -- the diagonal angle is necessary. I also had to dremel a couple of corners off the SBC to make it fit. For example:
You can see a small grey ribbon cable snaking under the motherboard in the above picture -- not the huge one on the right-hand side, but the smaller one in the background to its left. This is how the SBC communicates with the 286. It's soldered to the serial port on the underside of the motherboard:
The SBC itself has a few USB ports, and I installed into one of these a USB wireless dongle to give the thing the ability to speak to the outside world via a wireless network. (The SBC also has built-in audio capabilities, and I intend to add a couple of internal speakers too.)
So there we have it: no visible changes at all when the machine is closed up, but internally, there is now a complete second computer that can speak to the original 286 (and thus its screen and keyboard) through a serial port, and can connect to the outside world through a wireless network.
Software on the SBC
The SBC has a 512-MB CompactFlash drive installed, running a trimmed-down version of Debian Linux. It's no speed demon but it does the trick. I have the lynx text-based web browser pictured below:
I can control my stereo through the mpc / mpd suite of tools (I might write this up later), and I can ssh/sftp around the Internet. This is all done invisibly over the serial link through the 286, described below.
Software on the 286
There's a surprising amount of free (as in beer) software for this ancient platform. FreeDOS, mentioned above, is the operating system. The '90s-era X86 platform is still widely used for embedded systems, as the hardware is dirt cheap, reliable, and doesn't usually need cooling fans. FreeDOS is a minimal, capable operating system and a lot of developers cut their teeth on the stuff. DOS may be long gone from the home computer scene, but it's still running in more places than you think.
Embarcadero Systems, which took over the reigns from venerable Borland, released Turbo C as freeware -- this was the best-loved C compiler for the PC platform for years. I remember saving up paper route money to buy a $400 educational copy of Borland C++, on 12 floppy disks, probably back in 1994 or so. Seeing this again, running on a vintage machine, really took me back.
As a terminal program to communicate with the SBC, I used the excellent, respected, ancient and capable MS-DOS Kermit. It's the end of an era for this project: it'll be officially wrapped up on July 1st. Their news page has the whole history of the project, going back to 1754 -- well, 1981. This software has been through the mainframe wars, the BBS era, and survives on somewhere in the Internet renaissance. (They're releasing the source code to all their Kermit programs, permitting them to live on; see the news page for details.)
When FreeDOS starts, it displays a "Starting FreeDOS" message. I didn't want the two-computer trick to be visible during boot, so I wrote a small C program to modify the DOS binary by searching for "Starting FreeDOS" and changing it to "Booting Stage 1" instead. Insert satisfied nerd noise here.
FreeDOS boots directly into MSDOS-Kermit (anyone remember tuning autoexec.bat?), which is scripted to connect to the serial port immediately and start displaying what's happening there. Since both machines power on at the same time, when the switch on the back is flicked, they boot in parallel and the 286 hands over the terminal to the SBC as soon as it's ready. The whole thing is seamless.
Field trip to Cafe Prado
Well, I haven't gone to Cafe Prado with it yet. This project is finished (minus the speakers I want to install eventually) and provides a terrific combination of old-school aesthetics and modern connectivity. It's not useful for an enormous amount, since it's limited to a text-mode terminal, but I think that adds to its charm -- and you can accomplish an awful lot through a terminal. Web browsing, typesetting, programming -- I could even watch videos in text-mode if I had something faster than a serial connection. That's the UNIX heritage.
So maybe I'll head down to Prado to commemorate the end of the Kermit project on July 1st. If I do, I'll take some photos.
Thanks for reading! I've got a few more hardware hacks that I'd like to document here when I get the chance.