Saturday, January 06, 2024

Are you keeping up with the Commodore...

A little while ago - sometime in July(ish) - I happened to mention my hobby of messing about and fixing (sometimes successfully) old computers to a close family friend. They, by chance had a Commodore 64 that didn't appear to be working which they hoped I could have a look at.

Challenge accepted.

After a bit of a delay we managed to pop round to see them just after Christmas and, there waiting for me, was a box containing a Commodore 64C. Nice. We tried to make it work there and then and after managing to tune in an analogue channel on their LCD TV the familiar blue screen popped up via RF, proving that the actual machine itself was somewhat working.


C64c circa 1990ish


Having prepared for the visit I had got hold of an 8-in-1 diag and dead-test cartridge which I then dutifully inserted (after switching off) to see if there were any unseen faults lurking. Sure enough, the diagnostics seemed to be saying that the user port and serial ports were 'Bad' as was the SID (darnit).


Bad SID. But is it though?


Despite this, we persevered and tried to load a game in from tape. It didn't work. The screen went blank as expected but nothing was found on the tape.

At this point I needed to get it back home and on the bench to see what could be done to restore this C64C to its former glory. In particular, I was keen to know whether the serial and user ports were 'Bad' because they were actually faulty or whether the diagnostic was expecting some sort of test harness to be attached. So I was entrusted with the precious machine and it came home with me.

Good news first. The keyboard works perfectly. Every key is fine and is registered immediately it is pressed. Next, the SID was not dead! Yay! The SID in the C64C is the later 8580 variant which, although viewed by some as inferior to the original 6581 chip, is generally regarded as a bit more reliable and less likely to fail due to old age. The diagnostic still reported SID as faulty and because we didn't have any sound on the RF I thought that this was correct. However, when I got home I used a composite video cable with separate audio to connect to the TV and the diagnostic sound tests come through loud and clear. It isn't 100% though, and the 'burn-in' tests report one minor failure when it tests the SID. I can't work out what that is but it didn't seem to affect the games that loaded up later - but I'm getting ahead of myself. SID working is a huge relief as prices for original chips are currently sky-high and are likely to only keep climbing as more of them fail over time.


One fault on SID but it's not noticeable


Back to the faults. With the Cassette apparently not working and the serial and user ports reporting as 'Bad' I immediately suspected the CIA chips. There are two of these on the board (similar to the later Amiga) and they control various input and outputs e.g. keyboard matrix, timers etc. I opened up the C64C and it was obvious no-one had been in there previously, even though the warranty seal had been broken. Straight away I could see that the two CIA chips were soldered directly to the board.


Left keyboard support

Right keyboard support

Main board top view


CIA chip

The other CIA chip

One way to troubleshoot the CIAs is to swap them over. If the fault changes then one of the chips is faulty. To swap these I would need to de-solder them from the board. This was slightly nerve-wracking as I have never worked on a C64 board before. I've done plenty of Amiga A500s but the C64 is a much earlier computer and the earliest boards can be fragile. Fortunately, there were no issues with this board and it was actually very reminiscent of the later A500 boards, being of a pretty good quality. I took my time too and I have just replaced the nozzle on the 'moo-ing' de-solder station which also probably helped.


CIA chip removed and socket
added


With sockets installed for both chips I checked to make sure it was behaving as it had done previously, which it did, and then I swapped the two chips to see if the faults changed. 

They didn't.

Ah.

I was not expecting that. This immediately suggested that the two CIAs are actually OK. So, to see if the cassette unit was working or not I dug out a blank cassette which I had stashed for a rainy day and typed up the ubiquitous 'hello world' program in BASIC. Then I saved it to tape - which I had to Google how to as I've not used a C64 before. After re-winding the tape I reset the C64 and then tried to load my saved BASIC program. And it worked.

So, this meant that the cassette drive is fine but that for some reason, the original game tapes were not being read correctly. At this point, any veterans of the cassette era will probably be hopping up and down with a single word on their lips. Azimuth.

Very briefly, in a cassette drive there is a read/write head that should be perpendicular to the track that is present on the tape. If the head is at an angle or too high or too low, the signal being read is distorted or too quiet or missed entirely, meaning that programs will not load correctly. 

