Advertisement
Thar0

OoT Controller Format

Jan 24th, 2020 (edited)
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Controller format:
  2.  
  3. AABBXXYY
  4.  
  5. Each analog direction is a signed byte, 0x00 - 0x7F (0 - 127) is positive and 0x80 - 0xFF (-128 to -1) is negative
  6.  
  7. XX : X Direction on analog stick, Range 0x00-0xFF (-128 to 127)
  8.  
  9. YY : Y Direction on analog stick, Range 0x00-0xFF (-128 to 127)
  10.  
  11. Each button is a single bit
  12.  
  13. AA : Sum of all d-pad, A, B, Z and Start, Range 0x00-0xFF (however some require all/opposite d-pad directions)
  14. A = 0x80 , ( 1 << 7 ) , 0b10000000
  15. B = 0x40 , ( 1 << 6 ) , 0b01000000
  16. Z = 0x20 , ( 1 << 5 ) , 0b00100000
  17. Start = 0x10 , ( 1 << 4 ) , 0b00010000
  18. d-up = 0x08 , ( 1 << 3 ) , 0b00001000
  19. d-down = 0x04 , ( 1 << 2 ) , 0b00000100
  20. d-left = 0x02 , ( 1 << 1 ) , 0b00000010
  21. d-right = 0x01 , ( 1 << 0 ) , 0b00000001
  22.  
  23. BB : Sum of all c-buttons, L and R, Range 0x00-0x3F
  24. L = 0x20 , ( 1 << 5 ) , 0b00100000
  25. R = 0x10 , ( 1 << 4 ) , 0b00010000
  26. c-up = 0x08 , ( 1 << 3 ) , 0b00001000
  27. c-down = 0x04 , ( 1 << 2 ) , 0b00000100
  28. c-left = 0x02 , ( 1 << 1 ) ,0b00000010
  29. c-right = 0x01 , ( 1 << 0 ) , 0b00000001
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement