Monday 28 May 2018

ZX Spectrum, no -5V repair

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

When repairing something like a ZX Spectrum, it's good to run it on a soak test for a while. In this case, it was an issue 2 board where the colour had drifted, so I wanted to let it run for a while, and run from cold the next day to make sure it hadn't drifted again.
This one had been working OK, but when I powered on the following day, it didn't boot. A quick check of voltages, and the -5V rail was missing.
At this point, it's a good idea to switch off, the 4116 chips in the lower RAM don't like running without all their supply rails. None of them felt hot, which is normally a sign that they have an internal short, which could be dragging down the -5V rail.
Normally, when the 12V and -5V supplies have problems, it is the transistor in the DC-DC circuit, TR4. I replaced that with a new ZTX651, and tried again, but the -5V rail was still reading 0V.
The next port of call is the other transistor in that circuit, TR5. I replaced that with a new ZTX751, but still got 0V. The circuit used in the DC-DC section changed with every revision of the Spectrum, but I still don't think they ever got it right.
Looking at the schematic for the Issue 2 board, I started to isolate sections. Firstly, I removed R55 to check if there was any negative voltage rail being generated.
With that isolated, I was reading around -12V, so the oscillator was working, but with R55 in place, it dropped to 0V. The next thing to try was removing D12.
The idea was that with R55 back in place, and D12 removed, the zener diode D16 would clamp the voltage at -5V. But it didn't, it went down to 0V. Removing D16, with D12 definitely out of circuit, the -12V rail was back.
So D16 had failed short circuit. One new 5.1V Zener diode and we were back in service. I wasn't expecting that one, but at least I didn't have to go through removing all the 4116 RAM to see if one of those was at fault.

Sunday 27 May 2018

ZX Spectrum Resurrection

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

