Users reported FTP permission refusals again. Since v0.6.7 the title usually
hands itself over at once (to the picker or ES-DE, through LoadExec, which ends
the process), so the start-up repair that opens /app0 to FTP was cut short; and
the picker and ES-DE, other executables, wrote with their own modes.
- Files are 0777 as folders are (were 0666): the link-time wrappers and the
repair (src/permissions_ps5.cpp).
- ps5_permissions_settle waits for the repair (at most a minute) before every
handover: to a frontend, closing the title, the relaunch test.
- ES-DE's library files and folders, the remembered frontend
(src/ps5_frontend_choice.h) and the picker's test record are 0777; the picker
opens RADV's shader cache to FTP after its first 30 frames and again when it
hands over.
Verified on the base PS5: the trace reads "permissions: /app0 checked=17992
repaired=174 refused=0" then "handover waited 596.2 ms"; after a home-screen
launch held at the picker and closed there, an FTP walk of
/data/homebrew/PPSA99169 finds 17992 entries, 0 not 0777 (before: 175 files
at 0666) (evidence/permissions-0777). tools/verify.sh format, unit and
evidence PASS.
Three of the frontend follow-ups in docs/FRONTENDS.md:
- The frontend the title starts with is remembered in config/frontend.cfg
("ask", "retroarch" or "es-de"; src/ps5_frontend_choice.h, shared by
eboot.bin, the picker and the WebUI). The picker's Square switches
Remember, which writes the frontend started, or "ask". The WebUI's
quick panel has "Start with", kept in that file, never in webui.cfg.
A launch from the home screen then starts that frontend directly.
Holding L1 while the title starts opens the picker anyway: the first
user's pad is read for up to a second before anything opens it
(src/frontend_hold_ps5.cpp).
- A frontend that quits now says so: ES-DE and the picker-started
RetroArch restart eboot.bin with --ps5-mode=quit. That shows the picker,
or closes the title when a frontend is remembered.
- Logs: a launch with no --ps5- argument starts a session, and keeps the
previous session's trace as trace.1.txt. RetroArch logs a game-mode game
to retroarch-game.log and its own sessions to retroarch.log, each with
its previous copy (.1). ES-DE keeps its last stdout.txt, and starts
es-de-ps5.log again past 512 KiB.
- An update installed as RetroArch quits no longer hands over. Its
files are already in place, so the title closes rather than start the
new picker or ES-DE from the old process.
tools/run-title.sh: --picker-test takes :remember or :forget; with
--home-launch the title starts as from the home screen (no test-run
marker); a game-mode run's log is checked in retroarch-game.log.
Evidence: evidence/frontend-launch/ (capture.json, expectation.json).
Base PS5 13.40, build 584d4d27:
game mode: the game logged to retroarch-game.log, and the trace held
only this session (the rest in trace.1.txt)
picker test with Remember on: frontend.cfg "es-de"
home launch: L1 read (not held, decided at once), started ES-DE; ES-DE
quit, and the title closed by itself
the console's WebUI: frontend_start es-de, set to ask (200); the next
home launch opened the picker
Holding L1 on a real pad was not exercised by a script. An installed
update closing the title is covered by the host test only.
Host tests: frontend_mode_ps5 and test_webui PASS.
Command:
tools/run-title.sh --picker-test=300:es-de:remember --frontend-capture=20 --watch 50
tools/run-title.sh --no-build --no-deploy --home-launch --frontend-capture=8 --frontend-quit --watch 40
Gates: tools/verify.sh PASS (format unit build integration evidence).
A frontend never runs a game itself. It asks the title to run the game in
RetroArch, in a process of its own, and to come back to it afterwards.
src/ps5_game.h and src/ps5_game.c are that contract, compiled into
eboot.bin and into every frontend executable (tools/build-frontend.sh),
so all frontends share one implementation:
- The frontend writes /app0/game-request.txt (content, core, its own
executable, a state string) and restarts the title as eboot.bin
--ps5-mode=game. Its launch command can simply be RetroArch's own,
"/app0/eboot.bin -L <core> <content>"; ps5_game_parse_command reads
it, shell escapes included.
- eboot.bin (src/frontend_mode_ps5.cpp) takes and checks the request.
The core is the one RetroArch's playlists associate with the content
when they name one of the title's cores, else the frontend's. A
request that can't run is refused back to the frontend with the
reason. RetroArch starts on the game (-L, no --menu,
quit_on_close_content = CLI from config/game-mode.cfg). Once it has
quit, /app0/game-result.txt gets the status and seconds, and the
title restarts as the frontend.
- ES-DE: its launch (patch, FileData::launchGame) saves its game lists,
releases the display and calls the contract. Its start (patch,
ViewController::goToStart) counts the play, adds the play time and
opens the system's game list on the game. systems.tsv gives each
system a default core from the title's cores.
- The capture hook's "launch" action and tools/run-title.sh
--frontend-launch start a game unattended.
Evidence: evidence/game-mode/ (capture.json, expectation.json,
capture-test.jsonl, gamelist-snes.xml); base PS5 13.40: es-de, eboot
(Donkey Kong Country 2 with snes9x, SRAM saved to
savefiles/Snes9x), es-de back on the game with playcount 1 and
playtime 11; no fatal signal.
Command:
PS5_FRONTENDS='es-de picker' tools/build-title.sh
tools/run-title.sh --no-build --relaunch-test=1 \
--relaunch-image=es-de/es-de.bin --frontend-capture=4,20 \
--frontend-launch --retroarch-frames=600 --watch 75
Gates: tools/verify.sh PASS (format unit build integration evidence).
A launch from the home screen now shows a pre-screen in
PS5_VulkanTemplate's Gloss theme with two cards, each with a preview
captured on the console: RetroArch's XMB and ES-DE's Alekfull NX SNES
view. Choosing one restarts the title as that frontend (approach B,
LoadExec). Quitting either one comes back to the picker, and CIRCLE
in the picker closes the title.
- frontends/picker/picker.cpp: the picker, a program of the template's
UI module. tools/build-picker.sh builds it the template's way (a
generated one-program title at the pinned template commit, with its
app root moved to /app0/picker) and stages picker/picker.bin, the
kit's assets and the previews (assets/picker, NOTICE.md credits them).
- src/frontend_mode_ps5.cpp: eboot.bin decides first. --ps5-mode=
retroarch runs RetroArch, es-de starts ES-DE, and no mode starts the
picker, except for a test run. RetroArch the picker started goes
back to the picker when it quits.
- tools/run-title.sh writes /app0/test-run.txt before every launch (as
src/main.cpp documents), so scripted runs keep starting RetroArch;
--picker-test=FRAMES:CHOICE, --retroarch-frames, --frontend-quit.
Evidence: evidence/frontend-picker/ (capture.json, expectation.json,
picker-test-es-de.jsonl, picker-test-retroarch.jsonl); base PS5 13.40:
eboot, picker, es-de, eboot, picker (ES-DE quit) and eboot, picker,
eboot (RetroArch, 600 frames), eboot, picker, with no fatal signal.
Command:
PS5_FRONTENDS='es-de picker' tools/build-title.sh
tools/run-title.sh --no-build --picker-test=300:es-de \
--frontend-capture=15 --frontend-quit --watch 60
tools/run-title.sh --no-build --picker-test=300:retroarch \
--retroarch-frames=600 --watch 60
Gates: tools/verify.sh PASS (format unit build integration evidence).