To adjust the azimuth of the head simply needs a small screwdriver to twiddle the adjustment screw that is located on one side of the head. On this cassette unit the screw had a small blob of locking compound on it. To remove this I had to dismantle the unit and, while I was there, I also cleaned the read/write and erase heads with 99% isopropyl alcohol on a cotton bud.

After carefully tweaking the screw about a half turn anti-clockwise I tried loading in 'Squash'. And would you believe it actually found 'SQUASH'. At this point I had to Google what to do next as the tape had stopped. Of course, it just needs either 'Space' or the Commodore key to be pressed to continue. There are no raster bars on the 'Squash' game. Which was annoying as I had no indication that things were proceeding as expected. And then a line of text appeared across the top of the screen with the publishers name. This was a good sign. About 45 seconds later a loading screen appeared, depicting two people in a squash court. This was another good sign. 


Is this a loading screen I see before me?


Then after about five minutes the loading screen disappeared and was replaced with the original line of text. Hmmm. This was not a good sign. Eventually the tape ran to the end and stopped. 

So I tried another tweak to the screw and gave it another try. The same happened as before right up to the loading screen disappearing. I expected the tape just to run through and stop again, but I was wrong. After another minute or so the picture of a squash court with a side panel appeared, asking me to select a 5, 3 or 1 game match. Awesome!


Squash. Who's Jonah Barrington?


The other games that I had brought home to try and make work were Postman Pat 2 and Postman Pat 3. There is a Postman Pat fan somewhere in this story... :) Anyway, I tried PP2 and this got as far as a loading screen but then the game failed to start - or at least, nothing happened and the tape reached the end. So then I tried PP3 and, again, a loading screen appeared but no game at the end, just a light grey screen.

This was still an improvement!

To cut a long story short it took quite a while to hit the 'sweet spot' with the azimuth. I connected my oscilloscope to the board of the cassette drive and I could see the digital signals being fed into the C64 which was cool. I could influence the signals by going to the extremes on the adjustment screw but it was still hit and miss as to whether any game would load.


Oscilloscope - Connected to the digital input to the C64

Eventually, I undid the adjustment screw on the head until the head didn't move any further. Then I tried to load the Squash game. This failed completely so I turned the screw one quarter to slightly tighten the adjustment and tried loading Squash. Rinse and repeat. On the fourth go I got the loading screen. On the fifth, the game loaded properly. Immediately I tried loading PP2 and was met with a fully loading game! Yay! So, then straight to PP3 and although this got to the loading screen, the game failed to start again. So I tweaked to screw another quarter turn and tried PP3 again. And it loaded, perfectly.


Postman Pat II


Postman Pat III


Then, to make sure the adjustment was still OK I went back and loaded Squash and PP2 again. And they both worked without (too much) trouble. One thing I did find was that Squash will only load from side 2 no matter how the azimuth is adjusted. Odd, but bearable providing the two PP games worked!

Finally, to make sure that the adjustment didn't move again I put a blob of Mrs Crashed's nail varnish on the screw to lock it into place. 

One final test, I loaded all three games again after re-assembling the cassette drive to make sure that I hadn't messed anything up while I was screwing the case back together. 

So now the main unit is working, the games load from tape and the only thing left to do was to check the joysticks. Time for my Heath-Robinson USB powered joystick tester! 


Archer Joystick under test.
Up and Right directions lit.


The first joystick is an Archer quickshot 2 clone (Archer being a brand of the now defunct Tandy - or Radio Shack if you're in the US). This is the better of the two units as it has microswitches and actually feels very sturdy. All the directions were fine and the trigger fire button was OK too, as was the 'auto-fire' function. The top fire button didn't work, and I suspected it was just the microswitch that needed a clean. Sure enough, after removing the cover from the handle and a quick clean being carried out on the top microswitch, it was back in business.


Top microswitch needed a clean.

The second joystick is a Quickshot Python. This worked without any issues although it's not as nice as the Archer as it doesn't have the nice clicky microswitches. I used to have one of these with my Amiga, back in the day, so it did bring back some happy memories. 

And that's basically it. This C64 is ready to go back and be enjoyed again by its original owner.