arcadetips
SEGA Saturn controller to USB with minimal lag
Table of ContentsI'll use an original Sega Saturn gamepad (model HSS-0101) in a Mister FPGA setup using Daemonbite code.
What you need
- Arduino Pro Micro ATMega32u4 5V 16MHz
- USB ASP Programmer
- SEGA Saturn original gamepad
- Micro USB to USB male-male
- 22 AWG copper cable
- Solder tool and solder wire
- Female connector for the Saturn gamepad
Instead of Micro USB there are Mini USB versions for the Arduino Pro Micro. Although a bit pricier, the connector is way more reliable.
How to compile
- Download SaturnControllerUSB
-
Open the
.ino
file from Arduino IDE -
Select the board
Arduino Leonardo
-
Compile and export to bin and save it as
.hex
I've done this process so you can just skip the compilation and use the file SaturnControllerUSB.ino.with_bootloader.leonardo.hex
How to program
Programming the Arduino Pro Micro from the Arduino IDE turned into a failure, so I programmed the microcontroller using a cheap USBAsp programmer via ICSP. Just connect the pins RST
, CLK
, MOSI
, MISO
, +5V
and GND
and run avrdude this way:
# avrdude -c usbasp -p m32u4 -U flash:w:SaturnControllerUSB.ino.with_bootloader.leonardo.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "SaturnControllerUSB.ino.with_bootloader.leonardo.hex"
avrdude: input file SaturnControllerUSB.ino.with_bootloader.leonardo.hex auto detected as Intel Hex
avrdude: writing flash (32730 bytes):
Writing | ################################################## | 100% 1.65s
avrdude: 32730 bytes of flash written
avrdude: verifying flash memory against SaturnControllerUSB.ino.with_bootloader.leonardo.hex:
avrdude: load data flash data from input file SaturnControllerUSB.ino.with_bootloader.leonardo.hex:
avrdude: input file SaturnControllerUSB.ino.with_bootloader.leonardo.hex auto detected as Intel Hex
avrdude: input file SaturnControllerUSB.ino.with_bootloader.leonardo.hex contains 32730 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.44s
avrdude: verifying ...
avrdude: 32730 bytes of flash verified
avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude done. Thank you.
Wiring & Pinout
Don't forget to solder J1 in the Arduino Pro Micro in order to bypass the built-in voltage regulator to make it work at 5V.
This is the pinout for the controllers. You will need one Arduino Pro Micro for each controller.
Hembra Saturn (P1) | Arduino Pro Micro |
---|---|
1 | VCC |
2 | 2 |
3 | 3 |
4 | 15 |
5 | 14 |
6 | 4 |
7 | TXO |
8 | RXI |
9 | GND |
Hembra Saturn (P2) | Arduino Pro Micro |
---|---|
1 | VCC |
2 | A2 |
3 | A3 |
4 | 15 |
5 | 14 |
6 | 6 |
7 | A0 |
8 | A1 |
9 | GND |
How to configure
If all this has been done correctly the Arduino can be connected to the Mister FPGA and it will detect each button press. Just follow the Joystick Remapping Documentation. Basically:
- Connect a keyboard and the gamepad to the Mister
-
Press
Esc
and select Define joystick buttons -
Press
Space
forDPAD
andTilt
- Press direction buttons and face buttons on the gamepad
-
Press
Space
for the mouse options -
For
Menu
press a combination of two buttons likeL
+R
-
Once you see Press: Menu: OK press
Enter
Enable fast polling
Just press B button just after powering on the Mister and a menu with the option Scripts will appear. Then select and run fast_USB_polling_on
. If the gamepad you are using is not working it means it doesn't support 1000Hz mode and you need to switch back running fast_USB_polling_off
.