Commit Graph
8 Commits
Author SHA1 Message Date
hypermist 83043eede6 test(libSceVrTracker2): stop asserting that system modes throw
Remove the system-mode throw cases in GuestVrTracker2.cpp that tested
modes 1000 and 1001 throwing. Allocate a fresh temporary directory
atomically in EnterApplicationRoot without clobbering existing paths.
Update the debt entry without citing a source.

Assisted-by: Antigravity:gemini-3.8-flash-medium
2026-10-25 20:40:44 +13:00
hypermistandClaude Opus 5.5 8883a34320 Merge remote-tracking branch 'upstream/main' into feat/vrtracker2-initialize
Resolved Export.cpp and GuestVrTracker2.cpp keeping main's header layout; the new sceHmd2Internal exports are declared in the libSceHmd2 header and the test uses the library headers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 13:29:54 +13:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
hypermistandClaude Opus 5.5 16c9c3174e test(libSceVrTracker2): check the whole cleared work memory range
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]>
2026-10-24 23:30:29 +13:00
hypermistandClaude Opus 5.5 439b426c4b feat(libSceVrTracker2): validate initialization and pass through the Hmd2 tracking result
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]>
2026-10-24 23:18:29 +13:00
boykopovar 3fff17d08e fix(vrtracker2): restore memory modes and initialization layout 2026-10-21 21:51:44 +03:00
boykopovar 4c43601278 fix(vrtracker2): restore named export signatures and play area layouts 2026-10-21 21:50:38 +03:00
T3cm0andClaude Opus 5.5 151f116550 feat(libSceVrTracker2): answer as the console's module before initialization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 17:28:03 +02:00