Sunday 8 April 2018

ZX Spectrum "4 Out of Memory" Error Repair

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Here is a ZX Spectrum issue 3B board with a bit of an unusual error.
It is displaying an error message, "4 Out of Memory Error, 0".
You see that on Commodore PETs and C64's with RAM faults, but I have never seen it on a Spectrum before. The fact the characters are readable would tend to point to am upper RAM fault. Lower RAM faults don't usually result in readable text.
This is one of those boards I would rather not work on. It has been repaired several times before, and has been recapped and this repair has already been started. It's not as bad as some others I have been sent for repair (those of a nervous disposition, look away now).
This other board is one I have been putting off for a while. Some tracks have been damaged and through hole plating removed. It has been recapped with radial capacitors rather than axial ones. I'm not a fan of recapping in general, but I really don't like it when it's done with bent over leads like that (even though those are Nichicon caps, so are better than the ones used on the other board).
I also noticed one of the decoupling capacitors is missing, presumably damaged whilst levering the chip off. Please don't lever chips of a board. If they don't fall out, they aren't desoldered properly. If you have to resort to levering the chip out, you're likely to pull tracks and through hole plating off with the chip.
Back to the board I'm working on today. I didn't want to power on at this point, to test it as one of the RAM chips had been partially desoldered and there was lots of debris around the pins. I also noticed that a couple of the capacitors had been fitted the wrong way around.
I checked several boards to make sure, but all four capacitors on the side should be the same way around, and the second from bottom was reversed. The extra caps I have seen before, I think this is the result of a previous repair to power supply section, which has been recreated with new capacitors. The reset capacitor next to the ULA was also in backwards.
One reason I don't like working on boards like this is I can't trust the previous work. Two of the lower RAM chips have been removed in the past and replaced, one in a socket, one not. Pin 1 had also been cut and repaired on all the original chips. This is the -5V rail, I guess there had been a short on that in the past, and someone had cut the legs to identify the culprit.
With the damage, and the mix of three different makes and speeds, this wasn't ideal. The owner had purchased a new set of 4116 chips, so it seemed the best option was the remove all the suspect chips and check the board out below.
With all that removed and cleaned up, the board was in surprisingly good condition. I checked continuity and all was as it should be, so I fitted a bank of sockets.
I repeated the continuity checks again, and then powered up the board to test all the voltages were present, and all was correct and within spec.
I fitted the new 4116 chips (well, new old stock 4116 chips) and powered on.
4 Out of Memory, 0 just as I had been told. As I expected, the fault wasn't the lower RAM, but at least that is in a more presentable state now. So, after quite a bit of work, the damage from the previous repairs fixed, the board is now back how it was with the original fault, .
Running the Spectrum test ROMs show the lower RAM is fine and the first highlights a problem with the addressing of the upper RAM. A5 is switched by IC25, a 74LS157 which happens to be in a socket here. I did try replacing that, but it made no difference (and neither did the other 157 in a socket).
If not the external multiplexing, then the address decoding in one of the RAM chips. But which one? The other test ROM was more specific, and pointed the finger at IC21.
That seemed a reasonable bet, so I swapped it out.
With a new (again, new-ish) 4532 RAM fitted, repeating the test yielded success, the tests passed. (I'll replace that with a -15 speed one to match the rest later).
Back to the original ROM and we have a clean copyright screen.
I loaded some programs via the divMMC future and everything was fine. I'll test further when it's all back together.
The other thing I was asked to do was to fit a switching regulator, which was supplied. This isn't the type I normally use, but should do the job.
It looked like it would fit as intended, but it was a bit too tall and hit the top of the case, so I removed the pins and remounted it horizontally with a 0.1" header to space it off the board.
It fitted fine that way, so that's it finished.
I ran the ZX diagnostics in soak test mode for a while and ran various games without a problem.
Just whilst I have this on the bench, I was asked recently about composite video conversions on the Spectrum, do I really need a capacitor? Yes, you do. Why?
The capacitor here blocks DC offset from the output of the Spectrum. With the capacitor, the signal is as it should be, the second trace is showing 0V.
Without the capacitor, this rises to over 2V. This voltage offset is applied across the input resistance of the TV, and is turned into heat. The input resistance is meant to be 75Ω, so 2V into 75Ω, is 26mA. It's not quite that in practice, I found adding the capacitor dropped the current consumption of the Spectrum by 15mA. That 15mA would have been flowing through the video cable into the TV, and that extra load on the 5V rail, means extra heat in the 5V regulator.
So yes, you do need a capacitor. It does work without one, but it's not good for the TV or the Spectrum.