Changes

Calibration data.
Line 6: Line 6:  
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: [https://docs.google.com/Doc?id=dds4pks_606fmcd6zwt&hl=en Three Data Samples from Wii Motion Plus (Google Doc)]
 
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: [https://docs.google.com/Doc?id=dds4pks_606fmcd6zwt&hl=en Three Data Samples from Wii Motion Plus (Google Doc)]
   −
It appears that the 32 bytes from 0x(4)a60020 are, as usual, calibration information, but it is unknown how they work.  
+
The 32 bytes from 0x(4)a60020 are, as usual, calibration information, described as follows.
 +
<source lang="cpp">// All values are big-endian.
 +
struct calibration_block
 +
{
 +
// Gyro values at 0 deg/sec to 16 bits of precision.
 +
u16 yaw_zero;
 +
u16 roll_zero;
 +
u16 pitch_zero;
 +
// Gyro values at "scale" deg/sec.
 +
u16 yaw_scale;
 +
u16 roll_scale;
 +
u16 pitch_scale;
 +
// Angular velocity of the above scale values in deg/sec divided by 6.
 +
// e.g. A value of 45 would mean the "scale" values represent the gyro at 270 deg/sec.
 +
u8 degrees_div_6;
 +
};
 +
 
 +
// uid_1,2 seem to be just a unique ID.
 +
// crc32_msb,lsb is a crc32 of all calibration data except the checksum bytes.
 +
struct calibration_data_at_0x20
 +
{
 +
// Calibration for "fast" mode. (described below)
 +
calibration_block fast;
 +
u8 uid_1;
 +
u16 crc32_msb;
 +
// Calibration for "slow" mode.
 +
calibration_block slow;
 +
u8 uid_2;
 +
u16 crc32_lsb;
 +
};
 +
</source>
    
Writing 0x04 to 0x(4)A600FE activates the MotionPlus as the "active" extension. This does 3 things (with no additional initialization):
 
Writing 0x04 to 0x(4)A600FE activates the MotionPlus as the "active" extension. This does 3 things (with no additional initialization):
2

edits