1
0
mirror of https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter synced 2024-11-24 10:02:18 -05:00

Merge pull request #17 from coliss86/playstation

Enhance the documentation
This commit is contained in:
Jarno Lehtinen 2024-06-15 21:08:52 +03:00 committed by GitHub
commit b27f6d2f18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 118 additions and 129 deletions

View File

@ -1,5 +0,0 @@
## Hardware_Atari-SMS-Genesis.jpg
Two 9-pin D-sub connectors taken from Commodore 64 and pins 1,2,3,4 and 5 soldered directly to Arduino. Other pins connected with short piece of wire.
## Sony_Playstation_Multitap.jpg
Sony Playstation Multitap

186
README.md
View File

@ -1,4 +1,5 @@
# Arduino-USB-HID-RetroJoystickAdapter
# 🕹️ Arduino-USB-HID-RetroJoystickAdapter 🕹️
## What is this?
Very cheap and quite easy way to connect many non-USB joysticks and gamepads or DIY arcade cabinet controller to almost any machine with USB-port and HID-support. Arduino board with ATmega32u4 chip with help of Joystick-library does all the USB-work.
Tested with Windows and Linux desktop computers and ARM based computers like Raspberry Pi and Orange Pi.
@ -7,24 +8,25 @@ ATmega32u4 can be easily changed to act as keyboard and/or mouse too. With keybo
### Supported controllers
- Atari-joysticks (supports controllers with 2-fire buttons) (RetroJoystickAdapter_Atari.ino) ²
- [Sega Genesis / Megadrive controllers (3 and 6-button versions) (RetroJoystickAdapter_Megadrive.ino) ²](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/megadrive)
- Sony Playstation with Analog and Multitap 4 controllers support (RetroJoystickAdapter_Playstation.ino)
- Nintendo 64 controller (RetroJoystickAdapter_N64.ino) (3.3V!) \*
- Wii Nunchuck and Classic Controller (and maybe Pro, not tested) (RetroJoystickAdapter_WiiExtension.ino) (3.3V!)
- [X-Arcade (X-Arcade/x-arcade.ino) ²](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/X-Arcade)
- [AT and PS/2 Keyboard to 4 joysticks \(Keyboard_PS2/RetroJoystickAdapter_PS2-keyboard.ino\)](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/Keyboard_PS2)
- [Soarer's programmable AT and PS/2 adapter \(works with X-arcade too\) \(PS2_Soarer_Converter/\)](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/PS2_Soarer_Converter)
- Nintendo Entertainment System controllers (NES) (RetroJoystickAdapter.ino) \* ²
- Super Nintendo controllers (SNES) (RetroJoystickAdapter.ino) \* ²
- [Simple one joystick two button Atari-joystick adapter made with Atmel Studio \(should be very compatible\) \(C64_joystick_atmelstudio/\)](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/C64_joystick_atmelstudio)
- [C64 keyboard adapter for BMC64 made with Soarer's keyboard controller firmware \(C64_keyboard/\)](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/C64_keyboard)
- (old, don't use: Atari-joysticks (supports Sega Master System controller with 2-fire buttons) (ATARI) \* ²)
- (old, don't use: Sony Playstation 1/2 controllers (doesn't support Dualshock or analog features) (PSX) \* ²)
- Atari-joysticks (supports controllers with 2-fire buttons) ²: [RetroJoystickAdapter_Atari.ino](RetroJoystickAdapter_Atari.ino), [hardware](atari)
- Sega Genesis / Megadrive controllers (3 and 6-button versions) ²: [RetroJoystickAdapter_Megadrive.ino](RetroJoystickAdapter_Megadrive.ino), [hardware](megadrive)
- Sony Playstation with Analog and Multitap 4 controllers support: [RetroJoystickAdapter_Playstation.ino](RetroJoystickAdapter_Playstation.ino), [hardware](playstation)
- Nintendo 64 controller ¹ (⚠️ 3.3V!): [RetroJoystickAdapter_N64.ino](RetroJoystickAdapter_N64.ino), [hardware](nes)
- Wii Nunchuck and Classic Controller (and maybe Pro, not tested) (⚠️ 3.3V!): [RetroJoystickAdapter_WiiExtension.ino](RetroJoystickAdapter_WiiExtension.ino)
- X-Arcade ²: [hardware](X-Arcade/README.md)
- AT and PS/2 Keyboard to 4 joysticks: [hardware](Keyboard_PS2)
- Soarer's programmable AT and PS/2 adapter (works with X-arcade too): [hardware](PS2_Soarer_Converter)
- Nintendo Entertainment System controllers (NES) ¹ ²: [RetroJoystickAdapter.ino](RetroJoystickAdapter.ino)
- Super Nintendo controllers (SNES) ¹ ²: [RetroJoystickAdapter.ino](RetroJoystickAdapter.ino)
- Simple one joystick two button Atari-joystick adapter made with Atmel Studio (should be very compatible): [hardware](C64_joystick_atmelstudio)
- C64 keyboard adapter for BMC64 made with Soarer's keyboard controller firmware: [hardware](C64_keyboard)
- (old, don't use: Atari-joysticks (supports Sega Master System controller with 2-fire buttons) (ATARI) ¹ ²)
- (old, don't use: Sony Playstation 1/2 controllers (doesn't support Dualshock or analog features) (PSX) ¹ ²)
¹ = needs Joystick-library
² = 2 controllers supported
\* = needs Joystick-library
If you use Linux and want to get more than 1 controller with one Arduino, check "Linux and more than one controller with one Arduino"-topic in this same page.
@ -43,11 +45,6 @@ If you use Linux and want to get more than 1 controller with one Arduino, check
#### Arduino board
Starting point is ATmega32u4 based Arduino board. There is two versions of ATmega32u4, IO-logic with 5V or 3.3V. Many controllers (like basic Atari-controller) doesn't include any logic, so 5V and 3.3V versions are fine. Most of controllers with some logic needs 5V (NES, SNES, Genesis) and some rare ones needs 3.3V (N64/Gamecube) (5V is 16MHz and 3.3V 8MHz, so timings are different and 16MHz code doesn't work for N64/Gamecube with 3.3V version). Make sure that Arduino includes USB-port. There are some versions which doesn't include USB-port and then you have to add USB-connector for it. Arduino Leonardo includes ATmega32u4, but cheapest and smallest ones are named Pro Micro. Arduino Pro Micro and ATmega32u4 are good words to use when searching from Ebay etc. Cheapest starts from about $4.
Example of Arduino Pro Micro:
![Arduino Pro Micro](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/raw/master/Images/Arduino_ProMicro.jpg)
#### Computer with Arduino IDE
Arduino IDE works with Windows, OS X and Linux and ARM (beta). If you use small card computer like Rasperry Pi or Orange Pi, you can program adapter even with them (tested with Orange Pi PC and RetrOrangePi 2.0). That way you don't even have to unplug adapter from your emulator/game-platform if you want reprogram adapter.
@ -57,19 +54,14 @@ https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-1.0 (note tha
#### Joystick(s) or gamepad(s) and way to connect them to Arduino
Some joystick/gamepads uses their own connectors and original connectors can be very pricey. Sometimes you can find extension cord cheaper than plain connector and you can take cable and plug from that.
You can use any IO-pins, but try to avoid pins 0 and 1. They are serial port TX and RX pins and even though they are not used right now, they are handy for debugging and other uses.
Example in [Hardware](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/Hardware) folder.
Example of NES-controller wiring:
![NES wiring](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/raw/master/Hardware/nes.png)
### Setup
### ⚙️ Setup
- Download and install Arduino IDE: https://www.arduino.cc/en/Main/Software
- `Tools->Board->Arduino Leonardo`
In Arduino IDE you have to select board. In my case some reason "Arduino Leonardo" selections works better than "Arduino/Genuino Micro". With Leonardo-setting RX and TX leds are normally off and blinks when data is transfered to/from USB. With Micro-setting LED's are normally on and they blinks to off when data is transferring. Connect now your board ATmega32u4 through USB, the RX and TX leds should blink (if not, try another USB port).
In Arduino IDE you have to select board. In my case some reason "Arduino Leonardo" selections works better than "Arduino/Genuino Micro". With Leonardo-setting RX and TX leds are normally off and blinks when data is transferred to/from USB. With Micro-setting LED's are normally on and they blinks to off when data is transferring. Connect now your board ATmega32u4 through USB, the RX and TX leds should blink (if not, try another USB port).
- `Tools->Port->COMx`
@ -82,13 +74,14 @@ Example of NES-controller wiring:
- Install joystick library (needed only with some controllers - check list at top of this page)
Go to https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-1.0 and press `Clone or download -> Download ZIP`.
Extract Joystick2 folder from zip to `%HOMEPATH%\Documents\Arduino\libraries` (Windows) or `~/Arduino/libraries` (Linux).
After extraction check that you have files `%HOMEPATH%\Documents\Arduino\libraries\Joystick2\Joystick2.h and Joystick2.cpp` or `~/Arduino/libraries/Joystick2/Joystick2.h and Joystick2.cpp`.
Close and start Arduino IDE again so it searches and finds library.
Extract `Joystick2` folder from zip to `%HOMEPATH%\Documents\Arduino\libraries` (Windows), `~/Arduino/libraries` (Linux) or `~/Library/Arduino15/libraries` (MacOS).
After extraction check that you have files `%HOMEPATH%\Documents\Arduino\libraries\Joystick2\Joystick2.h and Joystick2.cpp`, `~/Arduino/libraries/Joystick2/Joystick2.h and Joystick2.cpp` or `~/Library/Arduino15/libraries/Joystick2/Joystick2.h and Joystick2.cpp`.
Playstation analog controller `RetroJoystickAdapter_PlaystationAnalog.ino` needs `Joystick\Joystick.h` and `Joystick\Joystick.cpp`.
- Close and start Arduino IDE again so it searches and finds library.
- Load `RetroJoystickAdapter.ino` to Arduino IDE (check right filename from list at top of this page)
Select controller by commenting and uncommenting and edit pin-numbers (if needed).
@ -97,22 +90,24 @@ Example of NES-controller wiring:
- If you got the message "all done" and no errors, your done here.
### Time to Enjoy
### 🎉 Time to Enjoy
You can test the joystick with this website : https://hardwaretester.com/gamepad. It works with any modern browser.
#### MS Windows
- You should go now to `Control Panel -> All Control Panel Items > Devices and Printers (some Windows versions in Game Controllers)` and try to find `Arduino Leonardo` device. Right click on `Gamepad controller definitions` > double click in one of the options (1st is the controller one, and the 2nd is the controller two) and you can now test the buttons.
You should go now to `Control Panel -> All Control Panel Items > Devices and Printers (some Windows versions in Game Controllers)` and try to find `Arduino Leonardo` device. Right click on `Gamepad controller definitions` > double click in one of the options (1st is the controller one, and the 2nd is the controller two) and you can now test the buttons.
##### Notice With Windows!
##### ⚠️ Notice With Windows!
If you move adapter to other Windows machine, you may have to install the arduino drivers. To have the last updated ones, just download the file `Windows ZIP file for non admin install` from the page https://www.arduino.cc/en/Main/Software. After the download, unzip the folder. Go to the `Computer` > right click > `Manage > Device Manager > Unknown devices` > right click > `Update Driver Software > Browse my computer for software > Browse...` > and try to find the folder `\arduino-1.6.xx\drivers` inside the folder you unziped before. Click `Next` and Windows should install the driver. Arduino would apper as the name `Arduino Leonardo` inside `Ports (COM and LPT)` with an associated COM port (like `COM9` for example).
#### Linux
- Just connect, open your command line and test whit `jstest /dev/input/js0`.
Just connect, open your command line and test whit `jstest /dev/input/js0`.
##### Notice With Linux!
##### ⚠️ Notice With Linux!
Linux usbhid-module doesn't support out of box multiple controllers with one USB without USB-hub-features.
You have to give parameter
`quirks=0x2341:0x8036:0x40` (first numbers are VID and PID of Arduino) to usbhid-module.
You have to give parameter
`quirks=0x2341:0x8036:0x40` (first numbers are VID and PID of Arduino) to usbhid-module.
Here is example how to do it with RetrOrangePi 2.5.2:
- Make backup of `/boot/boot-retro.cmd` and `/boot/boot.scr`
@ -145,11 +140,11 @@ There is simple tutorial in [Tutorial](https://github.com/mcgurk/Arduino-USB-HID
### Changing VID/PID so Windows and Linux works without drivers or quirks
Linux problem with multiple controllers are solved with changing VID and PID to something that already has HID_QUIRK_MULTI_INPUT (0x40) activated in kernel.
Linux problem with multiple controllers are solved with changing VID and PID to something that already has `HID_QUIRK_MULTI_INPUT (0x40)` activated in kernel.
Here you can see what quirks are activated to different VID/PIDs:
https://github.com/torvalds/linux/blob/master/drivers/hid/usbhid/hid-quirks.c
In these instructions, USB_VENDOR_ID_MOJO 0x8282, USB_DEVICE_ID_RETRO_ADAPTER 0x3201 are used.
In these instructions, `USB_VENDOR_ID_MOJO=0x8282`, `USB_DEVICE_ID_RETRO_ADAPTER=0x3201` are used.
Edit `C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt` (update 26.7.2022: `C:\Users\[USER]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5`) or in linux `arduino-x.x.xx/hardware/arduino/avr/boards.txt` (close Arduino IDE before editing):
```
@ -160,14 +155,15 @@ leonardo.build.pid=0x3201
# leonardo.build.usb_product="Arduino Leonardo"
leonardo.build.usb_product="Retro Joystick Adapter"
```
#### WARNING!
There is possibility that serial port is not recognized after VID/PID change. We have tested with two Windows 10 machine and Linux with no problems. If you "brick" your Arduino, you get it back to life with resetting it rapidly two times in a row (grab a wire and make a shunt with RST->GND, they are located between A3, VCC and RAW) and then upload sketch (example blink.ino) with <b>normal Arduino VID/PID</b>. Be quick, because <b>you have only 8 seconds</b> to start uploading (try to hit `Send` button before make the reset).
> [!WARNING]
> There is possibility that serial port is not recognized after VID/PID change. We have tested with two Windows 10 machine and Linux with no problems. If you "brick" your Arduino, you get it back to life with resetting it rapidly two times in a row (grab a wire and make a shunt with RST->GND, they are located between A3, VCC and RAW) and then upload sketch (example blink.ino) with <b>normal Arduino VID/PID</b>. Be quick, because <b>you have only 8 seconds</b> to start uploading (try to hit `Send` button before make the reset).
### Changing number of buttons in joystick-library
If you want that less than 16 buttons are shown in joystick-settings, edit Joystick.cpp/Joystick2.cpp/Joystick3.cpp "USAGE_MAXIMUM"-line (0x10 = 16). You may to have create new project after that, because all libraries are not recompiled every time and we don't know how to force full recompile.
If you want that less than 16 buttons are shown in joystick-settings, edit `Joystick.cpp/Joystick2.cpp/Joystick3.cpp` "USAGE_MAXIMUM"-line (0x10 = 16). You may to have create new project after that, because all libraries are not recompiled every time and we don't know how to force full recompile.
### Menu for multiple adapter names
Adapter shows as "Arduino Leonardo", but if you want it to show some other name, edit `C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt` (update 26.7.2022: `C:\Users\[USER]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5`). You can even add sub menu to tools-menu by adding these lines (after editing boards.txt, you have to close and reopen Arduino IDE):
Adapter shows as "Arduino Leonardo", but if you want it to show some other name, edit `C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt` (update 26.7.2022: `C:\Users\[USER]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5`). You can even add sub menu to tools-menu by adding these lines (after editing `boards.txt`, you have to close and reopen Arduino IDE):
```
menu.usb_name=USB Product Name
@ -186,9 +182,9 @@ leonardo.menu.usb_name.leonardo_4.build.usb_product="SNES-adapter"
### New board to Arduino IDE
If you add new board to Arduino IDE, it survives from Arduino IDE updates. Copy `boards.txt` to `{sketchbook folder}\hardware\retroadapter\avr\`.
Restart Arduino IDE and select Tools -> Board -> Arduino Pro Micro Retroadapter.
Restart Arduino IDE and select `Tools -> Board -> Arduino Pro Micro Retroadapter`.
It changes VID to 0x8282 and PID to 0x3201 (Keio Retro Adapter).
It changes `VID` to `0x8282` and `PID` to `0x3201`: `Arduino Retroadapter`
### Arduino Uno R3
Arduino UNO R3 includes ATmega16u2 (along with ATmega328p) and it can be used too, but it needs some extra work (code doesn't work without modifications with UNO):
@ -225,73 +221,37 @@ Wii extensions are 3.3V, but I have used Wii Nunchuck and Classic Controller wit
### Konami code
You can also enable or disable Konami-code-shortcut with some controllers. For now it works only with Genesis 6-button controller (X+Y+Z+UP (or DOWN)), SNES-controller (X+Y+R1+UP (or DOWN)) and PSX-controller (rectangle+circle+triangle+UP (or DOWN)). "UP"-version is normal and "DOWN"-version swaps A and B. Some games demands that not other buttons are pressed before code and that's why only last pressed button can be button which have some function in emulator.
https://en.wikipedia.org/wiki/Konami_Code
https://en.wikipedia.org/wiki/List_of_Konami_code_games
* https://en.wikipedia.org/wiki/Konami_Code
* https://en.wikipedia.org/wiki/List_of_Konami_code_games
### Other ideas
Of course Arduino can be used many other ways. Add a PIR motion detector module from Ebay (under $2) and your computer wakes up from sleep when you walk to room. Just read PIR-sensor data pin and if it is 1, send some keyboard button (which normally does nothing) to computer so it wakes up. Or make info-board to your kitchen or hallway wall from old Android tablet and it turns on backlight only when someone goes to kitchen.
## Links
## 🔗 Links
#### Arduino
http://playground.arduino.cc/Main/InterfacingWithHardware
#### NES
http://www.mit.edu/~tarvizo/nes-controller.html
#### SNES
http://wiki.superfamicom.org/snes/show/Schematics,+Ports,+and+Pinouts
https://github.com/burks10/Arduino-SNES-Controller
#### Sega Megadrive / Genesis
https://www.cs.cmu.edu/~chuck/infopg/segasix.txt
https://jonthysell.com/2014/07/26/reading-sega-genesis-controllers-with-arduino/
#### Playstation
http://www.gamesx.com/controldata/psxcont/psxcont.htm
http://playground.arduino.cc/Main/PSXLibrary
http://problemkaputt.de/psx-spx.htm#controllersandmemorycards
#### Playstation Dualshock:
https://gist.github.com/scanlime/5042071
#### Nintendo 64 / Gamecube:
https://github.com/NicoHood/Nintendo
https://github.com/brownan/Gamecube-N64-Controller
#### Wii Classic Controller:
https://github.com/robotgeek/WiiClassy
http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Classic_Controller
#### Gamecube / N64
http://www.int03.co.uk/crema/hardware/gamecube/gc-control.htm
https://github.com/NicoHood/Nintendo/wiki/Gamecube
#### PC Engine/Turbografx
(I don't have this controller, so it is not implemented, but it should be implemented very easily)
https://emu-docs.org/PC%20Engine/tg16cont.html
#### MSX
https://www.msx.org/wiki/Joystick_control
#### How to reset Arduino (in case of emergency)
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq#ts-revive
#### C64 Mini
https://www.tsb.space/projects/c64-mini-arcade2usb-converter
* Arduino: http://playground.arduino.cc/Main/InterfacingWithHardware
* NES: http://www.mit.edu/~tarvizo/nes-controller.html
* SNES:
* http://wiki.superfamicom.org/snes/show/Schematics,+Ports,+and+Pinouts
* https://github.com/burks10/Arduino-SNES-Controller
* Sega Megadrive / Genesis:
* https://www.cs.cmu.edu/~chuck/infopg/segasix.txt
* https://jonthysell.com/2014/07/26/reading-sega-genesis-controllers-with-arduino/
* Playstation:
* http://www.gamesx.com/controldata/psxcont/psxcont.htm
* http://playground.arduino.cc/Main/PSXLibrary
* http://problemkaputt.de/psx-spx.htm#controllersandmemorycards
* Playstation Dualshock: https://gist.github.com/scanlime/5042071
* Nintendo 64 / Gamecube:
* https://github.com/NicoHood/Nintendo
* https://github.com/brownan/Gamecube-N64-Controller
* Wii Classic Controller:
* https://github.com/robotgeek/WiiClassy
* http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Classic_Controller
* Gamecube / N64:
* http://www.int03.co.uk/crema/hardware/gamecube/gc-control.htm
* https://github.com/NicoHood/Nintendo/wiki/Gamecube
* PC Engine/Turbografx (I don't have this controller, so it is not implemented, but it should be implemented very easily): https://emu-docs.org/PC%20Engine/tg16cont.html
* MSX: https://www.msx.org/wiki/Joystick_control
* How to reset Arduino (in case of emergency): https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq#ts-revive
* C64 Mini: https://www.tsb.space/projects/c64-mini-arcade2usb-converter

View File

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 142 KiB

6
atari/README.md Normal file
View File

@ -0,0 +1,6 @@
# Atari
## What do I need?
- You will need one [Atmega32u4](https://pt.aliexpress.com/item/New-Pro-Micro-ATmega32U4-5V-16MHz-Module-with-2-row-pin-header-For-Leonardo-best-quality/32273120508.html?spm=2114.13010608.0.0.Uv843y&detailNewVersion=&categoryId=400103) (e.g. Arduino Leonardo).
![atari-adapter](Hardware_Atari-SMS-Genesis.jpg)

View File

@ -4,26 +4,24 @@
- You will need one [Atmega32u4](https://pt.aliexpress.com/item/New-Pro-Micro-ATmega32U4-5V-16MHz-Module-with-2-row-pin-header-For-Leonardo-best-quality/32273120508.html?spm=2114.13010608.0.0.Uv843y&detailNewVersion=&categoryId=400103) (e.g. Arduino Leonardo).
- [Two DB9 ports](https://pt.aliexpress.com/item/Type-DR9-90-degrees-bend-DR9-male-head-needle-serial-port-and-seat-DB9-RS232-9/32706812789.html?spm=2114.13010608.0.0.1YtDRt), better if you find a 90º version.
- Original Mega Drive Controller
- Follow step by step the how-to [`Long version`](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter)
- Use the file [RetroJoystickAdapter_Megadrive.ino](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/RetroJoystickAdapter_Megadrive.ino), comment the fist set of pins, and uncomment the second that says `// if you use two DB9 connectors solded back to back on your ATmega32u4, you should use this inputs`.
- Follow step by step the how-to [`Long version`](https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter#long-version)
- Use the file [RetroJoystickAdapter_Megadrive.ino](../RetroJoystickAdapter_Megadrive.ino), comment the fist set of pins, and uncomment the second that says `// if you use two DB9 connectors solded back to back on your ATmega32u4, you should use this inputs`.
## Schematics and pinout
You sholud print this schema to guide you during the soldering process.
![megadrive-adapter](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/megadrive/pinout.jpg)
You should print this schema to guide you during the soldering process.
![megadrive-adapter](pinout.jpg)
## Final product
Here are Adriano's examples of his assembly.
![solded-adapter](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/megadrive/atmega_solded.jpg)
![solded-back-adapter](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/megadrive/atmega_solded_back.jpg)
![testing-adapter](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/megadrive/atmega_testing.jpg)
![solded-adapter](atmega_solded.jpg)
![solded-back-adapter](atmega_solded_back.jpg)
![testing-adapter](atmega_testing.jpg)
Here are the Jarno's examples of his assembly.
![Hardware_Atari-SMS-Genesis](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/Hardware/Hardware_Atari-SMS-Genesis.jpg)
![sega_genesis_adapter](https://raw.githubusercontent.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/master/Images/sega_genesis_adapter.jpg)
![Hardware_Atari-SMS-Genesis](../atari/Hardware_Atari-SMS-Genesis.jpg)
![sega_genesis_adapter](../Images/sega_genesis_adapter.jpg)

3
nes/README.md Normal file
View File

@ -0,0 +1,3 @@
## Nes
![nes-adapter](nes.png)

View File

Before

Width:  |  Height:  |  Size: 295 KiB

After

Width:  |  Height:  |  Size: 295 KiB

27
playstation/README.md Normal file
View File

@ -0,0 +1,27 @@
## Sony Playstation
## What do I need?
- You will need one [Atmega32u4](https://pt.aliexpress.com/item/New-Pro-Micro-ATmega32U4-5V-16MHz-Module-with-2-row-pin-header-For-Leonardo-best-quality/32273120508.html?spm=2114.13010608.0.0.Uv843y&detailNewVersion=&categoryId=400103) (e.g. Arduino Leonardo).
![playstation-adapter](Sony_Playstation_Multitap.jpg)
## Wiring the Controller
As the following picture from the [amazing CuriousInventor PS2 Interface Guide](https://store.curiousinventor.com/guides/PS2) shows, PlayStation controllers use 9 pins:
![PS2 Controller Pinout](https://store.curiousinventor.com/wp-content/uploads/2019/09/wiring.jpg)
| Pin # | Signal | Direction | Notes |
|-------|-------------|---------------------------|----------------|
| 1 | Data | Controller -> PlayStation | Open Collector |
| 2 | Command | PlayStation -> Controller | |
| 3 | Motor Power | | 7.5V |
| 4 | Ground | | |
| 5 | Power | | 3.6V |
| 6 | Attention | PlayStation -> Controller | |
| 7 | Clock | PlayStation -> Controller | |
| 8 | (Unknown) | | |
| 9 | Acknowledge | Controller -> PlayStation | Open Collector |
**You are advised not to rely on wire colors, but rather on pin positions**. The wires in the image come from an official Sony controller, I expect their colors to be fairly consistent among all Sony controllers, but you shouldn't really trust them.
-- documentation taken from https://github.com/SukkoPera/PsxNewLib

View File

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 254 KiB