0.1.4-alpha
v0.1.4-alpha
nightly / pre-release
Release notes · 2 files
Added
- On-screen keyboard for games' text input dialogs (sceImeDialog), drawn over the game: type on the keyboard (Enter accepts, Esc cancels) or use the controller (D-pad and Cross on the keys, Circle cancels, Triangle space, Square delete, L1 / R1 move the caret, L2 shift, R2 or Options accept), or click the keys. The game's pads read released while it is shown, and buttons still held when it (or the in-game menu) closes reach the game only after they are released. Before, the dialog was accepted at once with a default text (Demon's Souls' character name). Runs without a window, scripted runs and input recordings and replays still finish the dialog by themselves;
RPS5E_IME_HEADLESS=1does so with a window too.
Changed
- Play mode no longer waits for shaders at all: a draw whose pipeline is still compiling is skipped from the first frame and drawn from the frame its pipeline is ready (the per-frame wait of 3 ms is now 0,
--compile-wait); a pipeline the pipeline cache already holds is made on the spot instead of being skipped (RPS5E_INLINE_PROBE). Draws that write memory, draws without render targets and compute dispatches still wait, since the game and later GPU work read what they write. - The saved shader list of a game is built in the background while the game runs (on all compile workers, with "Building the shader cache: done / total" in the corner) instead of before the game starts;
--prewarm-wait(RPS5E_PREWARM_WAIT=1) keeps the old behaviour. Tests and input replays still build it first. - Compiles are ordered by need: the shaders a draw or dispatch needs now, then the saved list, then the compile lookahead's guesses; an eighth of the compile workers is kept free for the shaders needed now.
- The compile lookahead also reads the command buffers already queued after the current one, on every GPU queue, and reads past flips and conditional commands (
RPS5E_LOOKAHEAD_QUEUED,RPS5E_LOOKAHEAD_GUESS); the GPU command thread starts it whenever it meets a new compute program (RPS5E_LOOKAHEAD_EAGER), so it also works while draws are recorded on their own thread, where it found nothing before. - Demon's Souls gameplay runs about 1.4-2x faster (user's play recording, frames after the 3rd Triangle: 4.2 → 6.2-8.8 fps; 3 of 3 A/B pairs faster in one run, 5.97 → 8.50 fps). Shader resources read from a guest memory page that also holds GPU results no longer count as GPU-written when the GPU never wrote those bytes, or when its copy back to guest memory already finished: such reads waited 20-40 ms for all queued GPU work, and descriptor-table words were copied on the GPU, which split almost every draw into its own render pass and tripled the GPU time in runs where the game's tables shared a page with GPU output (
RPS5E_UNWRITTEN_WORDS,RPS5E_LANDED_WORDS). The GPU command thread also prepares the shaders of GPU-indirect draws the way the recording thread records them, so they are no longer prepared twice (RPS5E_PREFETCH_INDIRECT), and remembers per page whether it holds GPU results while it reads a shader's resources (RPS5E_DIRTY_PAGE_MEMO). - The recording thread (
RPS5E_GPU_RECORD_THREAD=auto) no longer switches itself off during loading pauses: a one-second window that recorded almost nothing no longer counts as the recorder waiting (RPS5E_POLICY_QUIET). In GTA V's city a probe that fell into such a pause kept the thread off for one to two minutes, and the city then ran at ~6.2 fps instead of ~7.8 (2 of 9 benchmark runs). - Bindless texture tables cost less to keep current: elements that can never have a view (null, another dimension, a depth compare on a colour format, ...) are no longer looked up again at every guest mapping change (
RPS5E_BINDLESS_WORD_FAILURES), a changed table is read again only on its changed pages (RPS5E_BINDLESS_PAGE_READS), and pinned images are logged once between two reads of the log (RPS5E_PINNED_DEDUP). GTA V's two ray-tracing dispatches per frame took 2.2-4 ms of recording each, now 1-1.9 ms (the recording thread's CPU per city frame 79 → 75 ms). - Shaders are much smaller and build up to twice as fast where the GPU flushes f32 denormals itself: the console's flush of tiny float values (FLOAT_MODE) was emulated with about six extra instructions per float operation; the emulator now measures at start what the GPU's own float operations do with denormals (each shader stage) and leaves the emulated flush out wherever the GPU already gives the same bits, and compares values that cannot be denormal with the GPU's own compare (
RPS5E_HOST_FTZ,RPS5E_NATIVE_F32_COMPARE). On an RTX 5090: building the saved shader lists from scratch takes GRAND THEFT AUTO V 23 s instead of 37 s, ASTRO BOT 18 s instead of 40 s and SILENT HILL: The Short Message 11 s instead of 25 s, and the largest ASTRO BOT shader shrinks from 1.1 M to 0.56 M words; pictures are unchanged. Games translate their shaders once more on the first start.RPS5E_NO_F32_FLUSH=1drops the flush emulation entirely (not exact, for measurements).
Fixed
- DOOM: The Dark Ages gets past "PRESS (X) TO START":
sceNpGetAccountAgenow completes its request as signed out, so the game'ssceNpPollAsyncreports the result (it answered "invalid request" forever and the title screen waited). The game goes on to the legal screen, saves its profile and opens the campaign menu.RPS5E_NP_REQUEST_COMPLETION=0restores the old behaviour. cpuset_getaffinity,cpuset_setaffinity,pthread_getaffinity_npandpthread_setaffinity_npaccept sets of 8 to 16 bytes and return ERANGE for other sizes, as measured on the console;pthread_getaffinity_npaccepted only 32 bytes and the others up to 32.- Block-compressed 3D textures in tiled thick layouts (4x4 blocks stacked in depth) are read instead of being bound as empty textures ("image layout (swizzle mode 5, D3, 16 bytes per element)" in DOOM: The Dark Ages and Marvel's Spider-Man 2).
RPS5E_BC_VOLUMES=0restores the old behaviour. - PlayGo reads the chunk count from
playgo-chunks.xmlin the game folder, so games whose dump has no other PlayGo data no longer get "PlayGo not supported" fromscePlayGoOpen(DOOM: The Dark Ages crashed right after start). - DOOM: The Dark Ages no longer loses the GPU ("Vulkan device lost", exit code 3) on the title screen. A slot of the bindless texture set kept its descriptor when a texture's new view got the same handle as its old one, but the driver hands out the handle of a destroyed view again, so the slot still described the destroyed view and sampling it hung the GPU. A slot now belongs to one view of one image.
- Textures selected through large bindless tables share one slot per view between the tables that read them. DOOM: The Dark Ages reads one texture heap through six tables and filled the 131 072-slot set ("bindless set full"); its draws then failed and the title screen stayed black.
- Pipelines of the saved shader list that use the bindless texture set are built at the start too; they failed with no pipeline layout and were built during play in every run (GTA V: 39 of 2302 pipelines, the ray-tracing ones, 2-4 s each) (
RPS5E_PREWARM_BINDLESS). - Shaders and pipelines added to the saved shader list are kept within a second (a journal next to the list,
RPS5E_PREWARM_JOURNAL), so a run that crashes or is killed no longer loses the last 30 s of them. - Pipelines of shaders that read their own code address and turned out not relocatable are saved under the shader's own key, so the next run finds them in the list.
sceKernelCreateSemaaccepts the attribute bit 0x100 (values 0x100-0x102), as the console does; it returned EINVAL.sceKernelGetSystemSwVersionandsceKernelGetProsperoSystemSwVersionaccept any value in the block's size field and leave it as it is, and return 0 for a null pointer, as the console does; they returned EINVAL and EFAULT.scePthreadCondSignaltoreturns ESRCH for a handle that names no thread and EPERM for a thread that does not wait on the condition variable, as the console does; it returned success.sceKernelHasTrinityModeis implemented and reports a base PS5 (0); it was missing, and its unimplemented-call error read as "PS5 Pro mode available".- Block-compressed textures whose descriptor has the compression bit set are no longer read through colour-compression metadata at the descriptor's (meaningless) metadata address.
Full Changelog: https://github.com/keklick1337/rps5e/compare/v0.1.3-alpha...v0.1.4-alpha