Finally! My gameport project is finished!
With this little circuit it is possible to emulate a ps/2 keyboard with your gamepad.
I designed the circuit for a game that could not be played with that gamepad. But it worked well with a keyboard - so this evil mad idea was born. ;)
I used my old repaired gravis gamepad (repair report) for that project. Other gamepads could be wired internal in a different way.
The circuit is designed for digital gamepads only - no analog sticks or joysticks are supported (yet)!
But such a functionality could be implemented too. Because i used an old ATMEGA8, there are a lot of free pins for further experiments and hacks.
The buttons are "hard wired" in the code to keys. I used the ALT, SPACE, ENTER and CNTRL keys for the buttons. A function to define new key bindings without hacking them into the code and reporogram the controller could be implemented - but i was to lazy to write it. ^.^
Another impressive project that shows how easy and yet powerfull a µC circuit can be.
THX to the KISS guidelines.
The circuit in the red box does all the magic.
Feel free to use or improve this circuit.
The code can be found here:
http://sites.google.com/site/species0x2118/hive
http://sites.google.com/site/species0x2118/hive/gamepad.c?attredirects=0&d=1 (direct link)
I changed the fuses to run the controller with 8 MHz to have enough speed reserves. But a lower frequency could work as well.
As a goody i made a video of the gameplay with the gamepad connected to the converter:
No comments:
Post a Comment