0
\$\begingroup\$

I am building a paddle controller for my Commodore C64. Basically all you need is a 470k (or 500k) potentiometer connected to two of the joystick wires. Internally, the C64 has capacitors through which the computer translates the input to a representation between 0 and 255.

However, the input is not stable and I would like to add an RC Low Pass filter to my paddle hardware. I don't know how to calculate the correct values in this scenario which is why I hope someone here can help me out. :)

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Trial and error seem to a legit approach. \$\endgroup\$
    – Eugene Sh.
    Commented May 20, 2022 at 20:41
  • 1
    \$\begingroup\$ How is the voltage digitized with capacitors? Via time measurement of the rise-time ? Is there no ADC-Chip present? \$\endgroup\$ Commented May 20, 2022 at 20:59
  • 1
    \$\begingroup\$ ADCs were still quite expensive in the C64 era. Timing loops in assembler were relatively cheap. \$\endgroup\$
    – user16324
    Commented May 20, 2022 at 21:22
  • 1
    \$\begingroup\$ The C64 had a 2 channel 8 bit A/D built into the sound chip. \$\endgroup\$
    – Finbarr
    Commented May 20, 2022 at 21:25

2 Answers 2

2
\$\begingroup\$

The C-64 uses the SID chip (datasheet) to read the paddles, it has two A/D converters.

The paddles use the wiper and one end of the pot as a simple variable resistance, there are 2200pF capacitors from the A/D inputs to ground.

From the datasheet:

POTX-, POTY (Pins 24,23) — These pins are inputs to the A/D converters used to digitize the position of potentiometers. The conversion process is based on the time constant of a capacitor tied from the POT pin to ground, charged by a potentiometer tied from the POT pin to +5 volts. The component values are determined by: RC = 4.7 E-4 Where R is the maximum resistance of the pot and C is the capacitor. The larger the capacitor, the smaller the POT value jitter. The recommended values for R and C are 470 KOhms and 1000 pF. Note that a separate pot and cap are required for each POT pin.

This means you will probably not be able to filter them much. As you increase the capacitance you have to lower the maximum resistance and there's going to be a limit to how far you can change the values from the recommended ones.

I wrote a Breakout game for the Commodore VIC 20 that used the paddles, I remember having to do an averaging of the values. This was done in machine language (the whole game was).

The paddles on the Commodore computers were always a little bit jittery, but if you're trying to use your paddle on a commercial game and it's really bad then you may not have a good potentiometer, as any professionally written game would have smoothing in software.

\$\endgroup\$
0
\$\begingroup\$

Most of the jitter you observe is likely from the ADC in the C64 itself; not the pot. Adding a capacitor will actually make an offset that will not allow the full 0..255 output range.

If you have (very) long wires between the paddle and input connector, perhaps those are picking up 60 Hz interference ? If so, use shielded cable.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.