diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-05 18:06:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 18:06:11 -0400 |
commit | a6ae7654105fe6ec46ff0bcabb714b8447b83899 (patch) | |
tree | 0ff4d2396cb0730ec5952181e4e67947b64832ec /src/core/loader/loader.h | |
parent | aba988f71c85a93b7e895cd306e3ecd6408e736f (diff) | |
parent | c913136eb215699f9c8d51a8fd56490b9df7657f (diff) |
Merge pull request #1179 from DarkLordZach/bktr
file_sys: Add support for BKTR format (Game Updates)
Diffstat (limited to 'src/core/loader/loader.h')
-rw-r--r-- | src/core/loader/loader.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index be66b2257..843c4bb91 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h @@ -107,6 +107,14 @@ enum class ResultStatus : u16 { ErrorMissingSDSaveKeySource, ErrorMissingSDNCAKeySource, ErrorNSPMissingProgramNCA, + ErrorBadBKTRHeader, + ErrorBKTRSubsectionNotAfterRelocation, + ErrorBKTRSubsectionNotAtEnd, + ErrorBadRelocationBlock, + ErrorBadSubsectionBlock, + ErrorBadRelocationBuckets, + ErrorBadSubsectionBuckets, + ErrorMissingBKTRBaseRomFS, }; std::ostream& operator<<(std::ostream& os, ResultStatus status); @@ -197,13 +205,22 @@ public: } /** - * Get the update RomFS of the application - * Since the RomFS can be huge, we return a file reference instead of copying to a buffer - * @param file The file containing the RomFS - * @return ResultStatus result of function + * Get whether or not updates can be applied to the RomFS. + * By default, this is true, however for formats where it cannot be guaranteed that the RomFS is + * the base game it should be set to false. + * @return bool whether or not updatable. */ - virtual ResultStatus ReadUpdateRomFS(FileSys::VirtualFile& file) { - return ResultStatus::ErrorNotImplemented; + virtual bool IsRomFSUpdatable() const { + return true; + } + + /** + * Gets the difference between the start of the IVFC header and the start of level 6 (RomFS) + * data. Needed for bktr patching. + * @return IVFC offset for romfs. + */ + virtual u64 ReadRomFSIVFCOffset() const { + return 0; } /** |