Thanks for the Memories

Note: This post has been altered since it was first published, to correct information about detecting the amount of memory in the ZX Spectrum, apologies for any confusion that arose as a result of the first revision of this post.


Apologies for the post title.

As I said in a previous blog, buying anything second hand, never mind 30 year old electronics, can be prone to issues.  So I went into the whole Spectrum buying thing with my eyes open, I’ve bought a lot of junk and if I end up with a reasonable Spectrum at the end of it, have had fun along the way, and maybe learned a thing or two, I’ll be very happy.

One of the issues early Spectrums had, is that the memory they used was cheap.  For a start, the 32K memory (in the 48K machines) was actually 64K chips with only half the bank of memory working.  Sinclair specifically used faulty chips to save cost.  It’s generally accepted that if the whole extra 32K wasn’t working post build, but the lower 16K was okay, Sinclair sold the machine as a 16K Spectrum (properly badged).  So you got a 16K Spectrum, but if you looked inside it would look like a 48K unit.

The only real way to tell was a little sticker on the outside of the case – which as you can imagine, does not stand the test of time very well.  So, people selling Spectrum’s on eBay may list them with or without memory sizes, if they’re not sure will usually say 48K, will sometimes list them as 64K for amusement, and very often the case won’t have the sticker left.

So here’s how you tell how much memory you should have, and if it’s faulty.

PRINT PEEK 23733

The return from that should be one of,

  • 255 – this Spectrum has 48K memory
  • 127 – this Spectrum has 16K memory

That 127 is the return I get on one of the Spectrums I have, which wouldn’t load Manic Miner without crashing.  If you don’t get either of those numbers, then you’ve got a problem you need to locate.  Even if you get 127, you could still have a 48K Spectrum in which the upper memory isn’t working, either as originally sold, or because it has developed a later fault.

You can also get the total memory you have, this little bit of code is all over the web (including World of Spectrum),

PRINT PEEK 23732 + 256 * PEEK 23733

That returns 32767 for a 16K Spectrum (16K ROM, 16K RAM), and 65535 for a 48K unit (16K ROM, 16K base RAM, 32K additional RAM).  If you don’t get either of those numbers, then you’ve got a memory fault of some kind, and need to do some digging.  You can check this site out for more advice on doing that.  Or, with even more detail, this page over at WoS.

I haven’t had a chance to test these out on the ‘fully working’ model yet (because it’s not fully working, the keyboard membrane is bust) but I’m hoping it turns out to be a 48K unit, the case certainly has the 48K sticker on it (see photo above).

Over time, Spectrum motherboards get moved between cases, repairs are made, cases are replaced, stickers wear off, and even when they were new, Sinclair would make repairs under warranty that meant the serial number, sticker, case and motherboard no longer matched.  So in essence, unless you see the output from those commands, the other information like case serial number or photo’s of the motherboard is still only a best guess at the actual configuration you’re going to get!

The Mystery of the Missing Video Signal

Now that I have a TV I don’t mind putting at risk, I thought it was about time to try seeing what kind of signal I can get from the Spectrum +2.  This is the one where it appears the RF connection has been severed, but the composite mod doesn’t appear to have been done either.  I asked around on Usenet and Twitter, and got various pieces of advice for both fixing the RF and testing Composite.  Folk on Usenet suggested just soldering the connection back from the orange capacitor to the RF socket,

however, Gareth Halfacree responded on Twitter, and pointed out he thought there was a 47ohm resistor missing.  Judging by those photo’s, the capacitor solders back into the PCB, along with the 47ohm resistor, and it is the resistor which ultimately connects to the RF socket.

Gareth was kind enough to take a few DSLR shots of the modulator in his ZX81 to help me diagnose where the connections should go.

