|
|
Line 10: |
Line 10: |
| {| style="border-collapse: collapse; padding: 0.2em 0.2em 0.2em 0.2em; text-align: center;" | | {| style="border-collapse: collapse; padding: 0.2em 0.2em 0.2em 0.2em; text-align: center;" |
| |- style="background-color: #ddd;" | | |- style="background-color: #ddd;" |
− | | style="background-color: #fff;" | | + | | style="background-color: #fff;" | |
− | | style="border: 1px solid #ccc; padding: 0.2em; text-align: center;" colspan="8"| '''Bit'''
| |
− | |- style="background-color: #cdc;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | '''Byte'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''7'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''6'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''5'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''4'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''3'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''2'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''1'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''0'''
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 0
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="8" | '''SX'''<span style="color: #777;"><<span style="color: #c00;">7:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 1
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="8" | '''SY'''<span style="color: #777;"><<span style="color: #c00;">7:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 2
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="8" | '''AX'''<span style="color: #777;"><<span style="color: #c00;">7:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 3
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="8" | '''AY'''<span style="color: #777;"><<span style="color: #c00;">7:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 4
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="8" | '''AZ'''<span style="color: #777;"><<span style="color: #c00;">7:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 5
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd; color:#888;" colspan="6" | Unknown
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">C</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">Z</span>
| |
− | |}
| |
− | SX,SY are the Analog Stick X and Y positions, while AX, AY, and AZ are the accelerometer data (in the same format as described in [[Wiimote#Accelerometer]]). BC and BZ are the state of the C and Z buttons (0=pressed).
| |
− | | |
− | Nintendo games calibrate the center position of the Analog Stick upon power-up or insertion of the Nunchuk.
| |
− | | |
− | = Classic Controller =
| |
− | The Classic Controller is identified by the 16-bit constant 0x0101 (0xFDFD encrypted) at register address 0xa400fe. It provides 15 buttons, two of which are analog triggers and provide both "clicked" status and a distance pressed measurement, and two X-Y analog sticks.
| |
− | == Data Format ==
| |
− | The Classic Controller reports its information as 6 bytes of data, readable at 0xa40008 and streamable using Data Reporting Modes that include Extension bytes (unused bytes are filled with 0x00). The data is packed into the six bytes as follows ('''after decryption'''):
| |
− | | |
− | {| style="border-collapse: collapse; padding: 0.2em 0.2em 0.2em 0.2em; text-align: center;"
| |
− | |- style="background-color: #ddd;"
| |
− | | style="background-color: #fff;" |
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; text-align: center;" colspan="8"| '''Bit'''
| |
− | |- style="background-color: #cdc;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd;" | '''Byte'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''7'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''6'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''5'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''4'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''3'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''2'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''1'''
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; width:3.3em;" | '''0'''
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 0
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="2" | '''RX'''<span style="color: #777;"><<span style="color: #c00;">4:3</span>></span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="6" | '''LX'''<span style="color: #777;"><<span style="color: #c00;">5:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 1
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="2" | '''RX'''<span style="color: #777;"><<span style="color: #c00;">2:1</span>></span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="6" | '''LY'''<span style="color: #777;"><<span style="color: #c00;">5:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 2
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''RX'''<span style="color: #777;"><<span style="color: #c00;">0</span>></span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="2" | '''LT'''<span style="color: #777;"><<span style="color: #c00;">4:3</span>></span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="5" | '''RY'''<span style="color: #777;"><<span style="color: #c00;">4:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 3
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="3" | '''LT'''<span style="color: #777;"><<span style="color: #c00;">2:0</span>></span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" colspan="5" | '''RT'''<span style="color: #777;"><<span style="color: #c00;">4:0</span>></span>
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 4
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">DR</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">DD</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">LT</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">-</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">H</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">+</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">RT</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #ddd; color: #888;" | 1
| |
− | |- style="background-color: #ded;"
| |
− | | style="border: 1px solid #ccc; padding: 0.2em; background-color: #eee;" | 5
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">ZL</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">B</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">Y</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">A</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">X</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">ZR</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">DL</span>
| |
− | | style="border: 1px solid #ccc; padding: 0.2em;" | '''B'''<span style="color: #c00;">DU</span>
| |
− | |}
| |
− | LX,LY are the left Analog Stick X and Y (0-61), RX and RY are the right Analog Stick X and Y (0-31), and LT and RT are the Left and Right Triggers (0-31). The left Analog Stick has twice the precision of the other analog values.
| |
− | | |
− | BD{L,R,U,D} are the D-Pad direction buttons. B{ZR,ZL,A,B,X,Y,+,H,-} are the discrete buttons. B{LT,RT} are the digital button click of LT and RT. All buttons are 0 when pressed.
| |
− | | |
− | Nintendo games calibrate the center position of the Analog Sticks upon power-up or insertion of the Classic Controller.
| |
− | | |
− | | |
− | [[Category:Hardware]]
| |