mirror of
https://github.com/griches/PS5_DevLoop.git
synced 2026-10-17 16:01:31 +02:00
A resident payload (ps5loop, port 9112) and a Python client that let a script or an AI agent press buttons on a jailbroken PS5 and see what its screen shows. - pad: a system-wide virtual DualSense through scePadVirtualDevice*, bound to the foreground user and made the controller titles read - grab: the running title's own frame, through a request file the title answers - shot: the console's screenshot, deleted afterwards through libSceContentDelete - AGENTS.md: the operating guide for agents, and how to give a title the grab hook Tested on firmware 13.60. Claude-Session: https://claude.ai/code/session_017LYNPMseS8c9yDQh8GWSGZ
37 lines
1.3 KiB
Bash
Executable File
37 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# PS5 DevLoop - build the resident payload, from macOS or inside the VM.
|
|
# Copyright (C) 2026 Gary Riches
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
# tools/build.sh [make arguments] -> build/ps5loop.elf
|
|
#
|
|
# The payload SDK (ps5-payload-dev/sdk) is found through PS5_PAYLOAD_SDK, or in
|
|
# ~/ps5-payload-sdk, /usr/local/ps5-payload-sdk or /opt/ps5-payload-sdk. On
|
|
# macOS with no SDK set, the build runs in a Lima VM that has one and mounts
|
|
# this folder at the same path: PS5LOOP_VM names it (default "ps5").
|
|
|
|
set -euo pipefail
|
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
if [[ $(uname) == Darwin && -z ${PS5_PAYLOAD_SDK:-} ]] && command -v limactl >/dev/null; then
|
|
exec limactl shell "${PS5LOOP_VM:-ps5}" -- bash -lc 'cd "$1"; shift; exec bash tools/build.sh "$@"' _ "$root" "$@"
|
|
fi
|
|
|
|
sdk="${PS5_PAYLOAD_SDK:-}"
|
|
if [[ -z $sdk ]]; then
|
|
for candidate in "$HOME/ps5-payload-sdk" /usr/local/ps5-payload-sdk /opt/ps5-payload-sdk; do
|
|
if [[ -x "$candidate/bin/prospero-clang" ]]; then
|
|
sdk="$candidate"
|
|
break
|
|
fi
|
|
done
|
|
fi
|
|
if [[ -z $sdk || ! -x "$sdk/bin/prospero-clang" ]]; then
|
|
echo "build: no PS5 payload SDK; set PS5_PAYLOAD_SDK to one" >&2
|
|
exit 1
|
|
fi
|
|
export PS5_PAYLOAD_SDK="$sdk"
|
|
|
|
make -C "$root/payload" "$@"
|
|
echo "==> $root/build/ps5loop.elf"
|