Xbox Cloud Gaming app for PS5 Homebrew
C
README in English, focused on the project, building, releases and license
Rafael Abud Ferreira2b0a0deb3e4d
diff --git a/.gitignore b/.gitignoreindex 846d8a0..42ed774 100644--- a/.gitignore+++ b/.gitignore@@ -1,5 +1,9 @@# Build trees (CMake, FFmpeg install, linked eboot, packaged app)/build-*/-# Sign-in tokens and logs: never commit+# Never commit: sign-in tokens, logs, autotest captures and stream dumpsaccount.json*.log+*.ppm+*.aus+*.h264+autoplay.txtdiff --git a/CMakeLists.txt b/CMakeLists.txtindex 8f12efc..8a8375c 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -1,5 +1,5 @@# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGPcmake_minimum_required(VERSION 3.20)project(xcloud_ps5 VERSION 0.1.0 LANGUAGES C CXX)diff --git a/README.md b/README.mdindex ecfa35a..db1601e 100644--- a/README.md+++ b/README.md@@ -1,139 +1,96 @@# PSBox Cloud Gaming-Cliente nativo de Xbox Cloud Gaming (xCloud) para PS5 com homebrew.+A native Xbox Cloud Gaming (xCloud) client for jailbroken PS5 consoles. Sign in+with your Microsoft account, browse the cloud catalog in a UI modeled on+xbox.com/play, and stream games at 1080p60 with sound, using the DualSense as+an Xbox controller.-O ícone e o logo são arte original (`src/ui/brand.cpp`), inspirada no-estilo do Xbox, sem usar o logotipo da Microsoft. Para regenerar o ícone da-home do PS5: `build-host/xcloud-cli render-icon ps5/sce_sys/icon0.png 512`.+- Sign-in with a device code (or QR code) shown on the TV; no password is+ ever typed on the console.+- Home screen with the same rows as xbox.com/play: Jump back in, Recently+ added, Most popular on cloud, Leaving soon and All games.+- WebRTC streaming (libdatachannel on Mbed TLS) with H.264 and Opus decoded by+ FFmpeg on the CPU.+- English UI; text is centralized in `src/ui/strings.cpp` for translation.-## Estado+Requires a homebrew-enabled PS5 that can run directory-style apps (for+example through ShadowMountPlus) and a subscription that includes cloud+gaming.-| Parte | PC (`xcloud-cli`) | PS5 |-| --- | --- | --- |-| Interface estilo xbox.com/play (home, detalhes, login com QR) | preview em PNG | testado (renderiza em 5-7 ms) |-| Login (conta salva), lista de jogos, sessão, fila | testado | testado |-| WebRTC (SDP/ICE, DTLS-SRTP, canais de dados) | testado | testado |-| Vídeo 1080p60 H.264 (FFmpeg, 3,1 ms/quadro no PS5) | testado | testado: 3 min, 99,6% dos quadros exibidos |-| Áudio Opus → sceAudioOut | decodificação testada | testado (ouvido no console; também ao trocar de jogo) |-| DualSense → controle Xbox no jogo | — | testado (autoplay aperta A no Balatro) |+## Building-## Teste automático no console--`tools/ps5/autotest.sh` compila, faz o deploy, abre o app pelo agente-`ps5vkctl` do PS5_Vulkan e espera o resultado. O app, ao achar-`autoplay.txt`, entra no jogo sozinho, aperta A aos 15 s e 20 s, registra-estatísticas por segundo e salva quadros em `frame.ppm`/`frame2.ppm`.+Clone with the submodules (Mbed TLS, libdatachannel, FFmpeg):```bash-PS5_HOST=<ip> tools/ps5/autotest.sh BALATRO 60 # streaming-PS5_HOST=<ip> tools/ps5/autotest.sh BALATRO 30 dump # + grava stream.aus (H.264 recebido)-PS5_HOST=<ip> tools/ps5/autotest.sh BALATRO 20 repeat # duas sessões seguidas no mesmo processo-XC_SAMPLE=amostra.h264 PS5_HOST=<ip> tools/ps5/autotest.sh BENCH 30 # só o decoder-build-host/xcloud-cli bench-decode build-ps5/autotest/stream.aus # reproduz no PC+git clone --recursive https://github.com/RafaelNGP/xbox-cloud-gaming-ps5.git+cd xbox-cloud-gaming-ps5```-Resultados em `build-ps5/autotest/`.+Requirements: CMake 3.20+, Ninja, Clang/LLVM (clang, clang++, llvm-ar,+llvm-ranlib), Python 3 and curl. NASM is built automatically if missing.+FFmpeg is configured and built by `tools/build-ffmpeg.sh` the first time+CMake runs.-## Particularidades do PS5 (sandbox do app)+### Desktop build (Linux)-- `getaddrinfo` não funciona (e o link do PS5_Vulkan o troca por um stub que- sempre falha): `libc_compat.c` implementa `getaddrinfo`/`getnameinfo` com- `sceNetResolver`, e o `link.sh` remove o redirecionamento.-- `ioctl(FIONBIO)`/`fcntl(O_NONBLOCK)` em sockets dão `EACCES`;- `setsockopt(SO_NBIO)` funciona (`ioctl` é embrulhado via `ps5/compat/ps5_lfs.h`).-- O callback de log padrão do FFmpeg derruba o app: o log vai para o nosso logger.-- `sceAudioOutInit` só pode ser chamado uma vez por processo (a segunda- chamada devolve `0x8026000E`); só a porta é aberta/fechada por jogo.-- O depacketizador H.264 às vezes entrega unidades vazias, que o libavcodec- entende como fim de stream: são descartadas.--## Build+Used to develop and check the protocol and the UI on a PC.```bash-git clone --recursive https://github.com/RafaelNGP/xbox-cloud-gaming-ps5.git--# PC (validação do protocolo)-cmake -S . -B build-host -G Ninja && ninja -C build-host-XCLOUD_DATA_DIR=build-host/data build-host/xcloud-cli login-XCLOUD_DATA_DIR=build-host/data build-host/xcloud-cli stream BALATRO 30 /tmp/out.h264--# PS5 (depende de ../../WoW-PS5/deps/PS5_Vulkan: SDK, linker, ps5-native-tool)-cmake -S . -B build-ps5 -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/ps5.toolchain.cmake -DCMAKE_BUILD_TYPE=Release-ninja -C build-ps5 xcloud_app-tools/ps5/link.sh build-ps5 && tools/ps5/package.sh build-ps5-PS5_HOST=<ip> tools/ps5/deploy.sh # FTP para /data/homebrew/PPSA99810-PS5_HOST=<ip> tools/ps5/deploy.sh --log # baixa xcloud.log+cmake -S . -B build-host -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo+ninja -C build-host+build-host/xcloud-tests # unit tests+build-host/xcloud-cli login # sign in+build-host/xcloud-cli stream BALATRO 30 # stream a title for 30 s+build-host/xcloud-cli ui-preview /tmp/ui # render every screen to PNG```-O FFmpeg (`deps/ffmpeg`, só os decoders H.264/Opus) é compilado pelo-`tools/build-ffmpeg.sh` na primeira configuração do CMake. O build roda em-`~/.cache/xcloud-ps5` porque o FFmpeg não aceita espaços no caminho; o `nasm`-também é compilado ali se não estiver instalado.--## Interface--Desenhada por software (`src/ui`): canvas RGBA, texto TrueType (Inter, OFL),-imagens baixadas e redimensionadas em segundo plano. As fileiras vêm das-mesmas listas do xbox.com/play (catalog.gamepass.com): Jump back in, Recently-added, Most popular on cloud, Leaving soon e All games. Primeiro carrega a-versão leve do catálogo (a home aparece em ~4 s) e depois, em segundo plano,-as artes hero e as descrições.+### PS5 build-Todos os textos ficam em `src/ui/strings.cpp` (inglês por padrão; outros-idiomas entram como uma nova coluna).--Para ajustar o visual sem o console:+The console build uses the toolchain of+[PS5_Vulkan](https://github.com/mihawk-99/PS5_Vulkan) (the PS5 payload SDK, the PS5 linker+recipe and `ps5-native-tool`). By default it is expected at+`../../WoW-PS5/deps/PS5_Vulkan`; set `PS5_VULKAN` to point elsewhere.```bash-XCLOUD_DATA_DIR=build-host/data build-host/xcloud-cli ui-preview /tmp/ui # PNG de cada tela+cmake -S . -B build-ps5 -G Ninja -DCMAKE_TOOLCHAIN_FILE=cmake/ps5.toolchain.cmake -DCMAKE_BUILD_TYPE=Release+ninja -C build-ps5 xcloud_app+tools/ps5/link.sh build-ps5 # -> build-ps5/eboot.bin+tools/ps5/package.sh build-ps5 # -> build-ps5/pkg/PPSA99810/```-## No console--- Na primeira vez, aparece um código: abra https://www.microsoft.com/link no- celular e digite o código. O `package.sh` copia o `build-host/data/account.json`- para o pacote se ele existir, e aí o app pula essa etapa. Esse arquivo tem o- seu token: não compartilhe o pacote.-- Home: direcional ou analógico navega, X abre os detalhes, X de novo joga,- O volta, OPTIONS sai da conta.-- No jogo: segure OPTIONS + TOUCHPAD por 1 s para sair. TOUCHPAD = View,- OPTIONS = Menu.-- Log: `/data/homebrew/PPSA99810/xcloud.log`.--## Organização--- `src/auth`, `src/xcloud`: login e API gssv (sessões, SDP, ICE).-- `src/stream`: sessão WebRTC (libdatachannel) e formato do canal de input.-- `src/media`: decodificação (libavcodec) e saída de áudio.-- `src/ui`: interface (canvas, fontes, cache de imagens, telas, textos).-- `src/display`, `src/input`: framebuffer do PS5 (sceVideoOut) e DualSense.-- `src/app`: `cli_main.cpp` (PC), `ps5_main.cpp` + `stream_player.cpp` (PS5),- `library.cpp` (fileiras do catálogo).-- `extern`: stb (truetype, image, resize, write), qrcodegen.-- `deps`: mbedTLS (com DTLS-SRTP habilitado), libdatachannel e FFmpeg.--Protocolo baseado nos clientes open-source xbox-xcloud-player e Greenlight.--## Licença--GPL-3.0-or-later (`LICENSE`). A escolha não é opcional: o `eboot.bin` linka-estaticamente o runtime do PS5 (o `app_crt`/`app_cpp_runtime` do PS5_Vulkan e-a camada de plataforma do payload SDK) e o pacote leva o `libc.prx`, todos-GPL-3.0-or-later. As demais dependências (Mbed TLS, libdatachannel, FFmpeg-em LGPL, stb, qrcodegen, fonte Inter, certificados da Mozilla) são-compatíveis; a lista completa, com versões, está em `THIRD_PARTY_NOTICES.md`,-e o pacote do app leva os textos das licenças em `licenses/`.--Quem distribuir o binário precisa oferecer o código-fonte correspondente:-este repositório na tag da release, com os submódulos.--## Aviso--Projeto não oficial, sem afiliação, endosso ou patrocínio da Microsoft ou da-Sony. Xbox, Xbox Cloud Gaming e Game Pass são marcas do grupo Microsoft;-PlayStation e PS5 são marcas da Sony Interactive Entertainment. É preciso uma-assinatura que inclua jogos na nuvem. O login usa o mesmo client id público-dos clientes Xbox open-source (o do app Xbox), e o protocolo é o do cliente-web do xbox.com: a Microsoft pode mudá-lo ou bloqueá-lo a qualquer momento.-Nomes e artes dos jogos vêm do catálogo público da Microsoft em tempo de-execução e não são distribuídos com o projeto.+## Release++1. Build the PS5 app as above. `tools/ps5/package.sh` produces the complete+ app folder `build-ps5/pkg/PPSA99810/` (eboot, `sce_sys`, `sce_module`,+ assets and the license texts under `licenses/`). It contains no account+ data.+2. Tag the release and attach a zip of that folder:++ ```bash+ git tag v0.1.0 && git push origin v0.1.0+ (cd build-ps5/pkg && zip -r ../PSBox-Cloud-Gaming-v0.1.0.zip PPSA99810)+ ```++3. To install, copy the whole `PPSA99810` folder to `/data/homebrew/` on the+ console (or use `PS5_HOST=<console-ip> tools/ps5/deploy.sh`, which uploads+ it over FTP) and launch it from the home screen once the loader has+ registered it.++The binary is GPL-licensed, so every release must point to the source it was+built from: the tagged commit of this repository with its submodules.++## License++GPL-3.0-or-later; see `LICENSE`. The PS5 binary statically links the PS5 app+runtime and payload SDK platform layer, which are GPL-3.0-or-later, so the+project as distributed must be too. All other components are compatible+(Mbed TLS, libdatachannel, FFmpeg under the LGPL, stb, qrcodegen, the Inter+font, Mozilla's CA bundle); `THIRD_PARTY_NOTICES.md` lists each one with its+version and license.++This is an unofficial project, not affiliated with, endorsed or sponsored by+Microsoft or Sony. Xbox, Xbox Cloud Gaming and Game Pass are trademarks of the+Microsoft group of companies; PlayStation and PS5 are trademarks of Sony+Interactive Entertainment. Game names and artwork are loaded from Microsoft's+public catalog at runtime and are not distributed with this project.+Microsoft may change or block the services this client relies on at any time.diff --git a/cmake/deps/ffmpeg.cmake b/cmake/deps/ffmpeg.cmakeindex c74eaff..6bd77c9 100644--- a/cmake/deps/ffmpeg.cmake+++ b/cmake/deps/ffmpeg.cmake@@ -1,5 +1,5 @@# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# libavcodec/libswresample/libavutil (H.264 + Opus decoders) from deps/ffmpeg, built by# tools/build-ffmpeg.sh into <build>/ffmpeg; run here when missing.diff --git a/cmake/deps/libdatachannel.cmake b/cmake/deps/libdatachannel.cmakeindex 6744c98..6c8b538 100644--- a/cmake/deps/libdatachannel.cmake+++ b/cmake/deps/libdatachannel.cmake@@ -1,5 +1,5 @@# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# libdatachannel (WebRTC: ICE via libjuice, DTLS-SRTP, SCTP data channels)# built static on top of the vendored mbedTLS. Include after mbedtls.cmake.diff --git a/cmake/deps/mbedtls.cmake b/cmake/deps/mbedtls.cmakeindex 7046346..197847c 100644--- a/cmake/deps/mbedtls.cmake+++ b/cmake/deps/mbedtls.cmake@@ -1,5 +1,5 @@# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# mbedTLS compiled from source for both builds (without net_sockets, tests or# programs), with the DTLS-SRTP extension WebRTC needs.diff --git a/cmake/deps/mbedtls_user_config.h b/cmake/deps/mbedtls_user_config.hindex 0f9a618..f3d7f26 100644--- a/cmake/deps/mbedtls_user_config.h+++ b/cmake/deps/mbedtls_user_config.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP/* Appended to deps/mbedtls's default config (MBEDTLS_USER_CONFIG_FILE).* WebRTC needs the DTLS-SRTP extension (use_srtp), off by default. */#define MBEDTLS_SSL_DTLS_SRTPdiff --git a/cmake/modules/FindMbedTLS.cmake b/cmake/modules/FindMbedTLS.cmakeindex d46a995..1bad123 100644--- a/cmake/modules/FindMbedTLS.cmake+++ b/cmake/modules/FindMbedTLS.cmake@@ -1,5 +1,5 @@# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# Resolves find_package(MbedTLS) inside deps/libdatachannel (and libSRTP) to# the in-tree mbedTLS from cmake/deps/mbedtls.cmake instead of a system copy.if(NOT TARGET xc_mbedtls)diff --git a/cmake/ps5.toolchain.cmake b/cmake/ps5.toolchain.cmakeindex 0d5eba8..ab2a88a 100644--- a/cmake/ps5.toolchain.cmake+++ b/cmake/ps5.toolchain.cmake@@ -1,5 +1,5 @@# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# CMake toolchain file for building xCloud-PS5 as a native PlayStation 5 app.set(CMAKE_SYSTEM_NAME Generic)diff --git a/ps5/compat/ps5_lfs.h b/ps5/compat/ps5_lfs.hindex 0cc617a..bec7d06 100644--- a/ps5/compat/ps5_lfs.h+++ b/ps5/compat/ps5_lfs.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#pragma once/** Forced into every PS5 translation unit. The PS4 toolchain's musl offered thediff --git a/ps5/stubs/libSceCommonDialog.c b/ps5/stubs/libSceCommonDialog.cindex 06124ef..aac16fe 100644--- a/ps5/stubs/libSceCommonDialog.c+++ b/ps5/stubs/libSceCommonDialog.c@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP/* Host-link only: names the module's exports so the native-app converter* records the imports. Never packaged or executed. */int sceCommonDialogInitialize(void) { return -1; }diff --git a/ps5/stubs/libSceMsgDialog.c b/ps5/stubs/libSceMsgDialog.cindex 20cc932..fc7b365 100644--- a/ps5/stubs/libSceMsgDialog.c+++ b/ps5/stubs/libSceMsgDialog.c@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP/* Host-link only: never packaged or executed. */int sceMsgDialogInitialize(void) { return -1; }int sceMsgDialogOpen(const void *param) { (void)param; return -1; }diff --git a/ps5/stubs/libSceRtc.c b/ps5/stubs/libSceRtc.cindex 871f156..63b29d1 100644--- a/ps5/stubs/libSceRtc.c+++ b/ps5/stubs/libSceRtc.c@@ -1,4 +1,4 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP/* Host-link only: never packaged or executed. */int sceRtcGetCurrentClockLocalTime(void *time) { (void)time; return -1; }diff --git a/src/app/cli_main.cpp b/src/app/cli_main.cppindex e48265c..12ad013 100644--- a/src/app/cli_main.cpp+++ b/src/app/cli_main.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Host (Linux) command-line front end, used to validate sign-in, the title// list and session provisioning on a PC before running on the console.//diff --git a/src/app/library.cpp b/src/app/library.cppindex 68263c0..0c75d26 100644--- a/src/app/library.cpp+++ b/src/app/library.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "app/library.h"#include "ui/strings.h"diff --git a/src/app/library.h b/src/app/library.hindex 96d91b3..a01400f 100644--- a/src/app/library.h+++ b/src/app/library.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Builds the home screen rows: "Jump back in" (the account's recently played// cloud titles) followed by the Game Pass lists xbox.com/play shows.//diff --git a/src/app/ps5_main.cpp b/src/app/ps5_main.cppindex 4bdd1ee..a66cc23 100644--- a/src/app/ps5_main.cpp+++ b/src/app/ps5_main.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// PS5 front end: the menus (ui::AppUi) and playing a title// (queue -> /connect -> Provisioned -> StreamPlayer).//diff --git a/src/app/stream_player.cpp b/src/app/stream_player.cppindex 5cd42fa..0bb8753 100644--- a/src/app/stream_player.cpp+++ b/src/app/stream_player.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "app/stream_player.h"#include "display/display.h"diff --git a/src/app/stream_player.h b/src/app/stream_player.hindex 2444b28..bde1af3 100644--- a/src/app/stream_player.h+++ b/src/app/stream_player.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Plays a provisioned xCloud session on the console: WebRTC session, H.264// decode thread drawing to the screen, Opus to the audio output, and the// DualSense state forwarded as an Xbox controller.diff --git a/src/auth/auth_manager.cpp b/src/auth/auth_manager.cppindex c703e2d..7403693 100644--- a/src/auth/auth_manager.cpp+++ b/src/auth/auth_manager.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "auth/auth_manager.h"#include "net/http.h"diff --git a/src/auth/auth_manager.h b/src/auth/auth_manager.hindex 29dc385..946aba8 100644--- a/src/auth/auth_manager.h+++ b/src/auth/auth_manager.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Ties sign-in together: stored refresh token (or a fresh device-code// sign-in) -> Xbox Live -> XSTS -> xCloud login. The UI only drives this and// shows the device code; it never sees passwords.diff --git a/src/auth/msa.cpp b/src/auth/msa.cppindex e24c1a5..ad6d079 100644--- a/src/auth/msa.cpp+++ b/src/auth/msa.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "auth/msa.h"#include "net/http.h"diff --git a/src/auth/msa.h b/src/auth/msa.hindex cb52247..ea78e37 100644--- a/src/auth/msa.h+++ b/src/auth/msa.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Microsoft account (MSA) OAuth via login.live.com: device-code sign-in and// refresh. The device-code flow fits a console: the TV shows a short code// (and a QR code) and the user signs in with their real account on a phone.diff --git a/src/auth/xbox_live.cpp b/src/auth/xbox_live.cppindex ad15db2..f16ad68 100644--- a/src/auth/xbox_live.cpp+++ b/src/auth/xbox_live.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "auth/xbox_live.h"#include "net/http.h"diff --git a/src/auth/xbox_live.h b/src/auth/xbox_live.hindex 149d2fd..dd4c303 100644--- a/src/auth/xbox_live.h+++ b/src/auth/xbox_live.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Xbox Live token exchange: MSA access token -> Xbox user token -> XSTS// token for a relying party (gssv for xCloud, xboxlive.com for profile data).#pragma oncediff --git a/src/display/display.cpp b/src/display/display.cppindex aa19002..44c7970 100644--- a/src/display/display.cpp+++ b/src/display/display.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "display/display.h"#include "platform/platform.h"#include "util/log.h"diff --git a/src/display/display.h b/src/display/display.hindex 93a5d01..eaf5376 100644--- a/src/display/display.h+++ b/src/display/display.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#pragma once#include <cstdint>diff --git a/src/input/controller.cpp b/src/input/controller.cppindex 231fc90..2b822f0 100644--- a/src/input/controller.cpp+++ b/src/input/controller.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "input/controller.h"#include "util/log.h"diff --git a/src/input/controller.h b/src/input/controller.hindex 01b1d58..d05bc95 100644--- a/src/input/controller.h+++ b/src/input/controller.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#pragma once#include <cstdint>diff --git a/src/media/audio_out.cpp b/src/media/audio_out.cppindex 3aec1b7..a779fc0 100644--- a/src/media/audio_out.cpp+++ b/src/media/audio_out.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "media/audio_out.h"#include "util/log.h"diff --git a/src/media/audio_out.h b/src/media/audio_out.hindex 0c425f5..5a1e321 100644--- a/src/media/audio_out.h+++ b/src/media/audio_out.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Audio playback: 48 kHz interleaved float stereo pushed from any thread,// played by a dedicated thread in 256-frame grains (silence on underrun).#pragma oncediff --git a/src/media/decoder.cpp b/src/media/decoder.cppindex d04ea0e..e332d11 100644--- a/src/media/decoder.cpp+++ b/src/media/decoder.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "media/decoder.h"#include "util/log.h"diff --git a/src/media/decoder.h b/src/media/decoder.hindex 77fa850..6958fa9 100644--- a/src/media/decoder.h+++ b/src/media/decoder.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// H.264 and Opus decoding through libavcodec (deps/ffmpeg, decoders only).#pragma oncediff --git a/src/net/http.cpp b/src/net/http.cppindex 8e2db58..b138f38 100644--- a/src/net/http.cpp+++ b/src/net/http.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "net/http.h"#include "platform/platform.h"diff --git a/src/net/http.h b/src/net/http.hindex 1b6a649..195be8f 100644--- a/src/net/http.h+++ b/src/net/http.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Blocking HTTPS/1.1 client over BSD sockets + mbedTLS.//// One code path for the Linux host build and the PS5: the payload SDK exposesdiff --git a/src/platform/host/platform_host.cpp b/src/platform/host/platform_host.cppindex 92df9cb..fe93276 100644--- a/src/platform/host/platform_host.cpp+++ b/src/platform/host/platform_host.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Linux host build: used to develop and validate auth, catalog and streaming// on a PC before deploying to the console.#include "platform/platform.h"diff --git a/src/platform/platform.h b/src/platform/platform.hindex 80736bb..70049b3 100644--- a/src/platform/platform.h+++ b/src/platform/platform.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Thin platform layer: everything that differs between the Linux host build// and the PS5 build lives behind these functions (see src/platform/host and// src/platform/ps5).diff --git a/src/platform/posix_common.cpp b/src/platform/posix_common.cppindex 3238ad3..d5bb61e 100644--- a/src/platform/posix_common.cpp+++ b/src/platform/posix_common.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// File helpers shared by both platforms (the PS5 libc is POSIX enough).#include "platform/platform.h"diff --git a/src/platform/ps5/libc_compat.c b/src/platform/ps5/libc_compat.cindex fa8a074..9ac1dd1 100644--- a/src/platform/ps5/libc_compat.c+++ b/src/platform/ps5/libc_compat.c@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP/* libc functions the console's libc does not export but deps use. */#include <errno.h>#include <pthread.h>diff --git a/src/platform/ps5/net_probe.cpp b/src/platform/ps5/net_probe.cppindex 073a066..91e4c3b 100644--- a/src/platform/ps5/net_probe.cpp+++ b/src/platform/ps5/net_probe.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Logs which socket operations the app sandbox allows (autoplay runs only):// the WebRTC stack (libjuice) needs non-blocking UDP, pipes and poll.#include "util/log.h"diff --git a/src/platform/ps5/platform_ps5.cpp b/src/platform/ps5/platform_ps5.cppindex 30800bd..ae313d7 100644--- a/src/platform/ps5/platform_ps5.cpp+++ b/src/platform/ps5/platform_ps5.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "platform/platform.h"#include "util/log.h"diff --git a/src/stream/input_packet.cpp b/src/stream/input_packet.cppindex e5ca877..3751548 100644--- a/src/stream/input_packet.cpp+++ b/src/stream/input_packet.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "stream/input_packet.h"#include <algorithm>diff --git a/src/stream/input_packet.h b/src/stream/input_packet.hindex a38368a..f86abc9 100644--- a/src/stream/input_packet.h+++ b/src/stream/input_packet.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Binary reports of the xCloud "input" data channel (protocol "1.0"), as// written by the xbox.com web client: a 14-byte header (report type, sequence,// timestamp) followed by the frames the report type announces.diff --git a/src/stream/stream_session.cpp b/src/stream/stream_session.cppindex 68680d9..dbd7b49 100644--- a/src/stream/stream_session.cpp+++ b/src/stream/stream_session.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "stream/stream_session.h"#include "platform/platform.h"diff --git a/src/stream/stream_session.h b/src/stream/stream_session.hindex ab9a184..df07ef1 100644--- a/src/stream/stream_session.h+++ b/src/stream/stream_session.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// The WebRTC side of an xCloud session, once gssv reports it Provisioned:// SDP/ICE exchange through GssvClient, then the four data channels (message,// control, input, chat) and the audio/video tracks.diff --git a/src/ui/app_ui.cpp b/src/ui/app_ui.cppindex a501b02..3f00209 100644--- a/src/ui/app_ui.cpp+++ b/src/ui/app_ui.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "ui/app_ui.h"#include "ui/brand.h"diff --git a/src/ui/app_ui.h b/src/ui/app_ui.hindex 47b7249..e40b357 100644--- a/src/ui/app_ui.h+++ b/src/ui/app_ui.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// The menus, styled after xbox.com/play: a hero background of the focused// game, rows of box art, a details page with Play, plus the sign-in, loading// and error screens. Pure UI: it renders into a Canvas and turns pad inputdiff --git a/src/ui/brand.cpp b/src/ui/brand.cppindex 03b5b2f..5dde5f0 100644--- a/src/ui/brand.cpp+++ b/src/ui/brand.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "ui/brand.h"#include <cmath>diff --git a/src/ui/brand.h b/src/ui/brand.hindex 785b0a0..1d0e8ab 100644--- a/src/ui/brand.h+++ b/src/ui/brand.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// PSBox Cloud Gaming's mark: a white sphere crossed by two curved swooshes// that pinch at the centre, on Xbox green. Original artwork (not the Xbox// logo); drawn with the Canvas so the in-app logo and the PS5 home-screendiff --git a/src/ui/canvas.cpp b/src/ui/canvas.cppindex 1f9892f..6372da6 100644--- a/src/ui/canvas.cpp+++ b/src/ui/canvas.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "ui/canvas.h"#include <algorithm>diff --git a/src/ui/canvas.h b/src/ui/canvas.hindex 4a5baf2..46f3366 100644--- a/src/ui/canvas.h+++ b/src/ui/canvas.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Software 2D drawing into a linear RGBA buffer, for the menus. Pixels are// uint32_t 0xAABBGGRR (bytes R, G, B, A in memory), the scan-out format of// the PS5 and of stb_image's RGBA output. The canvas itself is opaque.diff --git a/src/ui/font.cpp b/src/ui/font.cppindex 21c9af3..76669d8 100644--- a/src/ui/font.cpp+++ b/src/ui/font.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "ui/font.h"#include "platform/platform.h"diff --git a/src/ui/font.h b/src/ui/font.hindex b83a2a1..b6844e0 100644--- a/src/ui/font.h+++ b/src/ui/font.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// TrueType text through stb_truetype, with a glyph cache per pixel size.// Coordinates are the top-left corner of the line box.#pragma oncediff --git a/src/ui/image_cache.cpp b/src/ui/image_cache.cppindex 276ea0b..5f23201 100644--- a/src/ui/image_cache.cpp+++ b/src/ui/image_cache.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "ui/image_cache.h"#include "net/http.h"diff --git a/src/ui/image_cache.h b/src/ui/image_cache.hindex 07485c5..0028b72 100644--- a/src/ui/image_cache.h+++ b/src/ui/image_cache.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Box art and hero images: downloaded and decoded on background threads,// scaled to exactly the size they are drawn at ("cover": fill and crop), and// kept in memory up to a byte budget (least recently used dropped first).diff --git a/src/ui/strings.cpp b/src/ui/strings.cppindex 48d7d9a..f03aee2 100644--- a/src/ui/strings.cpp+++ b/src/ui/strings.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "ui/strings.h"#include <array>diff --git a/src/ui/strings.h b/src/ui/strings.hindex e74fc58..8ab520a 100644--- a/src/ui/strings.h+++ b/src/ui/strings.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// User-facing text. English is the default; other languages add a column to// the table in strings.cpp and are picked with setLanguage().#pragma oncediff --git a/src/util/json.cpp b/src/util/json.cppindex 7e0f742..e48682d 100644--- a/src/util/json.cpp+++ b/src/util/json.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "util/json.h"#include <cmath>diff --git a/src/util/json.h b/src/util/json.hindex fd97bf9..c73c801 100644--- a/src/util/json.h+++ b/src/util/json.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Minimal JSON value, parser and serializer.//// Self-contained on purpose: the PS5 payload SDK ships a bare libc++, and thediff --git a/src/util/log.cpp b/src/util/log.cppindex d507b00..2c71536 100644--- a/src/util/log.cpp+++ b/src/util/log.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "util/log.h"#include <cstdio>diff --git a/src/util/log.h b/src/util/log.hindex 825faba..de7e293 100644--- a/src/util/log.h+++ b/src/util/log.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#pragma once#include <cstdarg>diff --git a/src/xcloud/catalog.cpp b/src/xcloud/catalog.cppindex 259f276..6b95fdc 100644--- a/src/xcloud/catalog.cpp+++ b/src/xcloud/catalog.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "xcloud/catalog.h"#include "net/http.h"diff --git a/src/xcloud/catalog.h b/src/xcloud/catalog.hindex 43788b2..ca4ef17 100644--- a/src/xcloud/catalog.h+++ b/src/xcloud/catalog.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Game Pass catalog (catalog.gamepass.com), the source xbox.com/play uses for// its rows: lists ("sigls") of product ids, and product details with names,// descriptions, art and the xCloud title id needed to start a session.diff --git a/src/xcloud/gssv.cpp b/src/xcloud/gssv.cppindex 808b7dc..1410539 100644--- a/src/xcloud/gssv.cpp+++ b/src/xcloud/gssv.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP#include "xcloud/gssv.h"#include "auth/msa.h"diff --git a/src/xcloud/gssv.h b/src/xcloud/gssv.hindex 245ea91..d8a6116 100644--- a/src/xcloud/gssv.h+++ b/src/xcloud/gssv.h@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Client for the xCloud game-streaming service ("gssv"): login, title list,// and the session lifecycle (provision -> connect -> SDP/ICE -> keepalive).//diff --git a/tests/test_main.cpp b/tests/test_main.cppindex f419419..a0f0896 100644--- a/tests/test_main.cpp+++ b/tests/test_main.cpp@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-3.0-or-later-// Copyright (C) 2026 PSBox Cloud Gaming contributors+// Copyright (C) 2026 RafaelNGP// Offline unit tests for the portable core (no network).#include "net/http.h"#include "stream/input_packet.h"diff --git a/tools/build-ffmpeg.sh b/tools/build-ffmpeg.shindex dc70815..0f93b28 100755--- a/tools/build-ffmpeg.sh+++ b/tools/build-ffmpeg.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# Builds the slice of FFmpeg the client needs (H.264 + Opus decoders,# libavcodec/libavutil only) as static libraries.#diff --git a/tools/ps5/autotest.sh b/tools/ps5/autotest.shindex 91e0ed9..d2dc080 100755--- a/tools/ps5/autotest.sh+++ b/tools/ps5/autotest.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# One unattended console run: build, deploy, launch in autoplay mode, wait for# the result, close the app and fetch its log (and frame.ppm when present).#diff --git a/tools/ps5/configure-ld.sh b/tools/ps5/configure-ld.shindex 702159e..c6a6085 100755--- a/tools/ps5/configure-ld.sh+++ b/tools/ps5/configure-ld.sh@@ -1,6 +1,6 @@#!/bin/sh# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# Linker for third-party configure scripts (FFmpeg): links their test# programs as a PIE against the payload SDK's stub libraries, so a function# check passes only when the console really exports the symbol. The resultdiff --git a/tools/ps5/deploy.sh b/tools/ps5/deploy.shindex 3492565..a642c1a 100755--- a/tools/ps5/deploy.sh+++ b/tools/ps5/deploy.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# Upload the packaged app to the console over FTP, or fetch its log.## PS5_HOST=<ip> tools/ps5/deploy.sh [build-dir] upload <build-dir>/pkg/<TITLE_ID>diff --git a/tools/ps5/link.sh b/tools/ps5/link.shindex 60a8a04..5d00a01 100755--- a/tools/ps5/link.sh+++ b/tools/ps5/link.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# Link xCloud-PS5 into a native PS5 eboot (FSELF)set -euo pipefaildiff --git a/tools/ps5/package.sh b/tools/ps5/package.shindex 19d1293..2227122 100755--- a/tools/ps5/package.sh+++ b/tools/ps5/package.sh@@ -1,6 +1,6 @@#!/usr/bin/env bash# SPDX-License-Identifier: GPL-3.0-or-later-# Copyright (C) 2026 PSBox Cloud Gaming contributors+# Copyright (C) 2026 RafaelNGP# Package the PS5 app folder (ShadowMountPlus directory title)## tools/ps5/package.sh <build-dir> [out-dir] -> <out-dir>/<TITLE_ID>/