Tuesday 10 May 2016

VIC20 Diagnostics user guide

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

Following on from the previous posts on the VIC20 Diagnosics cartridge and test harness, here is a bit more information covering their use.
To start with, plug in all the connectors. Most will only fit one way. The edge connectors go with the test facing upwards, as shown. There is a pin missing on the keyboard connector, match this to the loopback plug.
Make sure you are using a good, known working power supply, or test it with a dummy load and a meter before going near your precious Commodore kit. As soon as you turn the power on and the testing should start. There are a few things that need to be working to some extent at least, the power supply, the CPU, the VIC, and the kernal ROM. Without those you would get a black screen or random garbage if it is the VIC chip. These things are often socketed, so if you don't get anything on the screen, and the usual checks (power, reset, clock) are OK, then try swapping those with good parts.
When the test is running, it isn't always clear what the error codes in the Commodore Diagnostics program mean. These are the results of my testing by removing certain parts, or swapping in bad parts. The first test is RAM. The VIC20 has all sorts of RAM in all sorts of places. The original has various sets of 2114 chips, too many to count. OK, I counted, there are 11, giving a total of 5.5K. Yes, you can have half a K. One of them is used as 4 bit wide colour RAM, the rest is pairs of 4 bit 1K 2114 chips giving 5K * 8 bits as normal. 
The later VIC20-CR  has four sets of RAM, 2x 2K 6116 chips giving 4K, a pair of 2114 chips giving 1K, and the single 2114 giving 1K x 4 bits for the colour RAM. There is also 1K of RAM in the diagnostics cartridge, which is required for it to run, and isn't actually tested.  Some of that RAM needs to be present for it to run. 
If there is a fault in the colour RAM, the display will be a bit flickery, and it will show the error. If one of the 6116 chips are faulty, it will show an error. If one of the pair of 2114 chips is faulty, it will just show a black screen.
Next comes the ROM tests. These are even more cryptic. If all is well, three numbers will be shown. These are, in order:
  • Character ROM checksum (should be FF)
  • Kernal ROM checksum (should be E0)
  • BASIC ROM checksum (should be C0)

If any of these fail, the actual checksum is shown. If the character ROM is bad, the first line will show an error, the second line will show an error if the Kernal ROM is bad, and if the the third line shows bad, it is the BASIC ROM at fault, as shown below. The checksum should be C0, but it was calculated as 0A. Sometimes, the number calculated changes each time you run the test indicating an intermittent fault.
Both the PAL and NTSC versions looks for the same checksums, so it appears the checksum should be the same for all versions of the ROM. Commodore presumably modified an spare byte until the checksum came out the same. ROMs that work but have different checksums (e.g. JiffyDOS) will fail as they haven't been adjusted (I think that gives 6B).
I have now seen a couple of cases of ROMs which initially pass, but then fail after a few minutes. Here it is the character ROM which is failing. I swapped it out for a replacement ROM and it ran fine for several hours. Putting the old ROM it failed again after 3 minutes, so I'm happy to conclude that ROM is bad. It was working OK in operation, but I think it's time to swap it for a good one.
The rest of the tests are the I/O ports, handled by the two 6522 VIAs. The keyboard test will pass if the first 6522 is good, even in the keyboard loopback is not installed. I presume this is intentional, so you can test without opening the case. If the loopback plug in installed and there are problems with the first 6522, you will get a keyboard error.

  • The keyboard tests are down to the first 6522 (nearest the keyboard)
  • The serial bus problems are usually down to the 7406 or the second 6522 (nearest the serial port).
  • Cassette port tests fails can be caused by the second 6522, or the TIP29 cassette motor drive transistor.
  • Joystick errors are down to the VIC chip or the second 6522.
  • User port errors are again down to the second 6522.
  • The pos/neg edge tests are to do with (guess what?) the second 6522 (it's really getting a work out). They refer to edge triggering I/O and interrupts on the control lines via the user port.
  • The timer tests refer to both 6522 VIAs
  • The sound test should get the VIC chip to play a sound.
 Next come a couple of test card screens, you can check for colour or alignment issues. 
The test then loops around and repeats until something fails or the power is removed.
N.B. Through out this, read all of these are suggestions of what may be at fault. Many problems can also be caused by address decoding, buffering (particularly on the RAM on the original VIC), power supply problems etc. or interaction between parts. One bad 6522 VIA can cause problems with the other. You can also swap the 6522s around and see if the user port fault changes to a keyboard fault etc. One bad ROM can cause others to fail. VIC20s usually only have a few chips socketed, but these can suffer from bad contacts.

Diagnostic boards and loopback cable are available from my Tindie store, either as PCBs, kits of parts, or assembled and tested sets.

2022 Update: The VIC20 Penultimate Cartridge includes a built in Dead Test and is now available from  The Future Was 8 bit