Tuesday, August 15, 2017

Using a PS3 game Controller with Linux

I have been a mouse and keyboard PC game player ever since my Doom days. About 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 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. That is easily dome with xboxdrv, but Mageia does not provide that, so I downloaded one for Ubuntu and used Alien to convert it to RPM format. It then installed without trouble and reports the controllers action to the OS.

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.

Some of these programs serve both functions and 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.

RESOURCES


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.

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

Thursday, August 10, 2017

Using a PS3 controller with Linux Games

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.

Fortunately, there is an application named xboxdrv that makes it possible to connect a gamepad when playing games on Linux, but des not configure the gamepad for a particular game.

Unfortunately for me, that package is not available from my distro of choice, but other distros such as Red Hat do offer it and do so in an RPM package, so installation was as easy as:

$ sudo urpmi ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/6/i386/xboxdrv-0.8.8-2.el6.i686.rpm

Since that installed without any problems, it would be easy to get the source RPM and modify it to meet Mageia's standards and then include it in a Mageia repo. I may do that as there are several applications that are not offered that I have found useful.

The homepage for xboxdrv also provides 10 links to other sires where use of xboxdrv is discussed.

I'll add more once I have worked out how to use the gamepad. I followed the HOWTO below and am able to verify that the gamepad and the OS are communicating.

There is a MS-Windows application named Xpadder that is fairly straightforward to use and might be useful under WINE. Also there is an other MS-Windows app  name Qjoypad that might also be useful.

RESOURCES

xboxdrv Homepage

xboxdrv man page

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


Monday, August 07, 2017

Quake4 for Modern Linux

This game is new enough to install without too much fuss. Just follow the HOWTOs.

Download the Linux installer from [the very slow, but free] IdSoftware.

Interesting Quake4 downloads and updates are found here.


RESOURCES


Quake 4 for Linux

Quake4 GNU/Linux FAQ



Sound issues?
"systemctl status osspd.service" will tell you the current state of the OSS Proxy Daemon. This is used to enable sound from legacy applications which use the OSS sound API. You should install the "ossp" package if you need this functionality.

Burning 25GB M-Discs

The popular GUI DVD-authoring apps like K3B and Brasero, do not support burning ISO images in sizes greater than 4GB, which is odd, since they can detect the discs and can create an ISO image greater than 4GB.

No matter what, remember that 4.7GB is sleazy marketing GBs, i.e. 1000  and not 1024. If translated to actual capacities, single layer DVD±R[W] capacity is only 4.4GiB, and 26GB BluRay Disc is actually 23.3GiB. Keep this in mind when creating your ISO images to burn manually.

I purchased a Blue-Ray writer (an LG-brand Hitachi Model WP40NB30)  hoping to use the 25GB M-Discs to archive some of the files I have accumulated spread out over several computers.

Fortunately, the growisofs tool comes to the rescue, so from the command line, I just execute as a regular user:

$ growisofs -speed=1 -Z /dev/sr1=big-image.iso

I need the lower speed to keep from prematurely emptying the buffer which borks the disc.

Although older, this page provides plenty of background on what is happening.

K3B does not support Blu-Ray burning out-of-the-box, but it can be configured to do so. still, it will not automatically break up files that are too large to fit on one CD/DVD/Blu-Ray medium.

Some discussion of bootable CDs, bootable USBs and partition offsets (very interesting) cane be found here.

Burn, baby, burn.

I have had success using Brasero as a graphical tool for creating 20+GB .iso images. It's handy and tells me how large an image has actually been created so I can choose which medium to use most efficiently, but Brasero will not burn a Blu-Ray disc. I am, however,  able to do than manually by:

$ xorriso -as cdrecord -v dev=/dev/sr1 blank=as_needed image.iso

SUMMARY

After all this, successful burning of Blu-Ray discs was not repeatable. The only way I have found to successfully burn these discs is to run the win-32 application ImageBurn. Installing it in Codeweavers Crossover was straightforward as the installer was automatically downloaded and the bottle created, but I encountered two problems.

The first was that I was unable to create a link to /dev/sr1 that shows up in the Wine Configuration/Drives window; the option to do that (the Device: selection) was grayed out, likely because, as a regular user, I needed superuser permission to do that. Crossover states in section 9.3 of their User Guide that invoking:

$ ln -s /dev/sda1 "~/.cxoffice/bottle-name/dosdevices/j::"

That should create the drive, but I was unsuccessful using that. Perhaps being the superuser would have made that possible. I finally added drives by creating one using the Wine Configuration/Drives window, the editing the symlink itself in the dosdevices sub-directory of the appropriate bottle to point to /dev/sr1, my Blu-Ray burner.

