Revisiting a ZX Spectrum Type-In

A couple of weekends back, I had possibly the most nostalgic day I’m ever likely to have clearing some of my old stuff from my parents house. We moved into that house when I was about 5 years old and the oversized loft has been something of a dumping ground ever since. Despite moving out years back, I’ve never got round to sorting out all my stuff as there was never any pressing need. My Dad is planning on moving himself this year though so it all needs to be cleared. The biggest find were all my childhood comics of which there are hundreds (now sold off on Ebay). I also discovered a Sinclair Programs magazine from February 1985 containing loads of ZX Spectrum game listings. Anyone above a certain age will probably remember magazines like this where you were expected to type in the code for each game from the pages. These would frequently have errors leading to much frustration in trying to figure out why it didn’t work. This process provided an early insight into programming for lots of kids like myself and you will find plenty of developers who started out from type ins. The most obvious example from an Origin standpoint being Chris Roberts whose Kong type-in game appeared some years back on this blog.

1

If you had asked me before I found this, I’d have said that I remembered typing in games from numerous magazines as a kid. The fact is that every game that I can vaguely remember is included in this one magazine. There are some reviews in there as well but the majority of the pages are code listings for a score of games.

3

Of personal note is this back page with an advert for the keyboard that I got to replace the ever unreliable rubber keyboard of my Spectrum. Given the cut out part of the page, this must be the very advert that we bought it from all those years back.

5

At any rate with all this nostalgia in the air I thought I’d keep it going by doing something I’ve not tried in 30 years, typing in some game listings. There are several of these games I can recall well enough to know that I played them but the details are patchy. I’ll go for a relatively short one first which impressed me with its graphics at the time with something of a city landscape drawn with lots of lines and dots. I was no doubt easily impressed back then so we’ll see what it looks like now.

The process of typing this in is a whole lot easier than on the original 16K or 48K ZX Spectrum. For those that haven’t ever used one, there were various types of “shift” mode for every key meaning it could type in all the basic commands like PRINT and LOAD with one keypress. This was in fact the only way that it would accept BASIC commands so you needed to learn where all these keywords were and couldn’t just type the word in. This system was also on the ZX81 which had a keyboard that was far more board than it was key being a flat immovable piece of plastic. Reducing typing probably made sense in those circumstances. It also saved memory as I understand by just storing a reference to the basic command rather than the whole word in the program listing. Again on the ZX81 with a frankly ludicrous 1K of RAM by default, probably a good idea.

The 128K spectrum improved matters by actually allowing you to type in the commands. This is the machine I own these days but I’m cheating here and typing it on an emulator first just so I don’t have to save to tape every time I want to test it.

Cheating or not, typing in the program is quite a lengthy procedure, a lot more than I expected. The Spectrum can’t always keep up with my typing and misses out characters. Everything has to be exact and I ended up having to proofread through much of the code after I’d typed it in. To make debugging somewhat easier I decided to type out relevant lines and test as I went along rather than going in strictly line number order. I had at least a couple of dozen typos of my own to sort out before I got this working. Everything in the magazine was correct at least so I didn’t have to fix any existing errors.

One point to note is that the program redefines some of the character graphics by poking new ones into memory so that the ufos, trees, etc.. in the game can be represented by these tiles. Where a letter is underlined in the text, it means I have to swap the spectrum to graphics mode, enter the letter, then swap out again to continue typing. This took a little figuring out and doesn’t appear to be mentioned anywhere in the magazine.

2 7

To get the program to an actual Spectrum, I save it to a virtual cassette in the emulator, then use a utility to convert the tzx file to a wav which I emailed to my phone. I’ve got one of those car audio cassette adaptors for this purpose which plugs into the headphone jack and I can then just play it into the Speccy as if it was a cassette. If you ever want to use one of these things by the way, just slide the cassette into the open deck as above, don’t try to load the cassette conventionally as it will slice off the cable within a few uses.

4 6

So what does the game look like after all that. Graphically, it isn’t bad actually for a type in. Most of the code deals with drawing the city using lots of draw/plot commands. This takes some time on the Z80 in BASIC. The game plays like the spaceship sequences in Ultima 1 if anything except with two UFOs at a time instead of the one. I have to move a cursor around trying to blast them before they destroy the city. Everything moves in character jumps so it’s not smooth or fast but for a type-in, it’s ok. After an hour of typing, you will probably be bored with it within a couple of minutes mind you.

I got a watered down version of the experience here but reliving this little piece of the 80’s, it’s kind of hard to believe this was ever a thing. The reward for the effort is incredibly minimal but I did learn/relearn a bit about Spectrum BASIC in the process. Who knows, I may not have got into programming myself if it wasn’t for this particular magazine so it must be at least partly to blame for my career since. It would be hard to imagine a kid having the patience these days. For anyone curious enough to try this out, the tzx is available here.

After a severe lack of Origin in recent posts, I probably ought to consider renaming this site but there is no way I can be bothered to create a new banner. So instead, I’ll get back on topic and finally have a proper playthrough of Wing Commander 2 on FM Towns next week.

4 thoughts on “Revisiting a ZX Spectrum Type-In

  1. Hi
    I wrote a program for Sinclair Programs called hunchback for the ZX81 pretty sure it was this edition can you confirm i was 15 years old 33 years ago! been after a copy of this for years
    kind regards
    Andy Carpenter

  2. wonderful little machine. i typed in (yes it’s coded, deal with it) the pac man program in sinclair programs 32 and while it’s finicky (i don’t have an actual spectrum since i live in ntsc land 🙁 ) it’s fun and makes me nostalgic for those days…then i see the load times and jerk back to reality.

Leave a Reply

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