mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
Cult of the Lamb (PPSA06465) imports libSceContentSearch, including sceContentSearchGetContentLastUpdateId, OpenMetadataByContentId, GetTotalContentSize and GetNumOfContent (import audit in #2686), which were declared without parameters and threw. Give the nine pending calls the signatures of AlexAltea/orbital db_types.json (cc408367, lines 555-569) and SharpProspero Interop/Content/ContentSearch.cs (5dfdb4b0), and implement the content library the host has, which is empty: - GetNumOfContent, GetTotalContentSize and SearchContent report 0 rows and 0 bytes, GetContentLastUpdateId and the search calls report update id 0. A search limit above 92 returns 0x809D100A and every call before Init returns 0x809D1001, both from SharpProspero. - Filters and sort conditions use SharpProspero's layouts (added to SceTypes.hpp with size checks) and are checked against its enums; unknown values, null outputs and null arrays with a length throw. - OpenMetadata and OpenMetadataByContentId throw, as no source gives the error for content that is not in the library, so no metadata id is handed out and CloseMetadata, GetMetadataFieldInfo and GetMetadataValue throw too. The update id value, the argument errors and the check order are recorded in TechnicalDebt. The four ContentSearch calls leave the unimplemented-imports test, and guest_content_search covers the library.
6 lines
1.8 KiB
Markdown
6 lines
1.8 KiB
Markdown
# libSceContentSearch technical debt
|
|
|
|
### Functional
|
|
|
|
- [libSceContentSearch](../../../core/libs/prx/libSceContentSearch/Export.cpp) searches a content library that is empty on the host, as nothing is exported to it. The signatures follow [AlexAltea/orbital](https://github.com/AlexAltea/orbital/blob/cc408367da6a6ebbf5ac1ac559fefeadc73b2831/tools/ida/db_types.json#L555-L569) and [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Content/ContentSearch.cs#L255-L316), which agree; the filter and sort layouts and enums, the limit of 92 rows, `0x809D100A` for a larger limit and `0x809D1001` before `sceContentSearchInit` are SharpProspero's. `sceContentSearchGetNumOfContent`, `sceContentSearchGetTotalContentSize` and `sceContentSearchSearchContent` report 0 rows and 0 bytes without writing a content row, and the update id they and `sceContentSearchGetContentLastUpdateId` report is always 0; no reference gives the console's update id for a library that never changed. Filters and sort conditions are only checked against SharpProspero's enums, and a null output, a null array with a non-zero length, an empty column set, a null filter value or an unknown enum value throws, as the console's errors for them are unknown; a null column set with length 0 is taken as no filter. `sceContentSearchOpenMetadata` and `sceContentSearchOpenMetadataByContentId` throw, as no reference gives the error for a path or content id that is not in the library, so no metadata id is ever handed out and `sceContentSearchCloseMetadata`, `sceContentSearchGetMetadataFieldInfo` and `sceContentSearchGetMetadataValue` throw. Every title is taken to hold the content-search permission (SharpProspero's `0x809D1013` is never returned). The order of the initialization, argument and limit checks is unverified
|