So, this isn’t going to be as simple as I first thought.  I do have some options, I could pick up a 47ohm resistor and have a go at patching it up myself (which, considering I’ve never soldered a device to a PCB in my entire life should be an exciting challenge), I could get a complete modulator from an otherwise non-working Spectrum and replace it (they’re pretty generic), or I could just use a composite output and forget about the RF.

The advice from Usenet is that you can just touch the end of a phono lead to the composite input, while touching the shielding to the modulator case (which is grounded), and that’ll test whether or not the composite feed is viable.  So I took the +2 apart again, and had a go at that.  Nada, zip, just a solid black screen with some flickering white lines.

Of course, that doesn’t mean it’s not working, it might mean I’m just an idiot, or completely inexperienced and missing something obvious.  However, I had a TV I didn’t mind blowing up, some solder, some phono leads I wasn’t emotionally attached to and a desire to ‘mess about’.  I also happen to know the Spectrum 128 +2 has an 8 pin DIN connector on the back, which is used for video (RGB), but it also includes a composite output on pin 1 with ground on pin 2.  You can read all about this here, although I originally found it in this PDF (not sure which is the original source).  Before I go any further, this is the Grey +2 model – the Black +2A model has a very different pin-out on the 8 pin socket, and pin 1 is actually +12V.

So, some hackery and flux sniffing later, and I had a ‘test cable’.  I guess you can all laugh at my soldering now.  If I’d been doing this for a while I guess I’d have some connectors rather than trying to solder wire to wire, but there you go.  The wire in the phono cable is pretty fine, so rather than try and just stick it into the DIN socket, I soldered some more manageable pieces onto the end.

Now, holding the signal wire in pin 1 and the ground in pin 2 – I can finally get a composite output on the TV.  It’s not brilliant, it’s very snowy, with brief flashes of solid picture depending on the position of the two wires, but it gives me some confidence that my next plan might work.  I’ve ordered some 8 pin DIN plugs, some phono plugs and some 4-core wire, and I’m gonna make me a cable.

I could have a shot at making the SCART cable in the documents linked above, because the TV does have a SCART input.  However,

  1. my main TV doesn’t have SCART but it does support straight composite.  So if I want to use this on the main TV it’ll have to be phono only anyway.
  2. the SCART wiring is more complex, and considering I’ve never made a cable in my life, I want to have a go at making a simple two-wire cable first.

I still have plans for fixing the UHF modulator as well, I think you can just remove the whole unit (after de-soldering the +5V and composite input), and I may use that to further practice my soldering butchery.

The Spectrums, they’re breeding

One of the advantages of taking out the Articles thing (see here), is that I can stop worrying about posting these blog entries in order.  I’ve already written two posts which are scheduled to go tomorrow and Wednesday, but another Spectrum arrived this morning.  If I’d stuck with the article structure, I would have had to either schedule this post for Thursday, or renumber the other articles.

Instead, I can share with you my joy, the joy of my lucky wife, and the joy of the postman, and announce that this arrived!

What could it be!?  Turns out it’s the first Spectrum I bought, way back on the 6th September (not going to be a positive feedback experience on eBay dude).

The good news is, it’s in pretty good condition, it’s supposed to be a 48K Spectrum and the memory test indicates it is! Yay!

That takes the total so far to 5 ZX Spectrums.  Four rubber key (16K and 48K) and one Spectrum +2.  The good news is, that at best, there’s only two more on the way (one in good condition for a Buy Now price I couldn’t ignore, and the other is broken, but I want a complete UHF modulator to play with).

At least I haven’t bought an Interface 1 or Microdrive yet.

Or an Atari 400.

Or a mint condition ZX80 for about £100.

I’ve asked about a bit on advice for taking photo’s from CRT televisions, so hopefully at some point in the next few days I’ll get some half decent shots of one of working.

Articles and Sorting

Hmm, the 8bit Mid-life Crisis posts are increasing in number pretty quickly, and I think they’re going to break the ‘articles’ page.  They already break the sorting which is alphabetical, so 10 comes before 2, and if I keep writing them at 1 a day, which is where I am at the moment, it’s going to outgrow that list of articles very quickly indeed.

