mirror of
https://github.com/mihawk-99/PS5_RetroArch.git
synced 2026-10-18 23:09:29 -05:00
src/ps5_forwarders.{h,cpp}: a tile is /data/homebrew/<id> (PPSA99170 to PPSA99269, an
id no folder has and ShadowMountPlus knows nowhere) with the tile app and payload of
step 1, libc.prx, a param.json for its id and name, an icon and forward.txt (the
arguments, which also mark the folder as a tile: nothing else is listed, changed or
removed). ShadowMountPlus's HTTP API (127.0.0.1:10101, its docs/api.md 1.7) puts it on
the home screen: manual/add at once, installed when no game runs.
Routes (src/webui_ps5.cpp): GET/POST /api/forwarders (the list with ShadowMountPlus's
state, the cores, each tile's state; create), POST /api/forwarders/edit?id=,
PUT/GET /api/forwarders/icon?id= (a 512x512 PNG, up to 2 MiB), POST
/api/forwarders/delete?id=. The library JSON carries each game's core, to prefill it.
ShadowMountPlus refuses to uninstall while a game runs, and RetroArch is one whenever
the WebUI is up: a removal of an installed tile takes it out of the manual list at
once (so no scan installs it again) and is finished by the WebUI's daemon once the
title has closed (daemon/webui_daemon.cpp -> finish_pending): uninstall, then delete
the folder. A new name or icon on an installed tile is re-registered there the same
way (uninstall, back in the manual list, scan), and every tile's app and payload are
brought up to the build's.
Found on the console and handled: ShadowMountPlus 1.7-beta5fix1 can drop a source from
its manual list as it installs it (its next scan reads app.db before the install shows
there); the tile stays installed, and a re-registration adds it back first. Its game
list can take longer than 5 s after RetroArch starts: 20 s now, and a list that does not
arrive says why instead of showing every tile as waiting.
Evidence:
- host: tests/test_webui_forwarders.py against a stand-in for ShadowMountPlus's API:
create (first free id past a plain folder and a title ShadowMountPlus knows), the
files and param.json, validation (name, content path, "..", absolute path, newline,
core), edit, icon (size and format refused, stored, served), removal while busy
(pending, out of the manual list) finished by finish_pending, at once when not
installed, re-registration after the source was dropped, binaries refreshed,
ShadowMountPlus absent - 3 tests OK.
- console (base PS5 13.40, ShadowMountPlus 1.7-beta5fix1), through the WebUI from the PC:
GET /api/forwarders: ShadowMountPlus answers, the test tile PPSA99170 installed;
POST create -> PPSA99171 (eboot.bin, launch.elf, libc.prx, icon0.png, param.json
UP9000-PPSA99171_00-FORWARDER0099171, forward.txt with five arguments), in the
manual list; RetroArch closed -> ShadowMountPlus "installed game PPSA99171";
the tile opened -> tile.log "110832 sent to 127.0.0.1:9021 (errno 0)", launch.log
five arguments, RetroArch "forwarder: /app0/content/snes/<game> with
/app0/cores/snes9x_libretro.so, closing after it"; rename and icon -> updating,
delete PPSA99170 -> pending (manual list empty); RetroArch closed -> daemon
"forwarder PPSA99170: removed", "forwarder PPSA99171: installed again with its new
name or icon"; /user/appmeta/PPSA99171 titleName "Forwarder renamed" and the new
icon (first pixel 20 60 d0), /user/appmeta/PPSA99170 and /data/homebrew/PPSA99170
gone, app.db 33 -> 31 -> 32 entries; the daemon also replaced PPSA99170's older
launch.elf with this build's.
- gates: format, unit (209 tests), build, integration (209 tests), evidence - PASS.