Sunday, 20 January 2019

Commodore PET 8032 Repair - ROMs, Regulators and Rivets

A Commodore PET 8032 board in for repair today. This is an early 8032, the dedicated 80 column board, not the usual universal 40/80 one. This one looks interesting, my favourite, a board that has previously been worked on. It's always fun having to retest all the previous work.
Firstly, the 6502 is missing, the owner had removed it before shipping (?). Several of the ROM chips have been replaced with EPROMs, including one shrouded in mystery covered in tape, and another that looks to have had some pins broken and soldered into some stand off pins.
Above are two original mask ROM chips, but it looks like they are the wrong way around. The original sequence was three BASIC ROMs, 901465-19, 901465-20 and  901465-21. Then the editor (various versions depending on screen, keyboard and language). Finally, the KERNAL, 901465-22.  A bug was discovered in the 901465-19 ROM, so all but the very earliest 8032s come with that chip replaced with 901465-23. So the correct order of chips should be 901465-23, -20, -21, editor, -22, so those two are the wrong way around.
The other noticeable issue is that the two 7805 (or LM340) 5V regulators have been replaced, and instead of the original round metal TO3 packages, they are rectangular TO220 versions.
I'm not too happy with that aesthetically, but also the 0V lines appear to be connected to the frame ground connection on the IEEE-488 port. That is different from the 0V rail, and the 56R resistor connects the two together and that is the path to ground.
When bolted into the case, that will eventually get back to 0V via the metal case connection back to the centre tap on the transformer, but that's not the best place to reference it. For the moment, I shorted out that resistor to tie the 7805 ground pins to the PETs OV rail. There is also a track, which is the 5V output, that appears to have been cut on the back of the board, but is still making contact.
I powered on and all the voltage rails were present and correct, nothing was particularly hot, so I'll leave those for the moment and get on with the rest of the testing. On power on, the board chirped as normal and the screen was initialised and blanked, but nothing happened. That usually indicates a fault with the BASIC ROMs or a partial RAM failure - enough RAM for the KERNAL to get so far, but not enough for BASIC to print up the READY message.
Time to get out the PET Diagnostics board and fit that in place of the 6502. That should generate a display and test the system ROM and RAM, even when there are ROM and RAM faults. (these are now available on my Tindie store)
That also got a beep and the display fired up and was filled with text, but it was clear there were some video problems. It looks like the main RAM is OK, but there is a video fault, and some ROM issues. To get a clearer result, I switched to the PET LCD board with PET diagnostics plugged into that.
That showed the ROM chip in socket D10 (marked 901465-20) was faulty, giving an unknown CRC. and the chip in D9 (marked 901465-23) was the working, but in the wrong socket (it is the B000-BFFF ROM so should be in D10). I swapped those around and went back to a 6502 to see if it would boot, just in case it was somehow a different variant of the 901465-20 ROM. That got no further, still a blank screen.
The ROM sockets on the PET do not conform to the standard 2732 EPROM pinout, but it can take 2532 EPROMs, and I have a few of those. Most modern programmers don't support the 2532, but I keep my Stag P301 programmer around for things like that (as a follow up to that blog post, the Fujitsu NiMH batteries are still going strong).
I printed a label for the new EPROM, and decided to also label up the other EPROMs, since the editor ROM was uncovered and should have something over it's window to prevent it being erased. The one hidden under the tape was also a TMS2532 replacement. The editor is the German DIN version of the editor ROM.
Checking those with PET Diagnostics, there was now a full set of BASIC 4 ROMs. I wanted to get those fixed, in case that was contributing to the display issue, but that is still present.
The tests show errors in bits 4 and 5 of the even video RAM. Time for a process of elimination. The 80 column PETs have the video RAM split into odd and even bytes, as apparently they were not fast enough to keep up if they were used sequentially. This means the video circuitry is split into odd and even halves. The odd video RAM seems to test OK, and every alternate character does appear correct, so that rules out the common elements such as the character ROM and the output shift register.
It is only affecting bits 4 and 5, so that rules out one of the RAM chips (UC4), and one of the 244 buffers (UB4), as they only connect to bits 0,1,2 and 3. That still leaves the other 244 buffer (UB5) that allows bits 4,5,6 and 7 of the even video RAM to be written (and also read) by the CPU. It also leaves the RAM itself (UC5) and the 373 latch (UB3) that stores the output of the selected byte of RAM to feed the character  ROM address lines. To narrow that down, it's time to get the 'scope out and probe the pins.
Probing the even data lines, bits 0,1,2,3 and 6 and 7 were changing, but bits 4 and 5 were doing nothing. That points at the input buffer, as nothing is getting into the circuit. With a replacement 74LS244 at UB5, time to test the theory.
Success, also note the previous 'inconsistent CRC' messages are now missing and the empty sockets are correctly detected as empty. When testing the CRC, all bits should read high, but when something on the bus is misbehaving and writing to the databus when it shouldn't, some different values are read. In this case it seems the LS244 was causing some output on the databus when it wasn't meant to be. The border around the screen is meant to be a solid line, but the DIN PETs have a different character set, so don't have the line drawing characters.
The only thing left to do now was sort out those regulators and the damaged track. I have some of the right kind, but originally they were riveted to the heatsink. I could bolt them in, but let's do this properly. It's been a while since I riveted anything, but I still have a rivet gun somewhere.
These 7805s were particularly thick, so I had to get some longer rivets, to fit through the PCB, the heatsink and the regulator flange.
Not bad, I think I did OK there, seems to be making good mechanical and electrical contact, don't think they are going anywhere.
That's better, how it was meant to look, the original 7812 and the two new 7805s.
On the back, I scraped away a bit of the solder mask and flowed some solder onto the track where the scratch was. The rivets look nice and clean, I'm quite pleased with the way they turned out.
That's all back together, ready for testing. It chirped, and up came the ready prompt. It was a little tricky running test programs as the DIN keyboard layout is slightly different to the normal UK/US business keyboard, so it was a little trial and error on some of the punctuation symbols.
All looking good, loading programs from tape and IEEE-488 port, and running a BASIC memory test program. A bit more soak testing then it's on it's way back to it's owner.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.

