Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Controller format:
- AABBXXYY
- Each analog direction is a signed byte, 0x00 - 0x7F (0 - 127) is positive and 0x80 - 0xFF (-128 to -1) is negative
- XX : X Direction on analog stick, Range 0x00-0xFF (-128 to 127)
- YY : Y Direction on analog stick, Range 0x00-0xFF (-128 to 127)
- Each button is a single bit
- AA : Sum of all d-pad, A, B, Z and Start, Range 0x00-0xFF (however some require all/opposite d-pad directions)
- A = 0x80 , ( 1 << 7 ) , 0b10000000
- B = 0x40 , ( 1 << 6 ) , 0b01000000
- Z = 0x20 , ( 1 << 5 ) , 0b00100000
- Start = 0x10 , ( 1 << 4 ) , 0b00010000
- d-up = 0x08 , ( 1 << 3 ) , 0b00001000
- d-down = 0x04 , ( 1 << 2 ) , 0b00000100
- d-left = 0x02 , ( 1 << 1 ) , 0b00000010
- d-right = 0x01 , ( 1 << 0 ) , 0b00000001
- BB : Sum of all c-buttons, L and R, Range 0x00-0x3F
- L = 0x20 , ( 1 << 5 ) , 0b00100000
- R = 0x10 , ( 1 << 4 ) , 0b00010000
- c-up = 0x08 , ( 1 << 3 ) , 0b00001000
- c-down = 0x04 , ( 1 << 2 ) , 0b00000100
- c-left = 0x02 , ( 1 << 1 ) ,0b00000010
- c-right = 0x01 , ( 1 << 0 ) , 0b00000001
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement