# C_PAD_RINGBUF button word -- the REMAP from XINPUT_GAMEPAD into the game's
# own bit numbering. Built by sub_8220D500 and stored to ringbuf+12.
# Every row read straight out of /image/sylpheed.pe (VA - 0x82000000); the
# 'raw' column is the instruction word in the image at that address.

site       raw        XINPUT source  condition                      ring bit     bit#
8220D55C   39000001   wButtons       A                              0x00000001   0
8220D578   61080002   wButtons       B                              0x00000002   1
8220D594   61080004   wButtons       X                              0x00000004   2
8220D5B0   61080008   wButtons       Y                              0x00000008   3
8220D5CC   65080001   wButtons       START                          0x00010000   16
8220D5E8   65080002   wButtons       BACK                           0x00020000   17
8220D604   61081000   wButtons       DPAD_UP                        0x00001000   12
8220D620   61082000   wButtons       DPAD_DOWN                      0x00002000   13
8220D63C   61084000   wButtons       DPAD_LEFT                      0x00004000   14
8220D658   61088000   wButtons       DPAD_RIGHT                     0x00008000   15
8220D674   65080004   wButtons       LB (left shoulder)             0x00040000   18
8220D690   65080008   wButtons       RB (right shoulder)            0x00080000   19
8220D6AC   65080040   wButtons       L3 (left thumb click)          0x00400000   22
8220D6C8   65080080   wButtons       R3 (right thumb click)         0x00800000   23
8220D6E0   65080010   bLeftTrigger   bLeftTrigger > 0xDC (220)      0x00100000   20
8220D6F8   65080020   bRightTrigger  bRightTrigger > 0xDC (220)     0x00200000   21
8220D714   61080040   sThumbLX       sThumbLX < -20000              0x00000040   6
8220D728   61080080   sThumbLX       sThumbLX > +20000              0x00000080   7
8220D744   61080020   sThumbLY       sThumbLY < -20000              0x00000020   5
8220D758   61080010   sThumbLY       sThumbLY > +20000              0x00000010   4
8220D774   61080400   sThumbRX       sThumbRX < -20000              0x00000400   10
8220D788   61080800   sThumbRX       sThumbRX > +20000              0x00000800   11
8220D7A4   61080200   sThumbRY       sThumbRY < -20000              0x00000200   9
8220D7B8   61080100   sThumbRY       sThumbRY > +20000              0x00000100   8

# 24 mappings, covering every field of XINPUT_GAMEPAD.
# ring bits used: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23
# contiguous 0..23 with none repeated: True
