Line 521:
Line 521:
It appears that the 32 bytes from 0x(4)a60020 are, as usual, calibration information, but it is unknown how they work.
It appears that the 32 bytes from 0x(4)a60020 are, as usual, calibration information, but it is unknown how they work.
−
+
Writing 0x04 to 0x(4)A600FE activates the MotionPlus as the "active" extension. This does 3 things (with no additional initialization):
−
Writing 0x04 to 0x04A600FE activates the MotionPlus as the "active" extension. This does 2 things (with no additional initialization):
+
* A status report (0x20) will automatically be sent indicating that a normal extension has been plugged in.
−
* The standard extension identifier at 0x04A400FE now reads 0x04
+
* The standard extension identifier at 0x04A400FA now reads 00 00 A4 20 04 05
* Extension reports now contain MotionPlus data. Format is:
* Extension reports now contain MotionPlus data. Format is:
zz yy xx ZZ YY XX
zz yy xx ZZ YY XX
−
where rotation rate about the X axis is XXxx, etc. in a right-handed orientation. Note that I'm not 100% on the least significant bytes, but that seems to be correct, and the format is self-consistent. It is currently unknown how the MotionPlus is automatically detected - this method provides no status report when the MotionPlus is connected. 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 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.
+
where rotation rate about the X axis is XXxx, etc. in a right-handed orientation. Note that I'm not 100% on the least significant bytes, but that seems to be correct, and the format is self-consistent. 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 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).
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).