Commodore C64 Modifications
Controller Port 2
By: AlphA

The Pots/Mouse Switch

Data signals on C64 controller ports create keyboard conflicts. In addition, using the controller ports after the installation of the potentiometers could cause additional issues. The simplest way around these issues is to install a switch to select between the potentiometers and use of the controller port.

BigMech.com
pots/mouse switch

The switch will need to be interfaced, which makes this another invasive mod. If you decide to do the same, I recommend that you first remove the SID chip since pins five and nine connect directly to the chip.

BigMech.com

I started by removing the Controller Port's D-Sub connector. I trimmed pins 5(pot AY),7(+5V),8(GND) and 9(pot AX) and soldered eight lines to and from the interfacing switch.

BigMech.com
Controller Port 2 interface with connector

Since the switch is attached to the keyboard, which is mounted to the top of the 64C enclosure, I created another one of my connectors. The reason I have made separate connectors for each modification rather than one big connector is due to the fact that running data lines next to audio lines next to video lines would create noise issues. Not to mention, I would have to run longer lines all over the place.
Solving Amiga Mouse Issues

While installing the pots/mouse switch, I addressed the Amiga mouse right-click issue. As stated in the Prophet 64 Sequencer manual " Reading the right mouse button off an Amiga or Atari mouse is technically impossible on an unmodified device. " Obviously, it was time to modify that controller port and make the impossible possible! Contrary to what one would assume, zero voltage at a given pot sets the value to 255 and that value decreases as voltage increases. " Sequencer edition treats values above 128 ($80 hex) on POT-X pin of controller port #2 as an activated mouse button. Any value below 128 denotes a released button. " This is good news because the Amiga's right mouse button grounds pin nine when pressed. After some brief experimentation, I found that a simple pull up resistor between pins nine and seven brings the POT-X value above 128 (release button). Right-clicking the Amiga mouse grounds POT-X (obviously dipping the value below 128) creating an active right mouse button. If you perform this mod, make sure you double check your work before you power it up for a test run. You do not want to accidentally ground the +5VDC when you right-click. Keep in mind that this circuit will affect devices connecting to controller port #2 unless you add an additional switch to disable R3. Also, switching pin eight isn't’t absolutely necessary. You can probably get away with keeping all ground lines connected at all times. I just had a fancy switch I wanted to make use of. If you don’t need R3, then pin nine probably doesn't need to be switched either.
Improving the Potentiometers

A common issue with potentiometer use on a C64 is that the 64 only recognizes a fraction of the pots potential wiper rotation angle causing minimum and maximum values to be reached before the pot is rotated to either extreme. Another issue is that the values read from the potentiometer tend to fluctuate between values. In addition, some users have experienced interference between two pots on the same controller port. While doing some research, I found that these issues have already been addressed by firestARTer. This is explained on the Prophet64 User Forum. After reading the posts and taking a look at the original C64 main board schematics, I believe this is how it works: Increasing the capacitance of C80 C81 by adding parallel capacitors will smooth the incoming signal and help with value jittering. The extra capacitance also requires the potentiometer resistance to be lowered, since I assume the SID’s analog to digital converter (ADC) converts analog values to digital ones by timing how long it takes to charge a capacitor (a standard ADC technique). The SID data sheet shows 470 kilo Ohms of resistance (470k pots are less common) with 1000 Pico Farads of capacitance. Without going into further detail, 100k pots and 4.7nanoFarad capacitors will do the trick.

8580 SIDS use 2200pF caps for C80 and 81, while 6581 SIDs use 1800pF caps. Therefore, this mod may need to be altered to work correctly with older SID chips.

BigMech.com
multifunctional Controller Port 2 interface circuit

I've created a schematic to illustrate the use of the interfacing switch, the potentiometer enhancements and the Amiga mouse pull up resistor. With these modifications in place, I can use my Amiga mouse with right-click ability and still have the potentiometers installed with nearly full wiper rotation while avoiding keyboard conflicts.

BigMech.com

Since I already had ground and +5VDC running to my switch, it was only necessary to run X2 and Y2 to their respective pots. If I had added the capacitors directly to the main board, ground would not need to reach the pots at all.


BigMech.com
potentiometer monitor

I wrote a small C64 prog which monitors potentiometer values.
You may download it here (along with other monitoring tools).
NEXT»

 

-AlphA

 

More Hacks/Mods