Mapping a direct memory range that includes an unallocated physical
page threw std::invalid_argument and ended the process. It now returns
ENOMEM before anything is mapped, as shadPS4's MemoryManager::MapMemory
does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Firmware 13.42 checks the initialized flag first in all five and
returns 0x80920005 without writing the outputs. The debt entry now
says where the behaviour comes from.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Firmware 13.42 keeps the type of the 16th nested container in the context
slot that also holds the saved parser state, so a call that ends inside a
16th-level object leaves the outermost object open. The parser here does
the same; the test pins it, and the debt file records it together with
where the parser's behaviour comes from.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
KytyPS5 and shadPS4 return EFAULT for a null name. The test keeps that
and the rename and clear checks, and drops the null address, zero length
and past-the-end cases that no reference covers; the debt entry records
them as unknown, with the 32-byte name limit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceKernelWriteMapCommand2, sceKernelWriteUnmapToPrtCommand,
sceKernelWriteWriteAddressCommand, sceKernelWriteWriteCounterCommand,
sceKernelWriteWaitOnAddressCommand, sceKernelWriteWaitOnCounterCommand
and sceKernelWriteEventQueueOnCompletionCommand follow the checks of
firmware 13.42's libkernel and record this project's command layout.
Without the PRT flag, sceKernelWriteMapCommand2 is
sceKernelWriteMapCommand, as on the console. The debt files record where
the existing writers' checks differ from the firmware.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PS5 firmware 3.20 and 4.03 write trunc(clamp(x * 32767.0f, -32767, 32767)) into a PCM_I16L render buffer, with the product in float, NaN written as 0 and -32768 never written; ours rounded x * 32768 to nearest, wrote -32768 for -1 and threw on a nonfinite sample. Combined with the sampler's exact x / 32768 input, an I16 source now comes back one step toward zero, so the existing render, stream and gain tests expect that, and a new sweep checks the measured values on 1, 2, 6 and 8 channels.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The clamp was measured on a sampler voice's ports only, so the entry now says that a port past the count on another rack's voice and sceNgs2VoiceGetPortInfo still throw, and it no longer repeats the port gain ramp, which a separate change implements.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
PS5 firmware 3.20 and 4.03 clamp the port volume of VoiceControl param 0x2 and RunCommands command 6 to [0, 32], keeping NaN and -0, and return 0 for every value. Command 6 reads the low 32 bits of its value as a float whatever the value type and ignores numValues and flags, and a batch of port volumes naming a port past an 8-port rack returns 0x804A8357 without applying any of them. Ours stored the value raw, threw on a value type other than float and threw on the bad port after applying the earlier commands; other command ids and the unmeasured bad-port cases keep their old behaviour.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Firmware 13.42 libSceAgcDriver.sprx answers sceAgcDriverAcquireRazorACQ,
GetPaDebugInterfaceVersion, SetHsOffchipParamDirect,
SubmitMultiCommandBuffersDirect, SubmitToRazorACQ and
SuspendPointSubmitDirect with 0x8A6D0001 and ModuleRegistration with
0x8A6D0003 for every input, like SetTargetRingForDiag.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Implement sceMbusConvertToLocalDeviceId, sceMbusConvertToMbusDeviceId and
the same-class case of sceMbusConvertToLocalDeviceId2 from the firmware
13.42 module. A different class needs the Mbus service and throws.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
scePadGetMotionTimerUnit, scePadGetMotionSensorPosition,
scePadGetSphereRadius, scePadGetBluetoothAddress and
scePadParseUniqueDataLeonardo follow firmware 13.42's handle and
device checks for the one DualSense this library reports.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Staging a swept write-only element (#7618) costs a copy-in and a
copy-back per use. In PPSA03912's town that saves GPU time, but in its
main menu the 202 MiB element is faster in place (73 vs 91 ms of GPU
time per frame), so the menu lost about a fifth of its frames.
Decide per element by measurement. The busiest element is probed in
its current mode, the other mode and its current mode again; the other
mode is kept when its frames are faster by more than twice the
standard error. A repeated answer doubles the wait for the next probe
from 20 s up to 160 s, and a jump of the frame GPU time by more than a
quarter (a scene change) probes again at once. The frame GPU time comes
from the whole-batch timestamps, which the first probe turns on.
Resource builds made under the other decision are not reused.
APS5_NO_ADAPTIVE_STAGING=1 stages every eligible element, as before.
The policy is in AdaptiveStaging.hpp, fed by the caller with frame
counts and time; agc_adaptive_staging covers keeping the faster mode,
frame noise, the back-off cap, a scene change and the share threshold.
AI-assisted. Tested by me on my own machine.
Take the user ID, service label, entitlement label and info of the
runtime declaration in dlc_emu. A user ID of -1 returns the parameter
error before any other check; any other ID returns what
sceNpEntitlementAccessGetAddcontEntitlementInfo returns for the label,
including the not-found error for a label the entitlements file does
not list. Record the unverified prototype, the error order and the
label checks dlc_emu makes that this export does not in the debt.
The volume, mute and focus state that libSceAudioOut applies and libSceVideoOut changes now lives in libScePad, which both libraries already link, instead of in libSceAudioOut. The tests that compile the state directly and the environment reference follow the file.
Give sceNpWebApiAbortHandle, sceNpWebApiAddHttpRequestHeader,
sceNpWebApiCheckTimeout, sceNpWebApiCreateMultipartRequest,
sceNpWebApiSendRequest2, sceNpWebApiSetHandleTimeout,
sceNpWebApiSetMultipartContentType and sceNpWebApiSetRequestTimeout
their prototypes and the offline behaviour of the existing model.
Requests keep a multipart flag and a timeout whose timer starts on the
first send; CheckTimeout aborts expired requests at most once per
millisecond. The timeout unit is unverified: shadPS4 logs it as
milliseconds but adds it to microsecond process time, which is what
is done here. Handles created from SDK 3.00 get a timer slot. Headers
and multipart content types are validated and dropped, since nothing
is sent. Multipart parts and UtilityParseNpId still throw.