Something useful

      No Comments on Something useful

If you’re into retro computing, or building stuff based on SBCs such as the Raspberry Pi or BeagleBone, you’ll be familiar with a certain refrain from your significant other and even those you consider your friends. They’ll look at your latest project — perhaps a restoration of a 1980s home micro, or a simulation of a 1960s mini computer, or something of your own rolled from an SBC — and they’ll say, “Well yes, but what’s it for?” Or perhaps, “It’s very nice, but what does it do?”

There’s no good way out of this.

“I’m learning about early computers,” is one I’ve tried a few times. It’s always met with a glassy stare of incomprehension. “It’s about understanding how things work.” Nope, that doesn’t fly either. “It gives you an insight into today’s technology.” Yeah, like they’re going to believe that.

Eventually, as your explanations become more plaintive and your references more obscure, your interlocutor will roll her eyes as a sign that she has condemned you forever to the dark domain of the geeks. Or simply that you’ve confirmed her worst suspicions.

No matter. We know, don’t we? There is true enlightenment to be found in the realm of 8-bit microprocessors or simulated mainframes running on tiny developer boards.

I was delighted to find this video of 18 year-old Connor Krukosky who bought a 10 year-old, $350,000 IBM mainframe computer for $350, managed to cram it into the basement of the family home and got it running. When it came to explaining why he would do this, it all becomes somewhat vague, but those of us who have been initiated just know.

There’s an analogy here, although not a strong one. We currently have a car that, every time we fire it up, spends a minute or so pinging warnings at us — the air bags have malfunctioned, the brakes aren’t working, stuff like that. We ignore it because we know it’s lying. It’s just that the ECU (that’s a computer, pretty much) got damp and is getting confused. We’ll need to fix it soon, but you can’t. You can only replace it

Modern cars are crammed with electronics. As much as 35% of the cost of a new car consists of computers, sensors, displays and all the subsidiary stuff that goes with them. These days, you can barely empty the toffee wrappers out of the ashtray without first running diagnostic tests. There’s less and less the averagely informed owner-with-a-spanner can do to maintain, let alone improve, the vehicle.

Eight-bit microprocessors, early operating systems, computers with GPIO pins you can use to attach sensors or stuff you can control — all of this not only returns power to those willing to learn, it opens a world you can explore without needing a PhD in quantum electrodynamics. Writing machine code on a BBC Micro is not just easier than trying to do it on Intel’s latest, greatest x86 chip, it’s also a lot more fun. You can see real results. And yes, you get to understand how computers really work.

As well as tinkering with this old stuff, and hacking out Python code to force the Raspberry Pi to amuse me, I also write code (at a mostly hobbyist level) for modern platforms too. My iOS app, StoryFlow, was written in Objective-C on Apple’s Cocoa framework. I’m currently writing a companion program in Swift for the OS X platform. And that’s huge fun. But you’re always aware that you are a long way from the metal. Between your code and what appears on the screen are millions of lines of code written by someone else — all the OS, GUI and framework stuff. Assembler on the BBC Micro’s 6502 is a different matter altogether. Suddenly it matters exactly where a particular byte is stored.

So I do this retro- and maker-type stuff for the sake of doing it. But yes, even I occasionally stop and think, “What’s it for?”

The PiDP-8 — Oscar Vermeulen’s PDP-8 replica — is a thing of beauty and it makes me happy just sitting there flashing its lights. But I couldn’t help thinking I should find something for it to do.

So I wrote, using a Python library that I hacked together to read the switches and control the LEDs of the PiDP. Using the PiDP’s switches, you can enter two 12-bit numbers, in binary, and then AND, OR, XOR, ADD, SUB, NAND and NOR them to your heart’s content. The entered numbers and the results of the calculations are displayed on the PiDP’s rows of LEDs, as well as on-screen if you’ve got a monitor attached or have connected via SSH. (You’ll have to do one or the other to get the program to run.)

I’m pretty sure the results are correct. Just don’t build anything important with it, like a nuclear submarine.

So now, when someone looks at the PiDP as asks, “What’s it for?” I can truthfully respond, “It’s a binary calculator.”

Now I think of it, I’m not sure that’s going to make me seem any less hopelessly geeky. But it’s worth a shot.

The Python library and are here »

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.