Saturday, 14 October 2017

ZX81 Internal 16K RAM (reversible version)

One of the common issues with the ZX81 is the good old RAM pack wobble. Depending on the state of your edge connectors on your ZX81 and RAM pack, it sometimes does not take much to interrupt one or more connections and crash the ZX81.
To get around this, I have done many ZX81 internal RAM upgrades, following the procedure I described in an old blog post - ZX81 Internal 16K RAM.
I had a request to do one of these, but to do it in a reversible manner, without cutting tracks. The modification I normally do involves cutting a few tracks and making some extra links under the board.
I started with a ZX81 that had a memory fault, easy to check if it only works with a RAM pack connected. It was the version with two 2114 RAM chips.
You can see there are outlines for either IC4 (a single 24 pin or 28 pin chip) and IC4A and IC4B, (2x18 pin chips).
I removed those and cleared all the pads and fitted a 28 pin socket. Some ZX81's may already have this socket fitted, particularly kit built issue 1 boards.
To go back to a 1K ZX81, you can fit a 24 pin RAM chip here.
The originals were 4108 or 4118 chips, but you can also fit a 6116. With LK1 fitted (as standard), you will get 1K. With a 6116, you can also fit LK2 instead of LK1, and you will have 2K internal RAM. I just noticed that one of my TS1000's has a 6116 and LK2 fitted, I never knew it was 2K.
Here, we want 16K, so we are fitting a 62256. This is a 32K RAM chip, but it would require some additional logic gates to enable the full 32K, so we are just using 16K, which is fine for most ZX81 software.
Rather than cutting the tracks, I bent out the pins that needed to be connected to different places, namely pins 1, 21, 23 and 26. The wires then needed to be connected to address lines A10, A11, A12 and A13.
The order is not important, so I went for the nearest points, the top of diodes D1, D2, D3 and D5. To make a clean connection, I desoldered the diode leads, inserted the bared wire ends into the same hole as the diode leg and resoldered the connection.
That doesn't look too bad, and since no tracks were cut, it means those connections can be removed and the 6116 or 4118 RAM chip fitted to go back to a 1K ZX81. You could even fit a pair of 2114 chips again if desired.
As part of the upgrade, I also swapped the 7805 regulator for a switch mode replacement (also reversible).
And fitted a composite video modification, again reversible. As described in a previous blog post (ZX81 composite video modification), the input wire is desoldered and pulled back into the modulator, and the resistor connected to the phono socket is desoldered at the top and bent out of the way, and a TFW8B video amp board fitted in the remaining space.
This has one of the later 2C210E ULAs, so the video output includes the back porch signal, so just needs buffering.
A heatsink is a good addition, to protect that ULA.
That's the board finished. Four upgrades, all of which make it a more usable ZX81, but can be reversed if so desired.
One ZX81, upgraded and ready to go.

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

Sunday, 8 October 2017

Commodore PET 3016 repair

