-
Notifications
You must be signed in to change notification settings - Fork 3
Input report
Note: This information applies only to the old CECH-ZCM1 models, not the newer CECH-ZCM2 models.
The Move submits its status and sensor data in HID reports that will typically look like this:
01 00 00 00 06 00 00 7f 7f 7f 7f c0 05 2d 89 a8 7f 77 8d 1e 89 a0 7f 6f 8d f8 7f 02 80 fb 7f f8 7f 03 80 fb 7f 7d 10 9e fa 10 55 0a 00 00 00 00 00
The following section explains the report's format in detail, e.g. how to interpret the data.
Fields that cover more than one byte are stored as little-endian, i.e. the least significant byte comes first. Description of the axes assumes that the Move is held with the buttons pointing up and the glowing ball pointing away from you:
- X-axis pointing to the right
- Y-axis pointing up
- Z-axis pointing away from you.
Accelerometers, gyroscopes and the analog T button each report two values per report. The first value (subsequently denoted 1st half-frame ) contains data that is slightly older than the second one. This effectively doubles the reporting rate for these sensors.
Byte offset | Length (in bytes) | Description |
---|---|---|
0x00 | 1 | HID Report ID (always 0x01) |
0x01 | 1 | Buttons 1 (Start, Select) |
0x02 | 1 | Buttons 2 (X, Square, Circle, Triangle) |
0x03 | 2note 1 | Buttons 3 (PS, Move, T) and EXT |
0x04 | 1note 2 | Sequence number |
0x05 | 1 | T button values (1st half-frame) |
0x06 | 1 | T button values (2nd half-frame) |
0x07 | 4 | always 0x7F7F7F7F |
0x0B | 1 | Timestamp (upper byte) |
0x0C | 1 | Battery level |
0x0D | 2 | X-axis accelerometer (1st half-frame) |
0x0F | 2 | Z-axis accelerometer (1st half-frame) |
0x11 | 2 | Y-axis accelerometer (1st half-frame) |
0x13 | 2 | X-axis accelerometer (2nd half-frame) |
0x15 | 2 | Z-axis accelerometer (2nd half-frame) |
0x17 | 2 | Y-axis accelerometer (2nd half-frame) |
0x19 | 2 | X-axis gyroscope (1st half-frame) |
0x1B | 2 | Z-axis gyroscope (1st half-frame) |
0x1D | 2 | Y-axis gyroscope (1st half-frame) |
0x1F | 2 | X-axis gyroscope (2nd half-frame) |
0x21 | 2 | Z-axis gyroscope (2nd half-frame) |
0x23 | 2 | Y-axis gyroscope (2nd half-frame) |
0x25 | 2note 1 | Temperature |
0x26 | 2note 3 | X-axis magnetometer |
0x28 | 2note 1 | Z-axis magnetometer |
0x29 | 2note 3 | Y-axis magnetometer |
0x2B | 1 | Timestamp (lower byte) |
0x2C | 5 | External device data |
note 1: This field actually covers 12 bits. Only the upper nibble of the byte at the specified offset+1 belongs to this field. The lower nibble belongs to the following field.
note 2: This field actually covers 4 bits. Only the lower nibble of the byte at the specified offset belongs to this field. The upper nibble belongs to the previous field.
note 3: This field actually covers 12 bits. Only the lower nibble of the byte at the specified offset belongs to this field. The upper nibble belongs to the previous field.
This is a bit mask that indicates if Select (value 0x01) or Start (value 0x08) are pressed. The corresponding bit is set while the button is depressed.
This is a bit mask that indicates if X (0x40), Square (0x80), Circle (0x20) or Triangle (0x10) are pressed. The corresponding bit is set while the button is depressed.
This is a bit mask that indicates if PS (0x0001), Move (0x4008) or the analog T button (0x8010) are pressed. The corresponding bits are set while the button is depressed. If set, the bit 0x1000 indicates that an extension device, such as the Sharp Shooter attachment, is currently attached, has successfully sent its config data and the Move sent the specified ExtOut data in reply.
Note that the upper byte of this bit mask is applied to the byte at offset 0x04 while the lower byte of this bit mask is applied to the byte at offset 0x03.
This field has only 4-bit resolution. It increases with every received report and overflows at value 0x0F. It can be used as a simple mechanism to detect missed reports.
This field indicates the analog T button's position, ranging from 0x00 (not pressed) to 0xFF (fully depressed).
This is a 16-bit counter that continuously increases with every report and overflows at value 0xFFFF. Its lower byte is located at offset 0x2B, its upper byte at offset 0x0B. The value is build from an internal counter and could be used to measure the time interval between two consecutive reports.
This field reports the controller's battery level, a value of 0x05 meaning fully charged. If the controller is connected via USB cable the value is either 0xEE (charging) or 0xEF (fully charged).
These fields contain 16-bit data of the tri-axis accelerometer. The values are shifted up to always report positive numbers. Subtract 0x8000 (the ideal zero G level) to obtain signed values and determine direction from the sign.
These fields contain 16-bit data of the tri-axis gyrometer. The values are shifted up to always report positive numbers. Subtract 0x8000 (the 0 rad/s level) to obtain signed values and determine direction from the sign.
This field reports temperature as a 12-bit value. It contains the raw ADC value (plus an offset) measured at a voltage divider which contains a thermistor. Unless we find out which thermistor exactly is used (extremely unlikely considering the unlabeled part on the PCB), the only way to derive a temperature from these values is conducting our own measurements.
These fields contain 12-bit data of the tri-axis magnetometer. The value range is -2048..+2047 (assuming two's complement).
To convert this to a signed value, you can use the two's complement:
int decode_12bit_signed(int x) { return (((x) & 0x800)?(-(((~(x)) & 0xFFF) + 1)):(x)); }
Devices plugged into the EXT socket, such as the Sharp Shooter attachment, report some of their data using these bytes.