building a playstation controller protocol emulator

Started by dimensionxor, September 25, 2009, 08:19:43 AM

Previous topic - Next topic

dimensionxor

This is an an AVR (ATmega324p) microcontroller based project which emulates the data protocol of a dual analog playstation controller, and can translate input from other devices so they can also be used as controllers for a ps1 or ps2. Any acquired control data can be rearranged in software before being sent to the master device, allowing many possibilities for customising and improving control schemes.

AVR playstation controller protocol emulator (prototype) This video demonstrates the device being used with a few different games, systems, and controllers.

The prototype board currently has connections for a Wii "nunchuck", a sega saturn controller, two NES controllers, a standard playstation controller, and serial input/output. A 20x2 character LCD displays the current configuration mode, red/green LEDs are used to show communication status with the host device and a blue LED flashes when the host sends a command to actuate the controllers vibration motors. The device works directly with the playstation and playstation2, as well as xbox or pc with a proper adapter like the one shown in the video.

The current source code for the project is linked below and will be updated as new features are added, schematics can also be drawn up if anyone is interested. Ultimately I intend to etch a PCB for the project at which point I will post the board art as well. If anyone has worked or is working on something similar it would be great to hear suggestions and share ideas. Many thanks to everyone who has taken the time to research and post all the controller protocol info at GameSX, without it projects like this would not be possible.

dsc.c        // main program file
other.h     // functions and macros
def.h         // pin and bit defines


This is the prototype in its current state ("DSC Emu" stands for dual shock controller emulator).

At this point the AVR is able to emulate the the full protocol of the classic gray dual analog playstation controller. This controller has 16 digital buttons and two analog sticks with two axis each. It is able to work with all ps1 games, and nearly all ps2 games. When used with a proper adapter it will also work with any other console or pc as well. The project prototype board currently has connections for a ps1/ps2 controller (wired, wireless, analog, or digital), a sega saturn arcade stick, two NES controllers (for the NES advantage), and a nintendo wii "nunchuck". It also featurers a 20x2 character LCD and a few LEDs to show communication status and force feedback command activity. There are also two tact-switches on the board which cycle through configuration modes and toggle whether the AVR identifies itself as an analog or digital controller (functionally the same as the small "analog" button on playstation controllers located below the start and select buttons).

Waterbury


microworld

Very interesting project, I am an electronic student and I am learning micro controller programming, I would like to build this controller in order to learn about it, testing and programming real things !!! like games controller, if you can send me the hardware schematic, I will be very happy to start to build this controller protocol emulator, and start to play with parameters and settings in order to get knowledge about the different game protocols. Thank is advance !!!

dimensionxor

#3
Thanks for your interest Microworld. Hard to believe it's already been a year since I posted this. I put this project aside a while back while waiting on Linux support for the USB logic analyzer I was using for protocol decoding. Now that the Linux software is finally out, working on this will be much more convenient for me.