fix(APR): correct guest resolution outputs, object layout and gather sizing #2789
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2789"
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 tototomate123 on 2026-10-10T15:00:36Z.
What
Split from #1616, following its review. Set guest errno, invalidate failed file IDs/sizes and return the successful ForEach count. Match the 24-byte object: type at 0, cursor at 4, count at 8, capacity at 12 and pointer at 16, as asserted by ampr_emu; its 32-bit type word is represented as two 16-bit fields.
Compact gathers use 12 rather than 40 bytes to avoid HFW's 1 MiB buffer exhaustion. Opcode 29 and the three-word packing are AnyPS5 internal encoding, not console opcodes; existing 40-bit offsets and lengths 1 through 2^32 are retained. Keep that distinction in the header comment and record the reference/limits in TechnicalDebt. Three commits.
Tested
Linux x86-64, GCC 16.2.1, Release.
guest_ampr_markerspasses, including guest errno/failed output handling, constrained-buffer gather execution and size/offset boundary checks. Object field offsets are asserted at compile time. Conventions and whitespace checks pass on current main (5edae353).Depends on
None for build. HFW integration also needs #2785 (relinker), #2786 (loader), #2787 (filesystem), #2788 (http), #2790 (shader). #1269 (media), #1339 (VRR), #1586 (unwind) and #1436 (imports) are now on main. Local image-table experiments are excluded; open #757 → #758 overlaps them, and #920 is closed without merging. Earlier combined integration reached menu/loading UI; these isolated branches have not been game-tested and gameplay is unverified.
Checklist
main; no duplicate implementation found beyond superseded #1616Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T15:01:48Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:21:20Z.
Checked on Linux (GCC, Release) with the PR rebased onto current
main:guest_ampr_markersandguest_ampr_threadspass (96/96 in the scoped ctest); the new test code doesn't build without the change. The 24-byte object layout matches the ampr_emu assertions, the compact gather round-trips 40-bit offsets and lengths 1..2^32 through submit, and the errno now goes to the guest errno.Added as our own commit: a TechnicalDebt line recording that the
ForEachreturn value (count of resolved paths) is not confirmed on a title; ampr_emu only passes the resolver's count through.Merging once CI is green.
Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-11T07:31:40Z.
Additional platform validation of standalone PR head
b299350a7a008cc3ce2a39c8c6140390faa1ab3e(2026-10-11):Windows: passed — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release,
BUILD_TESTING=ON.1 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run.
Checks:
guest_ampr_markers.Command after building:
ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^guest_ampr_markers$".No title/gameplay validation. These results cover the standalone head, not a merge with current main.