A slightly different repair today. This is a Commodore PET 3016 board, the same board as used in the 2001N and 30xx and 40xx series (but not the 12" monitor 40xx series). It's not working, but it looks like it has had a lot of work done to it already. I normally try to avoid working on boards like this.
All the ROMs have been socketed, the original white single wipe contact sockets tend to be a bit rubbish, so they have been replaced with good quality turned pin sockets, I approve.
The capacitors have also been replaced. I'm never sure of the point of this, all of the caps I have removed from PET boards to check have tested fine, often still showing higher than the rated values of capacitance, and acceptable levels of internal resistance, so I don't really see the need to change them.
Looking around the board, it is clear that quite a lot of chips have already been replaced. No clear pattern, some with 80s date codes, some modern looking TI chips (which annoyingly don't have a date code). The latest actual date code was 1999 on one of the 74LS244 RAM data buffers.
Plugging in the PET diagnostics, a couple of problems show up, firstly there were some intermittent video RAM faults (only a couple showing up on this picture, as it is difficult to read otherwise).
The RAM appears to have passed (the last four blocks are the second bank of 16K which is not fitted in the 3016). Two of the ROM chips are OK, two faulty.
Looking at the video RAM, it appears the two chips have been replaced. One is at a definite angle, it appears to be making connection, but is certainly not straight. I socketed these to retest the chips to make sure it wasn't just an intermittent connection.
The problems persisted, but were also present with known working 2114 chips. So since the video RAM tests were failing, and always bits 0-3 only, and the display was corrupted, the problem must be the buffer feeding the video RAM (if the tests passed but the screen was still corrupted, I would be looking at the latch on the video output side instead). Swapping out that 74LS244 (UE8) and the problem was fixed.
I tested the two faulty ROMs in a programmer and one didn't respond and the other had corrupted data. Replacing those with EPROMs in adapters, all the tests passed. I had now set the diagnostics to 16K RAM test mode.
Swapping back to the original CPU, I still got a black screen. I tried a known working one, and got the same. Switching back to the diagnostics, all passed. Hmm, something odd is going on here.
I installed a ROM/RAM board, with the original 6502 CPU*, and got a READY prompt no problem. Switching off the ROM, and rebooting also brought up the READY prompt, so the ROM was working. Switching off the RAM and I got a black screen. (* actually just looking at the photos, it's not the original CPU or 6522, both have been replaced at some point, as has the RS branded 7425 below, I'll add those to the list)
Switching the ROM/RAM board to the PET Tester ROM, rather than the screen full of 'G' (for Good), it was more than half full of 'B' (for Bad). Going back and repeating the testing with the diagnostics board seems to indicate there was a timing difference between when the 6502 itself was accessing the RAM, and when the diagnostics board was.
I started looking through what could be causing that, starting with the data buffers, or maybe the address select logic, or the multiplexing. Maybe an issue with the R/W line. Following those up on the board, I found all the chips I was checking had already been replaced, the 74LS04 by the CPU, the 7417 by the IEEE-488 port, the 74LS10 in the middle of the board, the 74154, one of the RAM data buffers, one of the RAM multiplexors. Oh, and all 8 RAM chips.
This was ringing alarm bells. Someone has already spent a lot of time looking at this fault, and has replaced a lot of chips. What I don't know is whether they fixed the problem, or if they gave up. Also, crucially, I don't know if they damaged any tracks or through hole plating whilst replacing all these chips, potentially introducing the fault whilst repairing another. Or if any of the chips used were out of spec, or already faulty. This is why I don't like working on boards which have already had work done on them.
I went back to the ROM/RAM board and gave the rest of the board a thorough test. It was all running fine, the board bypassing the RAM fault. I looked further into the problem and replaced a few more chips, the 244 buffers and the 153 multiplexors without any improvement. The next step would have been to socket and replace the RAM chips, which probably wouldn't have helped, or go back and remove more of the previously replaced chips, test those and also check the state of the board underneath for faults. Which would make this a much longer and more expensive repair. At this point, I was aware the owner had said they didn't want to spend too much if it wasn't repairable and decided to give up on tracing that RAM fault.
I suggested the owner use the ROM/RAM board, which also gave them the option of upgrading to the full 32K from the original 16K and selecting the original BASIC 2 or upgrading to BASIC 4. Not ideal, I would have like to have repaired the board fully, but when there are that many unknowns, it would have meant a lot more work, and potentially a full set of RAM chips, which along with the two EPROM adapters would have worked out several times more expensive than going for the ROM/RAM board.
With the ROM/RAM board in place, that is all working nicely, I also fitted a user port piezo buzzer, which gives sound to games which support it such as Space Invaders and things like Down from Revival Studios.

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

Sunday, 24 September 2017

Commodore PET - digital tape counter repair

An unusual 2001 has come in for repair. The first things which stands out is the button and display bezel cut into the front panel.
Inside, there are some extra boards at the side of the PET.
There are two boards, one is a commercial counter board from RS, the other a homemade power supply.
It taps power from the transformer, to generate it's own 5V rail. Probably a good idea as the PET is often pushing the limits on it's regulators.
The counter board (RS part number 434-239 - discontinued) contains an RS badged ZN1040E (RS part number 306-285 - discontinued). I did find a datasheet for the ZN1040E.
The ribbon cable connects to the display mounted in the case.
It's not an hour meter, as there is a mechanical one on the back of the PET, currently showing 1,209.1 hours of operation for this PET (since the hour meter was installed anyway).
Tracing the wires from the counter board, it doesn't connect to the PET itself, it goes to the tape deck. Inside the tape deck, I found some more unusal modifications. Oh right, it's a tape counter.
The main drive belt had come off, and snapped as I was removing it, as it was quite brittle. They usually need replacing anyway (TFW8B sells them).
At the top there is a wheel with four slots cut out and an optical sensor. This will give four pulses for every rotation of the wheel. Wow, quite an impressive amount of work has gone into this.
This also had a belt which appears to have partly melted as it looks like it was an elastic band, rather than a rubber belt.
That looks like it went around the tape spindle, which appears to have been designed to take a belt drive.
Yes, I had a look at a later VIC20 datasette which is based on the same tape mechanism as the black PET version, but has a rather simpler tape counter built in. Simpler, but no where near as nice.
At the front, there is a microswitch which senses when the rewind switch is pressed, so it can count backwards. Rather near really.
The tapedeck at least isn't RS, Commodore part number 320109.E (Discontinued).
OK, that's the belt's replaced, let's give it a go then.
When powered on, 5V is present, but there is nothing on the display.  Probing around, none of the outputs are moving, the chip appears to be dead. The inputs looked correct, a pulse when the spindle turns, rewind sense working, no reset or disable pins active.
I looked around for replacement chips. I found 'untested' ones for £50, so decided not to go down that route. I did consider removing those boards and installing an Arduino or something like that to drive the display. But it would be a bit of a shame to lose the original boards.
Never fear, I have the datasheet, which includes a schematic of the actual board fitted to this PET. This contains all the drive transistors and resistors for the display etc. so all a replacement would need to do is set some lines high or low to multiplex the display, so let's build a replacement.
I have based this on a PET diagnostics PCB, which is effectively a breakout board for the microcontroller on board to allow it to drive the PETs address and databus etc. Here I've aligned the 28 pin socket so the display segments are all on one 8 bit port.
With than in place, just a case of writing some firmware. I didn't bother implementing all the features of the chip, just those required in this application. The full chip could be emulator and a custom 28 pin board designed, should there be a market for a ZN1040E replacement - let me know if there is. I started with a simple test of the multiplexing and the LEDs, display 8888.
Powering that on, I found that not all of the displays were working. Some of the segments were flickering, the end one was particularly bad and there were some flickering segments on two of the others.
The display board is another RS part (434-239 - discontinued). I moved the two best display to the right hand side. Writing the remaining code was fairly simple, two interrupts. A timer interrupt to handle the display multiplexing, and a pin change interrupt to increment or decrement the counter.
The switch also causes and interrupt, and resets the tape counter to 0. I initially started with 0000, but changed to hiding the leading zeroes so the bad displays were less obvious.
That all seems to be working nicely, apart from the duff displays.
The PET board was another issue, more on that in another blog post, but that is now working as well.


The LED modules were, of course, RS branded, 586-526 (discontinued).
 I had a look around and found some modern ones with the same pinout and digit size.
I replaced all of them as they were all getting a bit intermittent. They all worked nicely, and you don't see the grey background through the red tinted display window in the case.
With the new LEDs fitted that's all back in working order.

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