Commit Graph

943 Commits

Author SHA1 Message Date
Adrià Franch 2036697758 fix(ajm): convert planar 16-bit MP3 output from FFmpeg
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-02 09:20:45 +02:00
boykopovar c00bc19c0d
Merge pull request #222 from YossiYad/feat/windows-tls-load-registers
feat(relinker): load the fs:[0] thread pointer into any register in Windows guest code
2026-10-02 10:06:12 +03:00
boykopovar 56aa800ef0
Merge pull request #220 from asimplestray/feat/shader-sop1-saveexec
feat(shader): implement SOP1 saveexec/wrexec family
2026-10-02 09:46:06 +03:00
asimplestray f2bfdd26f9 feat(shader): implement SOP1 saveexec/wrexec family 2026-10-02 00:22:41 +00:00
Michon 04691c0797 feat(libs): offline services GTA V reaches in Story Mode
Sign-in, web browser and player dialogs finish cancelled; the message dialog finishes at once;
NpAuth, entitlement consumption, reachability, account age and the NpUtility bandwidth test
report signed out; sceKernelMtypeprotect changes the protection (the memory type has no host
equivalent); the APR ForEach resolvers resolve every path and report each failure in its own
result entry. vswprintf's stub is dropped in favor of the existing wide-formatter
implementation, which already covers it on every platform.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-01 23:21:54 +02:00
boykopovar 7c5f8b6e12 Revert "Merge pull request #143 from SamG-Coder/codex/shader-geometry-validation"
This reverts commit de49f81697, reversing
changes made to cfb1d76e60.
2026-10-01 22:55:27 +03:00
boykopovar 75434ee4ad
Merge pull request #240 from adriadam10/feat/pad-small
feat(libScePad): implement scePadGetHandle and the embedded mic vibration option
2026-10-01 22:00:55 +03:00
boykopovar 643c8cfc99
Merge pull request #239 from adriadam10/fix/error-codes
fix(libs): correct VideoOut and Pad error codes
2026-10-01 21:59:04 +03:00
boykopovar 54c3f39680
Merge pull request #238 from adriadam10/feat/playgo-language-todo
feat(libScePlayGo): fix error codes, implement the language mask and to-do list
2026-10-01 21:58:12 +03:00
boykopovar ce6bd0c750
Merge pull request #233 from adriadam10/feat/fiber-context-size-check
feat(libSceFiber): implement context size checking and the thread frame pointer
2026-10-01 21:57:29 +03:00
boykopovar 171c9a97b2
Merge pull request #230 from asimplestray/feat/rt-miss-mode
feat(shader): add ray tracing miss fallback mode
2026-10-01 21:56:27 +03:00
boykopovar a360f162c6
Merge pull request #224 from adriadam10/feat/ces-cp1252
feat(libSceCesCs): convert single characters between CP1252 and UTF-8
2026-10-01 21:53:01 +03:00
boykopovar e0f7866205
Merge pull request #223 from adriadam10/feat/http2-ssl-stubs
feat(libSceSsl): implement CA certificate queries and sceHttp2AbortRequest
2026-10-01 21:52:19 +03:00
boykopovar 0567aca352
Merge pull request #225 from adriadam10/feat/keyboard-key2char
feat(libSceKeyboard): implement the keyboard library
2026-10-01 21:50:25 +03:00
boykopovar 938b632784
Merge pull request #221 from adriadam10/feat/http-uri
feat(libSceHttp): implement URI parse, build and escape
2026-10-01 21:48:06 +03:00
boykopovar 01e1074efc
Merge pull request #219 from asimplestray/feat/shader-vop3-minmax16
feat(shader): implement VOP3 I16/U16 min/max/med3
2026-10-01 21:42:12 +03:00
boykopovar 1ffaa66173
Merge pull request #215 from julienlgy/feat/lib-sce-hmd-stub
feat(libSceHmd): add a disconnected-headset HLE stub
2026-10-01 21:28:09 +03:00
boykopovar c19448f834
Merge pull request #214 from oneandonlydean/fix/recompiler-sdwa-dword-dst
fix(recompiler): zero the high half of 16-bit SDWA results written as a whole dword
2026-10-01 21:27:50 +03:00
boykopovar e6a0af7e09
Merge pull request #213 from arreina/pr/cache-empty-memcpy
fix(shader): skip the push constant copy when there is nothing to copy
2026-10-01 21:22:29 +03:00
boykopovar b99472f7a6
Merge pull request #211 from ljkx/fix/decoder-rex-prefix-order
fix(relinker): ignore a REX prefix that is followed by another prefix
2026-10-01 21:21:44 +03:00
boykopovar de49f81697
Merge pull request #143 from SamG-Coder/codex/shader-geometry-validation
fix(shader): preserve NGG passthrough and wave32 launch inputs
2026-10-01 21:17:52 +03:00
boykopovar cfb1d76e60
Merge pull request #142 from SamG-Coder/codex/shader-interpolation-operands
fix(shader): preserve interpolation instruction operands
2026-10-01 21:17:16 +03:00
boykopovar cbf2bde178
Merge pull request #141 from SamG-Coder/codex/bounded-shader-jump-tables
feat(shader): lower bounded PC-relative jump tables
2026-10-01 21:16:14 +03:00
Adrià Franch 621c8bea23 feat(libScePad): implement scePadGetHandle and the embedded mic vibration option
scePadOpen now records that the pad is open and scePadClose clears it;
scePadGetHandle returns the handle for a port scePadOpen accepts while
the pad is open, and DEVICE_NO_HANDLE otherwise. No embedded microphone
is emulated, so the option that weakens trigger vibration while it is
in use is accepted with no effect.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:57:32 +02:00
Adrià Franch 76be6796dc fix(libs): correct VideoOut and Pad error codes
Ten libSceVideoOut and two libScePad error constants had values that
belong to other errors of the same library (for example INVALID_HANDLE
was 0x80290003 and RESOURCE_BUSY / SLOT_OCCUPIED were swapped). They now
match KytyPS5, shadPS4 and fpPS4, which agree on all of them.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:53:49 +02:00
Adrià Franch 2b36dc2408 feat(libScePlayGo): implement the language mask and to-do list
The title is fully installed, so scePlayGoGetLanguageMask reports every
language. scePlayGoSetToDoList validates the handle, entries, chunk IDs
and loci; nothing is pending, so the list is not kept.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:50:33 +02:00
Adrià Franch 97958bdd07 fix(libScePlayGo): use the library's error codes for bad pointer, handle and size
BAD_POINTER, BAD_HANDLE and BAD_SIZE were 0x80B20004, 0x80B20005 and
0x80B2000D, which are INVALID_ARGUMENT, NOT_INITIALIZED and BAD_SPEED.
They are 0x80B2000A, 0x80B20009 and 0x80B2000B.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:49:12 +02:00
Adrià Franch 62530c9d5c feat(libSceFiber): implement context size checking and the thread frame pointer
sceFiberStartContextSizeCheck and sceFiberStopContextSizeCheck toggle a
mode in which new fibers get their context filled with a pattern, so
sceFiberGetInfo can report the unused stack margin.
sceFiberGetThreadFramePointerAddress returns the frame pointer of the
thread that called sceFiberRun.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:27:24 +02:00
asimplestray c3a740b3e6 feat(shader): add ray tracing miss fallback mode 2026-10-01 17:24:09 +00:00
Adrià Franch 63501b6d73 feat(libSceKeyboard): implement the keyboard library
Keyboard input follows libSceMouse: the video out event loop forwards SDL
key and focus events, whose scancodes are USB HID usages, and the library
keeps the pressed keys, modifiers and lock LEDs in a 16-entry history for
sceKeyboardRead and a snapshot for sceKeyboardReadState.
sceKeyboardGetKey2Char translates the 101-key arrangement; the 106-key
one throws and is listed as technical debt.

