Skip to content

Xbox Cloud Gaming app for PS5 Homebrew

C

Log whether the plan renews (no date); roadmap: plans, hours left

Rafael Abud Ferreira08137e3a63d4
diff --git a/ROADMAP.md b/ROADMAP.md
index 4107219..a669ef0 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -187,10 +187,11 @@ is rolled back at the next start), then the app restarts itself
| 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 |
+| **next** Cloud playtime left | From November 2026 cloud play is capped each month (Ultimate 15 h, Premium 10 h, Essential 5 h). Source found (xbox.com/play): `GET contentaccess.exp.xboxservices.com/all/v1?market=..&offering=xgpuweb` with the `http://mp.microsoft.com/` XSTS (already used for the plan), protobuf answer: `remainingGameplayTimeInSeconds` / `maxGameplayTimeInSeconds` / monthly reset. A minimal protobuf reader, the hours left on Home and in the game menu, a warning near the end; and GSSV's `MonthlyLimitExceeded` (0x87DD043A) shown as such | small–medium |
+| **next** Catalog by Game Pass plan | Rows and tabs show only what the account's plan plays; the search gets a **Plan** filter (My plan / Ultimate / Premium / Essential / All) to see what an upgrade or downgrade changes; other plans' games marked (badge, "Included with Game Pass Ultimate" on the page). Data already downloaded: catalog.gamepass.com v3 `PassMetadataByPassProductId` (full hydration): Essential `CFQ7TTC0K5DJ`, Premium `CFQ7TTC0P85B`, otherwise Ultimate (EA Play `CFQ7TTC0K5DH`, Ubisoft+ Classics, PC, day-one); free-to-play for everyone. Audit 2026-10-15, 894 cloud games: 126 Essential, 440 Premium, 328 Ultimate only. The plan itself comes from the store (v0.9.7). A non-Ultimate account is needed to check the default view | 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 |
+| Game Pass trial badge (later) | The store's answer says `isTrial`; a TRIAL mark next to the plan. Not now | small |
| 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 |
@@ -214,6 +215,8 @@ is rolled back at the next start), then the app restarts itself
(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.
+- **1440p only for Ultimate**: not limited in the app; "Best" asks for the
+ most and the service gives what the plan allows.
- **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.
diff --git a/src/auth/auth_manager.cpp b/src/auth/auth_manager.cpp
index 904b0db..3ad356e 100644
--- a/src/auth/auth_manager.cpp
+++ b/src/auth/auth_manager.cpp
@@ -149,6 +149,26 @@ std::string subscriptionPlan(const std::string& body) {
return {};
}
+std::string subscriptionRenewal(const std::string& body, int64_t nowUnix) {
+ static const char* kIds[] = {"CFQ7TTC0KHS0", "CFQ7TTC0P85B", "CFQ7TTC0KGQ8", "CFQ7TTC0K5DJ"};
+ auto j = json::parse(body);
+ if (!j) return {};
+ for (const char* id : kIds) {
+ const auto& e = (*j)["entitlements"][id];
+ if (!e.isObject() || e["status"].str() != "Active") continue;
+ if (e["autoRenew"].asBool()) return "renews automatically";
+ // "2026-11-14T00:00:00Z" (or with fractions): the days left.
+ std::tm end{};
+ if (std::sscanf(e["endDate"].str().c_str(), "%d-%d-%dT", &end.tm_year, &end.tm_mon, &end.tm_mday) != 3)
+ return "no auto-renew";
+ end.tm_year -= 1900;
+ end.tm_mon -= 1;
+ int64_t days = (static_cast<int64_t>(timegm(&end)) - nowUnix) / 86400;
+ return "no auto-renew, ends in " + std::to_string(std::max<int64_t>(days, 0)) + " day(s)";
+ }
+ return {};
+}
+
void AuthManager::fetchSubscription(const XblToken& userToken) {
// What xbox.com shows on the profile: the store service's entitlements
// for the Game Pass products. Optional: a failure only leaves the plan
@@ -174,7 +194,9 @@ void AuthManager::fetchSubscription(const XblToken& userToken) {
}
if (std::getenv("XC_DUMP_SUBSCRIPTION")) std::printf("%s\n", r.body.c_str()); // diagnostics (CLI)
profile_.subscription = subscriptionPlan(r.body);
- XC_LOGI("subscription: %s", profile_.subscription.empty() ? "none" : profile_.subscription.c_str());
+ std::string renewal = subscriptionRenewal(r.body, unixNow());
+ XC_LOGI("subscription: %s%s%s%s", profile_.subscription.empty() ? "none" : profile_.subscription.c_str(),
+ renewal.empty() ? "" : " (", renewal.c_str(), renewal.empty() ? "" : ")");
}
bool AuthManager::loginOffering(xcloud::GssvClient& other, std::string& err) const {
diff --git a/src/auth/auth_manager.h b/src/auth/auth_manager.h
index 20bdd1c..cb2d3a1 100644
--- a/src/auth/auth_manager.h
+++ b/src/auth/auth_manager.h
@@ -30,6 +30,9 @@ struct Profile {
// The Game Pass plan in an entitlements answer ("Ultimate"...; empty: none).
std::string subscriptionPlan(const std::string& entitlementsJson);
+// For the log: whether that plan renews, or in how many days it ends (no
+// date: the log may go into public reports). Empty when unknown.
+std::string subscriptionRenewal(const std::string& entitlementsJson, int64_t nowUnix);
class AuthManager {
public:
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index 19a619a..d63b81f 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -770,6 +770,12 @@ static void testSubscriptionPlan() {
"Essential");
CHECK(auth::subscriptionPlan("{\"entitlements\":{\"cfq7ttc0kgq8\":{\"isSatisfyingEntitlement\":true}}}") == "PC");
CHECK(auth::subscriptionPlan("{\"entitlements\":{}}").empty() && auth::subscriptionPlan("not json").empty());
+ // The log's renewal line: no date, only days left.
+ std::string renews = "{\"entitlements\":{\"CFQ7TTC0KHS0\":{\"status\":\"Active\",\"autoRenew\":true,\"endDate\":\"2026-11-14T00:00:00Z\"}}}";
+ CHECK(auth::subscriptionRenewal(renews, 1791504000) == "renews automatically");
+ std::string ends = "{\"entitlements\":{\"CFQ7TTC0KHS0\":{\"status\":\"Active\",\"autoRenew\":false,\"endDate\":\"2026-10-20T00:00:00.0000000Z\"}}}";
+ CHECK(auth::subscriptionRenewal(ends, 1792108800) == "no auto-renew, ends in 4 day(s)"); // from 2026-10-16
+ CHECK(auth::subscriptionRenewal("{\"entitlements\":{}}", 0).empty());
}
static void testHostPacer() {