Joy2PS2 is a versatile interface designed to connect one or two gamepads from various retro platforms. This solution converts and redirects gamepad events into keyboard strokes to a PS/2 port. You'll find this type of port on old PCs and some modern ones, as well as on recent devices like the Next or the ZXUno, the latter being the platform for which it was initially designed. This interface is highly compatible and adaptable, including several keyboard maps in its firmware to facilitate interaction with different systems.
Note: As of release 2, Joy2PS2 is compatible with real PCs that use a PS/2 connection.
The original design of the logo and casing for Joy2PS2 version 2.3 was created by Jorge Mejias Cazorla.
Photos of the casing and PCB of Joy2PS2 version 2.3
Integrated version in an SNES controller designed by Antonio Villena
The gamepads compatible with the interface include: Atari, NeoGeo OldStyle, MSX, Amstrad CPC, VIC 20, Sega Master System, Sega Megadrive (3 or 6 buttons), Amiga, ZX Spectrum, and NES Famicom DB9. All of these can be directly connected to DB15 or DB9 sockets. However, some like the MSX, will require a special adapter to use the third button.
You can enter a special state called SHIFT at any time using any of the following combinations:
In SHIFT mode, it might seem like none of the buttons are working, but this is not the case. In this mode, actions are triggered by pressing button 1 on the gamepad as the final event. To exit SHIFT mode, you can press a SHIFT combination again or press button 2 on the gamepad.
Note: The combinations described are performed by pressing and releasing the buttons, not holding them down. Any change in direction resets the count of other actions:
Below are the sequences for rebooting the ZXUno through the SHIFT mode:
The following sequences enable navigating the game menu using SHIFT mode:
Use the following sequences in SHIFT mode to load games:
The following functions can be activated in SHIFT mode using the sequences described:
To toggle between DB15/DB9 and DB9x2 configurations, follow these steps while in SHIFT mode:
The selected configuration will persist even after a warm reboot of the ZXUno.
From release 3, the half-clock and clock times for sending Scancodes on the ZXUno, after a cold or warm reboot, comply with the standards of a real keyboard, being 16 and 32 microseconds respectively.
From release 5, the host command listening function on the ZXUno is disabled by default and after any reboot, whether cold or warm.
This mode allows direct interaction with the keyboard through the following commands:
To upgrade to the latest Official Firmware, you can use the AVR binary update software, XLoader.
For updates from the command line in OpenBSD or Linux, use avrdude with the appropriate parameters.
avrdude -p atmega168 -c arduino -P /dev/cuaU0 -v -b 19200 -U flash:w:joy2ps2.hex
The parameter /dev/cuaU0 may change to /dev/cuaU1, /dev/cuaU2, etc., depending on the connected serial devices.
The setup is similar, but the device might be /dev/ttyUSB0, /dev/ttyACM0, etc., depending on how it is identified in the system.
Lastly, we would like to thank everyone who, in one way or another, has contributed to making this project a reality::
Jorge Mejias Cazorla (Mejias3D)
Retro Adapter (broken link)
Does my 6-button Megadrive gamepad fully work or only some buttons as with the ZXUno's DB9 connector?
All buttons are recognized and will be mapped according to the configured key map. The Start and Mode buttons will also work for those Megadrive gamepads that include them.
Is it possible to play with 2 players? What happens if keys from the first player are pressed?
Yes, it is possible. Upon connection, the interface is configured to be used from the main DB9 port or DB15 (Neogeo). If the auxiliary DB9 port (second player) is used, keys associated with the last buttons of DB15 will be activated due to shared pins. To use two players, switch to DB9x2 mode using the corresponding sequence in SHIFT mode.
I selected a core with a different video mode than the one set by default in the BIOS from the core menu. How can I change it without a connected physical keyboard?
There is a sequence to change the video mode while in SHIFT mode. Refer to the SHIFT mode combination section in this wiki for details.
I found a game that I can't start because a mapping for a required key in the options menu is missing, what can I do?
The firmware includes the most common keys used in computer game menus, from '0' to '4' and 'R' to redefine. If other keys are needed, they can be requested to be included in a firmware update.
The key mappings do not meet the needs of a specific core or game, is there a solution?
The firmware can be almost completely adjusted to meet needs. Ideally, cores should follow a uniform standard regarding key use. The most common keys are selected by default, although it can be reviewed and adjusted if justified.
I disagree with the layout of SHIFT mode sequences, are there alternatives?
It's normal to have different preferences regarding the official firmware sequences. Users can debate and decide on the ideal combinations to develop an alternative firmware. Also, if you have programming skills, you can modify the firmware to your liking as the source codes are available to everyone.
When I connect an external keyboard, key presses repeat when using the gamepad.
This can happen because the external keyboard has active command listening, which can interfere with communication by sharing the CLK/DATA pins of the PS/2 connector. One solution is to place a diode on the DATA line with the cathode towards the external keyboard. For more information, visit this link:
http://www.zxuno.com/forum/viewtopic.php?f=63&t=1804
Although Joy2PS2 was designed to operate without the need for an external keyboard, especially in setups like bartop arcade machines, using a keyboard can enhance the user experience.