feat(libSceDiscMap): report no disc bitmap from the two disc map queries #6527
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6527"
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 SandstromPL on 2026-10-15T18:47:23Z.
What
Until Dawn (CUSA02636) bundles
libSceFios2.prx(01.00), which imports two functions from the system librarylibSceDiscMap.prx. SuperCatElvis reported the stop on #3093, on an earlier Windows checkout (#3141, #3142 and local changes): "The EXE then starts and stops at load onlibSceDiscMap.prx, imported by the bundledlibSceFios2.prx(NIDs ioKMruft1ek, lbQKqsERhtE)". No log line was posted. AnyPS5 has no libSceDiscMap; the only mention onmainis the sysmodule table entry0xd7.Bloodborne bundles an old
libSceFios2.prxtoo, and it imports the same two NIDs and no other libSceDiscMap function:libSceFios2.elf(symbols/imports.csv L690-L691).Why the missing library matters. As for #4960, every module in
sce_moduleis converted and loaded at start-up. Each module's DT_NEEDED goes into the converted executable's host libraries (GuestModuleBuilder.cpp L301-L304), solibSceDiscMap.prxis needed at start-up.On Linux, it becomes a DT_NEEDED entry of the executable (L312), found through the run path
$ORIGIN/libs, onmainand with #6381 alike.On Windows, what the start-up stub (WindowsEntryStubBuilder.cpp) does with a missing file depends on whether the imports name their library. I read both cases from the stub; I didn't run them.
main,libSceFios2.prx's imports have no library, becausemaindoesn't read the PS4 needed-module tag. So the missing file is skipped (L512-L524), and both NIDs would fail at start-up withunresolved ELF import. This title can't get there onmain: even past its earlier stops, the same untied imports stop its conversion at stop 8 (Cyclic guest initialization dependency: libSceFios2.prx), which #6381 fixes.libSceDiscMap.prxand the load is required. The start then stops withFailed to load module: ...\libs\libSceDiscMap.prx.Is it a system library? Yes. Titles ship
libSceFios2.prxinsce_module. SuperCatElvis's CUSA02636 01.00 haslibc.prxandlibSceFios2.prxthere (comment). The console provideslibSceDiscMap.prxinsystem/common/lib(ps4libdoc 9.00), and the sysmodule table lists it as module0xd7.Change. New system library
core/libs/prx/libSceDiscMap, with the two functions:lbQKqsERhtEsceDiscMapIsRequestOnHDD(const char* path, int64 offset, int64 size, int32* result)ioKMruft1eksceDiscMapUnknown_ioKMruft1ek, exported withAPS5_EXPORT)(const char* path, int64 offset, int64 size, void* flags, void* out1, void* out2)Both return
SCE_DISC_MAP_ERROR_NO_BITMAP_INFO(0x81100004) and write nothing. That is what the console library appears to return before it is initialised:libSceFios2.prx, shadPS4 lists CUSA02636 as in-game on Linux (shadps4-game-compatibility#617).sceDiscMapIsRequestOnHDD's result and 64-bit zeros to all threeioKMruft1ekoutputs, and returns 0. I found no title evidence for either.Neither function throws,
ioKMruft1ekincluded. #2686 reads every console libSceDiscMap call as returning this error while the library is uninitialised, and in that state nothing is written. So the unknown widths ofioKMruft1ek's outputs (shadPS4int*, fpPS4PInt64) don't matter here; they arevoid*and never written.Not added: the other libSceDiscMap NIDs. No title reported here imports them; Bloodborne's Fios2 also imports only these two. A title that does import one fails at start-up with a clear error.
fJgP+wqifnois the likely next one: by firmware 3.55 the systemlibSceFios2imports it instead ofioKMruft1ek, so a title that bundles a newerlibSceFios2.prxwill need it. ps4libdoc's 3.00 Fios2 importsioKMruft1ekand its 3.55 Fios2 importsfJgP+wqifno; it has no dump in between.fl1eoDnwQ4s(sceDiscMapGetPackageSize) and5+vOlukvkfg.Listed as silent stubs. Both functions are listed under Silent stubs in the new
docs/dev/debt/libSceDiscMap.md. CONTRIBUTING allows a silent stub only when it only affects the UI, and this one doesn't: its caller is Fios2, the title's file I/O library.libSceFios2.prxdoes with that error wasn't seen here. shadPS4 returns the same error to the same module, and the title is in-game there (#617, above).Tested
Ubuntu 24.04, GCC 13.3, Release with
BUILD_TESTING=ON, onmain92e50418f. Locally the libusb submodule isn't checked out, so I removed its two lines fromCMakeLists.txt.New
guest_disc_map(core/libs/tests/GuestDiscMap.cpp, registered from the library'sCMakeLists.txtas for libSceMbus) calls both functions with sentinel outputs. It requires 0x81100004 from each and every output unchanged.mainit does not build: nothing defines either function.sceDiscMapIsRequestOnHDDwrites 1 to its result, or ifioKMruft1ekwrites a 32-bit or 64-bit zero to any output.Full
cteston the RTX 3050 Ti: 1,259 of 1,264 pass.agc_driver_stencil_ref_exporton this GPU, and the VideoOut flip and frame-dump tests, which need a display.patched_librariesandguest_usbdare Not Run, because the libusb submodule isn't checked out. So I patchedlibSceDiscMap.prxby hand with the build'snid_patchercommand.libSceDiscMap.prx:agc_pending_key_storesfails onmainsince #6247.agc_driver_store_over_untrackedfails atstore over untracked: the result did not reach a block the CPU left alone. adriadam10 also sees it fail intermittently withmain's code (#5815, #5750).video_out_hdr_presentfails atSDR presentation of the DCC-cleared PQ buffer at 437 nits (clear value conversion) has no frame dump within one level of the CPU conversion, 4 runs out of 4. It passed in my first full run onmainff23657f3, before the rebase, so something inmainsince then or this host is the cause; I haven't looked further.nm -Don the NID-patchedlibSceDiscMap.prxlistslbQKqsERhtEandioKMruft1ek, andrYeuVKb2RZQ, the NID of the C namesceDiscMapUnknown_ioKMruft1ek(libScePad's unnamed exports get the same).tools/check_conventions.pyfrommainpasses with this title and body.@SuperCatElvis, if you can, could you swap this in for your local state and check that the start-up gets past
libSceDiscMap.prx? The exact start-up line from your earlier run would help too.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)main:mainthe title stops during conversion. Of the 11 stops SuperCatElvis listed ond92a8da:libSceDiscMap.prxstop was seen on their earlier Windows checkout, which passed the eboot's TLS import through.import_audit.pyrun on the executable's registry (a checkout with #3141 and #3142) counted 230 absent of 748.--lazy-bindingdoesn't apply with bundled modules.cteston NVIDIA GeForce RTX 3050 Ti Laptop GPU, driver 580.178.04, Ubuntu 24.04🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T18:48:04Z.
Progress report (
44df216→716d811)➖ System libraries: 88.8% (+0.0%, +2 implemented functions)
✅ 2 implemented
sceDiscMapIsRequestOnHDDsceDiscMapUnknown_ioKMruft1ek⚪ 2 behaviourally empty (constant return or throw)
sceDiscMapIsRequestOnHDDsceDiscMapUnknown_ioKMruft1ekImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T00:36:21Z.
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)sceDiscMapIsRequestOnHDDsceDiscMapUnknown_ioKMruft1ekcore/libs/prx/libSceDiscMap/CMakeLists.txtcore/libs/prx/libSceDiscMap/Export.cppcore/libs/tests/GuestDiscMap.cppdocs/dev/debt/libSceDiscMap.mdSome 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.
core/libs/prx/libSceDiscMap/CMakeLists.txtcore/libs/prx/libSceDiscMap/Export.cppcore/libs/tests/GuestDiscMap.cppdocs/dev/debt/libSceDiscMap.md