Commit Graph
136 Commits
Author SHA1 Message Date
Adrià 5c356f41c3 Merge pull request #11048 from imellag/feat/libkernel-macos-main-thread
feat(libkernel): start the guest off the main thread on macOS
2026-10-27 08:27:20 +01:00
Dean e55c69f1fd Merge pull request #8927 from ionut27001/fix/videoout-cursor-flip-status
fix(libSceVideoOut): answer the cursor, flip status and pending-flip calls as measured on a PS5
2026-10-27 14:57:01 +13:00
Adrià afc780e681 Merge pull request #10507 from orezraey/feat/videoout-composite-overlay
feat(videoout): composite the overlay bus over the main output
2026-10-26 20:00:54 +01:00
Dean ca6e29e836 Merge pull request #10924 from Jishnuraj07/fix/pad-sdl-host-controllers
test(pad): skip pad_sdl when host controllers are connected
2026-10-27 05:32:38 +13:00
Dean Galvin 231bbbce92 Merge branch 'main' into fix/videoout-cursor-flip-status 2026-10-27 04:20:52 +13:00
Dean Galvin 96f404d73d test(videoout): stop pinning results for unimplemented cursor and flip status calls
The removed checks asserted the exact failure text of cursor image, image
address and index calls and of a null flip status output. Those calls are
still not implemented and still refuse explicitly; the tests no longer pin
what they answer.
2026-10-27 04:20:52 +13:00
orezraeyandClaude Opus 5.5 f34c280578 Merge main into feat/videoout-composite-overlay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 03:06:04 -03:00
Jishnuraj07andClaude Opus 5.5 2b884749fa fix(pad): fail pad_sdl when SDL_NumJoysticks reports an error
SDL_NumJoysticks returns a negative value on error, which the host
controller check turned into exit code 77 and CTest reported as a
skip. A negative count now fails the test with SDL_GetError, and only
a positive count skips it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 11:26:25 +05:30
Dean 9f386f3a29 Merge pull request #9157 from shanu337/videoout-color-space-wrappers
refactor(libSceVideoOut): consolidate color space wrappers and add Flip tests
2026-10-26 15:32:59 +13:00
orezraeyandClaude Opus 5.5 655d0f3f32 Merge main into feat/videoout-composite-overlay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:51:50 -03:00
Dean 487a08e600 Merge pull request #8654 from xXPBSXx/test/video-out-telemetry-windows
test(libSceVideoOut): run the telemetry tests on Windows
2026-10-26 11:03:02 +13:00
Dean Galvin b7c91d3372 fix(libSceVideoOut): declare the sized color wrappers once in VideoOut.hpp 2026-10-26 10:31:23 +13:00
Dean Galvin 0a52fdf083 Merge branch 'main' into videoout-color-space-wrappers 2026-10-26 10:30:44 +13:00
Emanueleandmugurc 30cc4ea2e6 feat(libkernel): start the guest off the main thread on macOS
AppKit, which SDL uses for windows, Metal surfaces, event pumping and game
controllers, works only on the main thread, and a guest never hands its
thread back. The macOS relinker emits a call to Aps5StartGuest as the
entry of a relinked executable; no library provided it.

- Aps5StartGuest runs the guest entry on a new thread with the stack size
  of the main thread (at least 8 MiB) and serves the main dispatch queue
  from the run loop of the main thread. The guest ends the process with
  exit; a guest entry that returns aborts.
- Aps5RunOnMainThread runs a function on the main thread and waits for it,
  or in place where the main thread is the caller or Aps5StartGuest was
  never called.
- libSceVideoOut sends its SDL calls through OnMainThread, which carries
  the exceptions back to the caller: the initialisation and shutdown of the
  video and game controller subsystems, the window, its Vulkan surface and
  drawable size, the event polling and the pad, mouse and keyboard input,
  which are created and destroyed there. On the other platforms the
  functions run in place.
- The flip test starts its tests through Aps5StartGuest on macOS, as a
  relinked guest does.

