Re: Commodore joystick ports

From: Hársfalvi Levente (
Date: 2004-10-23 09:59:05


Jim Brain wrote:

> Scott McDonnell wrote:
>> Jim,
>> As Hársfalvi mentioned, 

Just a short note... Hársfalvi is my lastname... so, just in case you 
intended to call me by my firstname, you should call me "Levente" ;-).

> I'd travel down the path, but as of last night, the idea used by the 
> 1351 designers and Hársfalvi noted in his project is working pretty 
> well.  I can get from 10 to 255 on the POT lines using 2 10K resistors, 
> configured as noted in his PIC mouse project plans, and the jitter is < 
> +-3 (I cleaned up my code to reduce execution times), and only uses 3 
> pins on the AVR (INT1 and 2 data pins). 

The 10 cycles delay is introduced by the 10k resistor. I used it mainly 
for safety reasons and compatibility (the 1351 had 5.1k, but due to the 
5717's outputs having greater resistance than the PIC16c84 outputs, I 
raised it to 10k to meet similar delay in overall). Though, I haven't 
investigated this further. In theory, you could completely omit the 
resistor; after that move, the minimum value (read from the SID 
registers) is a function of the internal capacitor and the 
microcontroller output pin's resistance only. Though, in practice, I'd 
also notoriously search for all possible cases, when both the external 
microcontroller and the SID could drive the line, or at least use a 
smaller resistor to reduce the delay, but still limit the maximum 
current. ...Or both. As I said I haven't looked at this further. The 
safe configuration could be calculated from the SID electrical 
characteristics (its POT input's sink capability), the 4066 gate's 
resistance / maximum current, and the microcontroller output's resistance.

> I need to buy a 8MHz 
> crystal and recalibrate for that slightly faster speed.

Actually, you could use the Atmega8's internal RC oscillator (in case 
you're experimenting with a 'mega8 ).

> 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. ...

The biggest problem -- if I'm correct -- won't be the protocol itself, 
but the interference with keyboard activity. ...But I may as well be 
wrong in this.

Best regards,


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.