One GUI to rule them all

Last WE I started working on issue 19.

The idea is to make a simple GUI that can help the user in steps 2/3/4 of the (new) tutorial.
That means, no more “scary” commands to type in a terminal, and no more typos issues ๐Ÿ˜€
This also will make my work easier, since it will help people to report their issues.

Hopefully that will make windows users come to the Linux live USB solution…

Now, a few words for people that like technical stuffs and C/C++ programming.
To make my work easier and the code lighter, I’m not using the bluetooth and libusb libraries directly into the GUI app. I’m using a GLIB function called g_spawn_sync that allows to launch a command (bdaddr, hciconfig, sixaddr, emu, emuclient…) and to store the output of that command into a buffer (the output that is usually displayed into the terminal). This buffer is parsed so as to read interesting values (bdaddrs, dongle name, chip version, manufacturer…), which are lastly displayed in the GUI. I admit it is “quick and dirty”, but it works, and it’s time-saving ๐Ÿ™‚

Voice control

This is my first post about “voice control” for the PS3.

Voice control is only #4 in my todo list, but as I’m curious, I wanted to know how hard this stuff is, and I decided to begin searching for Linux tools.

Speech recognition is a wider area than voice control. Considering what I want to do (voice control), it is a hard and wasteful thing (cpu consumption, complexity).

There are many projects that allow voice control stuffs. I will only focus on projects that are widely used/tested and still developed/maintained.

Project to watch regularly:

Some projects that are probably good enough to make a “hackish” proof-of-concept:

  • Simon: the wiki tells the installation is easy, but this sadly seems to be broken with Ubuntu Maverick. I need to work more on that cross-platform (Linux+Windows) solution.
  • Julius+Voxforge: seems to be very easy to install, but no GUI.
  • Pocketsphinx: a recognizer library written in C.

To be continued!

Support for Xbox 360 gamepad

Thanks to the sixaxis emulator, it’s possible to use a Xbox 360 gamepad with the PS3.

This requires a small patch for the d-pad, which is defined as a “joystick hat”.

The configuration file is available there.

The d-pad support will be included in next packages.

English tutorial


Moved: link.

[spoiler]Warning: this tutorial is updated frequently. Don’t copy it. Link to it.

Please note that I don’t give support for anything else than Ubuntu running in a non-virtualized machine.

Introduction

This tutorial explains how to control a PS3 with PC peripherals (keyboards, mice, joysticks) plugged on a PC running Linux and using a bluetooth dongle.

This is possible thanks to the early work of Jim Paris.

I applied many modifications to its source code, developed a GUI to make the launch and the configuration easier, and simplified the installation steps for debian-based Linux distros such as Ubuntu.

If you want to see how well this works, have a look at this video made byMcKack (version 0.11):

PS3 games with keyboard & mouse - Sixaxis Emulator v0.11


Requirements

  • a sixaxis already used with the target PS3
  • a bluetooth dongle with a chip that can have its bdaddr (bluetooth device address) changed. Just perform the tutorial to discover if your dongle works.

Notes

Do it at your own risk. I’m not responsible for any damage you can cause to your PS3 or PC.

Some cheap (a few $) CSR Bluecore4 dongles on ebay are reported to work. Bluecore4 is the first CSR bluecore chip that implements EDR (Enhanced Data Rate), so that the keywords to look for are CSR and EDR. Warning: most of these dongle are counterfeits! Please note that I’m not responsible for any not working dongle you might buy.

Don’t try to use the sixaxis emulator and the sixaxis at the same time, and restore the bdaddr of the dongle if you don’t use it with the sixaxis emulator anymore.

This tutorial was written running ubuntu from a live usb disk (nothing is saved on the hard drive).

Feel free to install ubuntu on your PC! If you have a Windows OS installed, you can read this tutorial if you want to install ubuntu on your hard drive without erasing the Windows OS.

Another way to use the sixaxis emulator is to run it from a Ubuntu Live USB Persistent Flash Drive (read this post).

1 Installation

Add “universe” to your repositories:
– Clic System>Administration>Synaptic Package Manager.
– Clic Settings>Repositories.
– Select universe, close.
– Clic reload, close.

Download following file:

Install it (double clic, then install).

2 Quick start

Plug your sixaxis (and the bt dongle, if external) to your PC.
Launch sixemugui (shortcut: Applications>Game>Sixemugui).

  1. Select the sixaxis
  2. Select the bt dongle
  3. Set the dongle address (don’t forget to write the old one down)
  4. Re-select the sixaxis and the bt dongle
  5. Unplug your sixaxis and if it doesn’t power off by itself, press the PS3 button until it powers off
  6. Select emuclient parameters
  7. Select the configuration file to use
  8. Start emu (emuclient starts automatically if the connection is established)
  9. Play (press Escape to quit emuclient)
  10. Stop emu

Note: File>Save lets you save the sixaxis and PS3 addresses so that you don’t require to plug the sixaxis anymore after that.

3 Custom mappings for mouse, keyboard and joysticks

It is recommended to change the mappings and to calibrate the mouse for each game.

Configuration files have to be saved into the ~/.emuclient/config directory (~ is the home directory).

Launch sixemuconf (shortcut: Applications>Game>Sixemuconf).

Screenshots of my configuration for COD: Black Ops:

It’s possible to define a configuration for aiming: copy-paste the configuration #1 to configuration #2, define the right mouse clic as configuration #2 trigger with switch back, and adjust the mouse multipliers & exponents.

Items of the “Edit” menu that allow to convert a configuration:

The “Replace Mouse” item allows to change the mouse name and id.
The “Replace Keyboard” item allows to change the keyboard name and id.
The “Replace Mouse DPI” item allows to adjust the mouse multipliers according to old/new dpi values (the higher the better).

