Press the the red 'sync' button on the back of the Wiimote and then search for devices on your android device. When the Wiimote shows up, tap on it and enter the PIN you received from the 'C' code earlier. I only assume that this would connect the Wiimote as an ambient bluetooth device. Use your Wii Remote as a game controller. Use your Wii Remote as a mouse; Create your own custom keybindings for your Wii Remote. (As long as it uses the keyboard and mouse, it can be mapped to the Wii Remote) But before we get into the details of doing so, here are some materials that you will need before we get started. You will need: A. But there is no need to write 00 to 0x(4)a500fb, since Wii games don't do that. While the Motion Plus is initialising, the value at 0x(4)a600f7 changes from 0x02 to. I was however able to use a second older remote to navigate the menus and start a game, at which point the wiimote plus became functional again. It is also unable to connect to Dolphin. Windows is able to connect via bluetooth fine but it shows up as 'RVL-CNT-01-TR' instead of 'RVL-CNT-01' and Dolphin doesn't recognize it. I think the Wiimote would be a better choice than the pro. Most games that use the pro can also use the gamepad, but the games that use wiimote need it. Some recommended games are: Smash (Gamepad, pro, wiimote, gamecube) Mario Kart 8 (Gamepad, pro, wiimote) Mario Party 10 (one mode gamepad, everything else wiimote).
- 1Data Format
The Wii Motion Plus starts off at register 0xA60000 instead of register 0xA40000, because it has its own extension port on the back allowing a Nunchuk for example to be plugged in along with the Wii Motion Plus. BUT it changes to 0xA40000 once it is activated by writing 04 to 0xa600fe.
The Wii Motion Plus is first identified by the 6 bytes: 00 00 A6 20 00 05 at register address 0x(4)a600fa (instead of 0x(4)a400fa like a regular extension). Games attempt to detect the Wii Motion Plus by trying to read the two-byte expansion identifier at 0xA600FE (they try up to 3 times, then wait 8 seconds, then check again). If a Wii Motion Plus is not present, or it has already been activated, then the attempt to read those bytes will fail with error 7.
The extension is initialised by writing 0x55 to 0x(4)a600f0. But there is no need to write 00 to 0x(4)a500fb, since Wii games don't do that. While the Motion Plus is initialising, the value at 0x(4)a600f7 changes from 0x02 to 0x04 to 0x08 to 0x0C to 0x0E then stays at 0x0E. There is no need to read this byte, since games don't. While initialising, the 128 bytes from 0x(4)a60050 - 0x(4)a600cf also change briefly, but randomly, after the extension is initialized. More examples of this data block changing over time can be found here: Three Data Samples from Wii Motion Plus (Google Doc)
The 32 bytes from 0x(4)a60020 are, as usual, calibration information, described as follows.
Writing 0x04 to 0x(4)A600FE activates the MotionPlus as the 'active' extension. This does 3 things (with no additional initialization):
- A status report (0x20) will automatically be sent indicating that a normal extension has been plugged in, if and only if there was no extension plugged into the MotionPlus pass-through extension port.
- The standard extension identifier at 0x(4)A400FA now reads 00 00 A4 20 04 05
- Extension reports now contain MotionPlus data.
Writing 0x55 to 0x(4)A400F0 deactivates the MotionPlus, and activates the Nunchuk or other extension plugged into the back of the Motion Plus. It does these things (with no additional initialization):
- A status report (0x20) will always be sent indicating that a normal extension has been unplugged.
- The Motion Plus extension identifier at 0x(4)A600FA now reads 00 00 A6 20 04 05
- Another status report (0x20) will always be sent indicating that a normal extension has been plugged in.
- The standard extension block at 0x(4)A40000 now reads from the Nunchuk (or other extension)
- Extension reports no longer contain MotionPlus data
It is possible to read from both Motion Plus and an extension controller at the same time by activating the MotionPlus in one of the pass-through modes suggested by DogP. When activated, this interleaves extension controller data with MotionPlus data on every other read. Data passing through are modified to make room for 3 bookkeeping bits. Two pass-through modes are currently known, one with modifications adapted to the NunChuck, and one with modifications adapted to the Classic Controller (but suitable for Guitar, Drums, or Turntable).
Nunchuck pass-through mode :
- Activated by writing 0x05 instead of 0x04 to 0x(4)A600FE
- Data passing through drops the least significant bit of the three accelerometer values
- Bit 7 of byte 5 is moved to bit 6 of byte 5, overwriting it
- Bit 0 of byte 4 is moved to bit 7 of byte 5
- Bit 3 of byte 5 is moved to bit 4 of byte 5, overwriting it
- Bit 1 of byte 5 is moved to bit 3 of byte 5
- Bit 0 of byte 5 is moved to bit 2 of byte 5, overwriting it
Classic Controller or Musical Instrument pass-through mode:
- Activated by writing 0x07 instead of 0x04 to 0x(4)A600FE
- Data passing through drops the least significant bit of the axes of the left (or only) joystick
- Bit 0 of Byte 4 is overwritten
- Bits 0 and 1 of Byte 5 are moved to bit 0 of Bytes 0 and 1, overwriting what was there before
There is no requirement to use the correct mode for the extension, but otherwise the bitshift/move wouldn't make sense. Using the Nunchuk in classic controller mode would clobber a significant bit in the middle of the Z acceleration. Using the Classic controller in Nunchuk mode would clobber some of the buttons.
Data Format
The Wii Motion Plus reports its information as 6 bytes of data, readable at 0x(4)a40008 (or 0x(4)a40000 in some cases) and streamable using Data Reporting Modes that include Extension bytes (unused bytes are filled with 0x00). The data is packed into the six bytes as follows:
Bit | ||||||||
Byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | Yaw Down Speed<7:0> | |||||||
1 | Roll Left Speed<7:0> | |||||||
2 | Pitch Left Speed<7:0> | |||||||
3 | Yaw Down Speed<13:8> | Yaw slow mode | Pitch slow mode | |||||
4 | Roll Left Speed<13:8> | Roll slow mode | Extension connected | |||||
5 | Pitch Left Speed<13:8> | 1 | 0 |
While the Wiimote is still, the values will be about 0x1F7F (8,063), although it is best to calibrate for a few seconds every time you start, to get the actual zero values.
Voltage reference is 1.35V that you can assume it as 8192 unit (half of the ADC range), using 2.27 mV/deg/s, 8192 is 595 deg/s (1.35V/2.27mV), you must divide by ~13.768 unit/deg/s (8192/595) to know the correct deg/s.
At high speed (slow bit = 0) raw values read are small with the same deg/s to reach higher values on top, so you must multiply it by 2000/440 (they are the max reference in the two modes in deg/s [1]). Example: reading 8083 raw value and assuming 8063 as zero, 20 unit in slow/normal mode are 1,45 deg/s and in fast mode are 1.45*2000/440=6.59 deg/s.
Yaw/Roll/Pitch fast/slow bits are 1 when the Wii Remote is rotating slowly (or not rotating at all), 0 when the Wii Remote is rotating fast.
Extension connected is 1 when an extension is connected to the MotionPlus extension port.
Note: The definition of yaw, pitch, and roll, are slightly different for the gyros and accelerometers. Accelerometers measure angles relative to gravity. Gyros measure angles relative to the Wii Remote. If the Wii Remote is up the right way, then they are the same. But if the Wii Remote is on its side, then what the gyros call 'pitch' is actually what the accelerometers would call 'yaw'.
The correct way to measure orientation is to maintain a rotation matrix (or alternatively a quaternion) of the current orientation (relative to gravity), and update it each time you get a gyro reading. It will drift a little, so you should reset the matrix's pitch and roll (but not yaw) with the values from the accelerometers whenever the accelerometers and gyros indicate no movement. After significant rotation, you should reset the matrix's yaw to zero when the Wii Remote is pointing near the middle (horizontally) of the sensor bar.
Nunchuck pass-through mode
In this mode, MotionPlus data and modified Nunchuck data are interleaved, you can retrieve one set of data every 3ms (one wm+, one nunchuck, one wm+ and so on).First 6 byte are the motion plus, send a byte 0, wait some time that WM+ retrieve and overwrite its buffer, and now read other 6 byte that are the nunchuck data.If you don't wait some time (3ms between every request), WM+ give incorrect data, mixing byte with nunchuck.The data format for the Motion Plus does not change, but the data format of the nunchuck is different than the normal way:
Bit | ||||||||
Byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | SX<7:0> | |||||||
1 | SY<7:0> | |||||||
2 | AX<9:2> | |||||||
3 | AY<9:2> | |||||||
4 | AZ<9:3> | Extension connected | ||||||
5 | AZ<2:1> | AY<1> | AX<1> | BC | BZ | 0 | 0 |
Note that AZ, BC and BZ and the least significant bits of AX, AY and AZ are moved. Also, the least significant bit of each accelerometer axis are lost, consider them 0 to keep 10 bit values. Extension connected is usually 1.
Bit 1 of Byte 5 is used to determine which type of report is received : it is 1 when it contains MotionPlus Data and 0 when it contains extension data.
Classic Controller pass-through mode
In this mode, MotionPlus data and modified Classic Controller data are interleaved. The data format for the Motion Plus does not change. Here is the data format for the Classic Controller in this mode:
Bit | ||||||||
Byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | RX<4:3> | LX<5:1> | BDU | |||||
1 | RX<2:1> | LY<5:1> | BDL | |||||
2 | RX<0> | LT<4:3> | RY<4:0> | |||||
3 | LT<2:0> | RT<4:0> | ||||||
4 | BDR | BDD | BLT | B- | BH | B+ | BRT | Extension connected |
5 | BZL | BB | BY | BA | BX | BZR | 0 | 0 |
Note that BDL and BDU are moved, and each axis of the left joystick loses its least significant bit. Extension connected is usually 1.
Bit 1 of Byte 5 is used to determine which type of report is received : it is 1 when it contains MotionPlus Data and 0 when it contains extension data.
Hardware
The Wii Motion Plus contains two gyro sensors: A dual-axis gyro by InvenSense, the IDG-600(pitch and roll), and a single-axis gyro by EPSON TOYOCOM labelled X3500W (yaw).
Until its release it was speculated that only a dual-axis gyro was included in the Wii Motion Plus. The combined use of a dual-axis gyro and a single-axis gyro is what enables the Wii Motion Plus to report the angular rate in all three axis, thus allowing full orientation tracking.
Specifications of the X3500W are currently unknown, but may be similar to the specifications of the similarly named XV-3500CB (same manufacturer.)
Wii MotionPlus contains RVL-GU chip and EEPROM. RVL-GU chip is a microprocessor NEC 78K0/KC2. It has two firmware modes. I2C bus repeater mode and 'Activated' Gyro mode.Wii_motion_plus_kaiseki (japanese)
T1-T4 on side A are test points for the gyros. W1-W7 on side B are test points for the RVL-GU. In some versions the ground plane has four large solderless pads on side A.
Label | RVL-GU Pin |
---|---|
W1 | Vss |
W2 | RESET |
W3 | P13/TxD6 (TOOLD) |
W4 | Vdd (tied to P15/TOH0) |
W5 | P14/RxD6 |
W6 | P122/X2/EXCLK/OCD0B |
W7 | FLMD0 (TOOLC) |
Information
When not activated, the MotionPlus is detected by regular polling (every 8 seconds or so) of 0x(4)a600fe. Writing 0x55 to 0x4A400F0, then 0x00 to 0x4A400FB (standard extension init, works fine even with no extension) re-activates the standard extension, if any, plugged into the MotionPlus pass-through port. The development version of the CWiid driver currently implements this method (without automatic 8 second checks) on the motionplus branch: http://abstrakraft.org/cwiid/browser/branches/motionplus/. Additional information on MotionPlus workings and implementation requirements are at http://abstrakraft.org/cwiid/wiki/MotionPlus.
The combination of 3 linear accelerations with 3 angular rates allows what Nintendo refers to as 1:1 motion tracking, which is another way of saying 6DOF (degrees of freedom) over a short time. It's only valid over short times because of the integration involved to convert accelerations and rates into positions (input errors, when integrated, blow up over time).
In addition to providing yaw, the gyros also allow the software to tell the difference between orientation and acceleration, which are difficult to tell apart from the accelerometers which measure a mixture of both.
Reading 0x100 bytes from 0x(4)a60000 produces the following:
A different (Carl Kenner's) Wiimote and Motion Plus:
Two more:
Wii Motion Plus Remote
and
Wii Remote Plus Games Pacman
I added a bit of code to make the mouse less jerky. It just ignores any input that is too little to matter, so it doesn't constantly drift and jerk.
var.InputTolerance = 15 //this line goes below the other variable
var.YawSpeed = wiimote.MotionPlus.YawSpeed
if wiimote.MotionPlus.YawSpeed < var.InputTolerance and wiimote.MotionPlus.YawSpeed > -var.InputTolerance {
var.YawSpeed = 0
}
var.PitchSpeed = wiimote.MotionPlus.PitchSpeed
if wiimote.MotionPlus.PitchSpeed < var.InputTolerance and wiimote.MotionPlus.PitchSpeed > -var.InputTolerance {
var.PitchSpeed = 0
}
I'm not sure why all the drifting was going on, but this did a decent job of fixing it. Try this out if you're having issues, adjust the InputTolerance variable to suit. While holding still the cursor will stay still, I am not sure how to fix the jerkiness while moving. Smooth, controlled movements work well though. If your cursor goes directly to one corner this might fix it.
One issue is that this makes fine adjustments almost impossible.