feat(libSceDiscMap): report no disc bitmap from fJgP+wqifno #23349
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23349"
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 adam25136 on 2026-11-18T22:23:28Z.
What
fJgP+wqifnois a libSceDiscMap export with no known name. libSceFios2 calls it with a path, an offset, a size and three output pointers. Onmainit throws as an unimplemented NID. Onmainwith two open PRs merged, #17711 and #18184, inFAMOUS Second Son (CUSA00223) stops at the first call from its bundled libSceFios2. The code depends on neither PR.Export.cpp:sceDiscMapUnknown_fJgP_plus_wqifnoreturnsSCE_DISC_MAP_ERROR_NO_BITMAP_INFO(0x81100004) without reading or writing its arguments, likesceDiscMapIsRequestOnHDDandioKMruft1ek.Api.hppdeclares it, and the placeholder inInventoryExports.hppis removed.tests/GuestDiscMap.cpp(guest_disc_map) checks that it returns0x81100004and writes none of its three outputs, and that it returns it for a call fpPS4 would refuse on every check (null pointers, size 0, offset -2).docs/dev/debt/changes/discmap-fjgp-no-bitmap.mdmoves it from the placeholder table to an Unknown function info entry, and the libSceDiscMap entry names it next to the three other exports.Where the answer comes from (the console's answer is not measured):
NO_BITMAP_INFOwhile it is clear. Before it, shadPS4 loaded the real module when one was supplied, and it called this answer "likely the same we do when we load this lib lle". #6527 drew on it for two of this function's siblings, andmain's debt file gives that answer, before any argument check, for all three; forsceDiscMapGetPackageSizea PC run of the 13.42 module confirms it (#8647).Func_7C980FFB0AA27E7A, registered asfJgP+wqifnoat line 40), and fpPS4 after its own argument checks (0x81100001for a size of 0 or less, an offset below -1 or a null pointer). #2686 was written on suggestions from fpPS4's author, so shadPS4's code, its note and fpPS4 are not independent sources. This PR follows #2686's note and the three siblings; the debt entry records the difference.This carries the
fJgP+wqifnopart of DealPotato's #10531 (its answer, signature and reading of the outputs), with DealPotato as co-author. A bot closed #10531 for the open-PR limit, not on review. On 2026-11-16 I asked there whether they knew the console's answer and whether I could carry this part; there has been no reply so far. I also wrote there that I'd rather not claim an answer for this function without evidence like the siblings'. There is still none specific to it: this answer rests on #2686's note about the whole module, as two of the siblings' answers did.Tested
Windows 10 Pro 19045, NVIDIA GeForce RTX 5080 (driver 621.14), WinLibs GCC 15.2.0 r7, Release. This branch (
351c279b25) onmainc23832d809, rebased after the Windows check failed onmain's LibreSSL AES tests (since reverted). The selected-test, SPIR-V-tools and title runs, the overlap check and three of the breaks were on cd214f37f0, onmain82a8824748; the other two breaks on 2841cc1131, onmain866864a5bc. The changes since cd214f37f0 are one test argument (offset -2 in the null-argument call), the debt fragment's wording and the commit message, and the newermaincommits change none of this PR's files. On351c279b25,guest_disc_mappasses.guest_disc_mappasses. Each deliberate break fails it, and the restored code passes:NotImplemented_nid_no_patch): "sceDiscMapUnknown_fJgP_plus_wqifno not implemented" (on 2841cc1131);tools/select_tests.py selectpicks for the four changed source files (1,129), run withselect_tests.py ctest build --parallel 4 --timeout 120andANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1on the branch and onmain: the same one fails on both (check_compile_test_windows_quoted_response_tokens_match_clang), and none is skipped.ANYPS5_ENABLE_SPIRV_TOOLS=ON: everything builds exceptagc_driver_upload_cache_read_only_flush_tests, which fails the same way in the normal builds of this branch and ofmain(setenvis not declared).main82a8824748with #17711 (d20cbd0eb3) and #18184 (983c302fd1) merged locally. #17711 conflicts withmain; its one conflicting file,libSceGnmDriverForNeoMode/Export.cpp, keptmain's version.0x2f2fa2500's image descriptor (format 22, a 2D MSAA image,dim 6) is refused. #21961 (open) removes that refusal; the title then stops at the same dispatch in the driver.tools/check_conventions.pywith this title and description, andtools/debt_fold.py --check, pass.tools/pr_overlap.py --branch(cd214f37f0) found no overlap among the 1,971 open pull requests except #8647, which it could not compare because #8647 conflicts withmain(the tool fails closed, exit 2). By hand, #8647 changessceDiscMapGetPackageSizein the same two files, not this function.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)AI-assisted: Claude Code applied DealPotato's answer and test, added the null-argument check, wrote the debt entry, ran the tests and the title, and drafted this description; separate review agents checked it.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T22:24:41Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
2841cc1131:tools/check_conventions.pypassed.guest_disc_map_testsbuilt cleanly.guest_disc_map):core/libs/prx/libSceDiscMap/Export.cpp,core/libs/prx/libSceDiscMap/include/Api.hpp,core/libs/prx/libSceDiscMap/include/InventoryExports.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T01:25:02Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the implementation follows the documented no-bitmap behavior, while its function-specific behavior remains an inference rather than a console measurement.
What I ran
Head reviewed:
351c279b25d5e4eaf2f9ea6d207a197291764bb4. I read the prepared description, commit summary, manifest, diff, and all five changed files. I did not run tests or other commands; the checks listed in the description are author-reported.Results
Findings
Blocking
None.
Non-blocking
fJgP+wqifnoare supported by an inference from the module-wide Ghidra note and sibling behavior, and are explicitly documented as unmeasured. Console confirmation would strengthen this behavior claim. Changed implementation:core/libs/prx/libSceDiscMap/Export.cpp:35.Not verified
I did not run the tests or build, verify author-reported results, or confirm behavior on console hardware. All files listed in
review/manifest.jsonunder changed were read;files.jsonwas unavailable through the review reader, so exclusions beyond the manifest were not verified.To get this to a good state
Nothing is required. Optional: record a console measurement for this export when available.