1
0
mirror of https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter synced 2025-02-20 04:51:46 -05:00

60 lines
1.0 KiB
Markdown
Raw Normal View History

2016-10-23 23:38:22 +03:00
## PS/2 keyboard as 4 USB-joysticks
2016-10-23 23:40:47 +03:00
![PS2-adapter](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/Images/ps2-keyboard-adapter.jpg)
2016-10-23 23:38:22 +03:00
Needs Atmega32u4 (e.g. Arduino Leonardo).
2016-10-24 10:35:35 +03:00
PS/2 is 5V.
2016-10-23 23:38:22 +03:00
Needs custom ps2-library (PS2Keyboard_mcgurk.zip, unzip to libraries-folder).
Clock-signal must be in pin 2 (because of interrupts).
2016-10-24 09:41:42 +03:00
Edit button assignments manually. Assignments are in the end of source file.
2016-10-23 23:43:02 +03:00
2016-10-24 09:35:17 +03:00
`#define DEBUG` if you want to see codes in console.
2016-10-24 09:44:42 +03:00
Joystick 0:
2016-10-23 23:43:24 +03:00
```
2016-10-23 23:43:02 +03:00
arrows = up/down/left/right
R-ctrl = a
alt gr = b
enter = start
R-shift = select
2016-10-23 23:43:24 +03:00
```
2016-10-23 23:43:02 +03:00
2016-10-24 09:44:42 +03:00
Joystick 1:
2016-10-23 23:43:24 +03:00
```
2016-10-23 23:43:02 +03:00
W/S/A/D = up/down/left/right
L-ctrl = a
L-alt = b
tab = start
L-shift = select
2016-10-23 23:43:24 +03:00
```
2016-10-23 23:43:02 +03:00
2016-10-24 09:44:42 +03:00
Joystick 2:
```
I/K/J/L = up/down/left/right
M = a
N = b
O = start
U = select
```
Joystick 3:
```
keypad 8/5/4/6 = up/down/left/right
keypad 0 = a
keypad , = b
keypad enter = start
keypad + = select
```
2016-10-23 23:38:22 +03:00
## Links
http://playground.arduino.cc/Main/PS2Keyboard
http://www.computer-engineering.org/ps2protocol/
http://www.computer-engineering.org/ps2keyboard/scancodes2.html