Commodore 64 fix: RESTORE key and power switch

RUN/STOP+RESTORE is a useful key combination that allows you to escape from BASIC programs and some ML programs. For instance, you can escape an infinite WAIT loop with these keys. And this is the way to exit from an INPUT prompt as well. RUN/STOP+RESTORE is also useful to restore the system to standard parameters without loosing any data.

Some time ago I realized my all socketed Commodore 64 250407 board was no longer able to recognize the RESTORE key. No way.

First of all, I tried to swap the keyboard (one time I came across a non working contact on RESTORE key). But, this time I had no luck.

The male header for the keyboard was fine. No cold solders, everything OK. I then replaced the 556 timer (U20). It is commonly known to cause this problem. I replaced the old one with a new old stock chip I had previously found online. But again, that was not the problem.

I tried to swap the two CIAs with one another. Again, nothing changed. That made me think that CIAs were not related with the issue.

I then had a careful look at all solders (on CIAs and 556’s sockets), but I couldn’t see any problem either.

I then decided to have a look at the 250407 board schematics.

The RESTORE key is used to trigger an NMI. In combination with RUN/STOP, it sets default conditions as described above. An NMI is a non maskable interrupt, that is, an interrupt request that cannot be disabled.

There’s an NMI line on pin 4 of the 6510 CPU. This line can also be found on pin 21 of CIA #2 (U2 6526). But they both were fine.

I then checked all connections of the NMI circuit. The RESTORE key line starts from pin 3 of the keyboard header (please note that pin 2 does not exist but it’s part of the numbering. It’s a missing pin that acts as a key in order not to reverse the keyboard connector). Passing through some passive components (all checked and fine), this line goes to pin 6 of IC U20 556 timer. BUT, pin 5 of U20 is connected to pin 5 of IC 7406 (U8). And from pin 6 of the 7406 chip, the NMI line (also connected to the cartridge expansion port) goes to pin 21 of CIA#2 and pin 4 of 6510 CPU.

So, the 7406, being part of the NMI circuitry, could be the problem.

I replaced the 7406 with another one and luckily, the RUN/STOP+RESTORE key combination is now working fine. So, a partial failure on the 7406 chip may cause a non working RESTORE+RUN/STOP key combination. This is in addiction to the common 7406 fault relating to disk access problems.

This computer also had a bad ON/OFF switch. It was “working” but it was not operating smoothly. Being aware that a bad ON/OFF switch can cause many problems, I opted for replacement.

Once I desoldered the switch, I wanted to have a look inside it, to see how it worked. Here are some pictures I took.

wp_20161019_0021
A fully disassembled Commodore 64 on/off switch. This is the same as the one used on 1541-II boards.
wp_20161019_0031
The bigger piece has a spherical surface to accept a little shaft featuring a spherical surface too. One end of the shaft is to be inserted on the black plastic element that you push while using the switch. The other end has a hole with a spring inside.
wp_20161019_0041
This is the outer part of the metallic structure of the switch. It accepts the black plastic element. As you can see, it has holes that let it swivel. The hole to the centre is for introducing the little shaft with spherical surface (you must insert it from the other side).
wp_20161019_0081
The second element from left to right is a pin that makes a mechanical connection between the shaft and a little plastic element that acts as a pusher. It presses against metallic “leaves” (the two tiny elements to the right) to make electrical contacts.
wp_20161019_0131
Those are the contacts that are connected to the board. The “leaves” are made to press against them. It’s a double on/off switch, as we have two power lines on a Commodore 64 (+5V DC and 9 V AC).
wp_20161019_0141
The leaves put on their place. You can’t see from the pictures but they are a little bent on their ends to accept the pusher better and to make better contacts. The switch can either make an electrical connection from the center contacts to the upper ones, or from the center contacts to the ones to the bottom.
wp_20161019_0161
A detail showing a hole on the plastic element that you push directly while using the switch. It accepts the shaft with the spherical surface.
wp_20161019_0191
The little spring that keeps the pusher pressed against the electrical contacts.

I managed to fix the switch, but it’s something not very easy.

To open it, you have to use a very small, flat screwdriver. You have to lift the little metallic enclosures. Be very gentle in order not to damage the plastic, which is somewhat easy to break.

You can do damage and hurt yourself, do it at your own risk. Also, a bad repair may seriously damage your computer, so please be careful and take your time to fully test your switch before reinstalling it on your Commodore 64 computer.

I cleaned the “leaves” with isopropylic alcool, then I polished the six stationary contacts. After that, I took off the tiny spring from the shaft with the spherical surface, and carefully using my nails I stretched it a bit. It can fly away very easily, so I had to take care (and I was lucky too).

Then, I noticed that the leaves had different angles on their bent ends. So, I tried to make the angles the same between the leaves as much as I could. That allows you to have equal pressure on both left and right contacts.

The most difficult part was closing it back. Locking pliers have proven to be helpful. Those made it possible to keep everything closed while I was forcing the little metallic enclosures into the little grooves of the plastic case of the switch. I used the same screwdriver to force them back into position.

Be careful! Locking pliers can apply too much force and crash everything. So set the right force with patience.

I then resoldered the switch and it works fine now. It’s the first time I try to fix such a switch, so I don’t know how much this kind of repair will last. But still, it was fun.

 

Previous Entries Coding a scrolling chessboard with Commodore 64 BASIC Next Entries A bigger scrolling chessboard with Commodore 64 BASIC

Leave a Reply

*