summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/card_image.cpp20
-rw-r--r--src/core/file_sys/card_image.h4
2 files changed, 24 insertions, 0 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp
index 626ed0042..9fb6e0178 100644
--- a/src/core/file_sys/card_image.cpp
+++ b/src/core/file_sys/card_image.cpp
@@ -175,6 +175,26 @@ VirtualDir XCI::GetParentDirectory() const {
return file->GetContainingDirectory();
}
+VirtualDir XCI::ConcatenatedPseudoDirectory() {
+ const auto out = std::make_shared<VectorVfsDirectory>();
+ for (const auto& part_id : {XCIPartition::Normal, XCIPartition::Logo, XCIPartition::Secure}) {
+ const auto& part = GetPartition(part_id);
+ if (part == nullptr)
+ continue;
+
+ for (const auto& file : part->GetFiles())
+ out->AddFile(file);
+ }
+
+ return out;
+}
+
+std::array<u8, 0x200> XCI::GetCertificate() const {
+ std::array<u8, 0x200> out;
+ file->Read(out.data(), out.size(), GAMECARD_CERTIFICATE_OFFSET);
+ return out;
+}
+
Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) {
const auto partition_index = static_cast<std::size_t>(part);
const auto& partition = partitions[partition_index];
diff --git a/src/core/file_sys/card_image.h b/src/core/file_sys/card_image.h
index a350496f7..5a83acc1c 100644
--- a/src/core/file_sys/card_image.h
+++ b/src/core/file_sys/card_image.h
@@ -91,6 +91,8 @@ public:
VirtualDir GetLogoPartition() const;
u64 GetProgramTitleID() const;
+ u32 GetSystemUpdateVersion();
+ u64 GetSystemUpdateTitleID() const;
bool HasProgramNCA() const;
VirtualFile GetProgramNCAFile() const;
@@ -120,6 +122,8 @@ private:
std::shared_ptr<NCA> program;
std::vector<std::shared_ptr<NCA>> ncas;
+ u64 update_normal_partition_end;
+
Core::Crypto::KeyManager keys;
};
} // namespace FileSys