I already built a nifty handheld controller, and I should be enjoying my retro gaming experiences, but I couldn’t help building something new, so here is a PS2-to-Atari5200 adapter:
This adapter allows you to use a PS2 controller on an Atari 5200 gaming console. The 5200 was notable at the time for its use of analog joysticks, but the controllers that shipped with the console are pretty lousy. They don’t self-center and they have a mushy annoying feel to them. The fire buttons aren’t very tactile in nature. The controller in my opinion just doesn’t feel or work good. Nevertheless, you have to give the Atari 5200 some respect for trying to be a pioneer in the technology.
As such, several solutions have been proposed for using alternate controllers. There are adapters for Atari 2600 digital sticks, adapters for analog PC joysticks, my own handheld controller, etc. I decided to adapt the basic technique of my handheld controller to a PS2 adapter.
The basic idea
The Atari 5200 uses analog controllers. For each axis it expects an analog potentiometer of approximate 500K.
The PS2 dualshock is an analog controller with a digital interface. It communicates with the playstation by use of the SPI protocol. This is a clocked serial protocol with dedicated directional IO pins (MOSI = Master Out Slave In, MISO = Master In Slave Out) and a chip select.
Interfacing an SPI peripheral is dead simple with a microcontroller, you can easily bit-bang the SPI protocol, sending the appropriate bits in and out and toggling the clock. Numerous articles have been written on interfacing a PS2 controller to an AVR microcontroller. For example, CuriousInventor breaks down the protocol packets, and sunil93 has some C code to use that protocol. Reading the PS2 controller is a straightforward matter of repeatedly the controller for thumbstick and button state.
Getting that information back to the Atari 5200 is the interesting part. I use the same technique in this project that I did for my handheld controller, a digital potentiometer. The digital potentiometer used in this case is an MCP42100. It interfaces using SPI (just like the PS2!) and provides a range from 0 to 100K ohms in 256 steps. Unfortunately, finding a 500K digital pot is problematic. Knowing that the Atari 5200 uses capacitor charge rate to measure the position of the potentiometer, it’s possible to stretch out our 100K digital pot to the same charge characteristics as the stock controller by adding some additional capacitance, in our case 0.22uF. The same trick is used to make 100K PC joysticks work on an Atari 5200.
The current revision of this project does not feature a logic level translator on the PS2 connector. This appears to work fine for Sony controllers, but is unknown for third-party controllers. It’s conceivable the lack of logic translation could damage a controller. Builder beward.
The schematic is shown below:
At the left is your standard matrix keypad, straight out of the 5200 schematics. It’s wired to the first of two DB15 connectors, for the primary joystick port on the 5200.
Top right is the microcontroller, an ATTINY861. I used it because it’s similar to the ATTINY85 that I’ve used before, but with more pins.
There are two MCP42100 digital potentiometers. Each of these implements two pots, one each for X and Y axis of a controller. Having two MCP42100 allows us to implement two 5200 controllers, for games like Robotron or Space Dungeon that expect two controllers to be used together.
The PS2 port is implemented as a 9-pin header. MISO, MOSI, SCK, and PS2_ChipSelect are connected directly to the microcontroller. 3.3V power is provided via a LM3940-3.3 regulator.
I also wanted to be able to hook into the start/pause/reset buttons, so I made some effort to try to interface the microcontroller to the matrix keypad, you can see this on PA4-PA7 of the microcontroller with an associated pulldown resistor network. I haven’t got this feature working yet, so it’s recommended you do not populate RN1.
There’s an ICSP header, SV2, that can be used for in-circuit programming using a usbasp programmer.
Here’s a picture of the pcboard:
A few construction notes:
- The PS2 connector pigtail came from a PS2 extension cable. I cut the end off and used dupont-style pins and housing to connect to a 0.100″ right-angle header on the pcboard.
- Reset button doesn’t matter, and will be removed from the next board revision.
- Two DB15 connectors are present — if you’re only playing single stick games (i.e. not Robotron, Space Dungeon, etc) then you only need to populate the primary connector.
- You’ll need some 15-pin extension cables to connect the adapter to the 5200. “Game” extension cables ought to work, but general-purpose DB15 extension connectors may run into issues fitting into the connector on front of the 5200 console. Atari just didn’t leave much room around the connector housings.
I’ve made a few incremental improvements over time, Revision 0.7 is the current board design.
- Rev o.1
- Original Release
- Rev 0.3
- Remove reset switch and R1
- Added level shifter resistors (symbol name R1 reused)
- Removed resistor network RN1
- Removed KPD jumper
- Added LED
- Rev 0.7
- Added PS2 connector footprint.
Below is a component placement diagram of the Rev 0.7 board:
Bill of materials
|C1,C2,C5,C6||0.22uF||4||Monolithic Ceramic Capacitor||Digikey, 490-7533-1-ND|
|C3,C4,C7,C8||0.1uF||4||Monolithic Ceramic Capacitor||Digikey, 399-4264-ND (possible substitute 490-9145-3-ND)|
|C9||0.47uF||1||Monolithic Ceramic Capacitor||Digikey, 399-14039-1-ND|
|C10||33uF||1||Electrolytic Capacitor||Digikey, 493-14729-1-ND|
|IC2,IC3||MCP42100||2||Digital Potentiometer||Digikey, MCP42100-I/P-ND|
|JP2||JP2E||1||2-pin header||Digikey, S1012EC-40-ND (buy one, cut to size)|
|R1||Original Board – 10K, Rev 0.7 board – 330 ohm||1||resistor|
|RN1||0||DO NOT POPULATE||Digikey, 4605X-101-104LF-ND|
|SV1||MA09-1||1||9-pin header, RA||Digikey, S1111EC-40-ND (buy one, cut to size)|
|SV2||MA03-2||1||3-pin header, vertical||(cut from same strip as JP2)|
|U$7-U$18||12||Tactile switch, white (qty 12)||Digikey, 450-1649-ND|
|U$19-U$21||3||Tactile switch, red (qty 3)||Digikey, 450-1804-ND|
|U$25||1||Tactile switch, black (Optional)|
|VR1||LM3940-3.3||1||3.3V regulator||Digikey, LM3940IT-3.3/NOPB-ND|
|X1,X2||F-5200-CON||2||Female DB15||Digikey, AE10929-ND|
|9||female dupont-style pins||Digikey, 952-2157-1-ND|
|1||9-pin dupont-style housing||Digikey, 952-3122-ND|
You will also need:
- Programmer for programming the microcontroller, such as a TL866 or USBASP. See ebay.
- PS2 extension cable, cut off the end
HI there. I dusted off my atari 5200 after I bought like 25 games from craigslist for a great deal.
I saw this article.
I want to have a much better experience for the controllers. I see your project here. Its amazing. I am not yet skilled enough to do all this type of work to make one of these.
Is there any chance I could pay you to make me two of these? I could pay you like $100 for each one (not counting the cost of the parts).
It would so awesome to use a PS2 controller on my atari 5200, so I thought I would run this past you.
Thanks for all this great information!
I’d also be interested if anyone is building these ready to go.
Do you still have the PCB boards available for the 5200 to PS2 adapter? Thanks!
Do you have any of the PCB’s still available?
Yes, just placed some online at https://www.ebay.com/itm/174382303961
One headache after another trying to get this programmed with my USBasp. Can you please verify what fuse settings I should or should not use in the AVRDudess program? Thank you.
After further inspection, you sold me a board with multiple broken traces. After I spent over a month trying to track down the issue with why the ATTiny861 chip would not program, it boils down to this. Wow.
Hello. I made two of these adaptors about a year ago. My friend just discovered that none of the number pad buttons register as inputs on any games played with it. I tried my adaptor, and sure enough, none of the number pad buttons registers any inputs on any games tried with it. The start, pause, and reset buttons do work perfectly. Would you have any advice as to why this is the case? Thanks.