Co-authored-by: mugurc <[email protected]>
2026-10-25 16:02:42 +01:00
Jishnuraj07andClaude Opus 5.5 bdf5ab0e4a test(pad): skip pad_sdl when host controllers are connected
PadInput opens every joystick SDL sees, so a controller attached to
the host takes slot 0 and the slot checks abort. The test now exits
with 77, registered as SKIP_RETURN_CODE, when SDL sees any host
joystick before it attaches its virtual controllers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:00:17 +05:30
boykopovar 2db4bb590b fix(sdk): restore linux and libc++ header compatibility 2026-10-25 00:02:51 +03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Adrià FranchandClaude Sonnet 5.5 4fcaeba01d fix(pad): undef SDL's main redirect in pad_sdl_tests for MinGW
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 19:21:15 +02:00
SlugZero 05c177d2d4 test(pad): exercise PadInput slot lifecycle and pin single connected pad count 2026-10-24 19:21:15 +02:00
ionut27001 983a81d91b fix(libSceVideoOut): add APS5_OUTPUT_RESOLUTION to override the reported output resolution 2026-10-24 12:42:14 +02:00
ionut27001 bfeeed4ef4 fix(libSceVideoOut): report the output resolution from the host display as measured on a PS5
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.
2026-10-24 12:42:08 +02:00
orezraeyandClaude Opus 5.5 ded043d552 feat(videoout): composite the overlay bus over the main output
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:43:21 -03:00
shanu337 f24320dc1c refactor(libSceVideoOut): consolidate color space wrappers and add Flip tests 2026-10-23 19:00:18 +05:30
Dean f57ceaad6b Merge pull request #8370 from orezraey/fix/pad-test-unicode-config-path
test(pad): set the input mapping path through the wide environment on Windows
2026-10-23 11:28:44 +13:00
Dean 6d8f13207a Merge pull request #9608 from DavidSamir/test/videoout-flip-windows-driver
test(libSceVideoOut): run the VideoOut flip tests with SDL's windows driver on Windows
2026-10-22 17:59:50 +13:00
Dean 524398151f Merge pull request #8807 from ycbuzi/fix/agc-driver-frame-dump-wait
fix(agc-driver): make the presenter wait for a full frame dump queue
2026-10-22 17:50:26 +13:00
David f4f60cf277 test(libSceVideoOut): run the VideoOut flip tests with SDL's windows driver on Windows
ANYPS5_VIDEO_OUT_TEST_DRIVER defaulted to SDL's offscreen driver on every
host. That driver has no Vulkan on Windows, so all thirteen flip tests that
open a display skipped there. Windows now defaults to the windows driver.
A machine without a Vulkan driver makes DisplayWindow report that Vulkan
lacks VK_KHR_surface, so the flip tests also skip on a DisplayWindow error
that names Vulkan, as they do on offscreen's message.
2026-10-22 05:05:28 +01:00
David 0225ae65a7 test(libSceVideoOut): find the pre-vblank event among every queued event
The controls check read exactly two events after subscribing to pre-vblank
and waiting for one vblank, and expected one of them to be PRE_VBLANK_START.
The VideoOut filter queues every vblank of the earlier VBLANK registration,
and the queue returns one registration's events before the next, so when a
second vblank lands between the earlier read and the wait (a real display's
cadence), both events read are VBLANK and the pre-vblank event is the third.
The check now reads up to eight events and requires a VBLANK for the vblank
registration and a PRE_VBLANK_START with its own user data among them.
2026-10-22 05:03:59 +01:00
blu 445a549d88 Merge branch 'boykopovar:main' into fix/agc-driver-frame-dump-wait 2026-10-21 19:04:09 -07:00
Adrià ba6abe1fd4 Merge pull request #8418 from hypermoist/feat/videoout-remove-buffer-attribute-option
feat(libSceVideoOut): implement sceVideoOutRemoveBufferAttributeOption
2026-10-21 15:32:40 +02:00
blu 8fe945e590 Merge branch 'boykopovar:main' into fix/agc-driver-frame-dump-wait 2026-10-20 23:37:16 -07:00
ionut27001 51d561a551 fix(libSceVideoOut): answer the cursor, flip status and pending-flip calls as measured on a PS5 2026-10-21 09:28:51 +03:00
Dean 69d0861755 Merge pull request #8494 from NumberGuan/codex/videoout-eop-test-chunks
test(videoout): split long GPU work into bounded dispatches
2026-10-21 17:43:04 +13:00
bluandClaude Fable 5.1 3ed129ab33 fix(agc-driver): make the presenter wait for a full frame dump queue
With APS5_DUMP_FRAMES, FrameDumpWriter::Enqueue threw "frame dump queue exceeded 64 MiB" when the
writer thread fell more than 64 MiB behind, which failed the presentation and ended the title.
#4320 made that rare at the default APS5_DUMP_SCALE=4; at APS5_DUMP_SCALE=1 a 1920x1080 title
reaches it within nine frames and a 3840x2160 one on the third.