Sunday, 13 January 2019

Atari 400 S-Video output conversion

Following on from the Atari 400 composite video conversion I did recently, I was asked to do an S-Video version.
I suppose so, but I wouldn't recommend it unless you actually have an old CRT monitor with proper separate chrominance and luminance inputs. Many modern LCDs can make S-Video look worse that composite.
The circuitry inside the Atari 400 is similar to that in most other Atari 8 bit products, the signal is produced from separate sync, chrominance and a number of luminance outputs feeding a resistor ladder to generate different output levels.
The Atari 800 is a good reference at this point as it does actually have S-Video output from the same set of chips.
There is a lot going on with the Atari 800, so my plan was to replicate the parts necessary to generate the clean luminance and chrominance signals, but remove the circuitry which combines these to generate a composite signal, to reduce interference.
As with the composite video modification, the audio modulator oscillator transistor and variable inductor are removed to stop this interfering with the video signal. The conversion is a little more complicated, as the chrominance and luminance need to be split, then separately amplified.
To do that, I used two TFW8b.com video buffer boards, one for the luminance signal, and one for the chrominance. The ground and 5V lines are commoned, red and black for power and white for audio as usual. Yellow is used for luminance, and green for chrominance.
I stuck these boards to the inside of the internal metal shielding box. It's easy to connect to the mainboard from inside there, but there isn't an easy path to run the wires to the outside of the case.
To keep the Atari 400 modular, I had used connectors for the main board, and I thought the best option was to fit a 5 pin DIN socket to the side of the case to maintain the shielding but give a route for the output cables.
I went through a few variations on the circuit, trying to get a good S-video signal, and it ended up that the back of the DIN socket was a convenient place to add some extra bodge resistors.
That is a 75 ohm resistor in series with the luminance signal, and a potential divider with a 270 ohm and a 75 ohm to reduce the level of the chrominance signal.
The original plan was to use this to attach the final external cable, using a 5 pin DIN to 4 phono plug lead. Two for audio, one for chrominance and one for luminance, or possibly cutting off those two and fitting a 4 pin mini DIN plug for the SVideo. This ran out of the bottom of the case where the RF lead went. (I did consider making this the same pinout as the Atari 800, but decided the extra audio connection would be more useful).
I don't like to drill holes in cases, but was specifically asked to do so, rather than supplying a flying lead like that. I still used the pre-wired DIN lead, but now a little shorter than planned, to attach to the new 4 pin mini DIN S-Video socket and phono audio socket added to the case. The forth wire is not connected, that was a second audio jack, which is no longer required.
Inside, there are a few more changes, a 10uF capacitor has been fitted in place of C183 to provide a decoupled audio signal. Various parts have been removed and some of the resistor ladder has been modified to match the cutdown 800 schematic, including the additional diode in series with R176. Several 0.1" header pins have been fitted in the holes left by removing parts to pick up the output signals. I was going to use individual connectors, but these lined up nicely, so I used longer connectors to get the two power cables on one lead and the three signals on another. This allows the board could be disconnected from the case so it's not all hard wired together.
The connectors from the video buffer boards plug onto this as the system is being reassembled. See also the 48K RAM board in the background.
There isn't much to do on the power / output board, other than to remove the RF modulator.
For testing, I've wired this up to my Commodore 1901 monitor.
The picture is good, but I can't honestly say I saw much difference over composite. It is probably slightly better, your mileage may vary, but it's certainly a lot more work to do than the composite mod.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.

