On macOS a fiber's context buffer is its guest stack, and the buffer sits in the write-watched guest heap. Every collect re-armed its pages, so a push in a function prologue could fault on the page below the stack pointer. Rosetta cannot resume a synchronous exception that arrives after earlier instructions of the same translated block have run, and aborts with "unexpectedly need to EmulateForward on a synchronous exception".
PinStack and UnpinStack now bracket the context with a host write on macOS, as the Windows build does with the arena's writable pin, so the pages stay writable for the life of the fiber. The same hooks cover contexts attached on run or switch.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
test_debt_split.py started debt_split.py as a subprocess for every split
and committed the index in setUp and after each split, although only the
rebase tests and the resolve test outside a rebase depend on a commit.
The split helper now calls main() in process from the fixture's directory
with its output sent to a sink, the commits move into those tests, and
the test's git commands skip the automatic maintenance subprocess. One
test keeps a split through the command line to cover its output, and
resolve stays a subprocess. The test starts about a third fewer
processes and takes half the time on Linux; Windows CI reported 34 s
for it.
ReadCommitted and EqualsCommitted find the readable pages of a range,
then copy or compare them. On Windows a page another thread releases
in between faulted the copy. Demon's Souls (PPSA01342) samples a texture
at 0x38400 of 352 MiB while loading the tutorial level; on Windows that
range covers host heap pages, and the load stopped with an access
violation in ucrtbase's memcpy under cachedTexture.
On Windows the pages are now read through ReadProcessMemory, page by
page after a failed whole read, and a page that cannot be read counts as
uncommitted: zero in a copy, left out of a comparison.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceVideoOutGetOutputStatus derived resolution from the size of the
registered buffers, so a title that reads it right after sceVideoOutOpen
got 1 (1080p) whatever the display. In a payload process on a PS5
(firmware 12.70), with no buffer registered, the field changed with the
console's resolution setting: 2 with it on Automatic on a 4K display, 1
with it set to 1080p. Read it from the display mode SDL reports for the
window's display, next to the refresh rate, and keep it independent of
the registered buffers.
A converted title runs with the user's permissions, and its executable is not randomized on any host: Linux loads it at a fixed address unless the deprecated --lazy-binding is used, Windows without DYNAMIC_BASE, and macOS without MH_PIE. Say so next to the host requirements.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E7j2SYGtKCiPHcU9SwUSjh
After sceNetInit, the console's sceNetUsleep prints
"[LIBNET] usleep <count>" to standard output for a negative count
before failing with EINVAL, as a payload measured on firmware 13.60
(#9076). AnyPS5 failed without printing it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ImportWatched hashes every watched page of an import run before the
import, and checks every page the import reports written against those
hashes after it. On Windows the first touch of untouched write-watched
memory faults each page in, so the first pass over a fresh 64 MiB run
costs tens of milliseconds on the thread that draws.
Both passes now split their pages over up to four threads, at least
1024 pages per thread. The checks after the import still run after the
walk has reset the write watch, so a CPU store during the window is
caught as before.
Co-Authored-By: Claude <[email protected]>
Scan every byte of the 32 MiB tracker range and the tail after it, so a
shorter clear or one that stops before the boundary fails.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PS5 firmware 3.20 and 4.03 apply the first full-band and LFE gain a voice receives flat and ramp every later change over the next grain in eight lanes, as RESULTS15 measured; the entry said the levels never ramp. The clamp, the NaN handling and this change's behaviour are unchanged, and the missing ramp stays listed.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
On a discrete GPU a write-only V# element whose stride is wider than the
widest buffer store (16 bytes) and that a direct dispatch sweeps is staged
in a device-local shadow of up to 256 MiB, as read and written swept
elements are. Its stores no longer cross the bus into the host import.
AI-assisted. Tested by me on my own machine.
sceVrTracker2Initialize follows the order read from firmware 13.60
libSceVrTracker2.sprx (disassembly, not measured on a console). It
rejects with 0x8A740006, in order: a null record or a size other than
72; a mode other than 0, 1000 or 1001; a null work memory; a size below
the mode's 32 MiB, 7 MiB or 3 MiB; an alignment below 0x10000; a
non-zero reserved byte at 0x3a..0x47; a thread priority outside
256..767; an affinity mask outside bits 0..12 in mode 0 or outside
0xEA00 in modes 1000 and 1001. It then moves the module state from 0 to
1 and returns 0x8A740002 if it was not 0.
From there every failure undoes what the call opened and resets the
state to 0. Mode 0 clears the first 32 MiB of work memory first. The
application attribute checks on the sceKernelGetAppInfo2 record
(0x8A74001E, 0x8A740020) are skipped: the host has none, and a zeroed
record passes them. The signed option at 0x39 accepts -1 and 0,
and 1 only for titles compiled with SDK 7.00 or later. Modes 0 and 1000
then call libSceHmd2 TrackingOpen, TrackingStart, LedDetectorOpen and
LedDetectorStart and return the first non-zero result unchanged.
Without a headset main's libSceHmd2 answers 0 and -1 (its measured
pre-initialization answers), so Initialize returns -1 and every other
export keeps answering 0x8A740001.
Modes 1000 and 1001 need the application category, which the host does
not have, and a fully successful Hmd2 sequence would need the tracker
runtime; both throw. The eight tracking and LED-detector exports become
named functions in libSceHmd2 so that libSceVrTracker2 can import them
by name; their answers are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
_get_dstbias takes a long pointer, so the int variable added in the previous commit did not compile on Windows. The variable and its format specifier are now long.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>