Re: Commodore joystick ports

From: Jim Brain (
Date: 2004-10-23 03:37:14

Scott McDonnell wrote:

>Ok. Sounds like you got it working satisfactorily. : ) Just thought I would
>pipe in and offer my own suggestions. Hope I was at least some help.
Well, between you and Hársfalvi, I learned quite a bit more about 
analog.  I just never did grok the analog stuff we did for my EE 
degree.  Digital I completely understand, but the class on transistors 
(Q and all that) just didn't mesh, and the Fourier analysis class I 
barely kept my head above water in.  I really should grab my old texts 
and learn this stuff, as Fourier seems very useful, and knowing how the 
non-digital aspects on transistors would be applicable, but I've got so 
many cool projects to finish, so your emails may have to suffice for a 

The main problem now is how to create a RAW data transfer mode using the 
joystick port.  Not many bits to work with, and the keyscanner routines 
wreak havoc with a direct approach.

No one has responded on that issue, so I am assuming there is either no 
interest or no better ideas.

What I've come up with is:

if no buttons are pushed on controller, put controllder lines in HiZ 
mode, and watch them.
If a 10101 shows up, watch for 01010 for X uS
if 01010 shows up, watch for 10101 for X uS
Once that occurs, watch Fire line (now clock) for H-L transition
read command nybble.  (0000 or 1111 is go back to normal mode, in case 
keyscanner kicks in) 0001 is read raw data
when clock goes H, load length  (length of packet *2 + 1)
wait for L-H transition
load controller type (serial mouse, ame controller, etc.)
wait for L-H transition
send packet
go back to wait for command mode.

At all times, POT lines send valid data.


Jim Brain, Brain Innovations                      
Dabbling in WWW, Embedded Systems, Old CBM computers, and Good Times!

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.