8 Commits
Author SHA1 Message Date
MihawkandClaude aa7f0b2fbe SMB: RetroArch's file browser opens a shared folder from the WebUI
The WebUI's new SMB page signs in to one server (guest or a user and
password), lists its shares, checks a share and folder and saves them in
config/smb.cfg on the console; the password is never answered back.
RetroArch's file browser shows the share as SMB, after INTERNAL and
EXTERNAL. smb:// paths go through RetroArch's VFS to src/ps5_smb_vfs.c
(patches/series 0136), read-only and only on the saved server: a core that
reads through the VFS streams the file, one that opens paths itself gets a
copy in /app0/smb-cache, removed when the content closes.

libsmb2 is pinned at the master revision itsPLK/ps5-pkg-manager runs on the
PS5 (LGPL-2.1-or-later), built by tools/build-libsmb2.sh for the PS5 and the
host and listed in tooling/notices/components.json: RetroArch 1.22.2 has no
SMB client. In a title, getaddrinfo is bound to the platform layer's, which
resolves nothing, so libsmb2's resolver calls go to RetroArch's own
(src/platform_wraps.c); readv, writev, getlogin_r and getprotobyname are
wrapped, so libsmb2 adds no import. SMB sockets set SO_NOSIGPIPE.

Evidence: evidence/smb-load-content (python3 tools/evidence.py compare
evidence/): on the Base PS5 the console's WebUI listed the PC's guest share
and saved share/smb-test; Load Content > SMB listed it and a homebrew NES
ROM on it ran under FCEUmm, read through the VFS (build a2c7800a,
retroarch.log read back over FTP).

Gates: tools/verify.sh (format, unit 214, build, integration, evidence 140)
with PS5_REUSE_STAGED_CORES=ps5sx2: in this worktree the SDK's prospero-lld
wrapper adds -pie to ps5sx2's link (clang passes its long object list in a
response file the wrapper cannot read), so ps5sx2 is the main checkout's
build of the same pinned revision. Host tests run a Samba server of their
own (tests/smb_server.py, no root).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-18 17:42:06 -04:00
Mihawk 6fa72d46e7 Content: a folder for every system the installed cores run
content/ had only the folders people made (and a bare "Saturn"), so a fresh install
gave no hint where games go (issue 33). ps5_library_make_system_folders makes
content/<system> for each system the installed cores' databases name, with RetroArch's
names ("Nintendo - Nintendo Entertainment System"), which every frontend's library
reads as that system. A system with a folder already, under any name ("PS1",
"Genesis"), gets none: nothing is renamed or moved. A database no platform stands for
(Satellaview, Sufami Turbo, PICO, CD32, CDTV) gets none; variants go to their system
(Wii (Digital) -> Nintendo - Wii).

