[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading Joystick Position



Mark Cummings noted:

>> ...and the reason why the timing is crucial is because you *must*
>> wait while the capacitors in the joystick discharges, or you will
>> end up reading bogus values. Hence, the NOPs (no-operations) inserted
>> simply to waste a little time in precisely known amounts of delay.
>
>Normally there are no capacitors in the joystick for an Apple ][ (not
>counting line capacitance of course which is negligable)
>the RC timing components are 1. capacitor on the motherboard and 2. resistor
>in the paddle/joystick.
>
>there is a mod/circuit in Rubywand's FAQ that describes how to modify a PC
>joystick that normally uses a 100K potentiometer to make it compatable with
>the Apple ][ which expects a 150K potentiometer (for full control). I have
>yet to build it, but basically the circuit adds capacitance to the joystick
>port to alter the C value in the RC time constant. this has the effect of
>allowing a PC's 100K pot to work correctly on an Apple ][.

The physical location of the capacitors doesn't matter to their
function.  The supplementary capacitors mentioned in the FAQ
are electrically in parallel with the mainboard capacitors, since
any capacitance from the timing node to an AC ground (either
ground or +5) is in parallel from an AC point of view.

The few cycle delay before beginning polling of the timer is, as
the original poster suggested, there to give the circuit time to
discharge the timing capacitor(s) prior to the start of the RC runup.

-michael

Check out 8-bit Apple sound that will amaze you on my
Home page:  http://members.aol.com/MJMahon/