feat(pad): hold the sticks from the controller command file #4032
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4032"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-11T21:41:33Z.
What
The controller command file for test runs (
APS5_PAD_INPUT_FILE,tools/pad_input.py) could only press buttons. A command line may now carry four more fields,leftX leftY rightX rightY, each 0-255 with 128 as the centre, and the helper gets--left-stick X Yand--right-stick X Y:While such a command is active both sticks in the pad data come from it instead of the physical controller, and they go back when it expires. Three-field lines behave as before. A line with any other field count, an axis above 255 or a field that is not a whole number is ignored, like malformed lines were; the parser now splits the line into fields first and parses each one completely.
I needed this to get past the first tutorial of Astro's Playroom (PPSA01325) in a scripted run: the level asks for the left stick before anything else.
Tested
Arch Linux, GCC 16.2.1,
main752db7da7with this commit.guest_padpasses. WithPadState.cppreverted it aborts on the new stick assertion.tools/check_conventions.py --base origin/mainpasses.guest_padand the checker pass again after the rebase ontomain34a16b7f0(2026-10-12), on NVIDIA, RADV and lavapipe. That rebase resolved a conflict inPadState.cppwith the analog trigger change merged since: the trigger rule is the one onmain, with the command file's buttons as the injected ones. Not built on Windows; the new test code uses only<chrono>,<thread>and<fstream>.Astro's Playroom on an RTX 5080 with #3669, #425, #3750, #3878 and #3933 merged locally (it does not reach the level without them):
--left-stick 128 0makes Astro run forward,255 128to the right and128 255toward the camera. PRs 3669 and 3750 have merged since; the title was not run again on the new base.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T03:17:07Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libScePad/include/InputCommandFile.hppL3, L23-24, L27, L29-30, L33-34, L43, L45-47, L54-55Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-12T06:03:35Z.
Built and tested on Windows 11 Home (10.0.26300) with MinGW-w64 GCC 15.2.0 (WinLibs r7), Release:
e0eef6c57cherry-picks cleanly ontomaind146ec1b6, andguest_padpasses (3 runs).In a title: Planet of Lana (PPSA19450) on an RTX 3070 Laptop GPU, with #4267 applied too, since the game stops before its first frame without it.
--left-stick 255 128walks Lana right and0 128left, andcross --left-stick 0 128jumps while moving left. A script of about 20 such commands replays the first three minutes from a save.