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.
ES-DE's library came from RetroArch's playlists alone, so a game copied into
content/ appeared only after a Manual Scan in RetroArch. ps5_library_load_content
now also scans content roots after the playlists (a playlist's entry still
wins): /app0/content and the USB and extended drives ShadowMountPlus mounts.
- Each folder at a root's top that names a platform the title has a core for
is that system's; the platform table gains the systems the title now runs
(3DO, DOS, ScummVM, Neo Geo CD, NGPC, WonderSwan Color, SuperGrafx, PC-FX,
Virtual Boy, Pokemon Mini, Atari 5200 and Jaguar, NAOMI, Atomiswave), most
specific first ("NeoGeo CD" is not the arcade Neo Geo).
- In it, every file a core of the platform takes; .zip and .7z too for a
cartridge system (RetroArch opens them), not for a disc system (an archived
disc's tracks are not extracted). Left out: firmware (named in a core's
info, a variant of one, or [BIOS]/Kickstart/boot ROM), and the tracks of a
folder that has a .cue, .gdi or .m3u.
- A DOS game is a folder started by the program named like it (doom/DOOM.EXE);
a ScummVM game is a folder started from a data file in it.
- A path too long for the buffers is skipped, never truncated.
es-de.bin passes the roots (frontends/es-de/ps5/library_ps5.cpp).
Verified: tests/ps5_library_test.c (folder names, firmware, tracks, DOS,
ScummVM, a drive, archives by kind, no duplicates) and esde_library_test PASS.
On the base PS5: ES-DE lists 36 systems and 1025 games; E.T. (Fixed), found
only by the scan, starts in RetroArch (Stella) and returns to ES-DE
(evidence/issues-25-27, next commit). tools/verify.sh format and unit PASS.
The shared game library (src/ps5_library.h) now carries what RetroArch
remembers of each game:
- whether it is a favourite (playlists/builtin/content_favorites.lpl);
- its place in the history (builtin/content_history.lpl);
- its runtime log (logs/<core's corename>/<content name>.lrtl): when it
was last played, how often, and for how long.
A game in the history with no runtime log is given a time from its
place: the history file's time, a minute earlier for each place below
the top.
ES-DE's writer (frontends/es-de/ps5/library_ps5.cpp) merges these into
each game list entry:
- favorite: a game RetroArch added or removed since ES-DE's last start
follows RetroArch (ES-DE/ps5-favorites.txt records RetroArch's set);
any other game keeps ES-DE's own choice. A favourite set in either
frontend therefore shows in ES-DE.
- lastplayed, playcount, playtime: the later or larger of ES-DE's and
RetroArch's.
On the PS5, ES-DE's automatic collections default to Favorites and Last
Played (patches/0001). An install whose settings already said none gets
them once; a marker file keeps any later choice of the user's.
Evidence: evidence/esde-collections/ (capture.json, expectation.json).
Base PS5 13.40:
RetroArch's History tab, the game's menu, Add to Favorites (pad
script): RetroArch's favourites held Donkey Kong Country 2
ES-DE's next start: 1 favourite, 15 games played; CollectionSystemsAuto
favorites,recent; Donkey Kong Country 2 favourite, playcount 8,
playtime 838 s (the runtime log's 0:13:58), its later lastplayed kept
ES-DE's carousel: the SNES card reads "1 GAME (1 FAVORITE)", and the
Favorites and Last Played collections are there
The test favourite's file was removed afterwards; the console had none.
Host tests: ps5_library and esde_library PASS.
Command:
tools/run-title.sh --no-build --no-deploy --pad-script=tests/pad/history-favourite.txt --watch 25
tools/run-title.sh --no-build --no-deploy --relaunch-test=1 --relaunch-image=es-de/es-de.bin --frontend-capture=4 --watch 30
Gates: tools/verify.sh PASS (format unit build integration evidence).
A frontend keeps no game library of its own. Its systems and game lists
are RetroArch's playlists, read again each time it starts, so a game
added to or removed from a playlist in RetroArch appears or goes in
every frontend. src/ps5_library.h and src/ps5_library.c are that
contract, compiled into eboot.bin and into every frontend
(tools/build-frontend.sh), like game mode's:
- Games: the entries of /app0/playlists, minus RetroArch's history,
favourites and media lists, each game once.
- A game's system: the first known platform among its entry's
database, the playlist's name, its folder and its core's database;
otherwise a system of its own. A mixed playlist of DETECT entries,
like the base console's content.lpl, is split by folder.
- A system's core: the one its entries name most, else the core
RetroArch's core info associates with the platform. Its folder is the
deepest folder holding all its games, and its extensions are those of
its games and its core.
- ps5_library_command gives game mode's command line; game mode now
reads playlists through the same reader.
ES-DE (frontends/es-de/ps5/library_ps5.cpp) writes
custom_systems/es_systems.xml and each system's gamelist.xml from the
library at every start, using ES-DE's own names and themes. A game ES-DE
already knows keeps its play count, play time, favourite and scraped
details; a game no longer in any playlist is dropped. ES-DE then runs
with --gamelist-only. The fixed table (systems.tsv, systems.py) is gone.
Evidence: evidence/game-library/ (capture.json, expectation.json,
capture-test.jsonl); base PS5 13.40: 5 playlists gave 14 systems and 16
games, 0 failures. ES-DE loaded the 14 systems, started Donkey Kong
Country 2 through game mode and came back with the play counted
(playcount 2, playtime 21); 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 80
Gates: tools/verify.sh PASS (format unit build integration evidence).