Commit Graph

92 Commits

Author SHA1 Message Date
DotDebian f2fb7852bb feat(libs): implement NpCppWebApi IntrusivePtr construction, copy, release and access
IntrusivePtr<T> is three pointers: object, deleter, LibContext. The default
constructors zero them, the copy constructors copy them and take a reference
on the object, operator-> and operator* return the object, and the destructors
drop a reference and hand the object to the deleter when it was the last one.
The last-reference release of a pointer without a deleter needs the object's
destructor and the LibContext memory pool and still throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 11:18:39 +02:00
Adrià Franch 1cc11cee57 feat(shader): accept tfe and lwe on MIMG loads, stores and samples
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 08:25:57 +02:00
Dean 7db3e55c6a
Merge pull request #591 from hamb3r/fix/avplayer-decode-ahead
fix(avplayer): add decode-ahead buffers for application video output
2026-10-05 18:13:18 +13:00
Dean 0087fb6369
Merge pull request #567 from adriadam10/fix/f32-omod-zero
fix(shader): apply the f32 output modifier on the bits like the hardware
2026-10-05 18:07:22 +13:00
Dean dbfdcb1c79
Merge pull request #537 from adriadam10/test/vop1-float-unary
fix(shader): choose unary f32/f16 special results on the bits, as RDNA does
2026-10-05 18:06:40 +13:00
Nicolas Abosch 043332ba32 docs(ult): avoid overlapping AvPlayer debt note 2026-10-05 00:57:02 -03:00
Nicolas Abosch 65c139336e feat(ult): implement blocking queues and shared data pools 2026-10-05 00:52:22 -03:00
Adrià Franch b5da7d00e4 fix(shader): apply the f32 output modifier on the bits like the hardware
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 05:00:29 +02:00
Dean 00407df8a9
Merge pull request #585 from Raghav314/feat/ajm-batch-job-queries
feat(ajm): implement DecodeSingle, GetGaplessDecode and GetCodecInfo
2026-10-05 15:54:58 +13:00
Nicolas Abosch e08333825f test(agc): validate pixel LDS and expose pipeline statistics 2026-10-04 23:04:39 -03:00
hamb3r cf10b5e609 fix(avplayer): make decode-ahead buffers optional 2026-10-05 04:58:00 +03:00
Adrià Franch f3b74e2cef fix(shader): choose unary f32/f16 special results on the bits, as RDNA does
v_ceil/floor/trunc/rndne/fract/sqrt/rsq/rcp/rcp_iflag/log/exp/sin/cos
(f32 and f16) and v_frexp_mant_f32 left NaN, invalid, zero and infinite
results to the driver: signalling NaNs came back unquieted, lavapipe lost
the NaN sign and payload, invalid results were +NaN instead of -NaN, f32
sin/cos at whole and half cycles returned tiny values instead of +0, and
v_fract_f16 of a tiny negative rounded up to 1.0.

