Omega CN1166 Video Game Controller User Manual


 
G. Error and Exception Responses
If the controller receives a message which contains a corrupted character (parity
check fail, framing error etc.), or if the CRC16 check fails, the controller ignores
the message. If the message is otherwise syntactically flawed (e.g. the byte count
or word count is incorrect) the controller will also not reply.
However, if the controller receives a syntactically correct message which
nonetheless contains an illegal value, it will send an exception response,
consisting of five bytes as follows:
The Function Number field consists of the function number contained in the
message which caused the error, with its top bit set (i.e. function 3 becomes
0x83), and the Exception Number is one of the codes contained in the following
table:
H. CRC16 Calculation
This is a 16-bit cyclic redundancy checksum. It is calculated in accordance with a
formula which involves recursive division of the data by a polynomial, with the
input to each division being the remainder of the results of the previous one.
The formula specifies that input is treated as a continuous bit-stream binary
number, with the most significant bit being transmitted first. However, the
transmitting device sends the least significant bit first.
According to the formula, the dividing polynomial is 2
16
+2
15
+2
2
+ 1 (Hex
18005), but this is modified in two ways:
i. Because the bit-order is reversed, the binary pattern is reversed also,
making the MSB the rightmost bit, and
O077-4 Volume II 4-5
Addr. Func.
Exception No.
CRC16
HI LO
Code Name Cause
1 ILLEGAL FUNCTION Function Number out of range
2 ILLEGAL DATA ADDRESS Parameter ID out of range or not supported
3 ILLEGAL DATA VALUE Attempt to write invalid data/action not
carried out
4 DEVICE FAILURE N/A
5 ACKNOWLEDGE N/A
6BUSY N/A
7 NEGATIVE
ACKNOWLEDGE
N/A