Introduction: Arduino UNO + Sega Joystick = Nostalgia!
Recently, while cleaning the house I found under the bed an old game console [Sega Mega Drive]. Looking at her, I knew at once why it was there: its main board had burned impossible to play with anymore. However, the desire to remember my childhood did not disappear, I decided to revive the console by connecting its joystick to a PC and play some retro game from the 90's!
However, towards the implementation of the plans there was an unexpected problem: for the connection of the joystick with the computer you need an intermediary, but among the candidates for such intermediary I have got only one available: [Arduino UNO], which is not by default designed for this task. However, everything should be in order.
Step 1: Hardware
In order to connect the Sega joystick to Arduino UNO, we need:
- Male plug DB-9 (COM-Port).
- Some wires.
As result I got the following connection:
- COM 1 = A3.
- COM 2 = A2.
- COM 3 = A1.
- COM 4 = A0.
- COM 5 = VCC (5V).
- COM 6 = 13.
- COM 7 = 11.
- COM 8 = GND.
- COM 9 = 12.
After the connection is complete, you will need to download the scketch to Arduino (sketch can be found in archive [full_pack.zip])
Step 2: FreePIE Configuration
Now we need to configure the computer. First we install the [FreePIE] program, through which we will provide the interaction between Arduino and PC. However, there is one feature: in order to get FreePIE to work normally with Arduino UNO you need to make one patch: unpack the archive serial.zip (it can be found in the archive [full_pack.zip] or "extracted" from the [original] repository) in the folder pylib (see screanshoot).
In order to simplify I wrote some scripts for FreePIE that provide emulation of mouse and keyboard. The only thing you may have to change is the name of the COM port, you can see in computer properties (see screanshoot). To run the script, press F5.
Step 3: Lets Play!
We have in our hands the joystick from the legendary Sega! As a test I certainly couldn't pick normal games, I chose a modern implementation of retro games:
- Sonic GDK: Green Hill Paradise ACT2.
- Drift Stage (pre-alpha).
In order to play these games, I wrote two separate scripts for FreePIE: "sega_key_sonic.py" and "sega_key_drift.py". You can find some other scripts in my [repository].
Well, less words and more game!
If you like this instruction, I'll make a series of instructions on this topic! See you soon!