13 Commits
Author SHA1 Message Date
Jorge Feitosa 6f03aa224a Microphone input, optional melonDS DS core and its touchpad stylus (0134, 0135)
From mihawk-99/PS5_RetroArch#53 and #52 (Jorge Feitosa), renumbered
(0131 to 0133 were taken), taken together: #52 fixes the read loop #53
turns on.

- src/microphone_ps5.cpp (0134): a native AudioIn microphone driver,
  the default one, for the first controller's user. It captures only
  while a core has its microphone on, sends silence under the DualSense
  mute, and keeps PCM only in a bounded queue in memory. RetroArch is
  configured with the microphone; the title links a host stub for
  libSceAudioIn's imports.
- 0135: a microphone read that gets no frames returns silence instead of
  looping forever (a paused core, an empty nonblocking device, a failed
  capture).
- tools/build-melondsds.sh: melonDS DS at pinned revisions (git objects
  by SHA), software renderer and a native-memory JIT, staged only with
  PS5_WITH_MELONDSDS=1; DeSmuME stays the DS default. The DualSense
  touchpad drives its stylus as it drives DeSmuME's.

Changed from the pull requests: the README and the 0134 entry describe
what happens, not an opt-in the code never had. RetroArch's microphone is
on by default, as upstream; melonDS DS listens only while its microphone
button is held (its default), and Settings > Audio > Microphone turns it
off for every core. tests/test_microphone_read.py applies the port's
edits to vendor/retroarch itself rather than reading build/ra-conf, which
a tree configured before 0135 would fail. The SwanStation and melonDS DS
title changes are merged into one licence-file rule.

