mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
3.5 KiB
3.5 KiB
libSceUlt technical debt
Unknown function info
- libSceUlt ulthreads -
_sceUltUlthreadRuntimeOptParamInitialize,_sceUltUlthreadRuntimeCreateand_sceUltUlthreadCreateare assumed to take the same arguments as the existing exports without the underscore, including the trailing build version.sceUltUlthreadTryJoinis assumed to returnULT_ERROR_BUSYwhile the ulthread runs, andsceUltUlthreadRuntimeDestroyto returnULT_ERROR_BUSYwhile an ulthread created on the runtime is not joined. Neither error has been confirmed on PS5 hardware - libSceUlt queues - the added
sceUltQueuePop,sceUltQueueTryPush,sceUltQueueDestroyandsceUltQueueDataResourcePoolDestroysignatures are inferred from the existing push/pop and object APIs. Queue destruction is assumed to reject blocked callers withULT_ERROR_BUSYand otherwise discard queued data; pool exhaustion returnsULT_ERROR_AGAIN. These rules, alignment checks and shared slot limits have not been confirmed on PS5 hardware or a title. - sceUltQueueCreate, sceUltQueueDataResourcePoolCreate - a non-null option parameter is accepted and ignored, as the other Ult create calls already do. OpenOrbis declares
sceUltQueueOptParamInitializeandsceUltQueueDataResourcePoolOptParamInitializewithout their structures; the PS Vita libult in RPCS3 defines both as a 16-byte reserved header followed by reserved fields, 128 bytes, with no settings, and fpPS4 keeps them as 128 opaque bytes. That the PS5 structures carry no settings either is assumed from these, not verified - _sceUltWaitingQueueResourcePoolCreate, _sceUltSemaphoreCreate, _sceUltMutexOptParamInitialize, _sceUltMutexCreate, _sceUltQueueDataResourcePoolCreate and _sceUltQueueCreate (libSceUlt) forward to the exports without the underscore; that their argument lists match is inferred from the other underscore Ult exports, not measured
Functional
- libSceUlt queues use preallocated host storage instead of the supplied guest work area; its existing size formula and the 512-byte object layouts remain unverified. Waiting-queue pool thread limits and waiter priority ordering are not implemented. Finalization wakes blocked queue callers with
ULT_ERROR_STATE. - sceUltWaitingQueueResourcePoolDestroy refuses with
ULT_ERROR_BUSYonly when a thread is currently waiting on a pool-backed mutex, semaphore or queue, matching the PS5 libSceUlt disassembly (0x473a in or55417wcDk); bound but idle objects do not block pool destruction. Waiting-queue pool guest work area node accounting is not implemented. - sceUltMutexDestroy returns
ULT_ERROR_BUSYwhen the mutex is held or has waiting threads, tracked via owner and waiter counts inUltMutexState. Prosper (hle_ult.cpp) logs a destroy of a held mutex and returnsULT_OK; AnyPS5 returnsULT_ERROR_BUSYto prevent destroying active mutexes.