mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-14 10:58:00 -05:00
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
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user