19
Feb
13

ZX Spectrum repair

Image clearer - but corrupted

Image clearer – but corrupted

A couple of weeks ago I went to use my spectrum. I modded the circuit to output composite video instead of RF to make connecting it easier, and to clean up the displayed image. The mod was a great success but I discovered bad video ram was causing my machine to not boot up and only display garbage.The garbage had a pattern to it that looked to me like a single bit in the video ram was faulty. Two chips in the video memory were already socketed, probably from a previous repair, and after swapping them I suspected one of them was faulty. The video ram on a spectrum is organised into a bank of 8 4116 memory chips, each one responsible for one bit out of a byte word of video RAM. The original chips are increasingly difficult to find, this makes it difficult to repair them without buying a sacrificial machine to take parts from.

Chips!

Chips!

I searched high and low for some replacement chips and found some AMD equivalent plug-in replacements that I thought would do the job. They are AM9016FPC chips that are 150μs in speed. They are pretty much identical to the original 4116 chips that were originally in the spectrum, so I bought a number of them as spares, in fact enough to replace the entire video memory bank if required.

It's working!

It’s working!

Just this weekend gone the chips arrived and I had time to try them out. So  I dismantled my spectrum, removed one of the Texas Instrument chips in the sockets and replaced it with the new AMD chip. It wasn’t long before I had my spectrum back in working order! The fact that one of the chips had failed concerned me, so I decided to write a simple basic program to test all the memory I could in a simple way, to ensure that no others had died.

So after reading a memory map for the spectrum I banged out a short program to do some simple tests of the ram. Here is some of the code.

Test Program

Test Program

10 LET l=0
20 LET s=25001
30 LET e=65535
40 FOR i=s to e
50 LET c=INT (i/255)
60 IF c=l THEN GO TO 80
65 LET l=c
70 PRINT AT 1,1;"mem addr ";i
80 POKE i,0
90 IF PEEK i=0 THEN GO TO 110
100 PRINT "error ";i;" ";PEEK i
110 POKE i,255
120 IF PEEK i=255 THEN GO TO 140
130 PRINT "error 2 ";i;" ";PEEK i
140 NEXT i

You can adjust this code to test other areas of memory by changing the s and e variables. To run this code you should type CLEAR 25000 first so none of the memory used for basic is overwritten. It tests the upper portion of the contended memory and all of the 32K bank. Progress is printed every 255 bytes. It’s not a very thorough test of the memory as it doesn’t check for cross-links or other memory faults. It could of course be adapted for that, but would take significantly longer to perform the test, unless programmed in assembly.

I ran this on my spectrum and everything appeared fine, I even left the machine on over night and tested again in the morning, so I’m satisfied that the memory is now in good condition.

Advertisements

0 Responses to “ZX Spectrum repair”



  1. Leave a Comment

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


Blogs I Follow

Enter your email address to follow this blog and receive notifications of new posts by email.


Mister G Kids

A daily comic about real stuff little kids say in school. By Matt Gajdoš

Random Battles: my life long level grind

completing every RPG, ever.

Gough's Tech Zone

Reversing the mindless enslavement of humans by technology.

Retrocosm's Vintage Computing, Tech & Scale RC Blog

Random mutterings on retro computing, old technology, some new, plus radio controlled scale modelling.

ancientelectronics

retro computing and gaming plus a little more

Retrocomputing with 90's SPARC

21st-Century computing, the hard way

lazygamereviews

MS-DOS game reviews, retro ramblings and more...

%d bloggers like this: