Welcome to Elbug!

The year is 1982, I’m 13½ years old, and I had more or less completed the move from plain Lego bricks to Lego Tecnic. I’m also becoming increasingly interested in electronics, and while reading electronics books and magazines, and constructing my own circuits, Radio Luxemburg is playing on my AM radio. Reception is only possible after sunset and – depending on weather – even then is often quite poor, but the music and DJ’s are great, and I love it!

And this was when my computer career started: One of my father’s colleagues had built himself a simple computer based on the National Semiconductor SC/MP microprocessor. Based on a 1977 design by the Dutch/English Elektor magazine, he had chosen to skip their original printed circuit boards and instead build a compatible machine on wire wrap Eurocards. For some reason, he decided to give the machine to me 🙂

The machine was programmable in a tiny BASIC dialect called NIBL-E – and in machine code. Programs were recorded on cassette tape and loaded using a HEX I/O board with 16 hex number keys and 8 function keys for input, and 8 7-segment LED displays for output. A monitor program called Elbug residing in the lower 1.5 kb took care of hex i/o, cassette tape interface, and even had simple debugging tools. Starting the NIBL interpreter was easy though: You just had to RUN the program at address hex 1000, which was where the two 2 kb e-proms containing the full NIBL interpreter started.

The SC/MP had a very pretty instruction set architecture (almost RISC like), but was dreadfully inefficient and the BASIC programs executed very slowly. I therefore quite quickly moved on to learn the machine code language, writing programs on notepaper, converting the instructions to hex code by hand, and entering them on the hex-keyboard.

At some point, however, my father and I sat down and designed a simple assembler: Initially written in BASIC, over the following year or so, I wrote several machine code routines for it to speed up the assemblyprocess.

I remember carrying my open frame computer with several pc boards and 9 kb RAM and external terminal to a computer party. My friends found my computer odd, but cool. I programmed mine while they played games on their ZX Spectrums, ZX81s, andCommodore VIC-20s.

I explored and programmed the SC/MP computer for two or three years until I moved to a CP/M based personal computer, but that’s another story!

All this happened 30 years ago, and in the true spirit of retro computing, a few months ago, I started implementing an emulator in Java. Why? Well, I needed to get myself acquainted with a new Java IDE (IntelliJ), and my Java experience was getting pretty rusty… so why not do a hobby project which I could relate to? I still remember the hex codes of many SC/MP instructions – I think the memory of the computer is more or less hard-wired into my brain!

And here it is: My SC/MP emulator running the Elbug monitor:

My SC/MP emulator running the Elbug monitor

The processor emulator itself is about 600 lines of Java code, and there are some 500 additional lines of Java implementing a memory handling, a Swing based emulation of the HEX I/O board (including a 7 segment display widget), and a main program.

I feel I need to do some code clean up before I release it, but it’s my intention to put everything into a SourceForge project. Although I don’t know anyone apart from myself with a SC/MP computer, there are a few web pages around about this simple processor and the Elektor design, so it might be of interest to others.

I still have a few things to work out: The serial I/O on the SC/MP was implemented in software, so to run the original NIBL interpreter, I’ll have to do some cleaver de-serialization and serialization in Java as well as a simple terminal emulator. But I’ve got the software design pretty much worked out in my head, so I’m pretty sure I’ll make that work too.

I even have a plan to decode my old cassette tapes: A WAV file recording and some cleaver FFT analysis should be able to do the job of decoding the 600 baud FSK coding, I think.

By the way: The emulator is bug free! “That can’t be true!”, I hear you shout? Maybe not to you, but the thing is that none of the problems it has “bug me”: It’s all about entertainment! 😀

Computer history

As a teenager, I spent hours reading datasheets for CPU components like the bit slice processors AM2901. I also designed hypothetical CPUs in block diagrams. A 16 bit CPU was my objective, and it should have had a clock of 20 MHz. The instruction set was to be small and beautiful. My first computer was based on a National Semiconductor SC/MP processor, which had a very nice and simple instruction set, and I’ve always liked things which are the simple, beautiful and logical.

I never did build my own CPU, but at university, I spent hours playing with the old RC4000 mainframe we had in the electronics club. It was (is!) a 24 bit machine from the late 60’s, a very nice and advanced design. Its concurrent programming system was among the first in the world (appearing at about the same time as Unix was developed in the US), and my father, who used to work at Regnecentralen, gave me one of the original books about the system, which I read with great interest. It was a message passing based system, and I think the design had a few drawbacks, but the beauty of it was fascinating.

Yesterday I saw my old friend again. She is now residing in the rooms with computer historic enthusiasts. I visited the club with 14 year old son Frederik.

Photo of the RC4000 computer from 1971 in the basement of Dansk Datahistorisk Forening
The RC4000 computer was designed in the 1960's and was built from the late 60's to mid 70's when it was replaced by RC8000. It was a 24 bit architecture with up to 384 Kb core memory.

The RC4000 still works, but the enthusiasts are more focused now on its predecessor: A GIER computer, which has recently been brought back to life. The first GIER was delivered on July 31st 1961, so the design is turning 50 years old this year. About 50 of these machines were built and the club owns two: One early model and a late model. It is the late model which they are bringing back to life.

Photo of the now running late model GIER computer
GIER, a 50 years old computer design, now being brought back to life.

There are very few test programs for GIER, and this makes the repair process a bit more complicated. Poul-Henning Kamp, the author of the Varnish Cache, who is one of the active enthusiasts in the club, mentioned that it was probably because the designers found test program development to be too boring. These guys were innovators! Poul-Henning has unit tests for Varnish with great code coverage, but admits that writing tests is not the fun part of that project.

I used to program for a living and I can agree with this. Unit testing isn’t fun!

The smell of the old computers, their physical size, the noise they make, and their sheer lack of computing power (by todays standards) suggest that these machines are of a different era. Technology has evolved a lot, but people are still people. And the people matter – the technology is just a means to an end.

I still love working hands-on with technology, but my view on IT has grown a lot wider since I was young.