mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
Take main's restored signatures (the firmware-database sweep of 2026-10-21): the typed UsbStorageCallback across the register/unregister family, the UsbStorageDeviceInfo-typed device-info query, IsExist's three-argument bool form (succeeds and reports non-existence with no device attached), and RequestMap's six parameters with the trailing reserved pair dropped. The no-device answers and the argument validation are unchanged; the guest test passes an APS5_VABI callback and pins the exists out-parameter.
6.0 KiB
6.0 KiB
libSceUsbStorage technical debt
Silent stubs
- sceUsbStorageInit, sceUsbStorageTerm (libSceUsbStorage) - no USB mass-storage device is ever attached, so there is nothing to initialize or tear down: both accept every call and keep no state, as shadPS4 does with its plain ORBIS_OK returns. A passthrough that lists devices must build its list in
Initand free it inTerm.
Unknown function info
- sceUsbStorageRegisterCallback, sceUsbStorageUnregisterCallback, sceUsbStorageRegisterCallbackForMapAvailable, sceUsbStorageUnregisterCallbackForMapAvailable, sceUsbStorageRegisterCallbackForMapUnavailable, sceUsbStorageUnregisterCallbackForMapUnavailable (libSceUsbStorage) - what a successful registration stores, what unregistering a never-registered callback answers, and when any callback fires is unverified: no device is ever attached, and shadPS4 logs all six as
(STUBBED)and returns 0 without storing anything, the success-without-a-reference pattern #6288 was closed for. The argument validation is implemented (0x80f40002 for a null callback, an event type outside 1 and 2, or a null directory); past it they keep the marker until a reference or a measurement says what success does. - sceUsbStorageRequestUnmap, sceUsbStorageGetdentsClose (libSceUsbStorage) - what the console answers for a directory that was never mapped and a getdents descriptor that was never opened is unknown: nothing can be mapped or opened in this model, shadPS4's unmap only logs without keeping state and its close succeeds only because
eraseignores a missing key, and the no-device libraries throw on this path (sceMoveClosefor a handle that was never opened,sceContentSearchCloseMetadatabecause no metadata id is ever handed out). Both keep the marker after their argument validation. - sceUsbStorageClearFakeWriteProtection, sceUsbStorageSetFakeMapLockForDebug, sceUsbStorageSetFakeWriteProtection (libSceUsbStorage) - names and NIDs are present in the PS5 3.20 export inventory, but no credible prototypes were found. They are declared without parameters solely to resolve known imports; this is not an ABI claim.
- sceUsbStorageGetMountPointOfShellCore (libSceUsbStorage) - the prototype is known, but no reference says what a console without a mapped device writes into the mount-point buffer or returns; it keeps the marker until a reference or a console measurement answers it.
Functional
- the argument validation (libSceUsbStorage) - the null-pointer, null-callback, event-type and null-directory refusals with 0x80f40002, and the getdents read of a never-opened descriptor answering 0x80f40005 with zero bytes, follow shadPS4; the validation runs before the markers the register, unregister, unmap and getdents-close exports keep above. None of this is measured on a console.
- the no-device answers (libSceUsbStorage) - AnyPS5 has no USB mass-storage passthrough, so no device is ever attached: the device list is empty,
sceUsbStorageIsExistsucceeds and reports non-existence for every device id and directory, and the device-info query and the map and getdents-open requests answer 0x80f40004 for every device id. A passthrough that lists devices follows shadPS4's virtual-device model at the same commit for the filled paths, including its packed dirent. - the device-info record (libSceUsbStorage) - the 0x338-byte record a passthrough fills for
sceUsbStorageGetDeviceInfois unverified on hardware; its layout follows SharpProspero, which recovered it from the module's own export and was checked against #6288's "volume size at 0x0": the u64 volume size at offset 0, the vendor, product and serial strings at 0x16, 0x120 and 0x228, and the flags field the service masks with 0xd0 at 0x330. shadPS4's record starts with a u32 device id at offset 0; filling it that way puts a device id where a title reads the volume size. - the prototypes of sceUsbStorageRequestMap and sceUsbStorageGetDeviceList (libSceUsbStorage) - the signatures follow the ABI restored on
main(the firmware-database sweep of 2026-10-21), which matches shadPS4:RequestMap's six parameters, the typedUsbStorageCallbackof the register/unregister family,IsExist's three-argument bool form andGetDeviceList'sstd::int32_t*count (the count also follows SharpProspero, whose earlier eight-parameterRequestMapreading carried the trailing reserved pair the restored ABI drops).