Jump to content
IGNORED

Arduino Emulated Atari Joystick CX40


Dropcheck

Recommended Posts

6 hours ago, Kyle22 said:

Just make sure the 5v doesn't pop anything on the Arduino. Its low current through a resistor, but it's still 5v.

Can it handle that, or not?

 

Hence the reason for the optocouplers.  Isolate both the Atari and the ATmega328 board from each other as far as the data signals are concerned.

  • Like 2
Link to comment
Share on other sites

Can't speak for the Arduino, but it's pretty common practice on the Microchip PIC to use a resistor inline with an I/O line to limit a higher voltage from damaging the internal circuitry. Modern logic devices have clamping diodes on their inputs for protection, so the resistor simply limits the current to be below the rating when said diodes do their job.

 

  • Like 1
Link to comment
Share on other sites

The Atari has a bunch of protection. 10uH L and 220 R in series, plus 1nF C to ground. If you use an AtariLab, you get an extra 100 R in series on the outputs, although you can also use the inputs as outputs. We used pin 1 as output, but after pressing reset, it became an input again, but happily sank 9V :)

 

I really think optocouplers are overkill. With MIDI on SIO, I understand, but even SIO2SD, SDrive and the like, don't have extra protection. SIO has 100R in series and caps, although some people (have to) cut them to get to divisor 0. Never heard of any blown out Pokeys or PIAs because of no buffering of signals. I reckon Atari would have add more protection to AtariLab if that was necessary.

 

 

Link to comment
Share on other sites

2 hours ago, ivop said:

The Atari has a bunch of protection. 10uH L and 220 R in series, plus 1nF C to ground. If you use an AtariLab, you get an extra 100 R in series on the outputs, although you can also use the inputs as outputs. We used pin 1 as output, but after pressing reset, it became an input again, but happily sank 9V :)

 

I really think optocouplers are overkill. With MIDI on SIO, I understand, but even SIO2SD, SDrive and the like, don't have extra protection. SIO has 100R in series and caps, although some people (have to) cut them to get to divisor 0. Never heard of any blown out Pokeys or PIAs because of no buffering of signals. I reckon Atari would have add more protection to AtariLab if that was necessary.

 

 

I'm less sure. We have a history of problems with things hanging off the JS ports. I mean everything from the JS EPROM programmer to most recently Mytek and DMSC PIC programmer. I get RFI was a consideration when Atari designed the computers but I'm pretty sure the 2600 had JS just directly connected to the RIOT w/o anything else. Problem I have with the way things were done is an inductor and caps on the JS ports is it starts to look like a Kettering ignition system.<sic> One of my friends, when he wanted to generate a pulse for a clocking input just used a cap inline to generate a pulse on high to low or low to high transitions.

 

I did some stuff with JS ports and only way I could keep inductive loads from glitching the system was to isolate my circuit using PNP transistors on the JS ports. PNP had the advantage of being off in my design before the 6520 was initialized. I've also tried serial to parallel conversions for a Centronics printer interface that used a 74ls164 for the conversion. It was a total failure! To debug it I added LEDs to the outputs of the '164. A single clock pulse on the 6520 would toggle 2-4 bits of serial data. 

 

fig1.jpg

Link to comment
Share on other sites

21 hours ago, ricortes said:

I'm less sure. We have a history of problems with things hanging off the JS ports. I mean everything from the JS EPROM programmer to most recently Mytek and DMSC PIC programmer.

 

I did some stuff with JS ports and only way I could keep inductive loads from glitching the system was to isolate my circuit using PNP transistors on the JS ports. PNP had the advantage of being off in my design before the 6520 was initialized. I've also tried serial to parallel conversions for a Centronics printer interface that used a 74ls164 for the conversion. It was a total failure! To debug it I added LEDs to the outputs of the '164. A single clock pulse on the 6520 would toggle 2-4 bits of serial data.

 

Hmm - I´ve done dozens of experiments with the joystick ports in the 80s. Own modem interfaces, printer interfaces and several stuff. It was the time before the internet was present and informations where rare in Europe. So a lot of tinkerer "made their own thing". IMHO the ports are very stable and rugged. When something was damaged, then issues in the circuit were the culprit, most time when plugged in while the computer was already powered on.

 

When talking about using the joystick ports as an output. it´s mostly needed to use amplifiers. At some systems (computers) with some PIAs it worked without, at some not. When I do my stuff with the 74LS164, I also got problems. My solution was simple:

 

Text2LCD.thumb.png.c0fc844ec4cc13862f62a28f7d518eaf.png

 

This is a very simple thing I´ve made 10 years ago or so for the ABBUC magazine. It´s used to connect a standard HD44780 character display to the joystick port. Some simple BASIC and machine code samples came with. The both resistors R9 and R10 are only used for generating specified POT values which the "driver" software can use to check for the presence of this circuit. Without using the transistors I also got a lot of trouble with the 74LS164.

 

Edit: Because two users ask me, here are the files for the public. The ATR file includes a sample ATARI-Basic and a sample 6502 assembly language to access the HD44780 display. Schematics are already included above.

 

The PDF file (not protected) contains the article for the german ABBUC magazine, where this little project is explained. Please use Google translator or similar, thanks.

 

Text2LCD.atr

 

Text2LCD.pdf

 

 

 

  • Like 4
Link to comment
Share on other sites

A little bit of an update to this thread.  ?

 

I was successful in connecting the Arduino Uno directly to the Atari joystick port(no opto-couplers) and getting the Star Raiders game to respond to the 'fake' joystick input from the Arduino.  The sketch is clunky and slower than I'd like.  But it is working.  Both the Arduino and the Atari 800XL seem no worse for wear.  Now to refine the whole process to a finished project.  ?

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...