Atari Joystick USB Adaptor

Not rated 14,687

Atari Joystick USB Adaptor
Atari Joystick USB Adaptor

This project implements a composite USB device that supports two USB 2.0 full-speed gameport HID interfaces. The physical joystick ports are wired according to the Atari standard, allowing the connection of most Commodore 64 and Amiga joysticks, as well as older Atari 2600 compatible joysticks. The USB adapter is built around a PIC18F2550 microcontroller and utilizes a port of the Microchip USB stack for the Hi-Tech C18 PRO compiler. The circuit is designed for a minimal component count, facilitating easy construction on either a printed circuit board (PCB) or a small piece of stripboard. The two physical joystick ports are multiplexed onto the PIC's PORTB, which leverages the weak pull-up feature of PORTB for both joysticks, eliminating the need for ten pull-up resistors. An optional barrier diode is included to prevent power feedback to the host computer when using an in-circuit programmer. Multiplexing to a single port also allows PORTA to remain available for future additions, such as a mouse or paddle interface; there are plans to integrate an Amiga mouse port into the design. The entire interface consists of three ports (two joystick ports and one USB port) and includes ten components, including the PIC. For further compactness and cost reduction, the status LED (included for debugging purposes) and the MCLR pull-up resistor (necessary for the ICSP programmer to hold the device in reset during development) can be omitted. Most of the complexity resides in the software, which is available for download and adaptation. It should be noted that a personal USB VID or PID is not available, as obtaining one incurs a cost of $1500; thus, modifications to the VID and PID in the code may be necessary if conflicts arise with other devices (though this is unlikely since the Microchip VID is used). The software includes full switch debouncing for both on and off states to ensure a reliable positive response from the joystick, even if it is older than the user.

The project centers around a composite USB device that serves as an interface for classic joysticks, designed to be user-friendly and cost-effective. The PIC18F2550 microcontroller is a key component, providing the necessary processing power and USB connectivity. The integration of the Microchip USB stack allows for seamless communication between the joystick inputs and the host computer.

The choice to multiplex the joystick ports onto PORTB is a strategic design decision that minimizes the number of components required while taking advantage of the microcontroller's built-in pull-up resistors. This not only simplifies the circuit but also enhances reliability by ensuring stable signal levels from the joystick inputs. The optional barrier diode serves as a protective measure, safeguarding the host computer from potential damage during programming or unexpected feedback.

Future expansions, such as adding mouse or paddle interfaces, are facilitated by keeping PORTA free for additional functionality. This foresight in design allows for scalability and adaptability, making the project suitable for various applications.

The overall design philosophy emphasizes minimalism and functionality, with the possibility of omitting non-essential components to reduce costs further. The software's complexity is acknowledged, and users are encouraged to modify it according to their specific needs, ensuring versatility in usage. The inclusion of switch debouncing logic enhances the user experience by providing reliable joystick input, catering to both vintage and modern gaming enthusiasts.This project implements a composite USB device supporting two USB 2. 0 full-speed gameport HID interfaces. The physical joystick ports are wired in accordance to the `Atari standard` allowing connection of most Commodore 64 and Amiga joysticks as well as older Atari 2600 compatible joysticks. The USB adaptor is built around a PIC18F2550 microcontro ller and a port of the Microchip USB stack (to the Hi-Tech C18 PRO compiler). The circuit is designed for minimum component count to allow it to easily be built either on a PCB design (included below) or a small piece of stripboard. The 2 physical joystick ports are multiplexed onto the PIC`s PORTB, this is to allow use of the PORTB weak pull-up feature on both joysticks (removing the need for 10 pull-up resistors).

An optional barrier diode is also included to protect the host computer from power feedback when using an in-circuit programmer. Multiplexing to a single port has the added advantage of leaving PORTA free for future addition of mouse/paddle interfaces (at some point I would like to add an Amiga mouse port to the design).

The whole interface consists of 3 ports (2xJoystick, 1xUSB) and 10 components including the PIC. To make it even more compact/cheap you could also remove the status LED (which I included to help debugging) and the MCLR pull-up resistor (required so the ICSP programmer can hold the device in reset - useful when developing). Most of the complexity is in the software, feel free to download it and adapt it to your purposes. Please note that I don`t have my own USB VID or PID (since it costs $1500!) so you may need to alter the VID and PID in the code if it conflicts with another device (very unlikely since I used the Microchip VID).

The software includes full switch debouncing for both on and off states to ensure you get a good `positive` response from the joystick even if it`s older than your children:) 🔗 External reference