KeyboardData holds 16 key codes (96 bytes), not 6.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:00:23 +02:00
Adrià Franch fb6580ae36 feat(libSceCesCs): convert single characters between CP1252 and UTF-8
sceCesRefersUcsProfileCp1252 returns the CP1252 profile, and
sceCesSbcToUtf8 / sceCesUtf8ToSbc convert one character in each
direction. The five bytes CP1252 leaves undefined map to the matching
C1 controls, so every byte round-trips. Malformed UTF-8 and code points
outside CP1252 return the library's error codes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 18:41:25 +02:00
Adrià Franch c548cd25b7 feat(libSceSsl): implement CA certificate queries and sceHttp2AbortRequest
sceSslGetCaCerts reports that no CA certificates are available and
sceSslFreeCaCerts clears the structure, in line with the library's
no-network behaviour. sceHttp2AbortRequest succeeds like
sceHttpAbortRequest. sceSslClose and sceSslGetSerialNumber keep throwing
and are listed as unknown signatures.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 18:35:02 +02:00
Adrià Franch 0a8cc7f543 feat(libSceHttp): implement URI parse, build and escape
sceHttpUriParse, sceHttpUriBuild and sceHttpUriEscape work on strings
only and are implemented. sceHttpCreateRequestWithURL, sceHttpReadData,
sceHttpSetChunkedTransferEnabled and sceHttpCreateEpoll follow the
existing no-network behaviour.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 18:15:50 +02:00
asimplestray b15f6800dd feat(shader): implement VOP3 I16/U16 min/max/med3 2026-10-01 16:11:33 +00:00
Yossi Yadgar 53d4ef41d2 feat(relinker): load the fs:[0] thread pointer into any register in Windows guest code 2026-10-01 18:42:14 +03:00
julienlgy 0c4dace39e feat(libSceHmd): add a disconnected-headset HLE stub 2026-10-01 14:18:10 +02:00
Dean Galvin b37365d2dd fix(recompiler): zero the high half of 16-bit SDWA results written as a whole dword
A 16-bit VOP1/VOP2 result in SDWA form with dst_sel:DWORD writes the whole register, so with
dst_unused:UNUSED_PAD the high half is zero. write16Bits treated dst_sel:DWORD as the plain
encoding and kept the old high half, which is right only for the non-SDWA form (GFX10 16-bit
instructions preserve the high bits). The decoder already marks SDWA destinations with
explicitSdwaDst; write16Bits now sends those through writeRawU32 like the other selectors.