That whole articles page was really a way of tying together a small number of posts on a particular topic, but I guess if I end up writing 10’s of posts for the Spectrum stuff, it’s not going to fit.  Also, frankly, it’s a ball ache adding the custom fields which make the posts show up on that page.

So, I need to have a think and approach this in a different way.  Maybe a simple 8bit Mid-life Crisis category would suffice.  I tend to under-use the categories, and they do list the posts in reverse time order so that might work out okay.

Edit: Right, stuck with ‘Retro Computing’ category, which I’ll post all the Spectrum posts under.  If you want to read them all, they’re there.  You can also read a summary of all the kit, on the Retro Computing page.

Dirty Sticks of Joy

One of the job lots I bought included a dK’Tronics interface (Kempston compatible for those in the know), and a couple of Cheetah joysticks.  I’d been dying to find out if they actually worked, but I had to wait until I proved the Spectrums worked first!  With that done, I could get down to the serious business of cleaning my joysticks.

The interface was part of the collection which smelled a little bit like chip fat, not sure if it had been kept in someone’s kitchen for a while.  I haven’t cleaned the 48k Spectrum up yet, but I did already clean the Spectrum 128k +2 (see here!), and it was time to wipe down the joysticks and the interface.  Didn’t take long to be honest, seemed like mostly just surface dust sticking to grease, but the interface went from this,

to this,

so I was quite pleased.  The joysticks had some kind of vaguely white dust/powder build up on them, which didn’t take long to clean off either, no photo’s because who wants to see photo’s of a guy cleaning his joystick, really?

The dK’Tronics interface seems to be about as well constructed as most peripherals in the 80’s, by which I mean the edge connector is at a weird angle.  You can just about make it out in this shot.

Still, on with the experiment, whacked the interface into the known ‘best working’ Spectrum (which happens to the one it came with, so you’ll see I was being honest about not having cleaned it),

and the next question was what to play.  I knew I could load Manic Miner from MP3 after having tested that already, but Manic Miner doesn’t support joysticks.  My go to game in this instance was Bomb Jack.  Man, I loved that game.  You’ll be as cringingly embarrassed to learn, as I am to admit, that I wrote letters to some of the team that did the Spectrum conversion.  Anyway, a quick 10 minutes with OTLA and I had Bomb Jack on MP3.

I loaded it up, chose the Kempston joystick option from the start screen, and … nothing.  No movement at all or response to the first joystick.

I was fraught!  In desperation I tried a different joystick option (after waiting for the game to kill me three times, this is the 80’s folks, no quit option)!  That didn’t work either, so I went back to Kempston, and this time it worked, mostly.  I can only assume the joystick is as cruddy inside as some of the rest of the stuff was outside.  I’ll clean it out later, going left is hit and miss, a few buttons are hit and miss, but it seems okay.  The other joystick is much better although I wouldn’t describe it as smooth, but hell, that might just be how it was in the 80’s, this stuff has come a long way.

There we have it, the dK’Tronics interface and two joysticks both working, sadly, it’s only a single input interface, so there won’t be any two player head-to-head fun for me, and erm, me.

Testing the Spectrums

Buying second hand stuff always carries a bit of risk.  Buying second hand electronics which are 30 years old, and notoriously troublesome even when brand new is something you have to go into with your eyes open.  I’m not stupid, so when someone on eBay says ‘fully working’ I take it with a pinch of salt (good job too).  I knew that I was going to have to properly test the Spectrums.

I also wanted to actually play a game, since I’d had them for a couple of weeks, so combining the two seemed to make sense.  I already knew one of them was a non-starter since the keyboard membrane is screwed, and the P and Enter keys don’t work (so you can’t even type LOAD “” and hit enter!), but there were still 2 with which I could have a go.  I was wondering how to actually load some games, which led to this post.

