sceNpAppLauncherLaunchApp returned the libSceNpGameIntent codes
0x80553802/0x80553804, but the firmware tail remaps the internal
launch library errors into the launcher family, so the export reports
0x80553A02 before initialize and 0x80553A04 on invalid arguments;
the tests now assert those values and the unrelated GameIntent
constants are untouched.
The two assertions that a valid launch call must throw until
implemented are removed; the production throw and its debt entry
stay, and the validation and lifecycle coverage is unchanged. The
debt file keeps the silent-stub, InitParamInit, InfoInit and
remaining unknown-export entries, updating only the launcher parts.
Recovers the 4.03 firmware signature (int32, const char*, const char*), the uninitialized and invalid-argument errors, the strnlen(0x2001) bound on the optional argument and the initialize/terminate flag. The launch itself still throws.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Firmware 13.42's module looks the name up with sceNetGetIfName, which
has none past 9, then issues SIOCGIFFLAGS on the empty name. That ioctl
fails, and the call returns -1 with the flags untouched. Return the
same instead of throwing. Interfaces 1 to 9 still throw, and the test
no longer asserts that for 1 and 4, which the console answers from the
kernel.
Asked for in oneandonlydean's review, from BunnyFl's read of the
module.
Generate version 1 UUIDs as FreeBSD 11's kern_uuidgen does: consecutive
timestamps from the guest CLOCK_REALTIME, a 14-bit clock sequence that is
randomised on first use and incremented when the clock has not passed the
last batch, and a random multicast node. A count outside 1 to 2048 fails
with EINVAL and a null store with EFAULT.
Every shader source keeps up to 256 materialized results of
Recompile(request, capture) in its result memo, and as many patch
recipes in its masked memo, with no limit on their bytes. In Ghost of
Tsushima's opening the memos held about 500 MiB after 5 minutes and
kept growing, at a 13 % hit rate.
Each memo entry now counts the bytes its result's vectors keep (the
bindings' vectors included; the module is shared with the prepared
module cache), plus its patch recipe in the masked memo. A result held
by both tables counts once in each. Past a budget, 256 MiB unless
APS5_RESULT_MEMO_MB sets another (0 sets none), the least recently used
entries of both tables of all sources are dropped until three quarters
of the budget is left. The recency stamps come from one clock for all
sources and both tables so they compare across them. The profile line
also reports the trimmed and held entries and their MiB.
The trim takes its lock blocking and repeats, re-reading the bytes held,
until they are within the budget, so the insertion that pushed them
over has its trim run after any other; it stops when nothing is left to
drop.
SetResultMemoBudget and ResultMemoBytes let agc_shader_result_memo_budget
check that a memo over its budget keeps the most recently used results
and drops the oldest one, with the masked memo off. A one-shot hook
inside the trim (SetResultMemoTrimHook) lets
agc_shader_result_memo_budget_threads insert two results from other
threads after the trim has read the bytes held: the memo must still end
within its budget. agc_shader_result_memo_budget_masked, with the masked
memo on, checks that a first result counts its masked entry too and that
a trim empties the masked memo.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a PS5 the builder writes 15 dwords: a tag write of 0xc6000006, opcode 0x3a with its arguments, initiator 0x80 whatever the modifier, and a closing tag write; GetSize returns 60. AnyPS5 wrote NUM_INSTANCES and DRAW_INDEX_2 under argument meanings nothing confirms. The driver refuses 0x3a, whose field meanings are not known, and names it DRAW_INDEX_MULTI_INST as Linux's nvd.h does.
Create, CreateEx, Destroy, GetSize and Initialize follow the firmware
13.42 export measurements reported on the pull request: bases 0x813F0000
and 0x81770000, the pointer validated first (+0x01), then sample rate
(+0x10/+0x0F), channels (+0x0D/+0x0C) and application (+0x11/+0x10), the
required caller application 2051 for CELT and 2048 for SILK, the 0x17B2
state marker at +0xCC/+0xE8 behind Destroy (+0x16/+0x15) and fixed
728/752-byte GetSize values; a successful create zero-fills the console
state size. The internal encoder keeps the restricted celt and silk
applications whose packet identity the tests compare, float included.
The tests declare entry points through the libraries' Api.hpp instead of
local prototypes, cast states to the opaque encoder types, drop the silk
ctl/cancel/priority/timeout and live-encoder Terminate throw pins and
compare both float sections against opus_encode_float. Ctl,
Encode*WithPriority and the silk cancel and timeout entry points keep
their throwing stubs, and the debt notes carry the measurement with the
remaining gaps.
On a PS5, sceAgcAcbWaitOnAddressGetSize and sceAgcDcbWaitOnAddressGetSize return 56 for size 0, 64 for size 1 and 0 for any other 32-bit value, and sceAgcDcbContextStateOpGetSize returns 0 for an operation above 3. The ACB wait size takes a 32-bit argument instead of a byte.
tanh returned the host's tanh, whose last bit differs from the titles' copy
on Windows. The titles' copy is FreeBSD msun's s_tanh.c over msun's expm1,
and it sets no errno. tanh now computes that algorithm over this file's
Expm1.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
asinf left errno unchanged for |x| > 1, the infinities and NaN, following
included, stores EDOM there and leaves it alone for |x| <= 1; asinf now
does the same, and the test expects it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
asinf returned the host asin, so its last bit depended on the host: on
Windows it differs from the libc.prx that titles ship on 5,413,834 of the
floats in (-1, 1). That libc.prx is msun's e_asinf.c, which gives the same
bits as PPSA07923's and PPSA05916's copies for all 2^32 arguments. errno
is still left unchanged for |x| > 1 and NaN.
Co-Authored-By: Claude Opus 5.5 <[email protected]>