GFX10 compilers rely on this to zero-extend f16 results before packing two of them with an
integer add, e.g. v_cvt_f16_f32_sdwa ... dst_sel:DWORD dst_unused:UNUSED_PAD followed by
v_lshl_add_u32 v2, hi, 16, lo. PPSA21564's FidelityFX depth-of-field combine pass packs its
near/far colours into LDS this way 60 times: whatever the low register held before leaked
into the high half, so green (and alpha) of the packed pairs came back huge or infinite while
red and blue stayed right. The bloom then spread the bad green over the intro cinematic.

agc_driver_sdwa_destination_tests runs the padded, preserved and plain encodings and the
packing idiom on the GPU against a model of the guest instructions.
2026-10-02 01:07:59 +13:00
Alberto Ruiz cc3d2d21ef fix(shader): skip the push constant copy when there is nothing to copy
decodeResult and decodeAllocation called memcpy with the data() of
empty vectors, which may be null. Passing a null pointer to memcpy is
undefined even for a zero size, and UBSan reports it on every entry
without push constants, including the existing shader disk cache test.
The copy now runs only for a non-empty table, as Reader::Values does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-01 13:28:36 +02:00
ljkx d54dfb1595 fix(relinker): ignore a REX prefix that is followed by another prefix
In 64-bit mode a REX prefix only takes effect when it immediately
precedes the opcode; a REX followed by a legacy prefix or another REX is
ignored. The instruction decoder, the rewriter's reference classifier,
DecodedInstruction and the SSE4a, SHA-256 and CLZERO operand decoders
read legacy prefixes and then at most one REX. `48 F3 0F 2B 00`
(MOVNTSS) was therefore scanned as `[48 F3][0F 2B 00]` and kept, and
`48 67 0F 01 FC` lost its address-size prefix.

All of them now accept REX bytes among the prefixes and keep only one
that directly precedes the opcode. The converter's guard against
prefix-only fragments is removed, since the decoder no longer produces
them, and the TechnicalDebt entry describing the split is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:09:11 +02:00
boykopovar bc51b337ad
Merge pull request #148 from SamG-Coder/codex/shader-corpus-instructions
feat(shader): support 24-bit high products and fix image sample variants
2026-10-01 13:45:19 +03:00
SamG-Coder 5bcb6eae3e fix(shader): version passthrough requests after upstream pixel layout 2026-10-01 20:44:28 +10:00
SamG-Coder d9482ea3ae fix(agc): exclude hidden mesh words from vertex table lookup 2026-10-01 20:44:28 +10:00
SamG-Coder 4cd8e35366 fix(shader): preserve NGG passthrough launch and primitive inputs 2026-10-01 20:43:17 +10:00
boykopovar 131156c5d0
Merge pull request #209 from ljkx/feat/clzero-to-intel
feat(relinker): lower CLZERO for --to-intel
2026-10-01 13:43:09 +03:00
SamG-Coder 785c24e652 fix(shader): derive mesh launch state from guest wave size 2026-10-01 20:42:49 +10:00
SamG-Coder 7fea9dec9b test(agc): build mesh smoke test on Windows 2026-10-01 20:42:49 +10:00
SamG-Coder dfdbeae901 fix(shader): preserve comparison image flags in disk cache 2026-10-01 20:36:28 +10:00
boykopovar 4a82f04113 refactor(agc): organize driver modules into subdirectories 2026-10-01 13:31:24 +03:00
ljkx 09cb86b076 feat(relinker): lower CLZERO for --to-intel
Lower CLZERO out of line instead of failing the relink: the 64-byte line
containing rAX (EAX with 67h) is cleared with four MOVNTDQ stores of
zero, the same non-temporal, weakly ordered store. The line address is
masked in xmm0 so RFLAGS stays untouched; xmm0 and rcx are spilled below
the red zone. Short sites share stubs through MatchSequence. CLZERO with
LOCK, an FS/GS override, a 66/F2/F3 prefix or longer than 15 bytes fails
the relink.

The decoder splits a REX followed by another prefix into a separate
instruction, which would hide a prefix that changes what CLZERO or the
next instruction does. The converter now fails the relink when such a
prefix-only fragment directly precedes an AMD-only instruction or would
be moved into a stub as a trailing instruction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:30:35 +02:00
boykopovar 98b175f938 refactor(agc): fix deps after splitting 2026-10-01 13:24:48 +03:00