summaryrefslogtreecommitdiffstats
path: root/src/core/loader/loader.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-03-03loader: log the type of mismatching file-extensionBytesGalore1-1/+2
2021-07-20file_sys: Support load game collection (#6582)Feng Chen1-5/+8
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-05-26common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph1-1/+1
* common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-16core: Make variable shadowing a compile-time errorLioncash1-1/+1
Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
2021-05-06hle: kernel: Rename Process to KProcess.bunnei1-1/+1
2021-01-03main: Resolve error string not displayingLioncash1-0/+4
During the transition to make the error dialog translatable, I accidentally got rid of the conversion to ResultStatus, which prevented operator<< from being invoked during formatting. This adds a function to directly retrieve the result status string instead so that it displays again.
2020-11-25core: loader: Implement support for loading indexed programs.bunnei1-5/+7
2020-11-18patch_manager: Remove usages of the global system instanceLioncash1-12/+15
With this, only 19 usages of the global system instance remain within the core library. We're almost there.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash1-1/+1
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-07common/concepts: Rename IsBaseOf to DerivedFromLioncash1-1/+1
This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
2020-08-03Place in anonymous namespaceDavid Marcec1-0/+4
2020-08-03loader: Make IdentifyFile typesafeDavid Marcec1-20/+32
Relies on #4465 for concept.h Common::IsBaseOf
2019-06-05loader: Add recognition for KIP file typeZach Hilman1-0/+10
2019-06-05loader: Add KIP and INI file parser-specific errorsZach Hilman1-1/+5
2018-12-21kernel/process: Hook up the process capability parser to the process itselfLioncash1-1/+3
While we're at it, we can also toss out the leftover capability parsing from Citra.
2018-10-15nso: Return an optional address from LoadModuleLioncash1-1/+2
If a malformed NSO is attempted to be loaded, we shouldn't continue onwards. We should be reporting an error and bailing out.
2018-10-05loader: Add getter for packed updateZach Hilman1-1/+2
Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-1/+1
2018-09-04bktr: Fix bucket overlap errorZach Hilman1-2/+2
2018-09-04loader: Add BKTR-specific error messages and codesZach Hilman1-1/+10
2018-09-04loader: Add NSP file type and NSP-specific errorsZach Hilman1-2/+12
2018-09-02vfs_real: Forward declare IOFileLioncash1-1/+4
Eliminates the need to rebuild some source files if the file_util header ever changes. This also uncovered some indirect inclusions, which have also been fixed.
2018-08-23loader: Add new NAX-specific errors and messagesZach Hilman1-1/+14
2018-08-23nax: Add AppLoader_NAX and update loader to support itZach Hilman1-2/+12
2018-08-15loader: Make ResultStatus directly compatible with fmtLioncash1-8/+4
We can make the enum class type compatible with fmt by providing an overload of operator<<. While we're at it, perform proper bounds checking. If something exceeds the array, it should be a hard fail, because it's, without a doubt, a programmer error in this case.
2018-08-15loader: Remove address mapping remnants from citraLioncash1-6/+0
These mappings are leftovers from citra and don't apply to the Switch.
2018-08-12Fixed invalid cast in loaderDavid Marcec1-1/+1
GetMessageForResultStatus takes a u16, not a size_t.
2018-08-12loader: Recognize filename '00' as NCAZach Hilman1-0/+2
Needed to avoid mismatch filetype warnings on split NAND NCAs
2018-08-10loader: Add more descriptive errorsZach Hilman1-0/+49
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09loader: Remove unused IdentifyFile overloadZach Hilman1-4/+0
2018-08-07Avoid parsing RomFS to directory in NCAZach Hilman1-1/+1
2018-08-01Remove files that are not usedZach Hilman1-0/+9
2018-07-23loader: Remove unnecessary constructor call in IdentifyFile()Lioncash1-1/+1
RealVfsFile inherits from VfsFile, the instance from std::make_shared is already compatible with the function argument type, making the copy constructor call unnecessary.
2018-07-22file_util, vfs: Use std::string_view where applicableLioncash1-1/+2
Avoids unnecessary construction of std::string instances where applicable.
2018-07-19loader: Amend Doxygen commentsLioncash1-2/+2
These weren't adjusted when VFS was introduced
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman1-38/+25
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-08Revert "Virtual Filesystem (#597)"bunnei1-25/+38
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-06Virtual Filesystem (#597)Zach Hilman1-38/+25
* Add VfsFile and VfsDirectory classes * Finish abstract Vfs classes * Implement RealVfsFile (computer fs backend) * Finish RealVfsFile and RealVfsDirectory * Finished OffsetVfsFile * More changes * Fix import paths * Major refactor * Remove double const * Use experimental/filesystem or filesystem depending on compiler * Port partition_filesystem * More changes * More Overhaul * FSP_SRV fixes * Fixes and testing * Try to get filesystem to compile * Filesystem on linux * Remove std::filesystem and document/test * Compile fixes * Missing include * Bug fixes * Fixes * Rename v_file and v_dir * clang-format fix * Rename NGLOG_* to LOG_* * Most review changes * Fix TODO * Guess 'main' to be Directory by filename
2018-07-03Rename logging macro back to LOG_*James Rowe1-4/+4
2018-06-21Add support for decrypted NCA files (#567)Zach Hilman1-0/+10
* 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
2018-04-25loader: Move old logging macros over to new fmt-capable onesLioncash1-4/+4
2018-01-20loader: Clean up ctors and includes.bunnei1-3/+1
2018-01-20loader: Add DeconstructedRomDirectory for game dumps.bunnei1-0/+8
2018-01-20loader: Refactor to also pass filepath into IdentifyType.bunnei1-5/+5
2018-01-14Add missing FileType declarations in GuessFromExtension and GetFileTypeStringThog1-0/+8
2017-10-13Remove more 3DS-specific code.bunnei1-2/+0
2017-10-13Remove lots more 3DS-specific code.bunnei1-31/+0
2017-10-10loader: Various improvements for NSO/NRO loaders.bunnei1-2/+2
2017-10-06loader: Add support for NRO, as well as various fixes and shared linker.bunnei1-0/+6
2017-09-30loader: Add support for loading an NSO.bunnei1-0/+6
2017-03-08loader: lower file name logging levelwwylele1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-2/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-7/+8
2016-05-21CitraQt: Simplify the game list loader codeEmmanuel Gil Peyrot1-3/+11
2016-05-21Loader, Frontends: Refactor loader creation and game loadingEmmanuel Gil Peyrot1-43/+7
This allows frontends to keep a single loader and use it multiple times e.g. for code loading and SMDH parsing.
2016-05-06fix:return proper errorwwylele1-2/+3
2016-05-04add icon & title to game listwwylele1-19/+31
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage1-3/+2
2016-03-08Improve error report from Init() functionsLittleWhite1-1/+0
Add error popup when citra initialization failed
2016-03-03Display errors in GUI when loading ROM failedLittleWhite1-2/+3
2015-10-01Expose loader helper functions for identifying files.archshift1-13/+13
2015-09-21Implement 3dsx RomFSCruel1-1/+9
2015-09-10General: Fix up doxygen commentsLioncash1-1/+1
2015-08-15Properly indicate that CIA support is not implemented yetBenjamin Barenblat1-0/+4
Make `Loader::LoadFile` return an `ErrorNotImplemented` if you call it on a CIA file.
2015-08-15Give CIA file type a nameBenjamin Barenblat1-0/+2
Make `GetFileTypeString` return ‘CIA’ for CIA (CTR Importable Archive) files.
2015-07-26loader: Remove unnecessary else usagesLioncash1-9/+9
2015-07-14Loader: Remove unnecessary pointer indirection to IOFileYuri Kunde Schlesner1-3/+3
2015-07-14FS: Stream RomFS from file instead of loading all of it to memorycondut1-1/+1
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot1-0/+1
2015-06-28Common: Fix FileUtil includes, and everything relying on those.Emmanuel Gil Peyrot1-0/+1
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-1/+0
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-09Loader: Remove .bin file supportYuri Kunde Schlesner1-19/+0
It is of very limited practical utility currently, and will soon be impossible to support due to more accurate memory map emulation.
2015-05-09Process: Rename StaticAddressMapping => AddressMappingYuri Kunde Schlesner1-2/+2
2015-05-09Process: Support parsing of exheader kernel capsYuri Kunde Schlesner1-0/+1
2015-05-09Kernel: Remove g_program_idYuri Kunde Schlesner1-1/+0
This has been obsoleted by the field in Process.
2015-05-09Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner1-16/+21
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-0/+1
2015-02-12Build: Fixed some warningsSubv1-1/+3
2015-02-10FS: Allow multiple instances of the same archive type to be open at onceYuri Kunde Schlesner1-1/+1
2015-01-30loader: Add missing printf argumentLioncash1-1/+1
2015-01-15Loader: Display the type of the file being loaded.Emmanuel Gil Peyrot1-3/+23
2015-01-15Loader: Guess filetype from the magic, or fallback to the extension.Emmanuel Gil Peyrot1-15/+45
2015-01-15Loader: Keep a reference to the file and pass it to the correct AppLoader, instead of loading it multiple times.Emmanuel Gil Peyrot1-12/+11
2015-01-15Loader: Don’t duplicate the docstring into the cpp file.Emmanuel Gil Peyrot1-5/+0
2015-01-05Fix correct espaceDante384901-2/+2
2015-01-05Add support load 3DS roomDante384901-0/+2
2014-12-21License changepurpasmart961-1/+1
2014-12-20Common: Add a clone of std::make_uniqueYuri Kunde Schlesner1-2/+4
2014-12-18Filesystem/Archives: Implemented the SaveData archiveSubv1-0/+1
The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information Got rid of the code duplication in File and Directory Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive. FS_U: Use the correct error code when a file wasn't found
2014-12-16FS.Archive: Clean up treatment of archives and their handlesYuri Kunde Schlesner1-1/+1
- Refactor FS::Archive internals to make Archive creation and lifetime management clearer. - Remove the "Archive as a File" hack. - Implement 64-bit Archive handles.
2014-12-16Service.FS: Do archive registration using IdCode instead of nameYuri Kunde Schlesner1-1/+1
2014-12-16HLE: Rename namespaces to match move & fix initialization orderYuri Kunde Schlesner1-1/+1
2014-12-16HLE: Move kernel/archive.* to service/fs/Yuri Kunde Schlesner1-1/+1
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-3/+3
2014-12-08Loader: Add 3DSX supportichfly1-0/+7
2014-09-17Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions.Emmanuel Gil Peyrot1-1/+1
2014-09-09core: Prune redundant includesarchshift1-1/+0
2014-09-09Added string_util to common, small changes in loader.cpparchshift1-16/+15
2014-09-09loader.cpp: improved file extension checking, made Upper/LowerStr usefularchshift1-6/+8
Instead of forcibly taking the last 4 characters, it now finds the last extension separator (the period) and takes a substr of its location.
2014-08-31Loader: Added support for loading raw BIN executables.bunnei1-0/+20
- Useful for debugging homebrew Qt: Updated GUI to support loading .bin files.
2014-08-28Loader: Added support for loading raw BIN executables.bunnei1-0/+20
- Useful for debugging homebrew Qt: Updated GUI to support loading .bin files.
2014-07-05FileSys: Added preliminary support for applications reading the RomFS archive.bunnei1-4/+11
Archive: Fixed brace ugliness for neobrain :) FS: Commented out unused local variables to prevent warnings. ...But keeping them here for future use. archive_romfs: Removed unused #include.
2014-06-25Loader: Refactored use of const.bunnei1-2/+2
2014-06-25Loader: Implemented AppLoader interface for abstracting application loading.bunnei1-26/+29
- Various cleanups/refactorings to Loader, ELF, and NCCH modules. - Added AppLoader interface to ELF and NCCH. - Updated Qt/GLFW frontends to check AppLoader ResultStatus. NCCH: Removed extra qualification typos. Loader: Removed unnecessary #include's. NCCH: Improved readability of memcmp statements. NCCH: Added missing space. Elf: Removed unnecessary usage of unique_ptr. Loader: Removed unnecessary usage of unique_ptr.
2014-06-17Loader: Cleaned up and removed unused code, refactored ELF namespace.bunnei1-139/+3
2014-06-17Elf: Renamed modules to be consistent with new loader naming, fixed tabs -> spaces.bunnei1-1/+1
2014-06-17Loader: Added support for booting NCCH executables.bunnei1-0/+5
NCCH: Fixed typo in printing NCCH filename.
2014-06-17Loader: Moved elf and loader modules to a "loader" subdirectory.bunnei1-2/+2
2014-06-16Loader: Added stubbed detection of CXI and CCI files.bunnei1-0/+6
2014-06-16Loader: Removed unused CXI and DAT loading code.bunnei1-76/+0
2014-05-23kernel: refactored function naming to remove "__" prefixbunnei1-3/+3
2014-05-16added ability to load AXF files (same as ELF)bunnei1-0/+3
2014-05-14changed loader to use __KernelLoadExecbunnei1-8/+9
2014-05-01- added option to load a code.bin file extracted from a CXI filebunnei1-3/+50
- updated load launcher.dat function to use ARM11 format hack
2014-04-22Add a quick way to load Launcher.dat filesMathieu Vaillancourt1-0/+54
2014-04-09fixed project includes to use new directory structurebunnei1-6/+8
2014-04-09got rid of 'src' folders in each sub-projectbunnei1-0/+0
2014-04-09fixed all license file headers in corebunnei1-23/+3
2014-04-05added entry point loading from ELF filebunnei1-2/+4
2014-04-01added ELF loading support to loader.cppbunnei1-69/+113
2013-10-06renamed FILETYPE_CTR_DIRECTORY to FILETYPE_DIRECTORY_CXIShizZy1-11/+9
2013-10-02added an early function for booting from a directoryShizZy1-9/+30
2013-09-20added a module for loading bootable binariesShizZy1-0/+123