Adds an execution test for the 27 opcodes with expected values from
hardware; approximate ops are compared with tolerances from the Vulkan
precision table.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 03:38:12 +02:00
Dean 70596d78eb
Merge pull request #577 from CnRJay/feat/s-getreg-mode
feat(shader): implement s_getreg_b32 for the MODE round mode fields
2026-10-05 14:29:24 +13:00
raghav314 77e2fe1322 docs(ajm): record where the codec info and gapless values come from 2026-10-05 06:58:23 +05:30
Dean ec46678f61
Merge pull request #588 from DotDebian/feat/relinker-sha1-memory-operand
feat(relinker): lower SHA-1 instructions with a memory operand
2026-10-05 14:24:22 +13:00
Dean 65b750aee6
Merge pull request #592 from DotDebian/fix/pngenc-filter-subset
fix(pngenc): restrict adaptive filtering to the requested filter subset
2026-10-05 14:23:41 +13:00
Dean 18d9745de4
Merge pull request #584 from DotDebian/feat/font-get-render-scaled-kerning
feat(font): implement sceFontGetRenderScaledKerning
2026-10-05 14:23:00 +13:00
Dean 4ae4f53ffb
Merge pull request #338 from Pouare514/feat/prx-loader-tripwires
feat(prx): unknown loader tripwires for TLOU
2026-10-05 14:22:18 +13:00
Dean 8387b4da51
Merge pull request #573 from CnRJay/feat/ds-atomics-64
feat(shader): implement the 64-bit LDS atomics
2026-10-05 13:26:22 +13:00
Dean e440e2c22b
Merge pull request #579 from CnRJay/fix/ampr-wait-signatures
fix(libs): take the AMPR wait and counter signatures from ampr_emu
2026-10-05 13:20:59 +13:00
Pouare514 ac7bc704c3 fix(prx): export tripwire NIDs under recomputed real names, restore main's hunks 2026-10-05 02:13:22 +02:00
Pouare514 66a95ada20 feat(prx): unknown loader tripwires for TLOU 2026-10-05 02:12:32 +02:00
DotDebian bfe9bf9af4 fix(pngenc): restrict adaptive filtering to the requested filter subset
A filter_type naming a subset of the PNG filters used only the first
filter of the mask, because stb's writer is either fully adaptive or
forced to one filter. Decoder::Png::Encode now takes the set of allowed
filter types, filters the rows and writes the chunks itself, and keeps
stb for deflate only. Output for the all-filters and single-filter
cases is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:08:31 +02:00
DotDebian e11b4b5554 feat(relinker): lower SHA-1 instructions with a memory operand
SHA1RNDS4/NEXTE/MSG1/MSG2 with a memory source made `--to-intel` fail
the whole relink. The stub now spills a scratch xmm, loads the operand
into it with the unaligned load already used for SHA-256 and runs the
register-form lowering. The SHA1RNDS4 immediate is read after the SIB
byte and displacement. RIP-relative operands still fail: the stub runs
at a different address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:02:13 +02:00
DotDebian 52c13a0bde feat(font): implement sceFontGetRenderScaledKerning
Return the kerning between two character codes at the render scale of
the font, the one set by sceFontSetupRenderScalePixel and
sceFontSetupRenderScalePoint, and fail with NOT_BOUND_RENDERER when no
renderer is bound. sceFontGetKerning keeps its behaviour and shares the
FreeType lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:49:49 +02:00
Dean b5d54c9db8
Merge pull request #578 from DotDebian/feat/ajm-dec-mp3-parse-frame
feat(ajm): implement sceAjmDecMp3ParseFrame
2026-10-05 12:49:23 +13:00
Chad e3f18eec00 Merge remote-tracking branch 'upstream/main' into fix/ampr-wait-signatures
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-04 18:49:15 -05:00
Dean d5cf8a0add
Merge pull request #558 from Phi1ow/implement-error-dialog
feat(errordialog): implement the libSceErrorDialog state machine
2026-10-05 12:48:20 +13:00
Chad 53928c712e docs: record that s_getreg_b32 reads round to nearest even after s_setreg_b32
s_setreg_b32 has no effect, so a read of the MODE round fields after it
wrote another mode still reports round to nearest even, the rounding the
recompiled code uses. The refused HW_ID test row is named as hardware
register 4, which has no name on gfx10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:48:04 -05:00
Dean 221ea3c0bd
Merge pull request #535 from DotDebian/feat/audioout-set-mix-level-pad-spk
feat(libSceAudioOut): implement sceAudioOutSetMixLevelPadSpk
2026-10-05 12:47:38 +13:00
Dean f83ee125ce
Merge pull request #516 from Pouare514/fix/tlou-rtc
fix(libs): TLOU sceRtcParseDateTime ISO 8601 subset parser
2026-10-05 12:46:14 +13:00
Chad a583dc7116 fix(libs): reject odd AMPR counter pairs and invalid write addresses
As in ampr_emu, a counter pair starts at an even counter, and the write
commands take a non-null, 8-byte aligned address; others return EINVAL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:27:00 -05:00
Chad 5018b69fba fix(libs): take the AMPR wait and counter signatures from ampr_emu
sceAmprCommandBufferWaitOnAddress took (address, reference, mask,
compare) and WaitOnCounter (counter, reference, compare), and both read
the compare value as WAIT_REG_MEM (0 always, 1 <, 2 <=, 3 ==, ...).
ampr_emu, which replaces libSceAmpr for retail titles on the console,
has (address, reference, compare, flush) and (counter, reference,
compare, flush) with the SCE compare values (0 ==, 1 > unsigned,
2 < unsigned, 3 !=), so waits were decoded as other comparisons and
could block forever or pass early.

WriteAddressFromCounterPairOnCompletion takes one counter index, not
two, and WriteKernelEventQueueOnCompletion an int id and no user data.
Counter indices above 127, compare values above 3, flush values above 1
and misaligned wait addresses return EINVAL, as in ampr_emu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:25:45 -05:00
DotDebian f99be7e4d3 feat(ajm): implement sceAjmDecMp3ParseFrame
Read the MPEG audio frame header and report the frame size, channel
count, samples per channel, bitrate and sample rate. The signature,
the result layout and the rate tables follow shadPS4's reimplementation
of the PS4 library. Requesting the original file length throws: that
lookup is not implemented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:24:18 +02:00
Chad d78eea1f5f feat(shader): implement the 64-bit LDS atomics
ds_add/sub/rsub/inc/dec_u64, ds_min/max_i64/u64, ds_and/or/xor/mskor_b64,
ds_cmpst_b64/f64, ds_min/max_f64, their _rtn forms and ds_wrxchg_rtn_b64
threw in the decoder.

