Skip to content

Xbox Cloud Gaming app for PS5 Homebrew

C

Homebrew store compatibility, request pacing, Game Pass plans; roadmap from the survey

Rafael Abud Ferreiraffcb14adfe91
diff --git a/README.md b/README.md
index 690100f..29d8c01 100644
--- a/README.md
+++ b/README.md
@@ -30,8 +30,14 @@ controller.
- Six languages.
Requires a homebrew-enabled PS5 that can run directory-style apps (for
-example through ShadowMountPlus), and a Microsoft account with Game Pass
-Ultimate for most of the catalog.
+example through ShadowMountPlus), and a Microsoft account with a Game Pass
+plan that includes cloud gaming. Since October 2025 all three do: Essential
+and Premium stream at up to 1080p with a smaller catalog, Ultimate has the
+largest one.
+
+Reported working on firmware 13.00 and 13.60 with ShadowMountPlus. Other
+loaders that run directory apps from `/data/homebrew` should work too;
+please report your firmware and loader in an issue if it doesn't.
## Installation
@@ -42,13 +48,18 @@ No building needed: download `PPSA99810.zip` from the
`/data/homebrew/` on the PS5 (for example over FTP).
2. Wait for the loader (e.g. ShadowMountPlus) to add the **PSBox Cloud Gaming**
icon to the Home screen, then launch it.
+
+ Or install it from **ProsperoStore** (the homebrew store, listed on
+ [homebrew.page](https://homebrew.page)).
3. Sign in: open <https://www.microsoft.com/link> on your phone or computer
(or scan the QR code) and enter the code shown on the TV.
New versions install from inside the app (it asks after sign-in, and
Settings > Updates): only a package signed with the project's key is
-accepted, and your sign-in is kept. By hand: close the app and copy the new
-folder over the old one. The sign-in lives in `PPSA99810/account.json`: never share
+accepted, and your sign-in is kept. ProsperoStore's updates replace the
+whole folder; the app brings the sign-in and settings back from the copy
+the store keeps. By hand: close the app and copy the new folder over the
+old one. The sign-in lives in `PPSA99810/account.json`: never share
that file. More details, controls and troubleshooting are in the
`README.txt` inside the folder.
diff --git a/ROADMAP.md b/ROADMAP.md
index 7e1ac92..02028c6 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -4,7 +4,7 @@ Where PSBox Cloud Gaming goes next, most valuable first. Each item says why it
matters, what "done" looks like, and how it is measured on the console.
Status: **next** (being worked on), **planned**, **later**, **dropped**.
-Last update: 2026-10-14, after v0.9.5.
+Last update: 2026-10-14, after v0.9.5 (with a survey of other xCloud clients and PS5 homebrew).
## Now
@@ -179,6 +179,26 @@ is rolled back at the next start), then the app restarts itself
| **next** "Report a problem" with a QR code | On error screens, in Settings and in the game menu: a QR code opens the GitHub bug form on the phone, filled in (version, firmware, the error, the log's error/warning lines and last lines, ~3 KB, filtered once more for private data). No token in the app; works with the PS5 offline | medium |
| **next** Unexpected-close detection | The next start notices the last session didn't end normally and offers a report with the end of that session's log (what it was doing, not why it closed) | small |
| **next** Region bypass (unsupported countries), opt-in | Built, to be checked on the console. Offered only where it is needed: when the xCloud login is refused (any 4xx answer, as Better xCloud), the error says the country may not be offered (or no Game Pass Ultimate: the service doesn't say which) and offers "Sign in as another country" (Square): a warning (Microsoft doesn't allow it, at your own risk, more delay), Off or one of Brazil, Japan, South Korea, Poland, United States, Cross. The login is then retried with `X-Forwarded-For` (Better xCloud's addresses), on that request only; the address is never logged. Refused again as a country: the error says it is probably the subscription. Off by default; changed later in Settings > Sign-in country (Options on that error opens it). Still to do: learn the refusal's exact answer with a secondary account | small |
+| **next** Homebrew store compatibility | Built (this PR), to be checked on the console. PSBox is listed on homebrew.page / ProsperoStore, whose updates replace the whole app folder (the old one goes to `/data/prosperostore/previous/PPSA99810`): the sign-in and settings now come back from there once. Release zips store every file as 0777 (the console refuses to start files that aren't: CE-107750-0; v0.9.5's were 644), and `tools/release.sh` checks it | small |
+| **next** Request pacing to Microsoft's services | Built (this PR). Five requests a second per `*.xboxlive.com` / `login.live.com` host at most, and nothing to a host for its `Retry-After` after an HTTP 429 (30 s at most): fewer bursts an account could be flagged for (as Nubix does) | small |
+| User data in `/download0` | The store's advice: user data outside the app folder survives any replacement of it (and an app on a USB drive). Console needed: is `/download0` writable under ShadowMountPlus, and where FTP sees it (logs, `autoplay.txt`, the tools). Then a one-time move with the old folder still read | small |
+| Real 120 Hz output | Declaring it in `param.json` isn't enough: `sceVideoOutIsOutputSupported` / `sceVideoOutConfigureOutput(handle, 15, ...)` switch the output (ProsperoLight, PS5MC), and only with the console set to 1440p output (PS5_Vulkan 252bf912). Our `attribute3` VRR bit (0x80000) is refused on some firmwares: 0x40 (120 Hz) + 0x40000 (VRR). Console needed | small |
+| VRR for the stream | `sceVideoOutVrrUnpegFromFixedRate` would absorb the 60 fps stream's jitter (ProsperoLight's "Paced + VRR"); needs an extended libSceVideoOut stub | medium |
+| Cloud playtime left | From November 2026 cloud play is capped each month (Ultimate 15 h, Premium 10 h, Essential 5 h). Show the hours left on Home and in the game menu, warn near the cap; find the endpoint xbox.com uses, and whether Remote Play of one's own Xbox counts (if not, point to it) | small–medium |
+| Catalog by Game Pass plan | Since October 2025 Essential and Premium include cloud gaming (1080p, smaller catalog). Mark which plan a game needs (the titles' program fields, as green-nx), a Ubisoft+ Classics row (as XStreaming) | small–medium |
+| Free play with ads | Microsoft's ad-supported offering (`xgpuwebf2p` login and sessions, its own list): play without a subscription, with the service's limits; the ads are never skipped (as green-nx, Nubix, XStreaming) | small–medium |
+| Re-test 1440p and 1080p HQ | Microsoft offers 1440p to Ultimate since Nov 2025 (on consoles since Feb 2026); our "refused" measures are from v0.4/v0.5. If granted, the hardware decoder matters again | tiny |
+| Lower audio latency, lost audio filled | The audio queue may reach 120 ms; Moonlight keeps 40–50 ms. Keep ~40 ms, fill lost packets with Opus' concealment / in-band FEC (offered already, never used) | small |
+| Unreliable input channel (protocol v9) | The official client sends input on an unordered channel, so a lost packet doesn't hold the ones after it; needs a capture of its frames | medium |
+| Controller the server stops hearing | After a lag spike the server may keep receiving the pad and ignore it (green-nx #61/#67): notice it and announce the pad again; don't resend an unchanged pad 125 times a second | small |
+| Bitrate cap, stream volume | A maximum bitrate (`b=AS` in the SDP) for Wi-Fi; game volume and boost in the game menu (Better xCloud, Greenlight, XStreaming) | small |
+| Network indicator and session summary | A small warning when the connection degrades, and a summary at the end (loss, delay, resolution), also in reports (Moonlight, GeForce NOW) | small |
+| Rejoin a running session | After a crash or restart, a game still running in the cloud is joined again instead of a new session (`/v5/sessions/cloud/active`, XStreaming) | small |
+| Rest mode | End the stream before the console sleeps; on resume refresh the sign-in, controllers and audio (`sceSystemServiceReceiveEvent`, ezRemote) | small |
+| Button remapping, gyro aim, touchpad mouse | Per-game profiles: remapping (Edge paddles too), the DualSense gyro as the right stick (JoyShockMapper-style), the touchpad as a mouse once keyboard & mouse are in | medium |
+| Favourites, queue time on cards, game language | A favourites row; the estimated queue time on a game's page before Play (`/v1/waittime/{titleId}`); the game's language apart from the app's | small |
+| Home-screen tile per game | The PS5 Forwarder Format (ProsperoLight): a tile that starts one cloud game directly | small |
+| Crash address in reports | The fault's offset in the code and a script that names the function (ProsperoLight / ProsperoEden), for the unexpected-close report | small |
| USB keyboard & mouse + badges (v1.0+) | Some xCloud games accept native keyboard and mouse input; deferred to v1.0+ | medium |
| Dedicated voice chat output routing | Route voice chat audio independently to DualSense controller speaker or headset while keeping game audio on TV (if xCloud exposes separate voice track) | medium |
@@ -188,8 +208,12 @@ is rolled back at the next start), then the app restarts itself
server doesn't send.
- **Higher tiers on this account**: 1080p HQ, 1440p, H.265, a Tizen-TV
identity and `rateControlBitrateUpdate` were all refused by the service
- (measured, see the v0.4.0 / v0.5.0 PRs). The app still asks for HQ.
+ (measured, see the v0.4.0 / v0.5.0 PRs). The app still asks for HQ. To re-test: since
+ Nov 2025 Microsoft offers 1440p to Ultimate (see Next).
- **HDR**: xCloud doesn't stream HDR.
+- **Surround, frame generation, FSR 4**: xCloud's audio is stereo as far as
+ known; generated frames add delay; FSR 4 needs motion vectors and depth a
+ video stream doesn't have.
## Done
diff --git a/ps5/release/README.txt b/ps5/release/README.txt
index 87fe0df..b14c6ec 100644
--- a/ps5/release/README.txt
+++ b/ps5/release/README.txt
@@ -6,9 +6,10 @@ browse the cloud catalog and stream games at 1080p60 with sound, using
the DualSense as an Xbox controller. The picture is upscaled to 4K on
the PS5's GPU (AMD FidelityFX FSR 1, or Anime4K).
-You need a Microsoft account; Game Pass Ultimate for most of the
-catalog. Free-to-play games stream without it once they are on your
-account (see "Free-to-play games").
+You need a Microsoft account and a Game Pass plan with cloud gaming
+(Essential and Premium up to 1080p with a smaller catalog, Ultimate the
+largest one). Free-to-play games stream without it once they are on
+your account (see "Free-to-play games").
Unofficial project, not affiliated with, endorsed or sponsored by
Microsoft or Sony.
@@ -33,8 +34,10 @@ Installation
Updating: when a new version is out, the app offers it after sign-in
("Update now" / "Not now"; also in Settings > Updates). It downloads it,
checks that it was signed by this project, installs it and restarts by
-itself; your sign-in and settings are kept. By hand: close the app and
-copy the new @TITLE_ID@ folder over the old one.
+itself; your sign-in and settings are kept. ProsperoStore's updates
+replace the whole folder; the app brings the sign-in and settings back
+from the copy the store keeps. By hand: close the app and copy the new
+@TITLE_ID@ folder over the old one.
First launch
diff --git a/src/app/ps5_main.cpp b/src/app/ps5_main.cpp
index 61e49d1..862d34e 100644
--- a/src/app/ps5_main.cpp
+++ b/src/app/ps5_main.cpp
@@ -174,6 +174,7 @@ int main(int argc, char** argv) {
// An update cut short: the old files went back, and the old eboot.bin
// is the one to run.
if (recoverUpdate(platform::dataDir())) platform::restartApp();
+ importStoreLeftovers(platform::dataDir(), "/data/prosperostore/previous/PPSA99810");
struct stat settingsStat;
if (!g_settings.load(settingsPath()) && ::stat(settingsPath().c_str(), &settingsStat) == 0) {
// Unreadable (cut short?): kept aside, not overwritten by the defaults.
diff --git a/src/app/updater.cpp b/src/app/updater.cpp
index 53c031c..2f4d87e 100644
--- a/src/app/updater.cpp
+++ b/src/app/updater.cpp
@@ -186,8 +186,9 @@ bool updatablePath(const std::string& path) {
if (slash == std::string::npos) break;
start = slash + 1;
}
- static const std::set<std::string> kUsers = {"account.json", "settings.json", "library.json", "prices.json",
- "xcloud.log", "autoplay.txt", "update.journal"};
+ static const std::set<std::string> kUsers = {"account.json", "settings.json", "library.json",
+ "prices.json", "xcloud.log", "autoplay.txt",
+ "update.journal", "store_import.done", "settings.json.bad"};
std::string top = path.substr(0, path.find('/'));
return !kUsers.count(path) && top != "imgcache" && top.rfind("update.", 0) != 0 && path.find(".ppm") == std::string::npos;
}
@@ -349,6 +350,22 @@ bool installRelease(const Release& release, const std::string& dir, const std::s
return true;
}
+bool importStoreLeftovers(const std::string& dir, const std::string& previousDir) {
+ std::string text;
+ const std::string done = dir + "/store_import.done";
+ if (!platform::readFile(previousDir + "/account.json", text) || platform::readFile(done, text)) return false;
+ // Signed in here already (the store's folder is older): never later.
+ bool signedIn = platform::readFile(dir + "/account.json", text);
+ platform::writeFileAtomic(done, "1\n");
+ if (signedIn) return false;
+ int copied = 0;
+ for (const char* name : {"account.json", "settings.json", "library.json", "prices.json"})
+ if (platform::readFile(previousDir + "/" + name, text) && platform::writeFileAtomic(dir + "/" + name, text))
+ ++copied;
+ XC_LOGI("store update: %d user file(s) brought back from the previous version's folder", copied);
+ return copied > 0;
+}
+
bool recoverUpdate(const std::string& dir) {
bool rolledBack = false;
if (exists(dir + "/update.journal")) {
diff --git a/src/app/updater.h b/src/app/updater.h
index ade2df2..0874d48 100644
--- a/src/app/updater.h
+++ b/src/app/updater.h
@@ -39,6 +39,15 @@ bool installRelease(const Release& release, const std::string& dir, const std::s
// did), and removes what updates left behind.
bool recoverUpdate(const std::string& dir);
+// After an update by ProsperoStore (the homebrew store): it replaces the
+// whole app folder and keeps the old one in `previousDir`
+// (/data/prosperostore/previous/PPSA99810), so the sign-in and settings
+// stayed there. When `dir` has no account.json, the user's files come back
+// from there (copied; the store keeps its folder). Once only: `dir`'s
+// store_import.done then says so, and a sign-out later doesn't bring the
+// old account back. True when some did.
+bool importStoreLeftovers(const std::string& dir, const std::string& previousDir);
+
// --- The parts, for the tests ---------------------------------------------------
// True when `sigDer` is a valid signature of `data` by `publicKeyPem`.
diff --git a/src/net/http.cpp b/src/net/http.cpp
index 9bf16db..af8c6ce 100644
--- a/src/net/http.cpp
+++ b/src/net/http.cpp
@@ -22,8 +22,10 @@
#include <sys/time.h>
#include <unistd.h>
+#include <algorithm>
#include <cctype>
#include <cerrno>
+#include <cstdlib>
#include <cstring>
#include <mutex>
@@ -147,6 +149,33 @@ bool dechunk(const std::string& in, std::string& out) {
void setTestTransport(std::function<Response(const Request&)> transport) { g_testTransport = std::move(transport); }
+bool HostPacer::paced(const std::string& host) {
+ auto endsWith = [&](const char* tail) {
+ size_t n = std::strlen(tail);
+ return host.size() >= n && host.compare(host.size() - n, n, tail) == 0;
+ };
+ return endsWith(".xboxlive.com") || host == "login.live.com";
+}
+
+uint64_t HostPacer::reserve(const std::string& host, uint64_t nowMs) {
+ constexpr uint64_t kSpacingMs = 200; // five a second
+ if (!paced(host)) return 0;
+ std::lock_guard<std::mutex> lock(mutex_);
+ uint64_t& next = next_[host];
+ uint64_t at = std::max(next, nowMs);
+ next = at + kSpacingMs;
+ return at - nowMs;
+}
+
+void HostPacer::throttled(const std::string& host, int seconds, uint64_t nowMs) {
+ if (!paced(host)) return;
+ uint64_t waitMs = static_cast<uint64_t>(std::clamp(seconds > 0 ? seconds : 5, 1, 30)) * 1000u;
+ std::lock_guard<std::mutex> lock(mutex_);
+ next_[host] = std::max(next_[host], nowMs + waitMs);
+}
+
+
+
bool Url::parse(const std::string& url, Url& out) {
size_t s = url.find("://");
if (s == std::string::npos) return false;
@@ -434,9 +463,29 @@ Response performRetrying(const Request& req) {
} // namespace
+namespace {
+HostPacer g_pacer;
+
+Response performPaced(const Request& req) {
+ Url url;
+ if (!Url::parse(req.url, url)) return performRetrying(req);
+ if (uint64_t waitMs = g_pacer.reserve(url.host, platform::nowMs())) {
+ if (waitMs >= 1000) XC_LOGI("%s: waiting %llu ms (paced)", url.host.c_str(), static_cast<unsigned long long>(waitMs));
+ platform::sleepMs(static_cast<uint32_t>(waitMs));
+ }
+ Response resp = performRetrying(req);
+ if (resp.status == 429) {
+ int seconds = std::atoi(resp.header("retry-after").c_str());
+ XC_LOGW("%s: HTTP 429, nothing more to it for %d s", url.host.c_str(), std::clamp(seconds > 0 ? seconds : 5, 1, 30));
+ g_pacer.throttled(url.host, seconds, platform::nowMs());
+ }
+ return resp;
+}
+} // namespace
+
Response perform(const Request& req) {
if (g_testTransport) return g_testTransport(req);
- Response resp = performRetrying(req);
+ Response resp = performPaced(req);
Request next = req;
for (int hops = 0; req.followRedirects && hops < 5; ++hops) {
int s = resp.status;
@@ -457,7 +506,7 @@ Response perform(const Request& req) {
next.body.clear();
}
next.url = location;
- resp = performRetrying(next);
+ resp = performPaced(next);
}
return resp;
}
diff --git a/src/net/http.h b/src/net/http.h
index a737536..33bc262 100644
--- a/src/net/http.h
+++ b/src/net/http.h
@@ -10,6 +10,8 @@
#include <cstddef>
#include <functional>
#include <map>
+#include <mutex>
+#include <cstdint>
#include <string>
#include <utility>
#include <vector>
@@ -67,6 +69,23 @@ void shutdownTls();
Response perform(const Request& req);
+// Spaces the requests to Microsoft's services (*.xboxlive.com, login.live.com):
+// five a second per host at most, and after an HTTP 429 none to that host
+// until its Retry-After (30 s at most) — fewer bursts an account could be
+// flagged for. Used by perform(); a class for the tests (`nowMs` passed in).
+class HostPacer {
+public:
+ // How long to wait before sending to `host` (0: now); reserves its slot.
+ uint64_t reserve(const std::string& host, uint64_t nowMs);
+ // `host` answered 429 with Retry-After `seconds` (<= 0: unknown).
+ void throttled(const std::string& host, int seconds, uint64_t nowMs);
+ static bool paced(const std::string& host);
+
+private:
+ std::mutex mutex_;
+ std::map<std::string, uint64_t> next_; // host -> earliest next send (ms)
+};
+
// --- For the tests -------------------------------------------------------------
// Answers every perform() instead of the network; empty: the network again.
void setTestTransport(std::function<Response(const Request&)> transport);
diff --git a/src/ui/strings.cpp b/src/ui/strings.cpp
index bdb042d..8336298 100644
--- a/src/ui/strings.cpp
+++ b/src/ui/strings.cpp
@@ -249,8 +249,8 @@ constexpr Column kEnglish = {
"Off (this console's)", // LoginCountryOff
"Sign in as another country", // TryOtherCountry
"xCloud will be told the sign-in comes from the chosen country. Microsoft doesn't allow this: use it at your own risk. Games may then come from servers far away, with more delay. You can change it later in Settings.", // LoginCountryWarning
- "xCloud refused the sign-in. Cloud gaming may not be offered in your country, or the account may not have Game Pass Ultimate.", // RegionRefused
- "xCloud refused the sign-in, even as %s. The account probably doesn't have Game Pass Ultimate.", // RegionRefusedAs
+ "xCloud refused the sign-in. Cloud gaming may not be offered in your country, or the account may not have a Game Pass plan with cloud gaming.", // RegionRefused
+ "xCloud refused the sign-in, even as %s. The account probably doesn't have a Game Pass plan with cloud gaming.", // RegionRefusedAs
"Brazil", // CountryBR
"Japan", // CountryJP
"South Korea", // CountryKR
@@ -475,8 +475,8 @@ constexpr Column kPortugueseBR = {
"Desativado (o do console)",
"Entrar como outro país",
"O xCloud será informado de que o login vem do país escolhido. A Microsoft não permite isso: use por sua conta e risco. Os jogos podem vir de servidores distantes, com mais atraso. Dá para mudar depois em Configurações.",
- "O xCloud recusou o login. O jogo na nuvem pode não ser oferecido no seu país, ou a conta pode não ter o Game Pass Ultimate.",
- "O xCloud recusou o login, mesmo como %s. Provavelmente a conta não tem o Game Pass Ultimate.",
+ "O xCloud recusou o login. O jogo na nuvem pode não ser oferecido no seu país, ou a conta pode não ter um plano do Game Pass com jogos na nuvem.",
+ "O xCloud recusou o login, mesmo como %s. Provavelmente a conta não tem um plano do Game Pass com jogos na nuvem.",
"Brasil",
"Japão",
"Coreia do Sul",
@@ -701,8 +701,8 @@ constexpr Column kSpanish = {
"Desactivado (el de la consola)",
"Entrar como otro país",
"Se le dirá a xCloud que el inicio de sesión viene del país elegido. Microsoft no lo permite: úsalo bajo tu propio riesgo. Los juegos pueden venir de servidores lejanos, con más retraso. Puedes cambiarlo luego en Ajustes.",
- "xCloud rechazó el inicio de sesión. Puede que el juego en la nube no se ofrezca en tu país o que la cuenta no tenga Game Pass Ultimate.",
- "xCloud rechazó el inicio de sesión, incluso como %s. Probablemente la cuenta no tenga Game Pass Ultimate.",
+ "xCloud rechazó el inicio de sesión. Puede que el juego en la nube no se ofrezca en tu país o que la cuenta no tenga un plan de Game Pass con juego en la nube.",
+ "xCloud rechazó el inicio de sesión, incluso como %s. Probablemente la cuenta no tenga un plan de Game Pass con juego en la nube.",
"Brasil",
"Japón",
"Corea del Sur",
@@ -927,8 +927,8 @@ constexpr Column kFrench = {
"Désactivé (celui de la console)",
"Se connecter depuis un autre pays",
"xCloud sera informé que la connexion vient du pays choisi. Microsoft ne l'autorise pas : utilisez-le à vos risques. Les jeux peuvent alors venir de serveurs éloignés, avec plus de latence. Modifiable plus tard dans Paramètres.",
- "xCloud a refusé la connexion. Le jeu dans le cloud n'est peut-être pas proposé dans votre pays, ou le compte n'a pas le Game Pass Ultimate.",
- "xCloud a refusé la connexion, même en choisissant %s. Le compte n'a probablement pas le Game Pass Ultimate.",
+ "xCloud a refusé la connexion. Le jeu dans le cloud n'est peut-être pas proposé dans votre pays, ou le compte n'a pas d'abonnement Game Pass avec le jeu dans le cloud.",
+ "xCloud a refusé la connexion, même en choisissant %s. Le compte n'a probablement pas d'abonnement Game Pass avec le jeu dans le cloud.",
"Brésil",
"Japon",
"Corée du Sud",
@@ -1153,8 +1153,8 @@ constexpr Column kGerman = {
"Aus (das der Konsole)",
"Als anderes Land anmelden",
"xCloud wird mitgeteilt, dass die Anmeldung aus dem gewählten Land kommt. Microsoft erlaubt das nicht: Nutzung auf eigenes Risiko. Spiele kommen dann eventuell von weit entfernten Servern, mit mehr Verzögerung. Später in den Einstellungen änderbar.",
- "xCloud hat die Anmeldung abgelehnt. Cloud Gaming wird in deinem Land vielleicht nicht angeboten, oder das Konto hat kein Game Pass Ultimate.",
- "xCloud hat die Anmeldung abgelehnt, auch mit %s. Das Konto hat wahrscheinlich kein Game Pass Ultimate.",
+ "xCloud hat die Anmeldung abgelehnt. Cloud Gaming wird in deinem Land vielleicht nicht angeboten, oder das Konto hat kein Game-Pass-Abo mit Cloud Gaming.",
+ "xCloud hat die Anmeldung abgelehnt, auch mit %s. Das Konto hat wahrscheinlich kein Game-Pass-Abo mit Cloud Gaming.",
"Brasilien",
"Japan",
"Südkorea",
@@ -1379,8 +1379,8 @@ constexpr Column kItalian = {
"Disattivato (quello della console)",
"Accedi come un altro paese",
"A xCloud verrà detto che l'accesso arriva dal paese scelto. Microsoft non lo consente: usalo a tuo rischio. I giochi potrebbero arrivare da server lontani, con più ritardo. Puoi cambiarlo poi in Impostazioni.",
- "xCloud ha rifiutato l'accesso. Il cloud gaming potrebbe non essere offerto nel tuo paese, oppure l'account non ha Game Pass Ultimate.",
- "xCloud ha rifiutato l'accesso, anche scegliendo %s. Probabilmente l'account non ha Game Pass Ultimate.",
+ "xCloud ha rifiutato l'accesso. Il cloud gaming potrebbe non essere offerto nel tuo paese, oppure l'account non ha un abbonamento Game Pass con il cloud gaming.",
+ "xCloud ha rifiutato l'accesso, anche scegliendo %s. Probabilmente l'account non ha un abbonamento Game Pass con il cloud gaming.",
"Brasile",
"Giappone",
"Corea del Sud",
diff --git a/src/xcloud/gssv.cpp b/src/xcloud/gssv.cpp
index 238eb43..00db2dc 100644
--- a/src/xcloud/gssv.cpp
+++ b/src/xcloud/gssv.cpp
@@ -266,7 +266,7 @@ bool GssvClient::login(const auth::XblToken& gssvXsts, std::string& err) {
auto j = json::parse(r.body);
if (!r.ok() || !j || !(*j)["gsToken"].isString()) {
err = "xCloud login failed: " + describe(r);
- if (r.status == 403) err += " (no Game Pass Ultimate, or xCloud is not available in this region)";
+ if (r.status == 403) err += " (no Game Pass plan with cloud gaming, or xCloud is not available in this region)";
return false;
}
if (std::getenv("XC_DUMP_LOGIN")) {
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index d600b07..e65f0db 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -717,6 +717,55 @@ static void testPrivacyAndRobustness() {
CHECK(!app::unzip(storedZip({{"PPSA99810/eboot.bin", "a"}, {"PPSA99810/eboot.bin", "b"}}), "PPSA99810/", files, err));
}
+static void testStoreLeftovers() {
+ // ProsperoStore replaced the app folder and kept the old one: the
+ // sign-in and settings come back from it, once.
+ std::string dir = "/tmp/xcloud-store-test/app", prev = "/tmp/xcloud-store-test/previous";
+ std::system("rm -rf /tmp/xcloud-store-test && mkdir -p /tmp/xcloud-store-test/app /tmp/xcloud-store-test/previous");
+ xc::platform::writeFileAtomic(prev + "/account.json", "{\"a\":1}");
+ xc::platform::writeFileAtomic(prev + "/settings.json", "{\"language\":\"pt-BR\"}");
+ xc::platform::writeFileAtomic(prev + "/xcloud.log", "old log");
+ std::string text;
+ CHECK(app::importStoreLeftovers(dir, prev));
+ CHECK(xc::platform::readFile(dir + "/account.json", text) && text == "{\"a\":1}");
+ CHECK(xc::platform::readFile(dir + "/settings.json", text) && text.find("pt-BR") != std::string::npos);
+ CHECK(!xc::platform::readFile(dir + "/xcloud.log", text)); // only the user's settings and sign-in
+ CHECK(xc::platform::readFile(prev + "/account.json", text)); // the store's folder stays
+ // Signed out later: the old account doesn't come back.
+ std::remove((dir + "/account.json").c_str());
+ CHECK(!app::importStoreLeftovers(dir, prev) && !xc::platform::readFile(dir + "/account.json", text));
+ // Already signed in when the store's folder is found: never imported.
+ std::system("rm -rf /tmp/xcloud-store-test/app && mkdir -p /tmp/xcloud-store-test/app");
+ xc::platform::writeFileAtomic(dir + "/account.json", "{\"b\":2}");
+ CHECK(!app::importStoreLeftovers(dir, prev));
+ std::remove((dir + "/account.json").c_str());
+ CHECK(!app::importStoreLeftovers(dir, prev));
+ // No store folder: nothing.
+ std::system("rm -rf /tmp/xcloud-store-test/app && mkdir -p /tmp/xcloud-store-test/app");
+ CHECK(!app::importStoreLeftovers(dir, "/tmp/xcloud-store-test/none"));
+ CHECK(!app::updatablePath("store_import.done"));
+ std::system("rm -rf /tmp/xcloud-store-test");
+}
+
+static void testHostPacer() {
+ // Five a second per Microsoft host; other hosts never wait; a 429 holds
+ // the host for its Retry-After (30 s at most).
+ net::HostPacer p;
+ CHECK(p.reserve("xgpuweb.gssv-play-prod.xboxlive.com", 1000) == 0);
+ CHECK(p.reserve("xgpuweb.gssv-play-prod.xboxlive.com", 1000) == 200);
+ CHECK(p.reserve("xgpuweb.gssv-play-prod.xboxlive.com", 1100) == 300);
+ CHECK(p.reserve("titlehub.xboxlive.com", 1100) == 0); // its own slots
+ CHECK(p.reserve("login.live.com", 5000) == 0 && p.reserve("login.live.com", 5000) == 200);
+ for (int i = 0; i < 10; ++i) CHECK(p.reserve("store-images.s-microsoft.com", 1000) == 0);
+ CHECK(!net::HostPacer::paced("evilxboxlive.com") && net::HostPacer::paced("a.xboxlive.com"));
+ p.throttled("peoplehub.xboxlive.com", 7, 10000);
+ CHECK(p.reserve("peoplehub.xboxlive.com", 10000) == 7000);
+ p.throttled("peoplehub.xboxlive.com", 3600, 20000);
+ CHECK(p.reserve("peoplehub.xboxlive.com", 20000) == 30000);
+ p.throttled("store-images.s-microsoft.com", 60, 0);
+ CHECK(p.reserve("store-images.s-microsoft.com", 0) == 0);
+}
+
static void testAutoDeband() {
using xc::app::debandForMbps;
CHECK(debandForMbps(0.3, 1) == -1); // starting or standing still: no measure
@@ -765,6 +814,8 @@ int main() {
testBuiltinCa();
testLoginCountry();
testPrivacyAndRobustness();
+ testStoreLeftovers();
+ testHostPacer();
testAudioEncoder();
testAutoDeband();
testControllerTuning();
diff --git a/tools/release.sh b/tools/release.sh
index 293fa23..9120340 100755
--- a/tools/release.sh
+++ b/tools/release.sh
@@ -79,6 +79,9 @@ ok "PS5 build linked"
rm -rf "$out"
mkdir -p "$out"
env -u XC_INCLUDE_ACCOUNT XC_VERSION="$tag" tools/ps5/package.sh build-ps5 "$out" >/dev/null
+# Every file 0777 in the zip: the console won't start an app whose files
+# aren't (CE-107750-0), and installers such as ProsperoStore keep the modes.
+chmod -R 0777 "$out/PPSA99810"
(cd "$out" && zip -qr PPSA99810.zip PPSA99810 && sha256sum PPSA99810.zip > PPSA99810.zip.sha256)
sha=$(cut -d' ' -f1 "$out/PPSA99810.zip.sha256")
ok "$out/PPSA99810.zip ($(du -h "$out/PPSA99810.zip" | cut -f1)), sha256 $sha"
@@ -90,6 +93,8 @@ ok "signed: $out/PPSA99810.zip.sig"
echo "== checks in the package"
zip=$out/PPSA99810.zip
if unzip -Z1 "$zip" | grep -nE "$private"; then fail "a private file in the zip"; fi
+if zipinfo "$zip" | grep -E '^[-d]' | grep -v '^.rwxrwxrwx'; then fail "files in the zip without mode 0777"; fi
+ok "every entry mode 0777"
ok "no private file ($(unzip -Z1 "$zip" | grep -vc '/$') files)"
unzip -p "$zip" PPSA99810/README.txt | head -1 | grep -q "version $tag" || fail "README.txt is not at $tag"
unzip -p "$zip" PPSA99810/sce_sys/param.json | grep -q "\"contentVersion\": \"$content\"" || fail "the packaged param.json is not $content"