[WARNING: this post is pretty much pure nostalgia for 1980s hardware, and has little technical content. It does, however, set up something else that I want to write about soon.]
I was born 1968; I finished primary school and went to secondary school, at age 11, in 1979. At that time I’d never seen a computer, but at secondary school I met Myles Kelvin, and we quickly became best friends. His dad had recently bought a Video Genie to run a small business on, and that was the first computer I used.
(I know it seems odd to start an article about Commodore computers with a Video Genie photo, but bear with me.)
I cut my programming teeth on two computers more or less simultaneously: that Video Genie, and a Commodore PET 2001 belonging to Richard Lewsey, the father of a boy that my mum used to child-mind. I’ll probably write about the Video Genie some time, but today I want to concentrate on the Commodore stream, because that’s where I ended up putting most of my efforts for the next seven years.
Remember the PET 2001? The PET was the initial line of Commodore computers, predating the VIC-20 (see my blog banner image) and the Commodore 64. As far as I recall, the 2001 was the earliest model, blessed with 8 Kb of memory (half as much as the Video Genie), and a 40×25 character monochrome screen. PETs have a very distinctive profile, and the 2001 is instantly recognisable by its hideous keyboard — an array of tiny, closely packed squares, with lots of blue and red all over it.
I can’t begin to tell you how my inner self wells up with nostalgia just from seeing this image. The funny blue OFF/RVS and RUN/STOP keys; the white letter and number keys and silver punctuation; the weird graphics characters above the main glyphs (which you got using SHIFT, since there were no lower-case letters.)
Richard was an amazing man. It’s been 24 years since I last saw him, but I owe him a huge debt. He let me spend a huge amount of time camped in the corner of his living room, hacking away on his computer; he taught me all sorts of important techniques, critiqued my early programming efforts, and built me a truly unique piece of hardware (see below).
Programming on the PET was either using the built-in Microsoft BASIC interpreter (back from when Microsoft were the Little Guy) or in machine code. I’ll admit I did much more of the former than the latter, but enough machine-code stuck that I still remember far too many of the 6502 op-codes: A9 for load immediate, AD for load absolute, AA for transfer A to X, 00 for BRK. (What is all that stuff still doing in my mind, when I can’t seem to find space to remember the difference between the virtual factory maker pattern and the virtual builder factory pattern?)
When I was about thirteen years old, I started doing a milk round to earn the money to buy my own computer. I got up at 4:30 in the morning every Saturday and Sunday, and worked through to about mid-day, for £5 a week. (Sorry if this is a bit of an Old Fart story, but it’s in here as background.) By Christmas 1981, I’d accumulated about £140, and for Christmas my parents gave me the rest of the money that I needed to make it up to the list-price of the VIC-20 — a number engraved forever in my mind, £189.95.
A few days after Christmas, Dad took me shopping — I think this was literally the most exciting day of my life (sorry, Fiona!). I’d been happily expecting each programming session to consist of turning it on, writing a program, turning it off, and starting all over again the next time, but to my amazement Dad had another forty quid or so, and I was able to get the external tape-drive that would enable me to save my work! Awesome!
It was called a “Datasette”. With a VIC, you had to use Commodore’s official tape drive, unlike the Sinclair Spectrum and other such computers that would let you plug in any old tape deck. Under control of the firmware provided, the Datasette could transfer a less than awe-inspiring 50 bytes per second.
The VIC-20 was both less and more than the PET. On the positive side, it had a much better keyboard, eight colours, three-channel sound (the PET was silent, although I seem to remember that Richard had hacked his hardware to get a non-standard sound-card working on his PET) and lower-case letters (though not at the same time as the graphics characters). And of course, it had a much lower price. On the negative side, it had only 5 Kb of memory, of which 1 Kb was used by the system and 1/2 Kb for the memory-mapped screen, leaving a rather meagre 3583 bytes for the programmer — one byte shy of three and a half Kb. Finally, its truly tiny screen resolution: 22 characters across and 23 down, each drawn in an 8×8 pixel space for a total size of 176×184 pixels — 32384 pixels, or 0.03 megapixels in modern camera terms.
It’s worth taking a moment to think about that. My main work machine now has a 1920×1200 screen, which means you could tile it with 71 VIC-20 screens.
So about that three-and-a-half Kb. You could actually do a surprising amount in that space: I remember writing a Donkey Kong game with custom graphics characters, a fruit machine, various games where your spaceship had to avoid meteors falling down the screen and suchlike. (I got really good at writing Meteors. When I was in the local shopping centre, I’d often pop into Dixons, write that program on their display model VIC-20 and leave it running.)
Still, more memory was obviously needed, but I had a problem: money. We weren’t a rich family, and I’d stopped earning from the milk round because I was now spending all my early-morning time playing with the VIC instead of delivering milk. If I’m remembering right, the 8 Kb expansion cartridge cost a massive £35, and there was no way that was going to happen.
Richard Lewsey to the rescue! He made a memory expansion. I didn’t even know that was possible. He got hold of the chips, designed and soldered the board and housed it all inside … a cassette case! I still have it up in my office, and here it is for your enjoyment:
Armed with a full 11.5 Kb, I was ready to start making some real programs, and what moved me most was Adventure games. (“I’m in a forest. I can also see: trees.”) I wrote a whole sequence of these on the VIC, of which the first two were published: Magic Mirror and Nosferatu. Thanks to the wonder of emulators, I can still play them today, which I think is pretty astonishing. More worryingly, I can see the horrible code that I wrote back then, and marvel that it ever got published. (I’ll talk more about this in a future post.)
Those two games made me a bit of money — I think something like £650 all together, which was a lot for our family. I spent nearly all of it on more Commodore hardware: first the amazing new C64, which had a massive 64 Kb of memory:
Yes, the 64 looks very, very much like the VIC-20: basically identical except that the plastic casing is a duller shade of cream and the function keys are grey rather than sand-coloured. Around the back, it was a little more different — for example, the cartridge expansion slot was narrower.
Of the 64 Kb on board, 38 Kb was directly available to programs: if I’m remembering correctly, 16 Kb of the remainder was hidden behind the ROMs (8 Kb kernel and 8 Kb BASIC); some of the other 10 Kb was screen-mapped or zero-page, but I’m not sure where the rest of it went. (Note that loading a program that used the easily accessible 38 Kb, at the rate of 50 bytes per second, would take 13 minutes, plus however long it takes to get the milk.)
You could switch out the kernel and BASIC ROMs by setting certain magic memory locations to special values; but of course if you did that from BASIC using POKE, the interpreter would suddenly not be there any more and the computer would crash. So to access the hidden memory, it was necessary to use machine-code. I remember writing routines to copy chunks of memory in and out of the hidden banks to an area where I could access it from BASIC. A popular trick was to copy the ROMs through to the RAM hidden behind them, then switch the ROMs out and run the kernel and BASIC from RAM, where they could be tweaked.
As well as the C64 itself, I bought the astonishing (I am not being sarcastic) 1541 disk drive:
The reason I describe this drive as astonishing is that it was connected to the computer by: a serial lead. Yes: a line with DIN plugs at each end, connecting to a bit-serial IEEE 488 interface. Although its capacity of 170 Kb per disk compared fairly well with the disk drives of competitor computers such as the BBC Micro, the super-slow serial interface meant that its speed was tortoise-like. What’s that? You want a number? OK, here it is: 300 bytes per second. That’s 3000 baud (allowing for stop-bits and suchlike), which is 1/17 as fast as a typical modem (if you can even buy them any more). At that speed, copying a 170 Kb disk took ten minutes — but that was if you had two drives and could copy directly from one to the other. In practice of course, with only one disk, the process was read into memory for a while, prompt the user to switch disks, write to the destination disk for a while, prompt the user to switch back, and vamp till fade. All in all, it was a twenty-minute-plus process. To add insult to injury, lots of third-party drivers turned up for the tape drive, increasing its speed by an impressive 10x, yielding 500 bytes per second: the upshot was that the cassette drive was actually half as fast again as the disk drive.
How did we ever get anything done?
Completing the menagerie was the Commodore 1702 monitor, which meant I could dump the old black-and-white portable TV I’d been using:
[Photograph modified from one by Shane Docette, CC-Share Alike-licenced, downloaded from flickr -- thanks, Shane!]
Later I got a slow, noisy Commodore dot-matrix printer whose characters were bitmaps in an 8×8 matrix, and which therefore lacked descenders for the lower-case g, j, p, q and y characters. It printed, of course, on fanfold paper — everything did in those days. But I don’t remember the model number, and googling for photos hasn’t turned up anything that rings bells, so here is a picture of battleship-style salmon roe sushi instead.
Armed with my C64, 1541 disk drive, 1702 monitor and the printer, whatever it was, I was able to get more done, more quickly, than with the VIC-20. I wrote a multi-user adventure game called The Causes of Chaos, which I sold via a London-based software house called CRL, and which made enough money for me to survive through university without accumulating any debt. (Note that this was in England, where tutition is free; and in the late 1980s, when there were student grants instead of loans. So this is not as impressive as it probably sounds to anyone who’s working their way through Yale.)
So by 1986, I was firmly established in the world of Commodore computers, subscribing to ICPUG (the newsletter of the Independent Commodore Products User Group), and cheerfully hacking away mostly in BASIC with a bit of 6502 machine-code on the side, and dreaming of the day when amazingly advanced languages like COMAL would revolutionise the programing world by being even better than BASIC. (I knew this because I’d read about it in Practical Computing.) I was very comfortable and very happy in this world.
Then I went to university and met Unix. But that is a story for another day.
Note . I am embarrassed to admit this, but “multi-user” here meant that the players would take turns at the keyboard. I doubt that anyone, ever, actually played it that way.