- src/main.cpp runs it at each title start, before the frontend dispatch (a home-screen
  launch goes to the picker from there; RetroArch's own init is too late), so a core
  added later gets its folder.
- tools/system-folders.c runs the same code on the staged title in build-title.sh:
  dist/PPSA99169/content holds the 46 folders of the 33 cores; video-assets.py keeps
  empty folders in the release ZIP.
- The bare content/Saturn the title made is dropped (Sega - Saturn replaces it).

Evidence: evidence/issue-33-system-folders (console: 45 folders -> 52 after a home-screen
restart, the 7 missing systems added 0777, the owner's kept; dist and the ZIP: 46);
tests/ps5_library_test.c (10 made, an existing folder honoured, unknown databases and
cores without .so skipped, a second run makes none). tools/verify.sh: PASS (format unit
build integration evidence).
2026-10-09 22:29:13 -04:00
Mihawk 189b415505 Remaps: saved to and loaded from config/remaps, per game and per core
Remaps never worked: the config's input_remapping_directory "default" was taken
as a folder named "default" (upstream resets it for its other folders, not this
one) and the port set no default remap folder, so Save Game/Core Remap File
failed with default/<core>/<game>.rmp and no remap ever loaded. The PS5 frontend
now names /app0/config/remaps (created 0777), and patch 0113 resolves "default"
to it. Game overrides and game core options already saved and loaded.

Evidence: evidence/remaps-per-game (base PS5 13.40, Snes9x, DKC2, Quick Menu by
pad script). Before: "Error saving remap file.: default/Snes9x/Snes9x.rmp". After:
game remap saved and "Game-specific remap found" on the next launch; core remap
saved (input_player1_btn_b = "8") and "Core-specific remap found"; game overrides
and game core options found on every launch. Test files deleted afterwards.
Command: tools/run-title.sh --game=snes9x:<DKC2> --pad-script=build/tmp/remap/*.txt;
tools/verify.sh: all five PASS.
2026-10-07 07:41:51 -04:00
Mihawk e06c1b87c8 Browser roots: the USB and extended drives ShadowMountPlus mounts
ShadowMountPlus 1.7beta4 mounts the console's /mnt (and /data) into every
PPSA title's sandbox while it runs. The top of the file browser and Load
Content is now INTERNAL (/app0) and each drive actually mounted there: USB 0-7
(/mnt/usbN) and EXTENDED 0-1 (/mnt/extN). A slot counts as a drive when its
root is another filesystem than /mnt. With none, EXTERNAL (/mnt) stays, as
before. /data is never offered (owner's decision). The startup trace records
what the sandbox exposes: roots, drive slots and /mnt's mount names, no file
names.

tools/build-title.sh gains PS5_REUSE_STAGED_CORES (development builds only,
refused for a release): stage a core as its last build left it, to deploy a
title change while MAME's hour-long rebuild runs.

Verified on the base PS5 (13.40), ShadowMountPlus 1.7beta4, one USB drive:
run-PPSA99169-204255; trace: "directory /mnt opened=1", "storage /mnt/usb0
(USB 0) available", no DATA root (evidence/usb-storage-roots). Before,
/mnt and /mnt/usb0 failed with errno 2. The owner confirmed the drive is
listed and a game on it plays.
Gates: tools/verify.sh format, unit and evidence PASS (87 captures, 0
failed). build and integration not run: MAME's full rebuild is in progress.
2026-10-06 20:44:15 -04:00
Mihawk a34661795a Fix Saturn BIOS paths, JIT execution and cropped video frames
Create content/Saturn and system/Saturn at startup. Route the default core
system directory and menu BIOS preflight consistently, retaining custom paths.
Patch Saturn's x86 code pools to use the SDK executable allocator and release.
Keep cropped frames in core-owned storage to avoid resized lent texture reuse.
Include the patch in core stamps, provenance and shipped notices.

Two deliberate frontend patch blocks increase the expected count 232 to 234.
Verification: bash tools/verify.sh, all five gates PASS, 96 tests.
Evidence: evidence/saturn-runtime; replay with python3 tools/evidence.py compare evidence/.
Console: 100s controlled gameplay with clean captures; final frontend repeats
100s boot/demo and exits0; explicit BIOS preflight passes. Settings restored.
2026-10-02 13:39:37 -04:00
Mihawk 39a5230083 Load Content: INTERNAL and EXTERNAL, and nothing else
Patch 0097. Load Content, and the file browser's top level, list the
frontend's two roots: INTERNAL, the title's folder (/app0), and EXTERNAL, the
console's mounts (/mnt). A root shows its name, not its path, and Parent
Directory from a root goes back to the two roots, not to the sandbox's /.
Kiosk mode keeps upstream's list. The patch count is now 215, three blocks
more.

Inside the title's sandbox /mnt is ENOENT, so EXTERNAL is empty until the
title can see the console's mounts.
2026-09-28 15:06:47 -04:00
Mihawk be8e22bfb6 Fix FTP access to RetroArch managed directories
Create and repair all seven managed directories to the owner-authorized 0777,
including existing folders and restrictive umasks. Console 0775 modes still
denied every FTP upload; 0777 passed upload, byte-for-byte readback and cleanup
in each folder. Preserve user file modes and configuration contents.

Validation: tools/verify.sh (all five gates, 35 tests, 16 evidence records).
Console: tools/run-title.sh --no-build --watch 30; python3 tools/check-ftp-write.py.
Evidence: evidence/ftp-directory-permissions/{capture,expectation}.json.
Build: 347655429cf4a60f3d7608c3ba4e46ec1c1972f81704cbea9f9e654c9942cfed.
Thirty seconds alive, script-closed; no GPU refusals/API errors. PS5_Vulkan unchanged.
2026-09-19 13:22:39 -04:00
Mihawk ab55775550 Fix PS5 configuration persistence and directory browsing
Register a native platform frontend to preserve startup argv and supply browser roots and directory defaults. Keep live settings separate from the packaged seed. Supply the known executable path to avoid the procfs-related config-save crash, and enumerate directories through SDK getdents with a 64 KiB buffer.

Validation: tools/verify.sh passes all five gates (35 unit tests, 15 evidence records). tools/run-title.sh --no-build --watch 90 lists 96 /app0 entries with zero errors, stays alive, and is script-closed with zero Vulkan refusals/API failures. Owner confirms visible folders and configuration files. Live config is unchanged across upload/restart.

Evidence: evidence/native-paths/{capture,expectation}.json includes failed diagnostics and final acceptance. Build identity 26139a294d687ccf21c8fa779e5ad3883273b873b71ce67e1df48f48589f8f76. Patch count 102 to 105; fresh replay/idempotence verified. Runner snapshots build identity to avoid false stale-log failures during subsequent builds. PS5_Vulkan unchanged.
2026-09-19 13:08:24 -04:00