Skip to content

Play your Steam library's Windows games on a jailbroken PS5.

C++

Let Playden run on any console firmware

Leonardo Lobato226d27c59df8
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9c19474..7a3745f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -43,7 +43,7 @@ This guide covers setup, builds, tests, running on a console, and how to change
- About 2 GB of free space for `deps/` and `build/`.
- A checkout path without symbolic links. Playden refuses symlinked paths when it reads its data, so two tests fail
in a link such as macOS `/tmp` (use `/private/tmp` or a folder in your home directory).
-- For console work: a PS5 on firmware 13.60 with a jailbreak (see [Running on a console](#running-on-a-console)).
+- For console work: a jailbroken PS5, preferably on firmware 13.60, the version we test on (see [Running on a console](#running-on-a-console)).
## Get the source
@@ -98,7 +98,7 @@ the input changed. The PS5 build is reproducible, so the same sources give the s
You need:
-- A PS5 on firmware 13.60, jailbroken (for example with the WebKit autoloader).
+- A jailbroken PS5 (for example with the WebKit autoloader). We test on firmware 13.60; other versions are untested.
- These payloads loaded after each boot. The versions are the ones we test with:
| Payload | Version | What it is for |
diff --git a/README.md b/README.md
index 8e83993..37604c3 100644
--- a/README.md
+++ b/README.md
@@ -66,8 +66,8 @@ you sign in:
## Requirements
-- **A PS5 on firmware 13.60, jailbroken** (for example with the WebKit autoloader). Other firmware versions are
- untested.
+- **A jailbroken PS5** (for example with the WebKit autoloader). We test on firmware 13.60. Playden does not block
+ other firmware versions, but they are untested. Please give your firmware in a test report.
- **These payloads loaded after each boot:**
- [kstuff](https://github.com/EchoStretch/kstuff-lite) — required. Without it, every game fails with error
CE-100008-9.
diff --git a/src/homebrew/ps5.cpp b/src/homebrew/ps5.cpp
index 25d23a7..ed78c7a 100644
--- a/src/homebrew/ps5.cpp
+++ b/src/homebrew/ps5.cpp
@@ -303,8 +303,7 @@ int main() {
const auto firmware = playden::ps5::ConsoleFirmwareVersion();
playden::app::AppendLogLine(log_root, "runtime.log", "console_firmware=" + firmware.value_or("unknown") + " " +
playden::ps5::ConsoleFirmwareDiagnostics());
- if (!firmware) { *reason = "The console firmware version is unknown."; return std::nullopt; }
- const auto admission = rt::DevelopmentKitAdmission(*firmware);
+ const auto admission = rt::DevelopmentKitAdmission();
auto admitted = rt::VerifyInstalledKit(rt::kDevelopmentKitRoot, admission);
std::string ignored;
for (const auto& name : admitted.ignored_capabilities) ignored += (ignored.empty() ? "" : ",") + name;
diff --git a/src/runtime/kit_manifest.cpp b/src/runtime/kit_manifest.cpp
index 311ee46..129e464 100644
--- a/src/runtime/kit_manifest.cpp
+++ b/src/runtime/kit_manifest.cpp
@@ -266,16 +266,13 @@ class Verifier {
const auto* capabilities = Field(*manifest_, "capabilities", Json::Type::kArray);
if (!kit_id || !Identifier(kit_id->text()) || !firmware || firmware->array().empty() || !capabilities)
return Failure(KitManifestStatus::kMalformed, "kit identity, firmware, or capabilities are malformed");
- bool firmware_supported = false;
+ // The firmware a kit was tested on, for display; any firmware is admitted.
std::set<std::string> seen;
for (const auto& item : firmware->array()) {
if (!item.is_string() || item.text().empty() || !seen.insert(item.text()).second)
return Failure(KitManifestStatus::kMalformed, "firmware entries must be unique non-empty strings");
result_.firmware.push_back(item.text());
- firmware_supported |= item.text() == config_.current_firmware;
}
- if (!firmware_supported)
- return Failure(KitManifestStatus::kUnsupportedFirmware, "current firmware is not declared supported by this kit");
seen.clear();
std::vector<std::string> declared;
for (const auto& item : capabilities->array()) {
diff --git a/src/runtime/kit_manifest.h b/src/runtime/kit_manifest.h
index 72dde3f..eb1ef93 100644
--- a/src/runtime/kit_manifest.h
+++ b/src/runtime/kit_manifest.h
@@ -21,7 +21,6 @@ namespace playden::runtime {
struct KitAdmissionConfig {
// The kit this build was tested with: shown next to the installed one, never required.
std::string expected_manifest_sha256;
- std::string current_firmware;
std::string required_architecture = "x86_64+wow64-i386";
// Capabilities Playden can use; a kit's other capabilities are ignored.
std::vector<std::string> known_capabilities;
@@ -38,9 +37,9 @@ enum class KitManifestStatus {
kIntegrityFailure,
kUnsupportedSchema,
kUnsupportedKit,
- kUnsupportedFirmware,
- kUnsupportedArchitecture,
- kUnsupportedSource,
+ // Values are logged as numbers; 5 was the firmware check, removed when any firmware was allowed.
+ kUnsupportedArchitecture = 6,
+ kUnsupportedSource = 7,
};
struct KitManifestResult {
diff --git a/src/runtime/kit_trust.cpp b/src/runtime/kit_trust.cpp
index b05a84e..b53253e 100644
--- a/src/runtime/kit_trust.cpp
+++ b/src/runtime/kit_trust.cpp
@@ -6,10 +6,9 @@
namespace playden::runtime {
-KitAdmissionConfig DevelopmentKitAdmission(const std::string& current_firmware) {
+KitAdmissionConfig DevelopmentKitAdmission() {
KitAdmissionConfig config;
config.expected_manifest_sha256 = kExpectedKitManifestSha256;
- config.current_firmware = current_firmware;
// The publication guard capability stays unused until native qualification.
config.known_capabilities = {"dxvk", "offline_bottle", "per_game_title", "wow64_i386", kKitSharedSections,
kKitTitleAnyId, kKitGameRootUnowned, kKitOpenGLZink,
diff --git a/src/runtime/kit_trust.h b/src/runtime/kit_trust.h
index 45132c0..6b64a71 100644
--- a/src/runtime/kit_trust.h
+++ b/src/runtime/kit_trust.h
@@ -14,8 +14,7 @@ inline constexpr const char* kDevelopmentKitRoot = "/data/playden/kits/hl2-fw136
inline constexpr const char* kExpectedKitManifestSha256 =
"489927f2ef378ebed18be1e611173ef2878a712bf8bb27eef5c6fc6a87f0c24e";
-// What this build accepts from a kit. current_firmware is the running console's
-// version (for example "13.60"); an empty value never matches.
-KitAdmissionConfig DevelopmentKitAdmission(const std::string& current_firmware);
+// What this build accepts from a kit, on any console firmware.
+KitAdmissionConfig DevelopmentKitAdmission();
} // namespace playden::runtime
diff --git a/tests/kit_producer_consumer_test.cpp b/tests/kit_producer_consumer_test.cpp
index f73c856..256507f 100644
--- a/tests/kit_producer_consumer_test.cpp
+++ b/tests/kit_producer_consumer_test.cpp
@@ -8,7 +8,6 @@ int main(int argc, char** argv) {
if (argc != 3) return 2;
using namespace playden::runtime;
KitAdmissionConfig config;
- config.current_firmware = "13.60";
config.expected_manifest_sha256 = argv[2];
config.known_capabilities = {"per_game_title", "offline_bottle", "wow64_i386", "dxvk"};
const auto result = VerifyInstalledKit(argv[1], config);
diff --git a/tests/runtime_kit_manifest_test.cpp b/tests/runtime_kit_manifest_test.cpp
index b8bd562..5743963 100644
--- a/tests/runtime_kit_manifest_test.cpp
+++ b/tests/runtime_kit_manifest_test.cpp
@@ -181,7 +181,6 @@ struct Fixture {
Write(root / "titles/variant/sce_sys/param.json", "{\"titleId\":\"FAKE78001\"}");
RefreshInnerManifests();
- trust.current_firmware = "12.02";
trust.required_architecture = "x86_64+wow64-i386";
trust.known_capabilities = {"wine-wow64", "ps5-audio"};
trust.hash_file = HashFile;
@@ -528,8 +527,9 @@ int main() {
assert(fixture.Verify().status == KitManifestStatus::kVerified);
}
{
+ // Any console firmware is admitted; the kit's list is only what it was tested on.
Fixture fixture; fixture.RewriteManifest("99.99");
- CheckRejected(fixture.Verify(), KitManifestStatus::kUnsupportedFirmware);
+ assert(fixture.Verify().status == KitManifestStatus::kVerified);
}
{
Fixture fixture; fixture.RewriteManifest("12.02", "../escape");
diff --git a/tests/runtime_kit_trust_test.cpp b/tests/runtime_kit_trust_test.cpp
index 6682abe..4962417 100644
--- a/tests/runtime_kit_trust_test.cpp
+++ b/tests/runtime_kit_trust_test.cpp
@@ -30,7 +30,7 @@ int main(int argc, char** argv) {
CHECK(lock && lock->is_object());
const auto& kit = Get(*lock, "prospero_kit");
const auto field = [&](const char* name) { return Get(kit, name).text(); };
- const auto config = DevelopmentKitAdmission("13.60");
+ const auto config = DevelopmentKitAdmission();
CHECK(field("kit_id") == kDevelopmentKitId && field("console_root") == kDevelopmentKitRoot);
CHECK(field("manifest_sha256") == config.expected_manifest_sha256);
// Everything the tested kit offers is something this build can use.
@@ -53,9 +53,6 @@ int main(int argc, char** argv) {
std::vector<std::string>{"any-title-" + field("wrapper_revision").substr(0, 7)});
CHECK(admitted.view->variants.size() == 1 && admitted.view->variants.front().any_title);
CHECK(KitVariantFor(*admitted.view, "FAKE78011") == &admitted.view->variants.front());
- // Unknown or other firmware is refused.
- CHECK(VerifyInstalledKit(std::filesystem::canonical(root), DevelopmentKitAdmission("")).status != KitManifestStatus::kVerified);
- CHECK(VerifyInstalledKit(std::filesystem::canonical(root), DevelopmentKitAdmission("12.02")).status != KitManifestStatus::kVerified);
std::puts("development kit admitted and recognised as the expected kit");
return 0;
}