Enqueue now waits on the writer's condition variable until the frame fits, and the writer
notifies after each file; a single frame larger than the queue still throws. The VideoOut frame
dump queue test gets a wait mode at scale 1 whose third frame has to wait for the held first one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 14:29:09 -07:00
xXPBSXxandClaude Sonnet 5.5 c318c70b69 test(libSceVideoOut): run the telemetry tests on Windows
video_out_telemetry and video_out_telemetry_caption were registered only
for non-Windows hosts. Telemetry.cpp needs getpid, which Windows spells
_getpid, and a narrow path for OpenFromEnvironment, because a
std::filesystem::path c_str() is wide there. Register the tests with the
Windows PATH and unwind settings of the other video out tests; the caption
test skips (77) when the offscreen SDL driver has no Vulkan support.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 19:55:36 +02:00
orezraeyandClaude Opus 5.5 1965dc0dc4 test(videoout): skip the HDR probe check on a monitor Windows reports as HDR
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 11:37:50 -03:00
Tomás Ortellado 76aa70e552 test(videoout): split long GPU work into bounded dispatches 2026-10-20 10:44:24 -03:00
hypermistandClaude Opus 5.5 e9bde2a2d4 feat(libSceVideoOut): implement sceVideoOutRemoveBufferAttributeOption
Clear the given bits of the attribute's option field, the inverse of
sceVideoOutAddBufferAttributeOption, as libSceVideoOut does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 01:28:22 +13:00
orezraeyandClaude Opus 5.5 c06b6f00cf test(pad): set the input mapping path through the wide environment on Windows
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 08:23:47 -03:00
Adrià 36b72ad84a Merge pull request #7632 from WallisSkill/fix/pad-output-coalesce
fix(libSceVideoOut): coalesce controller output updates
2026-10-20 13:00:37 +02:00
dantdmdarealguy e3125e43af feat(agc,videoout): save the displayed frame as a PNG with a screenshot key
F12 (the new Screenshot input action) requests a capture of the next
presented display buffer. The presenter records it with the existing
APS5_DUMP_FRAMES GPU readback at full resolution, and the frame dump
writer thread encodes it with decoder_png into anyps5-screenshots/
beside the executable, or ANYPS5_SCREENSHOTS.
2026-10-20 00:28:39 -05:00
Adrià Franch f185afe130 test(videoout): match check_skips device-limitation text in telemetry skips 2026-10-19 15:28:45 +02:00
Eli Yarson b8607f4ced feat(videoout): write pad and present telemetry to APS5_VIDEOOUT_TELEMETRY_DIR
APS5_VIDEOOUT_TELEMETRY_DIR=<directory> appends one JSON object per line to <directory>/videoout.jsonl: a contract line for the run (commit and pid), a pad line whenever the published pad state changes in its buttons, sticks, L2 or R2, a present line after the first present and every 30 after that with the count and rate the window title shows, and a drops line with the number of lines the writer discarded, reported every ten seconds while it grows and once at a normal exit. A bounded queue of 4096 lines and one writer thread batch the file, so neither the present nor the input path waits for it; a pad change that the full queue refused stays pending for a later publish, and the frame count moves from UpdateTitle's function-static to DisplayWindow so the input path can name the present it belongs to.

Without the variable no file is opened and no thread is started: a present or an input update costs one call that checks a guard variable and returns null.
2026-10-19 15:27:49 +02:00
Adrià 415cd49fd3 Merge pull request #5913 from JJenkx/test/eop-live-token-filler-current
test(videoout): pin EOP matching across type-2 filler
2026-10-19 10:01:38 +02:00
Adrià c8e3fcb703 Merge pull request #6507 from karanvora2599/perf/videoout-unordered-cpu-flips
perf(videoout): don't hold a flip thread's CPU flips behind queued work
2026-10-19 04:49:51 +02:00
JJenkx 992f4a2d4e test(videoout): keep live EOP tokens in NOP payload after a type2 filler 2026-10-18 21:07:33 -04:00
EdouardSenceandClaude Opus 5.5 d71853cf25 feat(pad): add a Shake input that swings the reported motion while held
Some titles stop on a prompt to shake the controller, which keyboard players
and controllers without motion sensors cannot answer. While the Shake input is
held (X by default), the composed pad state reports motion with the
acceleration and angular velocity flipping sign every 50 ms; a controller's own
sensor data is used otherwise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:16:53 +02:00
AlxcBTW f0ec9bd2a0 Merge remote-tracking branch 'origin/main' into pr/input-analog-keys 2026-10-18 22:27:23 +02:00
Dean effb7d2d5a Merge pull request #7498 from AlxcBTW/pr/input-slow-mice
fix(libScePad): smooth a slow-reporting mouse over its measured report interval
2026-10-19 09:22:19 +13:00
Dean ce396a5d41 Merge pull request #7497 from AlxcBTW/pr/input-default-l2
feat(libScePad): bind L2 to R and the first mouse side button
2026-10-19 09:22:11 +13:00