Essentially, Spectrum games (and other cassette based games from the same era) are sound recordings of binary data (1’s and 0’s).  It goes without saying, therefore, that anything which can play sound, should in theory be able to provide a source for the Spectrum to load games from.  I had expected to use a little walkman style player we have, but the MP3 option seemed even better (and geekier, nerdier and more mind blowing).

I used the same process as the guy who’s article I found for converting the tape files to MP3.  The software isn’t exactly intuitive, and Windows 7 adds some excitement, but the basic process is (for Windows)

  • Go to the Project OTLA homepage (here)
  • Get the latest version of OTLA (from here)
  • Unzip it somewhere easy to use, and avoid spaces in directory names
  • Run otla.exe, you’ll get this screen,
  • At this point, I had to guess how to proceed, but you basically choose File | New+Add.  You’ll get the file dialog, and you then locate the file you want to convert.  OTLA will read .tap, .tzx, .z80, .sna, .scr, and .dsk files as well as it’s own .sbb.
  • OTLA will then ask you which blocks to include.  I just guessed.  For my Bomb Jack .sna file there’s only one block and it’s already added, for my Manic Miner .tzx file, there are three, with two already ticked.  I can’t tell you what to tick, just have a play and see what works!  Here’s the screen for Bomb Jack,

    Choose OK once you’ve guessed at what to do.
  • OTLA will then populate the main screen with some options, but default, I get this,

    but you might get something different.  Again, I can’t explain what all those options do.  I’m not worried about how long it takes the games to load, so I unticked Accelerate, and eventually, samples/bit of 4 worked best.  Make sure you choose the right Model, and I had to enable interrupts to get Bomb Jack to work.
  • Click SBB => MP3 and off you go.

Once you’ve got the MP3, you can play it from just about anything with an audio jack.  I did this first with Manic Miner and then today, with Bomb Jack.  Here’s the fun I had with Manic Miner though.

  1. The audio cable I have (came with the ‘fully working’ Spectrum), only the black audio jack works, the grey one doesn’t.  That took me 10 minutes of messing about to diagnose.  I was trying to play the MP3 via my iPhone and I knew I should be able to hear it being played through the Spectrum speaker, but couldn’t.  I assumed I had volume issues.  Ten minutes later I tried the other jack and I could hear it instantly.  So, problem solved.
  2. I tried three times to load the game on one of the Spectrums, and every time it just crashed and hard reset.  I recreated the Manic Miner MP3 a couple of times with different settings, but nothing helped.  Eventually I gave up and tried the other Spectrum that had a working keyboard and it loaded first time.  Much joy!  I played it for a bit, then went back to the first Spectrum – hard reset.  Then I had an epiphany 30 years in the making.  Can you believe that I remember from the days when my cousin had a 16k Spectrum, that the default behaviour when you tried to load a 48k on a 16k Spectrum was a hard reset?  I whipped out the ‘how to check how much memory your Spectrum has’ code (see a later blog post), and sure enough, one of my 48k Spectrums is actually only a 16k Spectrum.  From my reading of the output, it’s not a fault, it’s a factory condition.

After all that messing about, I was still pretty much ecstatic after playing Manic Miner, in blur-o-vision, on a Spectrum with a faceplate peeling off, despite having found out one of my Spectrums was oversold and the audio cable I had was dodgy.

Ah, the joys of retro gaming.

It’s getting bad – I bought a TV.

A couple of years ago now, we finally got rid of our VHS recorder and the portable TV that Grete had when she first moved to Nottingham.  We just never used it.  We’ve never been bedroom TV watchers, despite the portable TV being in that room, so it was just taking up space.

I was pretty instrumental in doing that, Grete liked the TV and would have kept it and infrequently used it, if I hadn’t ‘encouraged’ her to get rid of it.

Today, I went out and intentionally purchased a second hand portable TV from a local charity shop for £9.  I’m just lucky Grete likes me quite a lot I guess.