Evidence: tests/test_microphone_ps5.py (the driver against a simulated
AudioIn: lifecycle, mute, input failure); tests/test_microphone_read.py
(it times out with upstream's loop); tests/test_touchpad_stylus.py
(melonDS DS's relative stylus); tools/build-melondsds.sh, core ABI PASS
(25 exports, kernel_web, sha256 b03d4c93...). A title built with both
optional cores: 61 notice parts, check-notices covers every shipped
executable, check-manifest PASS, 78 melonDS DS options in the catalog.
Gates (default build): format, unit (204), build (staged cores reused),
integration, evidence PASS. Console: with this series' deploy.
2026-10-17 21:25:33 -04:00
Mihawk 0bca2863e6 Gates: test stubs for frame generation; comment wrapping; TLS and password patches renumbered 0129/0130
- tests/input_ps5_test.cpp: ps5_fg_record_request stub (the pad script's
  RECORD calls PS5_FrameGen's recorder, not linked in the host test).
- tests/test_webui_qr.py: stubs for the frame generation entries 0120 binds
  beside the WebUI's (ps5_fg_menu_is_label/_is_folder, action_ok_ps5_fg,
  action_ok_push_default).
- src/main.cpp, src/ps5_framegen_menu.c: tools/lint-format.sh --write
  (comments re-wrapped to the line limit; no code changed).
- The frame generation code already names patches 0122-0128, which
  patches/series does not list; 47879d1's TLS and password patches took
  0122/0123 and are now 0129 (TLS verification) and 0130 (password).

lint-format PASS; tests test_input_ps5, test_webui_qr, test_frontend,
test_webui_secrets: OK.
2026-10-14 19:27:23 -04:00
Mihawk 04cd031dc0 Add DualSense touchpad stylus control to DS and 3DS cores
Adapt Proton contact tracking for relative hover and physical press/drag/release.
Keep touchpad Select in menus and other cores. Add resolution-scaled mouse
motion and clipped stylus cursors to DeSmuME and Azahar (Vulkan/software),
with reproducible core patches, build provenance and licence attribution.

Verified: format; 182 host/integration tests; all shipped native targets;
core ABI, manifest and licence checks; 103 evidence captures replayed.
Deployed build 6da657c4 to the base PS5; stored SHA-256 of eboot.bin and both
cores matches the stage. Physical controller/TV acceptance remains pending.

Reproduce:
PS5_FRONTENDS='es-de picker' PS5_VULKAN_TEMPLATE="$PWD/build/picker-template" tools/verify.sh
python3 -m unittest tests.test_input_ps5 tests.test_touchpad_stylus

Evidence: evidence/touchpad-stylus/capture.json and expectation.json.
Raw logs: klog/touchpad-stylus/ (ignored).
2026-10-07 19:10:53 -04:00
Mihawk d2d85c535c WebUI: its own daemon, up across every frontend; downloads read in blocks
The WebUI only ran inside RetroArch: a frontend change (LoadExec) ended it with
every upload in flight. It is now a payload of its own (daemon/webui_daemon.cpp,
webui/ps5-retroarch-webui.elf) serving the title's folder on 6769. eboot.bin, the
picker and ES-DE each keep a link to it (src/webui_link.h, 127.0.0.1:6770) and the
first to find none starts it through the ELF loader (9021) or websrv (8080 /hbldr).
It stops 20 s after the title closes, never mid-transfer; an update's Install
closes the title and the daemon installs. With no loader, eboot.bin serves the
WebUI while RetroArch runs, as before. The page names the frontend shown.

Downloads were handed to MHD as a descriptor (sendfile), which stopped at 33,300
bytes on the console; they are read in 256 KiB blocks.

Evidence: evidence/webui-daemon (base PS5 13.40). 200 MiB upload across picker ->
RetroArch -> picker and 60 MiB across picker -> ES-DE: one token throughout, 201
Created, every 256 KiB block equal on the console; daemon stopped 20 s after the
title closed; a 1,917,648,896-byte download's sha256 equals the FTP copy.
Command: tools/run-title.sh --picker-test=600:retroarch --retroarch-frames=1800
--watch 110 with build/tmp/webui-handover.py; tools/verify.sh: all five PASS.
Host tests: tests/test_webui_link.py, tests/test_webui_daemon.py.
2026-10-07 07:41:51 -04:00
Mihawk 4788d35076 Up to four controllers, one per signed-in PS5 user
The console pairs each controller with a signed-in user, and scePadOpen
opens a user's controller, so RetroArch read only the first player's.
The joypad driver now connects controllers the way ProsperoEden does
(PS5_ProsperoEden b919847, headless/pad.cpp):

- Port 0 (player 1) is the user who started the title, and stays theirs.
- About once a second sceUserServiceGetLoginUserIdList is read again. A
  new user's controller takes the first free port (1 to 3); a port is
  let go, and announced gone, when its user signs out. A pad the process
  already holds is reused through scePadGetHandle.
- Each port is announced to RetroArch's autoconfiguration on its own and
  has its own buttons, axes, rumble and haptic stream. The pad script
  still plays port 0.

The console's config already maps players 1-4 to joypad indexes 0-3.
For test runs, tools/run-title.sh --pad-monitor arms
/app0/pad-monitor.txt, which traces each port's whole button word as it
changes, including the bit that says the system holds the controller.

Evidence: evidence/multi-controller/ (capture.json, expectation.json;
console user ids masked). On the base PS5 13.40 with two DualSense
controllers and two signed-in users (build 95a82988):
  run 211620: ports 0 and 1 opened, each with its haptic stream, and
    both reported connected
  the owner's own launch from the home screen: the launching user's
    controller became port 0 and the other port 1; both were opened again
    after RetroArch re-initialised input, and a racing game played with
    both controllers
The committed source differs from build 95a82988 only in the monitor's
trace format, which the host test covers; that build was not run on the
console.
Host test: tests/test_input_ps5.py PASS (the four-player scenario: join,
separate input and rumble, sign-out, rejoin, the first player kept, an
open failure, a full house, the monitor, re-announcement after a reset).
Command:
  tools/run-title.sh --no-build --no-deploy --pad-monitor --watch 120
Gates: tools/verify.sh PASS (format unit build integration evidence).
2026-10-04 21:26:17 -04:00
Mihawk 09ea2c2a66 Add verified console updates and BIOS alerts to the WebUI
Download and verify published packages on-console, stage changed managed files, preserve user data, and install after frontend shutdown. Set eboot execute permission explicitly so native installations relaunch.

Validation: tools/verify.sh (118 tests, native build and all gates); browser state checks; actual Alpha 6 download/install/relaunch and unchanged config. Evidence: evidence/webui-update/.
2026-10-02 19:06:46 -04:00
Mihawk d5f429c039 Ship offline video effects and fix overlay and temporal shader rendering
Validated: 108 host tests, native build and integration; evidence/offline-video-effects replays selected PS5 captures. Complete overlay geometry and normalized history/feedback verified on console. Includes release notes and arcade screenshot catalog for v0.6.0-alpha.6.
2026-10-02 15:58:41 -04:00
Mihawkandrpf16rj 97695a8235 Add DualSense rumble and safe haptic streaming
Adapt PR #6 with matched S16/F32 buffers, startup cleanup and serialized motor fallback. Preserve active levels when streaming fails and cover both formats and failure paths with AddressSanitizer.

Verification: all five tools/verify.sh gates pass; 87 tests. Console strong/weak/combined pulse run: 2269 buffers, 568 nonzero, zero output errors, normal exit. Evidence: evidence/dualsense-rumble/capture.json and expectation.json; replay with bash tools/verify.sh evidence. Physical feel remains unconfirmed.

Co-authored-by: rpf16rj <rpf16rj@gmail.com>
2026-10-02 09:18:50 -04:00
Mihawk b9f411adae Input test: stubs for the core option calls, and a check of the pad script's OPTION
The OPTION action (858129f) calls RetroArch's core option manager, which the
host test did not link, so the unit gate failed. The test now gives it one
option to find and checks that OPTION sets it, and that an unknown key or
value leaves the options alone. bash tools/verify.sh: PASS (format unit build
integration evidence).
2026-10-01 09:35:41 -04:00
Mihawk 2096666eb7 RPCS3: save states and every setting as core options; GTA IV 1.00 boots
The core's .info offers basic save states (RPCS3 savestates, kept in memory),
and the fork's RPCS3 settings are core options by section (docs/RPCS3_PORT.md).
The fork's pin also carries two RSX fixes GTA IV needs: a FIFO whose command
buffer is in local memory (system mode 0x200; GTA IV 1.00 stopped at its first
commands, RPCS3 issue #14194) and a ZCULL late fault that unlocks its page
(the 16K-page freeze of RPCS3 issue #19610).

The test pad script gains SAVE_STATE, LOAD_STATE and SCREENSHOT actions (the
last saves /app0/pad-shot-<n>.png), for runs that start from a known scene and
runs that walk through a game's screens.
2026-09-29 07:58:37 -04:00
Mihawk 67907d0159 Core threads count as finished after their destructors; the pad script's STOP
The loader counted a core thread as running until its start routine returned,
and RPCS3's threads end in pthread_exit, so 122 were "still running" at every
Close Content: the core stayed mapped and the reload mapped a second copy. A
core thread now counts itself finished from its first-registered thread_local
destructor, which runs last of them whether it returns or calls pthread_exit,
and one that returns ends through ps5_pthread_exit, so its destructors run
while its TLS is whole. The loader allows 20 ms after the count reaches zero
for the key destructors that follow. RPCS3 unloads at Close Content and
reloads at the same base; PPSSPP's battery still passes.

RetroArch forgets --max-frames when a core closes, so the pad script's STOP
ends a run that reloaded content, as the frame limit does, with its
screenshot.

God of War HD at 300%: twelve minutes without a crash, 71 of 71 windows at
100%, and the Close Content + reload battery passes (docs/PHASE_LOG.md).
2026-09-29 01:02:40 -04:00
Mihawk fa28bf1ae4 Fix thumbnail colours and input after resetting defaults
Preserve the requested RGBA format in asynchronous image loading. Default the native joypad to ps5 and refresh controller autoconfiguration after a live reset clears bindings.

Three new regression tests failed before the fixes and pass afterward. All five tools/verify.sh gates passed with 74 tests and 278 frontend sources. Patch inventory is 179, including five configuration.c edits. Owner accepted the uploaded build: Perfect. Commit.

Evidence: evidence/thumbnail-input-defaults/; replay with bash tools/verify.sh format evidence. Accepted build: e11018a79a62ce91fa723deaad6939c1e48a47bace21b3527ae84f4452148451. Current logging unchanged; no PS5_Vulkan edits.
2026-09-19 21:00:27 -04:00
Mihawk dae9006c37 Fix PS5 menu analog navigation and input binding capture
Register ps5_joypad with raw buttons/axes and a built-in controller profile.
Route controls through RetroArch's binding helpers and stop OR-ing hardcoded
pad state back into remapped input. Preserve held samples across the extra
binding-screen poll and keep disconnect/interception handling.

Add three upstream edits (105 -> 108): joypad declaration, registration and
built-in profile. No new dependency or toolchain flag. Host tests exercise
upstream mapping/analog helpers, native polling/lifecycle and ELF registration.

Validation: tools/verify.sh (all five gates, 37 tests, 17 evidence records).
Fresh patch replay: 107 applied + one existing marker; second pass unchanged.
Console: tools/run-title.sh --no-build --watch 120; owner confirmed flawless
stick navigation and binding capture, then confirmed manual close.
Follow-up: tools/run-title.sh --no-build --no-deploy --watch 30; full window
alive and script-closed, zero Vulkan refusals/API failures.
Evidence: evidence/native-joypad/{capture,expectation}.json.
Build: e6211dea9fd0bb512e83a9979a6a44c0c8c5fdf175564c753e3fd2a25067e0a9.
PS5_Vulkan unchanged.
2026-09-19 13:35:42 -04:00