Sunday, 6 January 2019

Atari 5200 not powering on repair and AV mod

Here we have an Atari 5200 that has arrived for repair, slightly worse for wear and a little damp due to courier / packaging issues.
This one is reported as 'not powering on', and indeed that is the case. The 5200 has a rather convoluted power system. Power is fed in via the RF cable. I think that says it all really.
Power is injected into the RF cable by the external switchbox above. Inside that, the supplied current is monitored as it passes through a current sense resistor (actually two 0.33R resistors in parallel). This is amplified by the LM393 OP Amp and when it goes above a certain threshold, the relay clicks over and the RF output of the 5200 is connected to the TV in place of the antenna.
Inside the 5200 it continues, power is extracted from the RF, and is switched off via a soft on off switch, i.e. not a nice simple big clunky clicky switch (like the XEGS for example). Was all of this stuff really necessary? I mean, OK, it's a nice idea, and some engineers would have been really pleased with it technically, but how many review meetings did this go through? how many cost reduction exercises did this survive? I think we can safely say this was before the Jack Tramiel days.
Here, a rather unusual and probably expensive SPDT push switch is used to toggle a flip-flop IC which will turn on a series of transistors which will eventually provide power to the 5V regulator (sorry regulators, after all, why have one when you can have two).
And this is where it seems to have failed. The 4013 is a dual flip flop. The first half is used to debounce switch switch and feed a clean pulse to the second half each time the switch is pressed.
The second half then turns the output on or off as appropriate. It is a CMOS chip, so is happy to run off the unregulated 9V DC input. That 9V is getting through fine. Probing around, I can see a pulse out of pin 1 and into pin 11 each time the button is pressed. I can see the /Q output on pins 9 and 12 toggling, but the Q output on pin 13 is doing nothing.
Yes, that would appear to be the issue. The 4013 failed testing in my MiniPro programmer. I didn't have a new one in stock, so I temporarily bypassed it by fitting a wire link from pin 13 to pin 14, effectively making it always on.
That allowed the 5200 to power up and everything else appears to be working fine.
With a new 4013 fitted, the on / off power switch was back in working order. It will soon be losing the external switch box as I have been asked to convert it to 9V DC input, as per my previous post on Atari 5200 AV out / DC in modification, but the soft on / off circuit will still be used.
The last 5200 I converted was mine, so I didn't plan to refit the metalwork shielding cans, but in this case it is a customers, so I will. There is a suitable gap in the metalwork on the inside corner, so I fitted some heatshrink sleeving around the wire bundle for a little extra protection.
I used the same TFW8b composite mod kit. The parts on the 5200 to be removed and the wiring is the same, although I have picked up the ground at a different point to make the cable lie flat.
The rest of the modification is the same as before, with the DC jack in one of the cutouts on the back of the case.
And the AV output board on the other.
That gets covered by the trim that clips over it. That was originally where the RF lead was meant to be wrapped around.
Another bit of trim I didn't mention previously (because it was broken on mine) is the massive storage compartment at the top of the unit. (which reminded me of an old sketch about useless gadgets that came supplied with the plugs already removed, ready to shove in the cupboard under the sink. It was from a TV show I had last seen 30 odd years ago but I managed to find the sketch on youtube).
The 5200 comes with it's own storage compartment, where you can store the original controllers (when they break), although not the power supply or AV switch box.
Thanks to notches at the side, it can also be used to store the AV cable.
With all that reassembled, it is powering on and off and everything appears to be working.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my Tindie store.