The ZX Spectrums I’ve got all have various issues, and two of the 48k ones in particular had pretty bad display quality on our regular LCD TV.  I wanted to start messing around with changing the Spectrum output to Composite, and with the +2, I wanted to see if I could fix it and get the regular RF working.  What I didn’t want to do, was damage our main television.  Sure it’s a few years old and has issues, but that’s no reason to electrocute it.  Of course, it’s not likely I’ll do it any major harm, but rather than risk it, I thought I’d get an old CRT and then if I blow the RF or AV connector, it’s no great loss.

So I am now the proud? owner of a Philips portable colour TV.  I spent a few minutes tuning in the Spectrum I know gives a good signal (keyboard doesn’t work though), and then set about seeing how the others faired, and I’m pleased to say the two other 48k’s are much better on this TV than the main one.  Not sure if it’s an issue of how fine the tuning is, or just a small CRT disguising the problems better, but all three of the 48k’s give between a passable and an excellent image.

I took a load of photo’s, but of course, digital cameras and 50Hz CRT’s don’t mix very well. I did get a couple though.  These are both from the same Spectrum, which is the one that works best, despite having the worst external condition.

The +2 still doesn’t get much of an image (as you would expect, since the RF connection has been cut), but at least the other 3 are improved (or give the illusion of being better).

Once I knew it worked, I set about taking the +2 apart to see if I could get a Composite video feed from it.  I’ll post about that, later.

Load ZX Spectrum games from MP3!

My memory of the ZX Spectrum is warm and hazy, but even I remember the pain you had to go through with tape players, and adjusting the azimuth of the tape head.  I even had (and who didn’t?) a specific special screw driver permanently in place in the tape player so I could tweak it as required.

To imagine you could get away with loading ZX Spectrum games from an audio file, created from a file which in turn has been created from the actual tape blows my mind.  To do it using a lossy-compression algorithm like MP3 makes my cortex bleed.

But you can, and it’s not that hard!

I’ve had the Spectrums in the house for a couple of weeks now, so I felt it was time I actually tried to you know, play a game on one of them.  This isn’t without challenges and in the process I discovered some more issues with the little black microcomputers from my past.  I don’t have a tape deck knocking around, although I do have a very old walkman style cassette player.  In my head, I’d been half planning to use that to try and load games on the Spectrum, and one eBay purchase had some tapes.  But I remembered something I’d read online about ‘speed loading games from an MP3 player’, so decided to do a little more research on that.

A quick google search later, and I was looking at this website.  Twenty minutes after that, downloading the software it mentions, I was playing Manic Miner on one of my real ZX Spectrums, on my TV.  Crazy!

I’ll write a longer blog post later, for the full process, and the issues it revealed with the stuff I’ve bought so far.

It’s not just the Rust

The first 48k Spectrum to arrive works fine, but the image is pretty flickery.  I’d assumed that was because the RF connector looked rusty, so after asking on Facebook/Twitter, I gave it a solid clean!  That requires taking the whole thing apart of course, and that means risking the paper thin membrane connectors which are shoved into the motherboard.

The inside of this Spectrum is different though, it’s a 3B apparently, and the connectors the membrane goes into are lying at an angle, I’m not sure if that’s original or not.

The membrane connectors are also slightly thicker and tougher than I would have expected, so I’m wondering if it’s been replaced at some stage (if it has, nice job, the metal faceplate looks well attached).  Anyway, here’s the back of the board.

And here’s the RF connector, it’s not as bad as I had feared.

5 careful minutes with some abrasive material, and it was significantly cleaner.  I also took the opportunity to clean up the rest of the board and then put it all back together (before I remembered to photograph the RF connector again).  Sadly, despite the clean, the image isn’t significantly better, so I need to ask around and see what else could be causing it.  In the meantime, here’s a pretty useless shot of the cleaned connector inside the case.