Packets
Trackball packet: Source = 5 Source address: BatmouseIII
Target = 2 Destination address: Projector
Track Ball Byte0 = 0xAA
Track Ball Normal
Byte0 1 0 S2 S1 S0 T2 T1 T0 Sx - Source Addr, Tx - Target Addr
Byte1 0 X6 X5 X4 X3 X2 X1 X0 X Movement, -64 to +63
Byte2 1 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Y Movement, -64 to +63
Track Ball Extended
Byte0 1 0 S2 S1 S0 T2 T1 T0 Sx - Source Addr,
Tx - Target Addr
Byte1 0 X6 X5 X4 X3 X2 X1 X0 X Movement, -64 to +63
Byte2 1 Y6 Y5 Y4 Y3 Y2 Y1 Y0 Y Movement, -64 to +63
Byte3 0 D6 D5 D4 D3 D2 D1 D0 D6 - D3 Sense Pattern,
D2 - D0 Drive Line number
* Byte4 1 C6 C5 C4 C3 C2 C1 C0 Checksum of Byte 0 - 3,
bits 6 - 0
*
NOTE: Make sure Byte1 & Byte2 make up to even parity!
Keyboard packet: Source = 5 Source address: BatmouseIII
Target = 2 Destination address: Projector
Keyboard Packet Byte0 = 0xEA
Keyboard Packet
Byte0 1 1 S2 S1 S0 T2 T1 T0 Sx - Source Addr, Tx - Target Addr
Byte1 0 0 0 0 0 D9 D8 D7 D9 0 = Key Released,
1 = Key Pressed
D8 Key Press Packet Toggle-bit
D7 Unused
Byte2 1 D6 D5 D4 D3 D2 D1 D0 D6 - D3 Sense Pattern,
D2 - D0 Drive Line number
Byte3 1 C6 C5 C4 C3 C2 C1 C0 Checksum of Byte 0 - 2, bits 6 - 0
Calculate the Check Sum as follows:
(0x7F & Byte0) + (0x7F & Byte1) + ... , then 2's comp.
A key package might have three states: Key released, key pressed or key held
pressed. D8 and D9 tell the state of the keypress. D8 toggles between consecutive
packets when key is held down.