November 2014

Sun Mon Tue Wed Thu Fri Sat
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29

« Purging unwanted DGN linestyle data from an AutoCAD drawing using .NET | Main | Midlife crisis planning »

December 14, 2012

Loading games on my ZX Spectrum from an iPod Photo

As mentioned in this previous post, I’ve been having fun with an old 16K ZX Spectrum that a colleague kindly gave me a few months ago.

After getting it working with a modern TV set, the next challenge was to get some games loaded into it. Pretty much any game you’ve ever played or heard of for the Spectrum is available online in digital format, although it should be stated that most are still protected by copyright.

World of Spectrum has a great collection, and if you go further afield you can find “complete” archives that people have posted.

For those of you who have never experienced the loading of a Spectrum game, it’s worth taking a quick step back and looking at that in more detail…

Mono tape playerBack in the day, ZX Spectrum games were bought (or copied, ahem) on audio cassette. To load one into your computer, you’d need to place it into a tape player (sorry if this is getting a bit basic – I just thought I’d better spell it out for any millennials who stumble across this post… ;-) and connect the Ear sockets on both the player and the Spectrum via a 3.5mm audio jack.

This was always a little confusing: the “Ear” socket on the Spectrum was used for audio input, while “Mic” was for output… but anyway. You usually tried one or the other first and switched if it didn’t work.

Later Spectrum models had integrated cassette players, but I never owned one of those, myself.

I typically had two or three working cassette players in use: the specific one needed would depend on the game (and dare I say the quality of the copy, if it was indeed a copy). You had to think about head cleaning, bass, treble and volume settings and still there were just some games that certain players just didn’t like. I have no other way of explaining why: some would simply never load from certain players.

The loading of games was therefore a feast of anticipation. You’d plug in the cassette player, type LOAD “” and hit Enter on the rubber keyboard, and hopefully you’d see an alternating red and cyan border on the screen as the carrier was recognised.

Then would come a series of tones – pilot signals – followed by bursts of data (which caused the border to go crazily Swedish with loads of blue and yellow stripes :-). It was very common for the initial few blocks of data to contain a “splash screen” – a very simple image – that would then be displayed while the game itself was loaded.

So the structure of the data was not as simple as just being about the code to be loaded and executed.

Eventually – after 3-6 minutes for a 16-48K game or around 20 minutes for a 128K game – the load process would either succeed or fail with an utterly devastating “R Tape loading error” message. Depending on the result you could either start playing or repeat the last process with another player and various other fingers crossed.

Now in my case I don’t actually want to go back to loading games from tape. I’m a retro-enthusiast, not a masochist. I want to get tape-equivalent audio data in MP3 format, and do my best to load that from a (relatively) modern MP3 player.

The first trick is to get games in an appropriate format: those available in TZX format are generally suitable, as they have the loading blocks encoded basically as they were stored on tape. This means you can essentially convert them back to WAV or MP3 format and expect that to be loadable into a physical Spectrum (rather than just working with an emulator which, while fun, is a far less spiritual experience).

So now I had to convert the various TZX files into an audio format of some kind. Once again World of Spectrum has a great list of tape-related utilities: I selected winTZX, as it seemed most suitable.

winTZX in action

This allowed me to create a bunch of MP3s from the various TZX files I wanted to load (and I got some inspiration from this list). I ended up converting them one-by-one, as I didn’t have much success using the winTZX utility’s batch mode. Ideally I’d like a more automated approach to crank out MP3s from TZX files, but this was enough to prove the concept, at least.

Once I had my MP3s, I had to find a way to get them across to my iPod Photo (which feels like a retro device in its own right, these days, even if the eras are a little mismatched). I didn’t want to maintain two iTunes libraries (if that’s even possible), so I ended up using a tool called SharePod, which allowed me to manipulate the contents of the device more manually.

SharePod managing my iPod Photo

Then it was a “simple” matter of connecting the iPod to the ZX Spectrum via an audio cable and hitting play on the chosen file when running the LOAD “” command. I say “simple”, as there were some tricks I needed to get it working well:

  • I used an audio splitter to send the audio via my stereo system – it’s really not the same if you can’t hear the data being loaded.
  • I changed the equalizer setting to “Small Speakers” on the iPod, to reduce the bass (I think). Other options, such as “for audiobooks” might also have done the trick, here.
  • As the iPod doesn’t have a balance settings, I had to pull the audio jack out slightly from the splitter in order to get the output to be mono. This was devilishly tricky to get right: too little or too far and the signal wouldn’t be detected. The fiddliness of it all took me back to my youth, though, so it wasn’t all bad. :-)

iPod Photo loading Horace and the Spiders

And here’s me loading and playing an old Spectrum classic, Horace and the Spiders:

So far so good (yes, there’s hopefully more to come – I haven’t finished quite yet ;-).

For my next Spectrum-related project I’d really like to find a way to hook up my Kinect controller to provide user input, probably by spoofing key-strokes or joystick input: I have a dream of playing Manic Miner by jumping up and down and running to the right or left.

It would take an additional, dedicated device (probably a PC – it seems the Raspberry Pi isn’t quite there, yet) to interpret the Kinect input and send the appropriate signals to the ZX Spectrum. But there’s something poetic – and largely pointless, which makes it even more appealing – about marrying the sublime with the ridiculous in this way (I’ll leave it up to you to decide which is which).

blog comments powered by Disqus


10 Random Posts