diff options
author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2018-06-21 11:16:23 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-06-21 11:16:23 -0400 |
commit | 63f26d5c40adb49094b03b232528672f526afe49 (patch) | |
tree | b76a154e17c819df7803d5860f08406446507a5c /src/core/loader/loader.cpp | |
parent | c3e95086b66dfa4214892dcddb9fd6f865037c1e (diff) |
Add support for decrypted NCA files (#567)
* Start to add NCA support in loader
* More nca stuff
* More changes to nca.cpp
* Now identifies decrypted NCA cont.
* Game list fixes and more structs and stuff
* More updates to Nca class
* Now reads ExeFs (i think)
* ACTUALLY LOADS EXEFS!
* RomFS loads and games execute
* Cleanup and Finalize
* plumbing, cleanup and testing
* fix some things that i didnt think of before
* Preliminary Review Changes
* Review changes for bunnei and subv
Diffstat (limited to 'src/core/loader/loader.cpp')
-rw-r--r-- | src/core/loader/loader.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 6a4fd38cbe..20cc0bac01 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -9,6 +9,7 @@ #include "core/hle/kernel/process.h" #include "core/loader/deconstructed_rom_directory.h" #include "core/loader/elf.h" +#include "core/loader/nca.h" #include "core/loader/nro.h" #include "core/loader/nso.h" @@ -32,6 +33,7 @@ FileType IdentifyFile(FileUtil::IOFile& file, const std::string& filepath) { CHECK_TYPE(ELF) CHECK_TYPE(NSO) CHECK_TYPE(NRO) + CHECK_TYPE(NCA) #undef CHECK_TYPE @@ -57,6 +59,8 @@ FileType GuessFromExtension(const std::string& extension_) { return FileType::NRO; else if (extension == ".nso") return FileType::NSO; + else if (extension == ".nca") + return FileType::NCA; return FileType::Unknown; } @@ -69,6 +73,8 @@ const char* GetFileTypeString(FileType type) { return "NRO"; case FileType::NSO: return "NSO"; + case FileType::NCA: + return "NCA"; case FileType::DeconstructedRomDirectory: return "Directory"; case FileType::Error: @@ -104,6 +110,10 @@ static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileTyp case FileType::NRO: return std::make_unique<AppLoader_NRO>(std::move(file), filepath); + // NX NCA file format. + case FileType::NCA: + return std::make_unique<AppLoader_NCA>(std::move(file), filepath); + // NX deconstructed ROM directory. case FileType::DeconstructedRomDirectory: return std::make_unique<AppLoader_DeconstructedRomDirectory>(std::move(file), filepath); |