LDS is a 32-bit workgroup array, so the two dwords are read and written
under a lock dword placed after the guest LDS, which is cleared with a
workgroup barrier at entry. The lock is acquired and released in the same
loop iteration, so lanes of one subgroup cannot deadlock on it. Stages
whose LDS is a function variable update it directly. 64-bit GDS atomics
throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:14:24 -05:00
Pouare514 e67d50cb2f fix(libs): route DateTime zone suffix through RFC3339 path, throw on unverified shapes 2026-10-05 01:10:25 +02:00
DotDebian 9a652bf82c docs(libSceAudioOut): record the pad speaker mix level as an assumed gain
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 00:55:11 +02:00
Dean 1bc945c1e5
Merge pull request #489 from oneandonlydean/feat/audiopropagation-source-render
feat(libSceAudioPropagation): render silence for propagated sources
2026-10-05 11:44:05 +13:00
Dean d1b8565d74
Merge pull request #482 from ThisIsAkill/feat/audiopropagation-no-propagation
feat(libSceAudioPropagation): implement the no-acoustic-propagation path with recovered signatures
2026-10-05 11:43:24 +13:00
Dean b44b308c53
Merge pull request #333 from adriadam10/feat/sopk-misc
feat(shader): implement s_cmovk_i32, s_version and s_setreg_imm32_b32
2026-10-05 11:41:47 +13:00
Phi1ow 6571ace5bd feat(errordialog): log the error code and record the silent stub
Adds the dialog to the silent-stubs list in docs/dev/TechnicalDebt.md, since it finishes without
showing anything. sceErrorDialogOpen now logs the error code and user id from the parameter
(offsets 4 and 8), like libSceMsgDialog logs its message, so an error a title would have shown
the player stays visible instead of disappearing.
2026-10-05 00:32:13 +02:00
Dean c457e756a5
Merge pull request #538 from DotDebian/feat/ampr-command-buffer-markers
feat(ampr): implement the command buffer markers
2026-10-05 10:23:03 +13:00
DotDebian 638d3802ad feat(ampr): implement the command buffer markers
sceAmprCommandBufferPushMarker, PushMarkerWithColor, PopMarker, SetMarker
and SetMarkerWithColor record a marker command, and the matching
sceAmprMeasureCommandSize functions return its size. The APR executor
skips markers, as it does a nop.

Signatures follow the ampr_emu reimplementation of libSceAmpr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:10:16 +02:00
DotDebian 2452ffcb3f feat(libSceAudioOut): implement sceAudioOutSetMixLevelPadSpk
The mix level is a linear gain on the pad speaker port, 32768 being 0 dB.
A pad speaker port opens at 11626 (-9 dB). An unknown handle, a port of
another type and a level above 0 dB return the AudioOut error codes; a
negative level throws, as its effect is unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:51:25 +02:00
Pouare514 af20824af4 fix(libs): TLOU sceRtcParseDateTime ISO 8601 subset parser 2026-10-04 16:30:14 +02:00
Pacuka 3e5648dcf7 fix(ajm): refuse Opus rates other than 48 kHz and record the parameter layout as unknown
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:28:19 +02:00
Adrià Franch 6ea9750bf3 refactor(shader): read f64 operands through readF64Bits and record the v_fma_f64 subnormal gap
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:52:14 +02:00
Adrià Franch eff7af93d4 fix(shader): translate s_setreg_imm32_b32 only for round to nearest even in MODE
Any other field or value throws. The existing s_setreg_b32 no-op is
recorded under Functional technical debt instead of silent stubs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:28:52 +02:00
Adrià Franch f994cc6ab7 feat(shader): implement s_cmovk_i32, s_version and s_setreg_imm32_b32
s_cmovk_i32 writes the sign-extended 16-bit immediate when SCC is set.
s_version is a no-op marker. s_setreg_imm32_b32 takes its value from a
literal dword and is ignored like s_setreg_b32; both are now listed as
silent stubs in TechnicalDebt.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:26:58 +02:00
Dean Galvin be3f06bfe8 feat(libSceAudioPropagation): render silence for propagated sources
sceAudioPropagationSourceRender takes the system, an array of RenderInfo
descriptors and their count: PPSA21564 and PPSA21567 pass one RenderInfo
{0x010107d6, 0x30} per call, with the source handle at +0x10, its output
buffer at +0x18, the buffer size in bytes at +0x20 and the word 2 at
+0x28, once per audio grain for each propagated source.

Without acoustic propagation a source contributes nothing, so each
output buffer is zeroed for its size. Every RenderInfo is checked first
(descriptor, a live source of this system, a non-empty output), and a
count of 0 or a format word other than 2 throws, as neither has been
observed.
2026-10-04 19:26:06 +13:00