Stick intensity control for button to stick mappings:

See this post for more details about this functionnality: link.

4 Mouse calibration mode

Before calibrating the mouse, be sure to set the in-game sensitivity to the highest, and be sure to set the mouse dpi to the highest value.

To start emuclient with the mouse calibration mode enabled, select Mouse>Calibrate in the sixemugui application. Then start emuclient.

Current mouse calibration values appear in the “Mouse calibration” part of the gui.

This calibration mode lets you calibrate each mouse independently. It reads values from the loaded configuration. To change values, use rctrl+FX key combinations and use the mouse wheel.

The dead zone value has to be set to the highest stable position.
Different dead zones for x & y only makes sense for a “rectangle” dead zone shape.
The dead zone shape has to be set to the most stable one.

5 Keyboard macros

It’s possible to configure keyboard macros.

A key press will generate a series of events, with timing conditions.

Commands are the following:
– key down
– key up
– key press (= key down + delay + key up)
– delay (unit = ms)

Each macro has to be defined in a file saved into the ~/.emuclient/macros directory (~ is the home directory, .emuclient folder is hidden).

Example: macro_example.txt

#Defines the action that triggers the macro execution
MACRO F1
#Performs a keystroke (key down + delay 50ms + key up)
KEY e
#Sleep 50ms
DELAY 50
#Perform a key down
KEYDOWN SPACE
#Sleep 50ms (minimum delay between KEYDOWN and KEYUP)
DELAY 50
#Perform a key up
KEYUP SPACE

Lines beginning with # are comments.

All keys of the keyboard can trigger a macro. The complete list can be found in conversion.c.

6 Troubleshooting / Feedback

I’m sharing my project for free, so please give me a feedback.

Tell me if it works or doesn’t work, and especially add the following details:

  • the Linux distribution
  • the PS3 hardware version (slim, fat 40Gb, fat 60Gb, …)
  • the PS3 firmware version
  • the bluetooth dongle (exact model + revision if there is one + output of commands “hciconfig -a hci0” and “sudo hciconfig hci0 revision” in a terminal)
  • the hardware of the PC (at least the CPU and the amount of RAM)

Report that in commentary to this post.

And if it doesn’t work, first verify if you have the latest packages. Then look at the FAQ and the bug list, see if your problems are already known, and if it’s not, report them.

If you want to contribute to this project, have a look at this page.
Paypal donation links are on the top right corner of this page.[/spoiler]

New stuffs coming very soon

The configuration reader for the emuclient process is finished.

I tested it (=played!) with my G5 mouse and n52 keyboard, and it works well for COD: Black Ops ๐Ÿ™‚

All game controllers are now supported. Great examples of game controllers that are now possible to use: Xbox gamepads, racing wheels (no force feedback yet), joysticks.

I tested with a sixaxis (wired, but it should work wireless too). You may ask, why would I need to do that? The response is simple: button mapping & dead zone removal.

I’m now focusing on making .deb packages, so as to make the installation easier.

There also will be an update for the tutorial.

For now, the tutorial has been modified to use a specific revision of the code, which is not the head revision.

Stay tuned!

Tuning mouse movements

There are now two different multipliers: one for horizontal moves, and one for vertical moves.

This is in emuclient.c:

#define DEFAULT_MULTIPLIER_X 4
#define DEFAULT_MULTIPLIER_Y 9

These two values are for Call of Duty: MW2/Black Ops (with in-game sensitivity set to the highest=10), and have to be adapted depending on the game.

Some new code allows to trigger a circular mouse movement, that helps to adjust a 1:1 ratio between vertical moves and horizontal moves.

Press Keypad 0 to enable calibration mode, then press ‘p’ to trigger a circular mouse movement.

If the result is an ellipse and not a circle, this means you have to adjust the multipliers.

Press Keypad 0 again to disable calibration mode.

Note: this post will be deprecated when the configuration tools will be released.

Some news about the project…

I am on the way to finish the config reader code in the emuclient process…
It seems I underestimated the time needed for that, and overestimated my time available to it ๐Ÿ™

I will try to release a beta version ASAP. I really hope that will come before the end of the week, but as I wasn’t able to make good predictions, I won’t promise anything. And I want to make the final code generic, as I hope to reuse it for a XBox360 controller. That makes stuffs to be even more complicated.

Note that I probably will modify the tutorial so that it will make the reader use a specific revision of the code corresponding to the last stable version (i.e. without my work on the config stuffs).

I also want to say a few word about the 27C3 presentation on the ‘PS3 Epic Fail’ made by the fail0verflow team. I was very excited to watch the live streaming, and I wasn’t disappointed. That really was epic ๐Ÿ˜€

Now that the PS3 is completely hacked, it seems it will be possible to play with ANY USB device directly connected to ANY PS3 running ANY firmware. ANY is a keyword I was waiting for. Moreover, it will be possible to do it with custom pup files, which makes the crappy dongle stuffs deprecated. Last but not least, it seems everything will be reversible, so that it will avoid the PS3 to be banned by Sony (reinstalling the official firmware before getting online). This means at least that we will be able to play offline with USB devices directly connected to the PS3. Sony will probably still try to fight against players running custom stuffs and playing online.

It will also be possible to reverse engineer the remote play/keyboard stuffs only available to Sony devices such as the PSP and viao laptops.

I don’t know yet what I will be working on. Before that, I will try to finish my current work.

To summarize, I will not stop the sixaxis emulator development since it’s the only way to play online safely, but I will more than likely try to find some time to run custom stuffs on the PS3.