As a teenager I tried to sell these games by running an ad
in a magazine. Sadly, too few copies were sold to recover
the £100 pound cost of the ad. You can now play for free.

Sinclair ZX Spectrum games by David Hembrow

Click below to download games directly. These games are all free to play and you can share them with other people as much as you want. The files are usable with almost any Spectrum emulator, emulators being available fore free for most more modern computers, or can be exported to an actual cassette for loading on a real Spectrum. I use the Fuse spectrum emulator.

While I'd been interested in computers for many years, the ZX Spectrum was my first 'real' computer. Before that we had lived in New Zealand where computers were far more expensive so I'd read in magazines about such wonders as the Ohio Superboard / Compukit UK101, the MK14, The Apple ][, Commodore PET, Tandy TRS-80 and other machines, but never had been able to afford one. We returned to the UK in 1981 and I quite quickly got my hands on the only programmable device I owned before the Spectrum, a TI57 programmable calculator. This was marvellous but limited to just 50 program steps and no I/O past the LED 7 segment screen and the keyboard. I wrote Lunar Lander games and similar types of things on the TI57, but you couldn't do much beyond that with such a simple machine. I'd also written some software in BASIC for an RML380Z at school, but of course my time was limited on that machine so I couldn't progress much.

Teaching myself to program in assembler and writing software on the Spectrum was something I did for fun. I did try to sell some of these games once and occasionally I sent things to magazines or to software houses with the hope of finding a career. I even ended up involved with a few commercial games software companies, but they either seemed to end up being something other than proper companies who could actually pay for work done or they'd not actually finish the projects so my efforts would end up unreleased. As a hobby I also built various bits of hardware for the Spectrum, including A/D and D/A converters with which I manipulated sound, a MIDI interface which allowed playing of samples from the Spectrum in response to a MIDI keyboard, Z80 CTC and PIO interfaces, a trackball interface, a fix for the IF 1 network so that it was compatible with the QL etc.

Simultaneously with this effort I was also getting into other sorts of software, writing other assembly languages (68000, 8086, 6800, 6809, 8051) and writing my own tools to work with these other machines (assemblers, compilers, linkers, disassemblers etc.). My Spectrum ended up in use as a printer service on the network running server software which I'd written in a FORTH like language. This was a path to an actual career in software for proper companies who actually paid invoices that I sent them.

I actually wrote quite a lot of games and other pieces of software for the Spectrum, but only the ones which I've successfully managed to get from cassette onto a modern computer can be found here. However all of that is a story for another time. This page is about the software written for the Spectrum which you are free to download and run. I hope it provides some amusement.

Miner (1983)

Miner runs on a 16 K Spectrum. It uses interrupt driven sound to provide a continuous sound track (not just occasional beeps) and the monsters as well as your own character are animated. The monsters are quite stupid as the game was released. This was a deliberate decision - I also wrote a far more clever algorithm for them but this resulted in instant death because they really did follow you every time. The game wasn't playable with the smart monsters However with the stupid algorithm you can easily make traps for the monsters and avoidance is the key to success. If you need to you can laser them by heading towards them and pushing the fire button.

The laser was supposed to include a visual effect but I never got around to implementing it. At the time that I wrote this I had only a 16 K Spectrum and I was using a very primitive Assembler which took source code from REM statements and assembled it into RAM (reserved with CLEAR, further reducing space for source code). This required several files on tape to be assembled one after another and a memory leak meant that each part had to be shorter than that which came previously. Not a very good development environment and something which stopped me making further developments after this point !

Note that this game doesn't work perfectly on some older Spectrum emulators. I used BCD for the score because this made displaying the digits more efficient but the DAA instruction wasn't correctly emulated on some older Spectrum emulators so the score didn't work properly. All modern emulators seem to be fine.

This is quite a difficult game because you quickly progress from one up to three opponents and it speeds up quite quickly. If you can score much more than a hundred points you're doing well.

Miner was written on a 16 K Spectrum using the Ultraviolet assembler. The source code was all written in REM statements and only a small part of the source code could be in RAM at once, so the source code consisted of many small BASIC programs each containing almost nothing but REM statements like that above. Linking was done by hand. I had paper with addresses of routines written on it. This was still more convenient than assembling by hand as I had done for my first Z80 experiments on the Spectrum. Oh, and don't copy this. This use of add hl,hl to calculate an address in the attribute space is far from optimal, using 93 T states just for the address calculation. I learnt to code more efficiently with time. Still, the game runs pretty well despite the sometimes less than optimal coding.

Keyboard controls: A = Up, Z = Down, 9 = Left, 0 = Right, Space = fire.

Download Miner

Zap Attack (1984)

By the time I wrote this I had expanded my personal Spectrum to 48 K of RAM. However the game still runs on a 16 K machine. This time the sound is similar but the objects on screen move pixel by pixel. I tried to get so many moving objects on screen as possible and I can't think of any other Spectrum game which animates so many objects at once as this one does. Mostly they're animated at 50 Hz, but slowdown can occur if the load becomes too high.

For a very long time this game was not available anywhere online. As well as the small number sold, I also gave copies to friends back in the 1980s and no doubt they tried to make copies for other friends, but this game was not easy to copy. I seemingly stumbled upon a copy protection mechanism worked reasonably well. This is how it worked:

  • Part 1: BASIC loader. Like almost all Spectrum games, this uses a small BASIC loader. This had code in a REM statement which was called immediately by the BASIC on loading, and that code then loads the loading screen.
  • Part 2: The loading screen. The loading screen is saved headerless, but looks like a header for a BASIC program to the Spectrum's standard load routine. I did this on purpose to sow confusion, especially for automatic copy software. The screen is also a little longer than usual because it also overwrites the printer buffer with code, to which the last piece of code then jumps.
  • Part 3: The tone. The printer buffer code did something quite unusual - it listened for a special tone on the tape which was not part of the code. If the tone was not present then a piracy warning text was displayed. If the tone was heard then the actual program would be loaded. The tone also had another feature: it was recorded far louder than the code segments. This confused the automatic level controls in cheap tape recorders and caused them to make poor and usually non-working copies if a tape to tape copy was attempted.

  • Part 4: The program. This is also headerless and also looks like a BASIC header, but it contains the actual code of the program. Once loaded it is jumped to and runs the game.
  • At the end of January 2020 I finally got around to defeating my own copy protection code by using a hex editor to re-write Part 2. This involved finding the code which checked for the tone and preventing it from jumping to the copyright message code. So a few NOPs replaced jumps and I had to recalculate the checksum.

    In the attact mode I show off the 64 column text routine I'd just written (yes, I know that this text is almost unreadable ;-) and smooth scrolling. These are things I was also using for more serious software. 32 columns was a real limitation. I also wrote a much nicer 40 column text output routine which may end up uploaded here somewhere if I find some more of my old tapes.

    This is a simple game to play. There are just three controls: left, right and fire. i.e. much like 'Space Invaders'. However as well as being simple it's also quite difficult. The speed is constant (unless you're good enough to experience the aforementioned slow down) but the number of enemies on screen rises rapidly. If you can score more than 1000 points you're doing well.

    Keyboard controls: X = Left, C = Right, L = fire.

    Download Zapattack

    Corona-V (April 2020)

    Like most people in April 2020, I'm stuck indoors due to corona virus (COVID19). This is a very serious crisis. Due to our government's slow action at the beginning we did not act quickly like countries such as Singapore, Taiwan and South Korea did. As a result, we've seen exponential growth in infections and deaths, despite our health services doing their best to limit the damage. We're all supposed to stay home as much as possible, to wash our hands regularly and to keep a distance from others when outdoors. So you have to find something to keep you occupied...

    This game involves eating healthily and washing away viruses. There are 12 different screens and while some viruses are easy to destroy, others are stronger and more aggressive. Controls are either the usual QAOP and space to pour disinfectant (actually all of the right bottom row) or Interface 2 joystick one. It should also work with a Kempston joystick if you turn that option on, but I've not been able to test this. It's nothing too special but it'll pass the time. While the tap file is less than 9 kb in size, you need a 48K spectrum for this game.

    The sound is interrupt driven, in a similar manner to the other two older games above. I used all the Z80's registers, with exx being use to enable the alternate register set in the interrupt routine instead of using the slower push and pop to save registers, and I also could use the IY register because none of the Spectrum's ROM code is called at all. The score is kept in BCD because this makes printing it much faster. Sideways scrolling proportionally spaced text is something that seemed like a good idea at the time. In total there's not much code at all. The whole tap file is less than 9 kb in size. That includes not only the code, but the text and tables and even the BASIC loader required to make it easy to load. I still find it somewhat amazing that everything is always so huge on modern computers.

    This game is written almost entirely with my own tools. I used a macro assembler and linker which I wrote back in the 1980s. This initially ran on the Sinclair QL under QDOS and used it later in the 1980s on MS-DOS and Concurent DOS. Back then, I used these tools for some commercial projects on the Z80 (including one on the Z88), as well as for a lot of hobby coding. This year I ported them to Linux, which left me with a development environment which needed a project, so I wrote this game using those tools. I also used Russel Marks' very handy zmakebas tool to create the BASIC loader in the tap file so the game can be loaded with the usual 'LOAD ""'.

    The assembler used allows some structures, so the code looks like this (this being the routine used to setup all the germs at the beginning of the game):

        ld de,germs
        ld ix,germs
        ld b,MAXGERMS
            xor a
            cp (ix+0)
                push bc
                call xychargerm
                pop bc
            ld de,GERMLENGTH
            add ix,de

    The macros work such that ifnz turns into a jr z,label with the label being at the endif. djnz turns into djnz otherlabel with this label being at repeat. There are various other repeat, else, exit, untilz etc. options for loops and various other conditions, including else and and. It's not a big thing, but it does stop one having to keep thinking of new names for boring labels and it stops such names which really have a limited scope being confused between different sections of code. "xor a" may look a bit strange, but it's an efficient way of loading the A register of the Z80 with zero in a single byte instruction which takes just four T-states. "ld a,0" takes up two bytes and 7 T states.

    Keyboard controls: Q = Up, A = Down, O = Left, P = Right, Space = fire.

    Download Corona-V

    Corona-V2 (June 2020)

    Do I have time on my hands ? Maybe I do. The Corona Virus second wave is now here. They're angrier than before, more difficult to beat.

    The reactions of many governments to the corona virus have been lacklustre to say the least. New Zealand announced this week that the virus had been beaten. They have no (zero) infections. Twenty two people died there, which is 22 more than anyone would like there to be, but thousands fewer than in countries like my own where the government waited far too long and did far too little. As a result, we still need to keep a distance from one another, still need to wash our hands a lot and we really should be wearing masks as well. It's notable that the countries in which it is normal to wear a mask when you know you have a cold have had lower mortality rates than those where mask wearing is not normal.

    Anyway, this game is somewhat more difficult than April's version so you perhaps want to play that first before trying the new one. The new version has extra features, extra more colourful graphics and it works a bit better.

    Keyboard controls: Q = Up, A = Down, O = Left, P = Right, Space = fire.

    Download Corona-V2, the second wave

    Microdrive backup utility (1985)

    I used Sinclair's microdrives with my Spectrum (less so with the QL because I had disks) for many years and despite all the negative publicity actually found them to be quite reliable. This utility allows backups to be made of microdrives.

    Note that what is saved here is a copy of what I had made as a distribution tape. It loads from tape and then immediately writes the program to an attached microdrive, ready to use.

    Download microdrive backup

    You can also find other links, and a few other games (mostly demos of a BASIC extension that I wrote at this link).

    Support me ?

    If you enjoy these games, that's great. If you copied them and played them back in the 1980s, I'm glad you did so. I certainly don't expect payment now for work that I did as a teenager. If you like the new games, that's great too. I don't want you pay me - this is a hobby. But consider making a donation to a development charity as there are people in this world who will be affected more by the corona virus to a far greater extent than those lucky enough to live in a more developed country and they need support.

    These days I don't code commercially but support myself by selling bicycle components. If there's anything you need for a bicycle then I can perhaps help you with that.

    Sinclair ZX Spectrum original publicity image. Issue 1 motherboard.