Saturday 17 February 2018

Back from the Grave: Commodore 1571 (light stays on and the system locks)

To go along with the 128, Commodore also released a new floppy drive in the form of the 1571.  Much like the 128 itself, this drive was designed to replace and build upon its predecessor - the 1541 - while retaining near 100% backwards compatibility.  A second read head was added, enabling both sides of a disc to be accessed simultaneously (though the second side would be effectively backwards, making it incompatible with a 1541), and a new burst transmission mode doubled transfer speeds.  It even supported reading IBM-compatible MFM format discs and CP/M discs, among others.

Released as both a stand-alone drive and integrated into the C128D and C128DCR, the 1571 was all but retired with the C128 in 1989, and discontinued entirely with the C64 in 1994.
Much like the C128D, this is not a complete list of everything which occurred.  This is primarily because I am not going to document portions I was not present for or could not confirm, since I cannot guarantee the accuracy of those events.  I do know that U15 - a 74LS14 inverter - was determined to be providing incorrect outputs using an oscilloscope, and replaced before much of the following.

This particular 1571 was integrated into the C128D we acquired in the late '80s.  Much like the 128 itself, it served me and my brothers for our childhood, but met an unfortunate end when a mechanical failure resulted in the upper head being torn off.  While we did source a replacement drive mechanism, it was never installed before the system was put into storage - mostly because it was inside a fully functional stand-alone 1571 drive.

After finally pulling the system out of storage, it quickly became evident there was an issue with the drive.  Ordinarily, the start-up sequence for a 128D in native mode would involve the floppy drive light coming on, going out a moment later, followed by attempted disc access searching for a bootable floppy (typically a CP/M disc) before finally returning to a BASIC prompt.  When the internal drive was connected in this machine, the light would come on but never go out, and the system would hang.

Following on from the successful repair of the 128D itself, we set about attempting to repair the drive and bring the system back to as-new condition.  Since we had a second, nearly-identical-but-still-working drive, it meant most of our diagnostics could be done by comparisons and substitutions.  Due to the presence of two ASICs, these substitutions would prove invaluable and ultimately result in success.

Initially, we had to determine base behaviour when the drive wasn't connected to a system.  Starting up both drives showed that the working unit would show the activity light briefly before turning it off, while the faulty one would hold the light on indefinitely.  This made for a very quick point of diagnostics, since any substitutions which caused the working drive to show the same misbehaviour could be attributed to whichever chip had just been installed.  Since the ROM and CIA were socketed already, we tried switching these (one at a time) to see if anything happened, but saw no changes.

Unfortunately, a rather significant problem arose at this time.  The external drive's power supply suffered a short in the transformer windings, resulting in large plumes of magical electric smoke being released.  Shortly after this, the filtering circuitry within the power connector suffered the same fate.  It was only as a result of the concurrent Apple //e repairs that we had access to a suitable external power supply to confirm whether the drive still worked and continue our diagnostics.

As luck would have it the drive did still work, and our next substitution - the smaller gate array ASIC - immediately resulted in the working drive presenting the same fault as the internal.  Switching the chip back to confirm we hadn't inadvertently damaged the working drive all but confirmed it.  We had found a faulty chip.  This would point out an oversight in our testing, however, as installing the known working chip in the faulty drive did not correct the problem.

It turns out that the controller boards for both drives are very slightly different electrically, not just physically.  The internal controller is missing a handful of pieces which were instead found on the C128D motherboard itself, since it wasn't ever expected to be operated without it.  Some of these missing parts related to the reset circuit, which meant the internal drive was never actually running - something we confirmed by checking for activity on its processor's address lines.  After manually resetting the drive, the processor sprang to life and light went out as expected with the working chip installed.

This was not the end of the story, however.  Upon re-installing the drive, the light would go out and the system would still freeze with no attempts made at disc access.  The drive was now functioning, but there was no activity on the data line.  The linking ribbon cable was checked for continuity and passed, but data signals were only found on the host motherboard - never on the drive.  It was decided that it was a better idea to simply replace the ribbon cable, especially as it was not in particularly good physical condition.

Despite the new cable, there was still no change.  Since the motherboard had been installed and we didn't want to disturb it, we never actually tested the host side with the drive attached as it was difficult to access the connector.  Testing the end of the ribbon without the drive attached showed that there was data activity on the ribbon, but as soon as it was connected to the drive all activity ceased.  Something on the drive controller was holding that line low.

Only three components connect to the data line on an internal 1571 (stand-alone drives also feature a pull-up resistor) - a 74LS14 inverter (U15) and a 7406 buffered inverter (U16), responsible for sorting input from output, and a 6522 VIA (U9).  Since it was holding the signal, it had to be on the data output line which ruled out the 74LS14 as was fed from the system side.  Taking the 50/50 gamble, we elected to substitute the 6522 with one of the know-working units, and fired up the system with drive attached.  Success!  Data was being received by the drive, it was now performing the startup sequence we expected and could read known-good discs.

That's all for this BftG.  Barring some minor physical damage to one of the joystick connectors (a pin has evidently been recessed), now our childhood friend was well and truly back to how we remembered it - complete with a new set of heads.  We also know what needs to be done to restore the external drive and, having already sourced a new switched-mode power supply, it will eventually see use once again as well.

Remember that electricity can be dangerous to both property and life.  If you don't respect it you can wind up seriously hurting or even killing yourself or others, and chances are it's going to be painful while it's happening.  Unless you're sure of what you're doing, avoid tampering with any electrical circuit - especially when it's live or mains powered - and always ensure you have a nearby assistant who can contact emergency services.

No comments:

Post a Comment