Pad input: buttons to pad bits

Decoded from the Store build 1.3.25854.2 executable. Completes “Lock-on and targeting” and “Play camera → Sticks”.

Per-frame read (0x14028ea10 → 0x14028e710 per pad, up to 4): the platform wrapper (0x1400dda60) fills a state block laid out like the common PC gamepad state: u16 buttons at +4, trigger bytes at +6 (left) and +7 (right), s16 sticks at +8 (left x, left y, right x, right y). The game turns it into a 32-bit button word plus four stick values, kept per pad at 0x1405a5ce0 + pad × 0x30 (+0x1c word, +0x20 left x, +0x24 left y, +0x28 right x, +0x2c right y). A pad that is not connected gives all zeroes (flag byte per pad at 0x14054ca58).

Pad bit Mask Button
0 / 1 / 2 / 3 0x1 / 0x2 / 0x4 / 0x8 d-pad up / down / left / right
4 0x10 A
5 0x20 B
7 0x80 X
8 0x100 Y
9 0x200 right shoulder
10 0x400 left trigger
11 0x800 right trigger
12 0x1000 Start
13 0x2000 Back
24 0x1000000 left stick click and left shoulder (both rows give the same bit)
25 0x2000000 right stick click

Pad objects (4 × 0x34 bytes at 0x14059b800, update 0x1401d1250 once per frame):

Offset Meaning
+0x0 held (the button word)
+0x4 pressed = held now and not the frame before
+0x8 repeat = pressed, then again every interval frames while held after delay frames
+0xc held the frame before
+0x10 / +0x11 repeat delay / repeat interval (bytes)
+0x14 32 countdown bytes, one per bit

Menus read pressed / repeat; the character input fill (0x140256580) copies held into the character (C + 0x1425c) and makes its own previous / pressed pair there.

Pad bit → action in a battle (from the sections that read each bit):

Bit Button Action Where
0x800 right trigger lock (toggle / hold by option) “Lock-on and targeting”
0x400 left trigger switch target; also the spectator’s next-player “Lock-on”, “Play camera”
0x1000000 left stick click or left shoulder the character’s evade / jump “The evade”
0x2000000 right stick click camera re-centre “Play camera”
0x10 / 0x20 / 0x80 / 0x100 A / B / X / Y the four skill buttons (M: which bit is which slot follows the skill record’s button field; not re-read here) “Skill table”
sticks left / right move / camera (dead zone 13000, ÷ 19767) “Play camera → Sticks”

Lock options: three bytes at 0x14052dfb7 (lock button mode 0 toggle / 1 hold / 2 hold and keep), 0x14052dfb8 (switch by distance order) and 0x14052dfb9 (teammates lockable); all 0 on a fresh save.

Not decoded: right shoulder (0x200), Start, Back and the d-pad in a battle (pause, deck view and chat are the candidates; L); the options screen entries that write the three lock bytes; the keyboard bindings; the sort direction of the distance-ordered switch.

Implementation notes for the rebuild