Files
Martin Pham 20dd7fe082 Home screen forwarders start a game with --rom and --core
From mihawk-99/PS5_RetroArch#34 (Martin Pham). A forwarder, a small app
with a home screen tile of its own, starts the title with --rom <file>
[--core <core>] [--exit-after-game] (each also as --x=<value>). On a
launch that names no mode, src/frontend_mode_ps5.cpp takes it as game
mode takes a frontend's request: the content (absolute, or inside
/app0/content/ and never above it) and the core are checked by
ps5_game_check, RetroArch starts with -L, and afterwards the title
opens as from the home screen, or closes with --exit-after-game.
Without --core the playlists choose, else the one core whose info file
lists the extension (Genesis Plus GX for the Mega Drive extensions both
Sega cores list) or, for a folder, the one core that opens folders. A
refusal goes to trace.txt and the launch goes on as from the home
screen; a handover's --ps5-mode wins over --rom.

Changed from the pull request: its README examples and test fixtures no
longer name games and use the ES-DE folder names content/ has now; one
header comment is moved to its declaration. Its line-ending rewrites of
the PowerShell scripts are dropped (they are gone, 8f14452), and its
GitHub workflow is parked in parked/github-build-workflow, with what
would finish it at the top of build.yml: it cannot run here, and it
does not fetch PS5_MihawkGen, which the frontend compiles now.

To prove it on a console, whose control payload launches without
arguments: the relaunch test takes its restarts' arguments from the
lines after the arm line, and tools/run-title.sh --relaunch-arg writes
them.

Evidence: tests/frontend_mode_ps5_test.cpp (parsing, paths, cores by
playlist, extension and folder, refusals, after the game);
tests/relaunch_ps5_test.cpp (arguments carried; a control character or
a ninth argument arms nothing). Gates: format, unit (204), build
(staged cores reused), integration, evidence PASS. Console: with this
series' deploy.
2026-10-17 21:42:17 -04:00

24 lines
1.2 KiB
Bash

#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# ../PS5_PayloadSDK, the payload SDK fork, at the commit tools/setup-native-dependencies.sh
# pins: just that commit, fetched and checked out beside this checkout. The setup exports it with
# git archive; tools/stage-notices.py copies its licence texts from the working tree (LICENSE,
# platform/src/regex/COPYRIGHT.musl).
#
# .github/scripts/fetch-sdk-fork.sh
set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
fork=$root/../PS5_PayloadSDK
revision=$(sed -n 's/^sdk_revision=\([0-9a-f]\{40\}\).*/\1/p' "$root/tools/setup-native-dependencies.sh")
[[ -n $revision ]] || { echo "fetch-sdk-fork: no sdk_revision in tools/setup-native-dependencies.sh" >&2; exit 2; }
if ! git -C "$fork" cat-file -e "$revision^{commit}" 2>/dev/null; then
[[ -d $fork/.git ]] || {
git init -q "$fork"
git -C "$fork" remote add origin https://github.com/mihawk-99/PS5_PayloadSDK.git
}
git -C "$fork" fetch -q --depth 1 origin "$revision"
fi
git -C "$fork" checkout -q --force --detach "$revision"
[[ -f $fork/LICENSE ]] || { echo "fetch-sdk-fork: no LICENSE in $fork at $revision" >&2; exit 2; }
echo "==> [sdk] PS5_PayloadSDK ${revision:0:12} beside $root"