Wednesday 2 May 2018

Back from the Grave: Commodore VIC-20 (Part 1: blank, dark screen)

(This is unchanged from the original post, aside from this message.  Blogger simply decided it wanted to revert the post to a draft and change its posting date, and I'm unable to figure out why)

Launched in 1980, the VIC-20 (sold as the VC-20 in Germany and the VIC-1001 in Japan) was the first computer of any kind to sell in excess of one million units.  Pairing the already established MOS 6502 (used in the PET as well as Apple's II), a custom graphics chip (VIC) originally intended for game consoles, and an introductory price of just $299 it effectively created the entry-level computer market and filled it in spite of its shortcomings (such as only 5KB of RAM, though expandable to 32KB).

Eventually it would finally give way to the juggernaut that was the Commodore 64 which, while incompatible with most VIC-20 software and twice the price, was simply too much better to ignore.  Commodore would eventually retire the VIC-20 in 1985 after superseding it with the similarly low-cost (and much less successful) 264 series; specifically the Commodore 16.
In this case, there are actually three systems involved.  Two of them came to us by way of a rescue from a footpath in completely unknown condition in the mid-2000s, while the other was one I had used myself when I was much younger before it was, like so many retro machines, put into storage and forgotten about.  Part 1 is dedicated to one of the rescue machines.

Initially, we only had access to the two rescue machines.  Both of these exhibited the same basic problem: they appeared to power up, but the screen would remain blank (dark) at all times. Due to the presence of an external RF unit, the first thing to determine would be if this signal was being produced by the computer itself.  Scoping the outputs from the VIC (Video Interface Chip) showed basically flat DC output - it wasn't even generating a sync signal, much less a blank picture.

Next step was to determine which chips were active in an effort to isolate the problem.  The VIC-20 is an unusual beast, in so much as the primary oscillator actually runs the VIC - not the 6502 CPU.  VIC accepts the input clock (approximately 4.43MHz for PAL variants, 14.32MHz for NTSC) and then outputs a clock for the CPU (1MHz for all variants).  Along the way this passes through several inverters (presumably used to boost the signal cheaper than an op amp), so there's plenty of points to check.

Of course, it didn't take use long to find what would turn out the be the problem.  The crystal was outputting the correct frequency, and the inverters were cleaning it up and boosting it nicely.  It reached both of VIC's inputs (it accepts two clock signals exactly reversed from each other), but it wasn't coming out the other side.  In the case of one of the systems it produced exactly nothing, while the other was feeding out a ~4.43MHz signal which very quickly decayed in both frequency and amplitude until nothing remained.

In other words, VIC wasn't outputting a picture because it wasn't being told to do so, because the CPU wasn't running.

For completeness, we then went on to check the reset line based on the assumption that perhaps it was required to correctly set the output clock.  The reset line was being held low as it should (though for longer than we were expecting) before going high.  Thus the reset trigger and the associated 555 timer were working fine, and not required by the VIC to start producing the clock for the CPU.  For the chip with the decaying signal, it had nothing left by the time the reset had completed.

It was around this time I stumbled upon the system I'd used in the past.  While it was known to have worked, experience has taught us that this may not still be the case.  Powering it up verified this once more - the screen drew white lines, which eventually skewed before going blank.  Opening it up revealed a large amount of crud, though no indication of how it got there, which appeared moist and was probably shorting some of the ICs.  But it did provide us with another VIC, which we promptly removed for diagnostic purposes until the rest of the system could be cleaned.

Installing this third VIC into the first of the two rescue machines, the change was immediately obvious.  Scoping the oscillator output showed a clearly defined 1MHz signal, and probing the 6502 showed its own oscillator outputs similarly functional, together with activity on the addressing lines.  We had life!  Attaching it to a television verified this, however all wasn't well - the screen displayed a series of garbage characters, and the system was not responsive.  Due to the previous Apple //e operation, this seemed likely to be a RAM issue, or possibly one of the ROMs.

The second rescue machine, however, was much more promising.  Again the correct output was found on the VIC and the CPU, together with address activity.  This system would show a small quirk in the VIC-20 - it takes around 4 seconds from power on before it boots, which fits in with the long reset signal we measured earlier.  Just as we were about to declare this one as "more dead", the BASIC prompt showed up clear as day.  Typing (albeit awkwardly as the keyboards have not yet been processed) worked fine and simple commands executed perfectly.  We have a runner!

This, of course, also means that we had two dead VIC chips.  Some research suggests this isn't uncommon, as the original VIC was known to run rather hot.  You could still touch it while in use, but due to the absence of ventilation in the VIC-20 and the EMI shielding over VIC itself, it was quite possible to "cook" the chip simply by using it in warmer climates.  Heatsinks are in order to ensure our remaining good chip doesn't meet the same fate.

So ends part one of this three-part BftG.  We've already made some progress towards repairing the other rescue machine, but as yet haven't really gone all that far with the machine we actually used to use.

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