Repository navigation
fix(libSceAgc): accept register range values at any byte address, as the console does - #7606
Open
hugodearaujo wants to merge 1 commit into
Open
hugodearaujo wants to merge 1 commit into
hugodearaujo wants to merge 1 commit into
Conversation
12 tasks done
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
11 tasks done
12 tasks done
12 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On a PS5,
sceAgcCbSetShRegisterRangeDirect,sceAgcCbSetUcRegisterRangeDirectandsceAgcDcbSetCfRegisterRangeDirecttake the register values from whatever byte address the title passes and copy them into the packet. HereWriteRegisterRangerequiredvaluesto be 4-byte aligned and threwnull or misaligned addressotherwise.This PR copies the values with
memcpyfrom any address. Nothing else changes: a nullvaluesstill reserves the payload without writing it, which is what the console does in the SH and UC calls, and the single register setters (which pass the address of their own field) and the register list writers keep their checks.Title
EA SPORTS FC 25 (PPSA20049, 01.000.028), on
maine5f18ea with #6343, stops 8 s after start with:Its render module
Engine.Render.Core2.PlatformPs5.prxpasses four SH register values that start 0x68 bytes into one of its objects, which sits at an odd address (the call is at module offset 0x8adea, count 4). With this PR it gets past that call: it shows its splash screen, the EA SPORTS intro video and its notice that online features need PlayStation Network and the EA servers, then stops 230 s after start on a compute shader table call that #7413 links (computed/data-dependent s_swappc_b64 call target at program counter 0x000004c4 is not statically resolvable). With #7413 as well, it reaches its main menu and was still there when the 620 s run ended. All runs usedAPS5_LAZY_SHADER_PREPARE=1andANYPS5_NO_SHADER_CACHE=1; the runs with and without this PR differed only inlibSceAgc.prx.Without #6343 it stops 32 s after start at
kevent: EVFILT_READ on a descriptor that is neither a socket nor the read end of a pipe not implemented, without reaching this call.Measured
PS5, firmware 13.60, from a homebrew payload process that calls the system's own
libSceAgcthroughdlopen/dlsym. Each function was called withvaluesat byte offsets 0 to 8, 12 and 13 from a 64-byte aligned buffer whose bytes are0x10 + i, with 1 and 4 values, each time on a fresh 64-word command buffer filled with0xCCCCCCCC; a second payload called each one with a nullvalues.values0xCCCCCCCC)This PR changes only the first row; the null CF case is left as it is.
Probe output (PS5 firmware 13.60, payload process)
Tested
agc_register_command_testsnow calls the three functions withvaluesat byte offsets 1, 2, 3 and 13 and checks the words the console wrote;agc_commandsexpects the bytes at offset 1 to be copied where it expected the throw. WithPacket.cppas onmainboth tests fail.-j8, 1441 of 1443 pass.agc_driver_tessellationsegfaults the same way without this PR.agc_driver_bda_devicefails withan anchored BDA read differs from the same read through the lookups; it does not build or loadPacket.cpp, whose only users arelibSceAgcand its tests.BUILD_TESTING=ON, no GPU: full CTest, no failures out of 1485;agc_driver_gated_dispatch_capture_short_timeoutis skipped there.tools/check_conventions.pypasses.tools/pr_overlap.pyfinds no overlap with open pull requests; fix(agc): synchronize pending writes before command allocation #6747 also changesPacket.cpp(it conflicts withmain, so the tool could not compare it): it adds a call inAllocate, andgit merge-treemerges the twoPacket.cppchanges without a conflict.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code