Wednesday, June 07, 2017

PS3 Six-Axis Controller with Qjoypad and Mageia6

If you spend a lot of time playing console games, you quickly become dexterous using those gamepads. While inferior in many respects to nimble mouse and keyboard work for some games, there is no doubt that it would be nice to use the game pad anyway.

I have been a mouse and keyboard PC game player ever since my Doom days way back in the 90s. Around 2007, I was introduced to the Sony PS3 and found it more convenient to play games on the console. Lately, I have been resurrecting all my old games which, of course, work well with a keyboard and mouse, but I have enjoyed using the controller. To me, the controller created a more immersive experience. Being able to do that, as always, takes several steps.

First I needed to have my Mageia6 OS receive information from the PS3 controller. By default, modern Linux use the evdev driver and will auto-magically detect the game controller. That can also be done with xboxdrv, but Mageia does not provide that. RedHat does provide an RPM file which will install without difficulty and you can also use alein to convert a .deb file.

Second, I need a way to map the gamepad-generated information to the appropriate mouse and keyboard keypresses to be what the game needed. I've seen where some newer games accommodate gamepads, but all my favorite games are old, old, old.

There are several applications that do just that. Most are windows-only and might work using WINE if you are running the games using WINE.

It would be nice to be able to use the same program for both Linux and WINE. It may take me a while to works through the choices, but I will first explore AntiMicro and get the gamepad set up for Unreal Tournament 2003 because it's one of the few native Linux games I have as most are run using Codeweaver's Crossover, an awesome application using WINE.

Mageia provides the qjoypad tool which allows you to create "profiles" that map out the Six-Axis buttons switches and joysticks to keyboard keys which are mapped to you game. It does not provide pre-configured profiles. It is a shame that there is no repository of profiles. As I construct profiles for the games I enjoy, I will make them available if I settle on qjoypad. Before beginning, you should read the well-written documentation.

Rather than futz with Bluetooth connectivity (since my PC does not have Bluetooth capabilities), I have settled for connection with a USB cable. Once connected, just press the PS button and the controller is recognized.

For Mageia, the device inputs are located in /dev/input. There you will find events 0-14, js0 and js1.

Now the trick is to map those buttons to keypresses using whatever app I choose.

RESOURCES:
Sixaxis Wikipedia Page

qjoypad Sourceforge Page

QJoyPad 3 Documentation

Qjoypad HOWTO

xboxdrv Homepage
xboxdrv man page
A driver to read XBox contrllers.

Use a PS3 Controller on Linux (USB) HOWTO

Gamepad HOWTO

Universal Controller Calibration & Mapping Using xboxdrv

Xpadder
MS-Windows gamepad to keyboard mapper; should work with WINE.

Xpadder Forum

Connecting PS3 Sixaxis Controller in XBMC Linux

xboxdrv
This is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. xboxdrv provides a wide varity of configuration options, it allows you to simulate keyboard and mouse events, remap buttons and axes, apply autofire, invert axis, tweak axis sensitivity, emulate throttle and rudder controls and send macros. The manpage has more details. It works with the PS3 controller as well. xboxdrv also accommodates wrapper scripts to start games.

Xpadder
This is a win32 program that is self-contained, runs under WINE and costs US$10. There are several sites that offer pre-configured Xpadder profiles; esoui.com, the XPadder Forum, WiiFi's Xpadder Fan site, The ISO Zone, and others. Xpadder is also used on Steam.

AntiMicro
This an Open Source tool for mapping keyboard and mouse events to gamepads and joysticks and is supported under MS-Windows, Linux and BSD. It is available for Debian-based distros and in RPM for Fedora, but not for Mageia. The Linux version uses SDL. There is a repository of pre-made profiles. and a WIKI. The homepage provides general Help and adding a new game controller mapping is here. AntiMicro can also be used on STEAM games. Video HOWTOs are here. Posts about in on Reddit are here and here. Auto launch scripting is discussed here. A tutorial is here (seems to be the best one) and here and here and here.

jtest-gtk
This is a simple, FOSS joystick tester with a  Gtk+ GUI. It provides you with a list of attached joysticks, a way to display which buttons and axis are pressed, a way to remap axis and buttons and a way to calibrate your joystick. It uses SDL. The program has received a few updates and appears to be actively maintained.

InputMapper
 A win32-only, free (DonationWare) DS4 (DualShock 4) input mapper that allows you to connect your PS4 gamepad to windows, wired (USB) or wirelessly (Bluetooth). Map virtually any controller input to virtually any button, keyboard key, mouse action, and more! Perform any combination of keystrokes, button presses, and other advanced functions in sequence with the touch of a button. Not yet tested in WINE. Version 1.6 is stable; version 2.0 is beta.

Using the PlayStation 3 controller in Bluetooth mode with Linux
A nice walk-through from 2007 of how this fellow got a PS3 controller working for a non-gaming application, a drone. He has some demonstrations YouTube videos linked on his site.

QtSixA is the Sixaxis Joystick Manager Linux
QtSixA v1.5.1 is the final version released in 2011, ArchLinux has a nice HOWTO in their typically fantastic documentation. Connection in Bluetooth mode at UbuntuForums. The manual is here. Download is here. There are Ubuntu packages, but only a src.rpm for Mageia with complaints about poor BlueTooth performance. A Fedora package is here.
.
GIMX
This FOSS Linux and MS-Windows tool is used to control a game controller and works via Bluetooth for the PS3/PS4 controllers. Documentation is here a blog is here and a Forum is here. It appears to be actively maintained.

Xinput Plus
Here's a Tutorial on using it. You may have some initial difficulties because the homepage is in Japanese and the app is set to the Japanese language by default. It explains how to download and configure Xinput. Xinput is only available for Windows.

MISCELLANEOUS RESOURCES

QUAKE Split-screen and Controller guides
Quake Quake2 Quake3

Linux_Gaming FAQs on Reddit

Linux conversations on Reddit

Linux Gaming on Reddit

WINE Gaming on Reddit

No comments: