14 KiB
14 KiB
Project technical debt
Build
- Building on Windows requires a specific version of mingw - MinGW-w64 GCC 15.2.0 (
winlibs-gcc15,x86_64-ucrt-posix-seh) - Even compiled prx libraries on Windows require nearby (static linking of these dependencies causes conflicts):
- libgcc_s_seh-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
Silent stubs
Throughout the project, every function at every stage either does exactly what it's supposed to or throws an exception. Everywhere... except:
- libSceSaveDataDialog.native
- libSceCommonDialog
- libSceErrorDialog - the error dialog runs the state machine but shows nothing; the error code passed to
sceErrorDialogOpenis only logged - libSceHmd implements only the disconnected-headset path: initialization succeeds, device queries report
NotDetected, and opening a device returnsDeviceDisconnected. Headset support, tracking, rendering and additional HMD exports are not implemented; SDK-level ABI compatibility and in-game behaviour remain unverified. - libSceAudioPropagation implements only the no-acoustic-propagation path: the system keeps a 16-byte header in the title's CPU memory (no GPU memory), rooms, portals, sources and materials are tracked handles, attributes are validated and have no effect, no rays are requested and sources report no audio paths. Ray results, path calculation and audio paths are accepted only when empty and throw otherwise;
sceAudioPropagationSourceRenderwrites silence (zeroes) to each source's output buffer for the given size, without a dry signal. Objects still alive when their system is destroyed become unusable, and their later destroy or unregister is a no-op: PPSA21567 releases its reference-counted room, portal and source owners just beforesceAudioPropagationSystemDestroy, so the order for every object is not proven. Occlusion, reflections and reverb from level geometry are absent; in-game behaviour remains unverified. - libSceNpCommerce - the PS Store icon show/hide calls do nothing
- sceVideoOutOpen validates the priority and CPU affinity that the open param requests for the VideoOut service thread but does not apply them: the port's present and vblank threads are host threads, and guest priorities and affinities do not reach host scheduling
- The shader recompiler skips baryctric coordinates (is not even passed to SpirvTargetOptions at row 212).
- libSceAvPlayer:
sceAvPlayerSetLogCallbackaccepts a callback that is never called, as the player produces no log messages, andsceAvPlayerSetAvailableBandwidthhas no effect, as it governs HLS sources, whichsceAvPlayerAddSourcedoes not implement. - sceAvPlayerSetTrickSpeed (libSceAvPlayer) with a negative speed runs the clock backwards but delivers no frames; when a forward speed is set again, playback resumes from the rewound time.
Unknown function info
- sceVideoOutOpen (libSceVideoOut) - the open param's first word is unknown (PPSA21564 passes 16; it is not the byte size, since the affinity mask is at offset 16); only 16 is accepted. Whether the param continues past offset 24 is also unknown
- sceRtcParseDateTime (libSceRtc) - accepted format assumed to be the ISO 8601 subset
YYYY-MM-DDTHH:MM:SS[.ffffff](T/t/space separator, optional fractional seconds) with the sibling RFC 3339 zone suffix (Zor±HH:MM); a string without a zone is taken as UTC, and anything outside this shape throws instead of returning a parse error, unverified against hardware - AMPR WaitOnAddress / WaitOnCounter (libSceAmpr) - compare encoding assumed to be the WAIT_REG_MEM one (0 always, 1 <, 2 <=, 3 ==, 4 !=, 5 >=, 6 >)
- AMPR markers (libSceAmpr) - signatures taken from the ampr_emu reimplementation, not confirmed on a title:
sceAmprCommandBufferSetMarkerWithColortakes the color by pointer, the push and measure variants by value. Colors are not recorded - sceAgcSetSubmitMode (libSceAgc) - mode values unknown; only 0 is accepted
- zARR5aCmkoY (libSceAgc) - unknown name, signature
- qj7QZpgr9Uw (libSceAgc) - unknown name
- fd5Bp5tGTgo (libSceAgc) - unknown name
- dolOmWH+huQ (libSceAgc) - unknown name
- V++UgBtQhn0 (libSceAgc) - unknown name
- gQkqkLttcpw (libSceAgc) - unknown name, signature
- sceKernelInternalMemoryGetModuleSegmentInfo (libkernel) - unknown signature
- sceKernelSyncOnAddressWait (libkernel) - the only known caller passes a null timeout and a name string as the fourth argument; the timeout is assumed to point to microseconds like the other kernel waits, and the name is ignored
- sceKernelMapNamedFlexibleMemoryInternal (libkernel) - flag 0x8000 unknown; only the sceKernelMapNamedFlexibleMemory flags are accepted
- sceLibcInternalBacktraceForGame (libSceLibcInternal, implemented in libc) - unknown signature
- sceLibcInternalHeapErrorReportForGame (libSceLibcInternal, implemented in libc) - unknown signature
- __progname (libkernel) - unknown data export
- pthread_barrierattr_setpshared (libkernel) - PTHREAD_PROCESS_SHARED throws: FreeBSD 9.0 libthr rejects it with EINVAL and 11.0 accepts it, and which one the console follows is unknown
- sceSslClose (libSceSsl) - unknown signature
- sceSslGetSerialNumber (libSceSsl) - unknown signature
- X+4jdIS75P0 (libSceAudioIn) - unknown name, signature
- sceAudioOutSetMixLevelPadSpk (libSceAudioOut) - effect of a negative mix level unknown; only 0 to 32768 (0 dB) is accepted
- sceAudioOutSetMixLevelPadSpk (libSceAudioOut) - no source applies the level (shadPS4 only stores it); it is assumed to be a linear gain on the port's own output, and the -9 dB default (11626) is applied to every pad speaker port, including those of titles that never call the function
- AOWqIYsgVHs (libSceContentExport) - unknown name, signature
- GQTObcITIXI (libSceShare) - unknown name, signature
- BnMAMrsfVWo (libc) - unknown name, signature
- AudioIn, NpSessionSignaling and PlayerInvitationDialog exports added without an implementation have assumed signatures
- libSceAudioPropagation (libSceAudioPropagation) - signatures and struct descriptors recovered from PPSA21567's calls (#481), not from documentation. The system options layout is unknown (only checked for non-null); the fourth argument of
sceAudioPropagationSourceCalculateAudioPathsis unknown;sceAudioPropagationSourceGetAudioPathis assumed to output an 8-byte path handle. The meaning of theRenderInfoword at +0x28 is unknown (PPSA21567 and PPSA21564 pass 2); only 2 is accepted. Both titles pass oneRenderInfoper call: a count of 0 throws, and larger counts are handled element by element without proof. No error code is known, so invalid input throws instead of returning one - sceAvPlayerStartEx (libSceAvPlayer) - start info layout unknown; it is ignored and playback starts as with
sceAvPlayerStart - sceAvPlayerInit / sceAvPlayerInitEx (libSceAvPlayer) - behaviour without a memory replacement unknown; frame and sample buffers then come from the guest heap
- SceAvPlayerVideoEx (libSceAvPlayer) - frame rate field and encoding unknown; it is left zero in frame and stream info
- sceAjmDecMp3ParseFrame (libSceAjm.native) - signature, result layout and rate tables taken from the shadPS4 reimplementation of the PS4 library, not confirmed on a PS5 title: the layer field is not checked and MPEG-2.5 stops at 64 kbps
- AJM Opus decoder (libSceAjm.native, codec 24) - the initialize parameter layout (
u32 channels, u32 sample rate, u32, seen as2, 48000, 0) and the little-endianu16byte count before each packet come from one title (The Smurfs Dreams); only 48000 Hz and a zero third word are accepted
Functional
- The shader recompiler ignores
s_setreg_b32: writes to MODE (float rounding and denormal controls) and the other hardware registers have no effect. - Shader recompilation currently occurs right before it was transferred to Vulkan with caching, but should be moved to the relinker stage. For this purpose, shader/recompiler was written completely independently from libs/prx.
- v_fma_f64 is fused exactly only for normal inputs: with a subnormal input it is a separate multiply and add, which rounds twice.
- The executable file that relinker generates opens the console when launched, which is inconvenient for playability.
- libSceJpegEnc encodes 4:2:2 sampling requests with 4:2:0 chroma subsampling, and grayscale requests as a 3-component JPEG with neutral chroma instead of a single-component one: the JPEG encoder (stb) only produces 3-component 4:2:0 and 4:4:4 images.
--to-inteldoes not lower RDPRU/MCOMMIT; the matcher fails the relink instead. SHA-1 instructions with a memory operand and SHA-256 instructions with a RIP-relative operand fail the relink.- The length-changing path of the instruction rewriter is not used by the converter: it does not adjust VEX/0F38/0F3A RIP-relative operands, data-to-code references (relocations, FDEs, jump tables) or segment sizes, so every substitution keeps the instruction length.
- The Linux placement of the
--to-intelstubs in the ELF patcher is covered only by a synthetic test. - The libc SSE4a trap emulation on Windows is superseded by
--to-inteland remains only until the relinked title has been verified without it. --to-intelguest module trampolines are covered only by a synthetic relinker test; no game title has been verified with them on Linux or Windows.--to-intelreplaces the approximate VEX.128 register forms of VRSQRTPS and VRCPPS with correctly rounded 1/sqrt(x) and 1/x, not with the AMD approximation: its tables are not public. Intel's approximation of 1/sqrt(1.0) is 0x3F7FF000, and two Newton-Raphson steps on it settle on 0.99999994 instead of 1.0; a renormalised identity quaternion then turns into a NaN axis in PPSA21564, which the console does not show. Refined results now reach the exact value; unrefined ones can still differ from the console in the low bits. Each site costs an out-of-line stub (two jumps, a spill below the red zone, SQRTPS/DIVPS). The 256-bit, scalar, legacy and memory forms keep the native instruction, as does a 4-byte site with no movable instruction after it for the jump (5 sites in PPSA21564).- sceKeyboardGetKey2Char (libSceKeyboard) translates only the 101-key (US) arrangement and throws for the 106-key (Japanese) one; Ctrl and Alt do not change the character.
- libSceAudiodec throws for the 24-bit PCM word size (
iBwPcm0): its sample layout is unknown. ATRAC9 decoding is covered only by configuration and error tests, as no ATRAC9 encoder is available for a fixture. - sceAjmDecMp3ParseFrame (libSceAjm.native) throws when the original file length is requested (
parse_oflnon-zero): reading it from the frame's Xing/Info, VBRI or Fraunhofer data is not implemented. - libScePngEnc honours
filter_typeonly as all filters (adaptive) or a single filter: the PNG encoder (stb) cannot restrict adaptive filtering to a subset, so the first filter in the mask is used. - libScePlayerInvitationDialog simulates dialog completion without displaying UI or sending invitations; its parameter ABI remains unverified.