That problem solved, I turned to my second problem. ImgBurn was not able to see or connect to the drive. Under Tools/Settings/"I/O"/Page 1, I checked "SPTI-Microsoft" instead of the default "ASPI-WINASPI32.DLL" and the drive immediately became available to the ImgBurn.

Finally, everything works as advertised. My discs are recognized properly and burned properly. I am able to use ImgBurn's tools to select directories and burn directly to both the 25GB M-disc media and the double-layer DVDs without issue. I have not yet tried spanning several discs.

The sad thing is that interacting with Blu-Ray media is certainly possible, creating iso9660 archives that span multiple discs is possible, so why haven't those capabilities been incorporated in Linux applications?

RESOURCES

CdDvd/Burning

Blu-Ray Linux Wiki

Welcome to libburnia project

The state of Blu-Ray burning in Linux is terrible

XORRISO man page examples

 Ray's Notebook § Computing

ImgBurn Homepage

Tuesday, August 01, 2017

Xtra-PC

The advertisement for Xtra-PC is alluring.
Xtra-PC: The $25 Computer.
New life for old or dead computers.

If you were an MS-Windows user with an older or non-functional desktop or laptop, and you just needed to do a few things: Use Facebook to keep in touch with the grandchildren, send a few emails, type a letter or even watch a few cat videos, it would seem too good to be true . . . but it's not.

Behind Xtra-PC is the power of Linux, Debian Sid (Casper?) to be exact. That knowledge would be intimidating to that MS-Windows user. After all, Linux is for computer geeks and hackers and is way to complicated for ordinary folks to install, configure and use.

By touting its virtues and barely mentioning its underpinnings, Xtra-PC will entice the unwary and deliver on its promise.  Linux users know this, so Xtra-PC may seem to them as a waste of money. They already know how to install, configure and use Linux, but they are not the market for this device, their grandparents are.

I purchased the $ 25 version which comes on an 8GB thumb drive. The same software is also available in 16GB, 64GB and 128GB versions. Bigger drives provide more storage space with possibly, maybe faster memory chips on them.

The 8GB drive is partitioned as follows:

Partition 1: 47MB fat32

Here, you will find the autorun.inf file and a README.TXT instruction users to read the docs from the website and remind them that Xtra-PC must be accessed from the system startup, not from MS-Windows.

Partition 2: 5.50GB ext4
This is where Debian lives. There's not too much room to install additional software, but the most commonly used software is already installed. Also, the most current version of Debian (jesse.sid) is not installed but not really needed since things just work out of the box.

Partition 5: 1.82GB swap
Since this is targeted to old or low-end machines, some swap is probably necessary.

Installation and setup is quick and non-technical and it works as advertised. As a Linux user, you might want to purchase the $25 device to have handy after installing a few repair tools.

There have been several attempts to offer MS-Windows work-alike Linux distros. Xtra-PC appears to be the closest yet.

Since it is intended for low-resource machines, I did disable the whoopsie process, a Canonical error reporting mechanism not likely to be useful to granny.

There are some tips to optimize Debian running on a flash drive here.

The special scripts that Xtra-PC uses are located in /opt/xtra-pc.

Since it is intended to run on older hardware, it might be useful for Linux to identify itself to the machine as "Windows XP". YMMV.

Thursday, July 27, 2017

Return to Castle Wolfenstein for Modern Linux

Return to Castle Wolfenstein is a first-person shooter originally released on November 19, 2001. The game, like many other classic games, is available at GOG.com and costs only US$5.99.

Don't bother with old and crusty Linux binaries offered by IDsoft; it is problematic to use them on a modern Linux. Fortunately for us, there are more modern GPL-licensed Linux binaries available for 32- and 64-bit systems as well as high resolution textures packages. The project at GitHub provides source code that can also be compiled for MS Windows using MinGW.

The game installer downloaded from GOG.com can be unpacked using innoextract, as can most any GOG game. The innoextract website has more details on extracting GOG installers. The only things you will need from the Windows version of the game are the are the *.PK3 files that contain the the game data. They will go in the /main directory of the game.

Venom Mod is an improved game engine keeping the original game engine look and feel.

The iortcw project is a modern game engine for Linux, Windows and Mac in active development.

The Return to Castle Wolfenstein v1.42d Patch is available here.

High resolution textures are available at the rtcw.pro website. They provide installation instructions.

If you have already played through the game (or not), you can download a saved game that will unlock all the levels.

The game runs well using GOG installer with WINE, PlayonLinux and Crossover. HOWEVER, you should install the unofficial patch from Knightmare if you have crashes on startup.

RESOURCES

Return to Castle Wolfenstein at Wikipedia

RTCW Linux binaries

RTCW hi-res textures

General Resources

Saved Games

2010 DirectX Runtime Package

DirectX Web installer

Control/Input Lag? Change VSYNC setting in video driver

Missing DLL Files