Typo in file name
[wiimote-pad] / README.md
1 # Wiimote-Pad
2
3 This is a small tool to use a Wiimote as a gamepad.
4
5 ## Introduction
6
7 Linux has had built-insupport for the Wii Remote (Wiimote for short)
8 since v3.1, support which was significantly cleaned up and improved
9 since v3.11. However, the low-level kernel driver exposes each component
10 of the Wiimote (accelerator, buttons, IR camera), as well as each
11 extension, as a distinct device, none of which is (fully) functional as
12 a controller ‘out of the box’ (the ‘buttons’ device —which the driver
13 calls the controller ‘proper’— does appear as a joystick device to
14 Linux, since it has a BTN\_A mapping, but it's a device with no axes and
15 thus not really usable).
16
17 A higher level interface (built on top of the Linux driver) is provided
18 by [xwiimote][], which provides a library for ‘coalesced’ access to the
19 Wiimote and its extension. As programs need to be designed specifically
20 to make use of the library, this still doesn't allow an ‘out of the box’
21 experience.
22
23 The purpose of this tool is to allow any application to use a Wiimote
24 —held sideways— as if it were a standard gamepad.
25
26 ## Usage
27
28 Associate your Wiimote with your computer (details on how to do this are
29 not discussed here, but you may want to at [xwiimote][]'s page for
30 additional information), then start the program. As long as the program
31 is running, a virtual controller (called “Nintendo Remote in gamepad
32 mode”) will be available. Just press Ctrl+C to terminate the program and
33 ‘disconnect’ the virtual controller.
34
35 Syntax:
36
37         wiimote-pad [device]
38
39 where _device_ is the path to a Linux-created device associated with the
40 Wiimote (e.g. `/dev/input/js0` or something like that). If no _device_
41 is specified, the program will look for the first device that it can
42 associate with and use that.
43
44 ## `udev` rules
45
46 This repository also provides a set of `udev` rules to:
47
48 * change the group and the permissios of all Wiimote-related devices
49   (both the kernel ones and the virtual one created by `wiimote-pad`);
50 * create descriptive symlinks for the event devices associated with
51   Wiimotes.
52
53 By default the group assigned to Wiimote devices is `bluetooth`, you
54 might need to tune it for your system. The group and permission changed
55 is needed sot that applications that use the event interface instead of
56 the joystick interface can still access the Wiimote.
57
58 ## Requirements
59
60 Dependencies for `wiimote-pad` are `libudev` and `libxwiimote`. The
61 latter should be version 2 or higher.
62
63 ## Compile
64
65 Just running
66
67         make
68
69 should work.
70
71 If you compiled and built `libxwiimote` yourself, you might
72 need to fix the include path in the `Makefile` to point to the correct
73 locations to look for the headers. By default, aside from standard
74 locations, the `Makefile` will look for an `xwiimote` source directory
75 in the parent of the `wiimote-pad` directory.
76
77 [xwiimote]: http://dvdhrm.github.io/xwiimote