My early experiences with Commodore computers

[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[1] 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 [1].  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.

About these ads

40 responses to “My early experiences with Commodore computers

  1. Wow, that’s a trip down memory lane. My old C64, and possibly a C128 is still stuffed away in my parents attic somewhere. I wonder if they still work. The monitor was great, I used it for years because it had RCA jacks. I sure wish my fancy flat panel display I have today had an input so simple and versatile. I never understood why the IBM monitor I got later didn’t have them.

  2. What a post!
    You have reminded me of the early days.
    I also took my first steps on commodore (64) hardware and I clearly reminds nights of “programming passion”.

    My girlfriend has already accepted to be at the 3th or 4th place right back my commodore 64 and my first assembled PC286. :-D

  3. Ah! Bringing back memories (nightmares) of sector patching TRS-80 floppy discs that had been corrupted by crashing software… And tweaking the 8008 assembler code for a home-brew (wire-wrapped) rally computer I and a friend built.

  4. I had much the same C=64 set-up as you when I was younger. I used it through high school (graduated 1994) for everything. The printer I had was the 1526 – sounds like it could be what you had, too. And I can’t believe I remembered that number off the top of my head without looking it up. . .

  5. Augie, I think you’re right — it probably was a 1526. Image here if anyone wants to see it.

  6. Heady days indeed. The “Mapping the C64″ book was amazing.
    Processors: thought the C64 had the 6510 (and the drive had the 6502).
    Printers: MPS801, MPS802 ?

  7. I have my Commdore 64 sitting next to me right now. I would like to get back into coding on it, but the issue is always relevancy. Unfortunately the world is not what it was once and the Internet does spoil one rather.

    To be honest, it saddens me that the console-de-jour these days is so closed and that there just isn’t that bedroom coding nature anymore. Imagine what could be achieved if the Wii came with a “Programming Channel” and full documentation. Gosh, we would have killed to have access to a computer with an always-on wireless connection to the Internet and every other console.

    I’m amazed you got something published, well done. I wrote a lot, but lacked the [what we now call] ‘social network’. I’m quite proud of myself for writing a machine code IRQ routine to move a mouse pointer sprite around the screen using the joystick.

  8. mdhills, your memory serves you well: 6502 in the PET, 6510 in the C64, and I don’t remember which in the VIC-20. I seem to recall that the chip actually ran slightly slower in the C64 than in the VIC. Weird.

    Croc Kamen, I’ll be writing more about my experiences getting my games published, and more generally about the cottage-industry feel of the computer-games world in those days.

  9. Pingback: Where Dijkstra went wrong: the value of BASIC as a first programming language « The Reinvigorated Programmer

  10. Pingback: Where Dijkstra went wrong: the value of BASIC as a first programming language « The Reinvigorated Programmer

  11. I don’t recall the exact speed ratings for the CPU of the V20 vs C64, but I do seem to recall that a part of the relatively slowness of the C64 was the larger display area which stole cycles from the CPU.

    In any case, awesome blog. If if you are just *slightly* younger than I am and more successful. :) Subscribed.

  12. Golan Klinger

    You may be surprised to learn that there is an active community of VIC-20 users and that new software and hardware is *still* being released. No nostalgic VIC-20 journey would be complete without a visit to:

    http://sleepingelephant.com/denial/

    There’s a not dissimilar although slightly more games-oriented Commodore 64 community here:

    http://www.lemon64.com/

    Last but not least, take a look at this archive:

    http://www.bombjack.org/commodore/

    You’ll understand why when you get there. Enjoy!

  13. I still have my C=128, 2 1571′s and a 1581 AND the old cassette drive (for some reason) and the BLAZING 1200 baud modem :-)

    While I would love to keep the around indefinitely, that may end up on ebay at some point.

    I forgot about the 1525/1526. And like Augie, I can’t believe I recalled the printer model number that I had.

    I had the printer the MPS 801.
    That was my first & was dot matrix, tractor feed and used fan fold paper.

    http://www.c64-wiki.com/index.php/MPS-801

  14. @Phil G.

    I had an Apple IIc with a 300/1200 baud modem, which I had to lock at 300, because I got too much garbage when I connected at the ‘much faster’ speed.

    Good times, good times….

  15. I think that Video Genie was sold in Australia as a Sorcerer. That was the first computer I ever saw – one of The Dads brought it along to my Cubs group. I think I was 7. He typed:

    10 CLS
    20 PRINT “HI”
    30 GOTO 20
    RUN

    The screen strobed with HIs and I was lost. The next year I got my first VIC-20. Those few short years with it are the bedrock of my current programming practice. I can’t imagine myself now trying to PEEK and POKE to manipulate the _actual graphics memory of the display_, but (and this is related to your other post about frameworks): I know how computers work. Not just how CoreGraphics or Cocoa or X-Windows or Unix work, but how the _computer_ works.

    And that tiny 3.5k of memory? It was freedom! I devoted one Christmas hols to writing an entire Star Wars adventure game (Episode IV had just come out, remember) including a stupidly lengthy intro sequence with graphics and sound (the programmable sound chip was awesome – Attack Decay Sustain Release!). How did we do it? I’ve no idea, but by jiminy I’m glad we did.

    I’m certain it makes us better programmers now, if only because it taught us to relish the unknown, to think of the computer as a very large bucket of generic lego, rather than the Star Wars Jar-Jar Binks Torture and Execution set (5 pieces, batteries not included, not compatible with sets from other manufacturers).

  16. According to Wikipedia, the Video Genie was a clone of the TRS-80. The Sorcerer was a similar Z80 machine made by Exidy. The Sorcerer was my first computer, so my head is filled with Z80 opcodes rather than 6502, but my first computer programming stories are more-or-less the same.

    The Sorcerer had these plug-in ROM packs with different software, the BASIC interpreter was the most common one. It had a cassette interface, and the S100 expansion bus allowed you to plug in this bus enclosure that you could slot S100 cards into (like floppy drive controllers).

    It also had a small “monitor” program burnt onto ROMS, I remember we completely rewrote the monitor in machine code and burned it onto EPROMS to replace those original ROMs. We also modified the video controller (all hardware in those days, fixed clock rates, etc) to change the 64×30 character display to 80×24. Wow!

    I think the machine and the S100 expansion box are still in my father’s cupboards somewhere, I hope to pull them out some day to show my son.

    Ahhh… The memories… :)

  17. Scott McLauchlan

    In Australia (and apparently New Zealand) the Video Genie was sold as the Dick Smith System 80 (through Dick Smith Electronics). See http://classic-computers.org.nz/system-80/ for a few more details.

    As for me, my first machine was a Commodore 64. My brother and I wanted an Atari 2600 and saved up money from our paper round. Our father talked us out of buying the Atari because he thought that, when we got bored playing games, we could use it for programming and learning about computers. This was the start of my career in IT (thanks, Dad). Our father also came up with the extra money ($A50) to buy a Datasette for us.

    After a few years my brother got bored of the C64, so I bought out his share and sold it to fund the purchase of a Commodore 128, which I still have.

    **** COMMODORE 64 BASIC V2 ****
    64K RAM SYSTEM 38911 BASIC BYTES FREE

    READY.

    Those were the days… :-)

  18. @Scott Yes of course it was the System 80, not the Sorcerer. I remember it was popular with Ham Radio enthusiasts because someone had written some logbook software, and they used to tell each other about it over the air. Pre-Internet – a viral marketing campaign!

    I also remember Dick Smith (for Podean readers, Dick Smith Electronics was a slightly more upmarket version of Radio Shack – or Tandy as it was called in Australia) used to sell a computer called the CAT, which was an Apple II-compatible that looked a bit like an Atari ST, back when those things were important.

  19. Aaron Davies

    heh, i remember the days on my mac plus when “multi-player” meant either taking turns or sitting squeezed together with one player on WASD and the other on IJKL.

  20. Pingback: Programming Books, part 3: Programming the Commodore 64 « The Reinvigorated Programmer

  21. This is the coolest post ever written!

    About load times being slow on the C64 is an understatement. We used to play darts while we waited. Then I got a Super Snapshot cartridge and all was good (the code for the fast loader was written by someone that went to my school. My brother knew him and was in the same class.).

    One thing I remember doing for kicks was building a parallel cable between the CIA chip in the disk drive (yes, the drive was its own computer with its own processor) to the user port of the C64. I had to write code both for the disk drive and the C64 and have them talk to each other and stay in sync without losing speed. Today, this is called distributed computing. Or at least client/server programming. I was doing it for kicks and got a 10x speedup. Then I obtained fast loader software designed for this parallel cable and it was insane the speedup. No more wait times at all. Didn’t work with copy protected materials unfortunately since they used their own disk drive code for the copy protection, but for most things, it worked great.

    I actually miss going to the electronics store (the kind that sold resistors and capacitors) and asking the guy who worked there all sorts of questions. His faces were quite telling at how he found us annoying, but we learned a lot and after a while, he seemed anxious to find out what crazy projects we’d be working on next. (One project was a sound sampler I saw in a magazine. 4-bit sound, YAY!) Those stores don’t exist around here anymore.

  22. What a wonderful trip down memory lane – thank you, thank you, thank you!

  23. Wow, nice stroll down memory lane. My first exposure to computers was with Apple II’s in high school. Then with an original IBM PC & PCjr during senior year.

    The VIC-20? My best friend had one and when he got a 64, he loaned the VIC-20 to me to see if I wanted to buy it. I played with it for one evening and took it back. I’ll admit it – I was spoiled after working with the Apples & IBM’s.

    Enough about me though. That custom memory expansion module is utterly cool! I’ve always envied those who had a knack for tinkering with hardware in ways that I could only dream of. The closest I ever came was a DIY car charger for my walkman (X-mas gift in ’82) – and duly fried it. Sorry Mom & Dad.

  24. I also started on a small keyboard PET

    Another good personal history of this period is

    http://www.llamasoft.co.uk/lshistory1.php

  25. Gareth Briggs

    Wow, what a pleasant surprise! I find this blog, and then you drop that you wrote The Causes Of Chaos. I remember playing it with eight characters for faster exploration.

  26. Gareth — AWESOME that you remember The Causes of Chaos! I’ll be blogging about that program at some point, so stay tuned.

  27. Pingback: The hacker, the architect and the superhero: three completely different ways to be an excellent programmer « The Reinvigorated Programmer

  28. Ah yes, the 1541. It really *was* an astonishing drive, though, because it had a CPU in it nearly as powerful as that in the C64 (a 6502 rather than a 6510, so all it lacked was bank-switching) and some RAM (IIRC, 8K). You could run distributed systems across the serial link, and with not very much work you could rewrite the astonishingly dire serial protocol into something that was actually relatively nippy: I managed 1.5Kb/s once, I think.

    That RAM expansion pack is amazing. I started with a ZX81: we bought a wobbly RAMpack, but a short in the RAMpack stopped it from working (it drew too much power and the machine shut down in sympathy). After dithering in worry for a year or two my dad fixed it. It’s surprising how much you can write in 1K… as long as you avoided BASIC. (The ZX81 BASIC’s only numeric representation was a six-byte float. Perhaps a bad choice given the tiny RAM). Its assembler was awesome, alternate banks and everything (the 6510′s was of course awesome in pretty much the diametrically opposite fashion, RISCy before RISC was cool). I can still remember Z80 opcodes the way you can remember 6502 ones (C9 for unadorned RET is the first that springs to mind 27-odd years later).

    That printer was horrific in hindsight. It was so noisy that more than once the neighbours knocked on the door to ask me to stop printing something so they could hear their TV, and the print quality was dire.

    oh, also, you typed in meteors games on store computers? I’m afraid I was much more evil. I tended to type in programs on store computers that would display an imitation of the normal boot prompt and then act bizarrely when the users tried to ‘use’ it, insulting them, boasting about how amazing this specific computer was and how it was so much better than the primitive carbon-based users… every time I rewrote it it got more surreal.

    In hindsight I’m surprised I never turned into some sort of systems cracker ;) I mean, fake login screens would have been easy in comparison!

  29. I loved those old PET computers; that was my first experience as well, though I didn’t get much farther than 10 PRINT HELLO; 20 GOTO 10.

    I’m pretty sure there was a 4kb model and that that was the one I got my hands on. (It belonged to a friend’s dad.)

  30. I still have the 64 monitor – and it still looks terrific. My kids use it with a DVD player in the bedroom so the parents can have some peace and the use of the big TV.

  31. hiya!

    you’ve used my image of the 1702, which is cool (I’m glad you liked it! :-) ), but it’s licensed under Creative Commons Attribution-Share Alike license. if you could link ‘er back to the page it comes from (http://www.flickr.com/photos/shaniber/3027892522), I’d muchly appreciate it.

    I really enjoyed the article… brought back a lot of memories of how I cut my teeth on the Vic-20 and C64. beautiful machines, they were…

  32. Hi, Shane, sorry about the lack of attribution on your 1702 photograph — now fixed. Thanks for bringing it to my attention.

  33. thanks, you rock!

    shane.

  34. Ohh that is pretty sweeet. Thanks for sharing. Nice to see a cool site again in this industry.

    –BurnList–

  35. Dominic Taylor

    I was born in 1968 – I remember being 13 years old. Saving all the money I could from my paper-round so I could buy a VIC-20. The day came to collect the computer, it was pure magic – I whish every day could be like that :)

  36. Does anybody remember a model of the PET 2001 without the tape drive? I fully remember the typing on the chicklets, but I’m pretty sure the ones in our lab had the keyboard centered, and some 3rd-party hack with an external tape drive.

  37. Pingback: Memory expansions then and now | The Reinvigorated Programmer

  38. Pingback: My early experiences with Commodore computers (via The Reinvigorated Programmer) | Elizabeth's space

  39. ha! I used to do the program a quick game into the display model Vic in the shop too! Kmart for me and instead of meteors it was ski slopes…

  40. I suspect that Meteors and Ski Slopes are essentially the same game!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s