Commit Graph
13 Commits
Author SHA1 Message Date
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Dean Galvin 73aede5257 Merge main into feat/libscezlib-requests 2026-10-24 10:38:35 +13:00
boykopovar 6036bc6512 fix(zlib): restore validation errors and finalization behavior 2026-10-21 21:56:06 +03:00
enfuego27826 729723a60f feat(libSceZlib): throw when finalize interrupts a waiter
A thread blocked in sceZlibWaitForDone was never woken by
sceZlibFinalize, so it waited for its whole timeout or forever.
Finalization now wakes every waiter, and a waiter that sees the
service finalized throws, since no source says what the console
returns. shadPS4 leaves such a waiter blocked.
2026-10-21 12:28:25 +05:30
enfuego27826 4020c844cc feat(libSceZlib): support timed waits in sceZlibWaitForDone
sceZlibWaitForDone threw for any timeout and when no finished request
was pending. Wait on a condition variable that sceZlibInflate signals:
a null timeout blocks until a request finishes, and a timeout returns
0x81120027 (timed out) on expiry, as in shadPS4. The timeout is read
as microseconds, as SharpProspero documents for the PS5; shadPS4
reads milliseconds.
2026-10-21 12:28:25 +05:30
enfuego27826 18e4066530 feat(libSceZlib): discard unread results on finalize
sceZlibFinalize threw while a finished request's result was unread.
Discard the stored results and the finished IDs not yet returned by
sceZlibWaitForDone instead. shadPS4 also returns success here and
never reports the abandoned requests; its next initialization clears
them. An ID from before finalization reports 0x81120002 afterwards.
2026-10-21 12:28:25 +05:30
enfuego27826 a5279134a1 feat(libSceZlib): allow repeated result retrieval
sceZlibGetResult threw on a second call for the same request and on
an ID it did not hold. Return the same length and status on every
call, and 0x81120002 (not found) for an unknown ID, as shadPS4 does.
Null output pointers still throw.
2026-10-21 12:28:25 +05:30
enfuego27826 7322375923 feat(libSceZlib): accept requests while earlier results are unread
sceZlibInflate threw when an earlier request's result had not been
read. Accept the request instead: every finished request keeps its
result, and sceZlibWaitForDone returns the finished IDs in submission
order, as shadPS4's done queue does. The PS5 completion order is
unverified and recorded in the technical debt entry.
2026-10-21 12:28:25 +05:30
enfuego27826 9f32653dcf refactor(libSceZlib): track results by request ID
Keep finished requests in a map keyed by request ID and their IDs in
a completion queue instead of a single optional result. This prepares
for several outstanding requests.

sceZlibWaitForDone now pops the completion queue, so it returns each
finished request once and no longer depends on whether its result was
read, as in shadPS4's done queue. A second wait for the same request
throws as before when nothing else is pending.
2026-10-21 12:28:25 +05:30
Ishmam Ahmed 0ea7055c21 fix(libSceZlib): report a truncated stream as fatal when the output is full
inflate returns Z_BUF_ERROR both when the output is full and when the
input ends early. sceZlibInflate treated every Z_BUF_ERROR with no
output space left as insufficient output, so a stream cut off after
its last data byte, such as one missing its Adler-32 trailer, reported
0x8112001C when the output capacity equalled its decoded length, and
0x811200FF with any larger buffer. Report insufficient output only
while input remains, as zlib's uncompress2 and miniz's mz_uncompress2
do and as the technical debt entry describes.
2026-10-16 01:02:41 +01:00
Mouhand Kaddo 9f55bf71b7 fix(zlib): inherit DWARF unwinding in Windows tests 2026-10-10 02:03:59 +04:00
Mouhand-Kaddo f0cec39265 fix(zlib): inherit MinGW unwind mode for SysV exports
Remove the asynchronous unwind override so SysV exports use the project DWARF unwinding and avoid invalid SEH assembler directives.
2026-10-10 02:03:59 +04:00
Mouhand-Kaddo 8fc83ae05c feat(zlib): implement sequential libSceZlib decompression
Resolve the missing system library with checksum-validating decompression. Add behavioral tests and document unsupported request semantics.
2026-10-10 02:03:59 +04:00