This is another one of those computer boards that have had a hard life, and are borderline cases whether they are worth repairing.
This is the board as it arrived. The result of many previous repairs and repair attempts have taken their tole.
Most notably, a recent attempt to remove the lower RAM chips. Here, two chips have been moved, one with the legs partly cut odd, some pads and tracks have been damaged, and capacitor C8 is missing, presumably cracked when used to lever the chip off. Please don't lever chips of boards. If they don't fall off by themselves, they are still attached.
Looking at the rest of the lower RAM. One chip has been removed and another of a different manufacturer, part number and speed, soldered back. Yes, it 'should' work, but you usually have a much better chance if you can match the rest of the chips, like the RAM chip to the right, which is the same part number, but a year older than the rest.
Another chip has been removed and socketed, although it worries me that it's not even the right socket, it's two parts of a larger socket cut down.
The same thing has been done to replace one of the upper RAM ICs, although it looks like the original chip has been reinstated.
The whole board has been recapped (a pet hate of mine), with radial capacitors with bent leads, rather than axial types as originally, although many of them are Nichicon, so they are at least good quality parts.
The Z80 is not original, it has a 1988 date code, the rest of the board is 1984 (8426 on the PCB under the lower RAM). The ROM has been replaced by an EPROM, and the 7805 with a switching replacement. The whole board is also covered in pretty nasty flux residue.
Finally, the ULA is a 6C001E-6, the board is an issue 4A. This then doesn't look like the original since the board is data a year later  The 6C001E-6 isn't meant to be used on issue 4 or later boards anyway, as the RAM timing was changed.
Where do you start? Well, the partial removal of the lower RAM has left some solder bridges on the back, so I can't even power it on. I think step one is to remove the lower RAM and try to make good the damage.
OK, well, that was fun. I have cleanly removed the remaining chips, as well as the replacement chip and the bits of socket.
One thing I didn't realise until I started, is that all the chips had their pin 1 legs cut and resoldered. An interesting trouble shooting technique, presumably a previous short on the -5V rail?
With a clear view of the board, it's not too bad, there are clearly some broken tracks, and missing tracks, and possibly a number of missing through hole vias. The missing capacitor, C8 is a 22nF decoupling capacitor. I replaced that with one from elsewhere on the board, so it matched, and fitted a modern 22nF cap where it was less obvious elsewhere on the board.
I've drawn in the two most obvious missing tracks in red. The rest of the tracks are generally OK, a few more breaks, and some places were the signal hasn't made it through to the top of the board due to loss of through hole plating. If I was going to replace this RAM, it would probably end up with a lot of wire links replacing missing tracks.
However, the saving grace with this board, is the owner had purchased a lower RAM replacement module that he planned to fit. This only has pins at either end, and one or two pins per chip in between, so I only needed to make sure those particular pickup points were connected correctly. It is also based on static RAM, so only needs 5V, rather than relying on the Spectrums rather flaky -5V and 12V rails.
This has thick square pins, which is not ideal, as these wouldn't fit in the round turned pin sockets I normally use in these situations. They are my preferred choice as they contact the board on both sides, so can act to replace missing through hole plating.
So instead, I went for soldering it directly to the board, with a couple of wire links underneath to fix missing connections. With that installed, I could at last power it on and see what we were looking at.
OK, so there is some output, but all 8 bits are being reported as bad. At this point, I swapped out the ULA and Z80 for known working ones, and removed the EPROM for the moment. That didn't help. Time to recheck the connections.
This time I found a break on the RAS line. It had continuity to IC25 (where I had measured it), but not to the ULA. Looking carefully around the board, I traced the track back to where it ran to the ULA, and bingo, we have a track break.
This is close to the leg of C28, so I presume it was knocked with the soldering iron when removing C28 for recapping. (another reason why I dislike recapping is it has these sort of knock on effects with the potential for more damage to be caused).
OK, so we have a working Spectrum now, although it is using a replacement ULA and Z80 and no ROM, loading the test ROM from an external ROM interface.
This has the two test ROM images I used (ZX Diag and the 128K RAM tester), and also the standard 48K BASIC ROM and the Looking Glass ROM (an updated version with keywords entered in the style of +2 BASIC). This fits into the divMMC future case (because I had those around), and as such I thought I may as well fill the 9 way D connector hole with a Kempston joystick interface. (UPDATE: people have asked, so I have listed the Joystick Emulator boards on Tindie)
Plugged into that is one of my 'Joystick emulator' boards. I use these for testing USB joystick boards, but it is handy here as you can control some of the features of ZXdiag using a Kempston joystick.
Running with that, it was working, so time to return some of the original chips. Replacing the EPROM didn't work. I tried to read it in the programmer, but it wasn't reading correctly, the whole thing was corrupt. I tried erasing it and reprogramming it, but it wouldn't verify giving similar errors.
The board had been modified (or at least so it appeared) for an EPROM, so I burned a replacement and fitted that, but I thought I would double check the EPROM conversion, and sure enough that wasn't right.
The H and N links set the ROM type as 'Hitachi' or 'NEC', and swap around the two CS lines on the mask ROM, one driven from MREQ, and one from ROMCS. Here, the original N links have been cut, and one of the H links has been fitted. This means the ROM would be enabled when ROMCS was low, even if MREQ was high. The missing link sets the second enable pin, on the mask ROM, pin 27. On a 27128 EPROM, this is the PGM pin, which needs to be pulled high in normal operation. This had been done with a wire link on the back of the board.
The usual way to do this properly, is to make an OR gate with two diodes and a resistor, so that the CS line is only low if both MREQ and RAMCS are low. These can be fitted in place of the links, with the 10K pulldown resistor attached to a convenient ground point to the left of the speaker.
With that fitted and the new EPROM, we were back in business. I put back the original ULA (well, not the original, but that one it arrived with), and that worked fine. I presume the timing is less of an issue as the lower RAM replacement module uses a latch to store the two parts of the RAM address.
I decided to remove the socket on the upper RAM as it was a bit loose, and may have caused intermittent faults in future.
I did try the original Z80 (again, I mean the one it came with), and although that worked, it had a bad M1 line, so it couldn't be used with a divMMC or Interface 1. So the upper RAM is original to the board. The ULA was replaced some time in the past, and I have now replaced the Z80, ROM and lower RAM. The speaker is still original though.
Time for some testing, with a divMMC future of course.

Sunday 20 May 2018

Commodore PET replacement keyboards

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

Here is my new Commodore PET replacement keyboard.
This can be used to directly replace a keyboard on a Commodore PET 2001, or can be used with any PET with a graphics keyboard.
The graphics keyboard is the one with 20 keys on the numeric keypad, and no numbers on the top row. These are found on most 40 column PETs, both 9" and 12", but not usually on any of the 80 column machines.
The keyboards on these machines do suffer from keys not working or being hard to press. You can get these back with a good clean of the contacts, but the problems do seem to come back.
The new keyboard is the same size as the smaller "chicklet" keyboard found on 2001 machines with a built in datasette drive.
This is held in place with 8 screws on the back.
The new keyboard can be screwed into place to directly replace it.
The replacement keyboard fits into the same cutout on the case.
Maybe white wasn't the best colour to choose. I thought my PET wasn't too yellowed until I fitted it.
Not as colourful as the original keyboard, but a lot easier to use.
The cable plugs in where the original did.
Thanks to the PETs hinged hoods, you can just lift the lid and plug the keyboard in and use it when you need to.
It is also very useful for bench testing PET boards, as it doesn't take up as much space as the full size keyboards, and is doesn't suffer from responsiveness problems.
Each of the keys has a set of carefully drawn graphics to match the originals, with the normal character below, and the shifted character above the switch.
The switches I use in the kit and built versions are good quality Panasonic light touch switches which are easy to type on. These are the same I use with the Minstrel keyboards.
The Commodore PET replacement keyboards are available from my Tindie store as PCB only, as a kit or fully assembled and tested.
They optionally can include a cable, or you can reuse one from a dead PET, VIC20, C64 or C64 keyboard.