Uutiset:

Genetic PET BBS Powered by Commodore 64
g-pet.tunk.org port:1025

Main Menu

PC joikkari C64selle

Aloittaja Jarno Kulmala, helmikuu 09, 2003, 19:36

« edellinen - seuraava »

Jarno Kulmala

eli siis sellainen hieno adapteri jolla saa normaalin pc joikkarin c64sella toiminmaan. tietääkö joku tälläaista projektia tai löytääkö netistä. ite en oo löytäny ku pari epäselvää jotai saksankielistä mongerrusta....

fmatic

Juu jotain kyllä löytyy, mutta...
PC:n joikkari on analoginen ja kuusnepassa digitaalinen. Mahdollistahan tuollainen on tehdä vaan maksaako vaivaa väsätä moinen sillä joikkarin saa kuusnepalle halvalla.

Jotain toki on saatavilla ja tässä eräs viritys:

PC-Commodore Analog Joystick/Wheel Adaptor
==========================================

Always wanted to use a steering wheel and pedals with Pole-Position II?
Dreamed of flying the F-15 Strike Eagle with a "real" flight controller?
Well know its possible!

This project goes further than simply connecting the analog hardware to
the C64 PotX and PotY connections. It actually does the necessary
analog-digital conversion so that the PC controller will work with all
C64 joystick applications without the need to modify the program's code.
It also should work with other Commodores such as the Plus/4 and the Amiga!

Background - the C64 Joystick Port
==================================
As most will know the C64 uses a digital joystick interface. Each
direction (up, down, left, right and fire) is a bit, and can be read via
the CIA registers. These bits are pulled to ground when the joystick's
switch is closed. The same CIA chip though is used to scan the keyboard,
and as a result the same bits which are inputs for the joystick are
input/outputs for the keyboard matrix. As a result special attention needs
to be given to the connection of any electrical components if the keyboard
is to remain operable.

Background - the PC Joystick Controller
=======================================
The conventional PC controller is a variable resistor, though more modern
controllers may use electronics to simulate the function.  The variable
resistor can take on any value between 0 and 200k-Ohm. The buttons are
either "connect-to-ground" types or electronically simulated, especially
if auto-fire etc is available. Steering wheels and other non-joystick
controllers also use potentiometers.

Circuit Theory
==============
The circuit can be considered in two sections. The first deals with the
analog-digital conversion, the second with the buffering of the converted
signal to the Commodore joystick port.

The A/D conversion is handled by a LM339 chip, which contains 4 voltage
comparators. Two comparators per PC-joystick axis are required. Each of
these is fed with a "reference" voltage and the joystick signal.

Two reference voltages are provided by the circuit, each tunable with the
on-board potentiometers. These pots are part of two voltage divider circuits.
One is tuned lower than the "centre" voltage and the other is tuned higher.
These provide the threshold which has to be crossed in order for the output
to toggle "high" and effectively provide sensitivity of the joystick or
steering wheel.

The joystick's resistance needs to be converted to a voltage and this is
achieved by connecting it in series with the 150k resistor and +5V.

The outputs from the comparators is buffered to the Commodore's port by the
74LS05 chip. This chip has six "open-collector" inverters. The inverters
convert the comparator's "high" to a "low" signal, but when their input is
"low" they effectively "disconnect" from the port. This ability to
disconnect the port means that the port is freed up for use internally by
the computer.

The PC joystick's button is passed through two inverters so as to design
protect for electronic "buttons".


Parts
=====
LM339
74LS05
Two Potentiometers
{I used 100k-Ohm, but smaller values eg 50k-Ohm are better}
Six 6.7k-Ohm resistors
Two 2.2k-Ohm resistors
Two 150k-Ohm resistors
DB9 connector (female)
{DIN connector if connecting to a Plus/4 or C16}
DB15 connector (female)
PCB
wire

Building the Circuit
====================
Follow the schematic closely. One thing to watch out for with regard to board
layout is the location of the DB9 connector. You may need to ensure that it
does not inhibit access to the on/off switch.

Calibration
===========
The two threshold voltages need to be calibrated using for example the
CAL-PCJ.PRG program. You may need to load/run the program before connecting
the interface. Connect the PC-Joystick to the interface before plugging it in.
The 74LS05 chip provides some protection against hot-plugging, but I do not
recommend doing this on a regular basis.

The calibration program displays the "bits" for both Joy-Port #1 and #2.
Identify which port you are using and then press the "Fire" button. The "1"
should change to "0". Calibrate the voltage references by adjusting the
potentiometers until all the "0" just change to "1". Rock the joystick or
wheel side-to-side and continue to calibrate the potentiometers until the
"right" level of sensitivity is attained.

If you want to be super-accurate you can adjust the trims on the PC-Joystick
until the "neutral" resistance for each axis-potentiometer is identical.

Different PC-Joysticks will require different calibrations and this
procedure needs to be repeated if you change from your "joy-pad" to your
"steering wheel".

This design is (c) Nicholas Coplin 2000
No warrantee or responsibility taken.


Jos aihe kiinnostaa niin kipinkapin lataamaan:
http://www.64hdd.com/download/c64pcjoy.zip

Paketista löytyy kaikki tarpeellinen tieto + ohjelma