summaryrefslogtreecommitdiffstats
path: root/src/core/loader/loader.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L1-2/+3
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-15nso: Return an optional address from LoadModuleLioncash1-0/+1
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-2/+12
Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
2018-09-29loader: Make the Load() function take a process as a regular reference, not a SharedPtrLioncash1-2/+1
A process should never require being reference counted in this situation. If the handle to a process is freed before this function is called, it's definitely a bug with our lifetime management, so we can put the requirement in place for the API that the process must be a valid instance.
2018-09-04bktr: Implement IVFC offset shiftingZach Hilman1-0/+9
Fixes base game read errors
2018-09-04bktr: Fix missing includes and optimize styleZach Hilman1-1/+1
2018-09-04loader: Add BKTR-specific error messages and codesZach Hilman1-6/+14
2018-09-04loader: Add NSP file type and NSP-specific errorsZach Hilman1-0/+2
2018-09-02vfs_real: Forward declare IOFileLioncash1-4/+2
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-0/+13
2018-08-23nax: Add AppLoader_NAX and update loader to support itZach Hilman1-0/+1
2018-08-15loader: Make ResultStatus directly compatible with fmtLioncash1-2/+2
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-7/+0
These mappings are leftovers from citra and don't apply to the Switch.
2018-08-12made ResultStatus a u16David Marcec1-1/+1
2018-08-10loader: Add more descriptive errorsZach Hilman1-9/+37
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09loader: Remove unused IdentifyFile overloadZach Hilman1-8/+0
2018-08-07Avoid parsing RomFS to directory in NCAZach Hilman1-1/+1
2018-08-02kernel: Move object class to its own source filesLioncash1-1/+1
General moving to keep kernel object types separate from the direct kernel code. Also essentially a preliminary cleanup before eliminating global kernel state in the kernel code.
2018-08-01Use more descriptive error codes and messagesZach Hilman1-1/+2
2018-08-01Remove files that are not usedZach Hilman1-0/+1
2018-07-24core: Make converting constructors explicit where applicableLioncash1-1/+1
Avoids unwanted implicit conversions. Thankfully, given the large amount of cleanup in past PRs, only this tiny amount is left over to cover.
2018-07-19loader: Amend Doxygen commentsLioncash1-3/+3
These weren't adjusted when VFS was introduced
2018-07-19Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman1-18/+12
* Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
2018-07-08Revert "Virtual Filesystem (#597)"bunnei1-12/+18
This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
2018-07-06Virtual Filesystem (#597)Zach Hilman1-18/+12
* 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-06-21Add support for decrypted NCA files (#567)Zach Hilman1-0/+1
* 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-06core, main.h: Abort on 32Bit ROMs (#309)N00byKing1-0/+1
* core, main.h: Abort on 32Bit ROMs * main.cpp: Fix Grammar
2018-01-20loader: Clean up ctors and includes.bunnei1-4/+1
2018-01-20loader: Add DeconstructedRomDirectory for game dumps.bunnei1-0/+1
2018-01-20loader: Refactor to also pass filepath into IdentifyType.bunnei1-1/+2
2017-10-15core: Refactor MakeMagic usage and remove dead code.bunnei1-4/+0
2017-10-13Remove lots more 3DS-specific code.bunnei1-4/+0
2017-10-06loader: Add support for NRO, as well as various fixes and shared linker.bunnei1-0/+1
2017-09-30loader: Add support for loading an NSO.bunnei1-0/+1
2017-09-27Loaders: Don't automatically set the current process every time we load an application.Subv1-5/+8
The loaders will now just create a Kernel::Process, construct it and return it to the caller, which is responsible for setting it as the current process and configuring the global page table.
2017-09-25Loader/NCCH: Add support for loading application updates (#2927)Max Thomas1-0/+13
* loader/ncch: split NCCH parsing into its own file * loader/ncch: add support for loading update NCCHs from the SD card * loader/ncch: fix formatting * file_sys/ncch_container: Return a value for OpenFile * loader/ncch: cleanup, always instantiate overlay_ncch to base_ncch * file_sys/ncch_container: better encryption checks, allow non-app NCCHs to load properly and for the existence of NCCH structures to be checked * file_sys/ncch_container: pass filepath as a const reference
2017-08-04loader: Expose program title.bunnei1-0/+9
2017-06-03Addressed Bunnei's review comments, and made some other tweaks:TheKoopaKingdom1-1/+1
- Deleted GetStatus() because it wasn't used anywhere outside of Core::System. - Fixed design flaw where the message bar status could be set despite the game being stopped.
2017-06-03Created a whitelist of system archives to prevent false positives creating dialogs.TheKoopaKingdom1-3/+1
2017-06-03Made some changes from review comments:TheKoopaKingdom1-5/+6
- Made LoadKernelSystemMode return a pair consisting of a system mode and a result code (Could use review). - Deleted ErrorOpenGL error code in favor of just having ErrorVideoCore. - Made dialog messages more clear. - Compared archive ID in fs_user.cpp to ArchiveIdCode::NCCH as opposed to hex magic. - Cleaned up some other stuff.
2017-06-03Fixed encrypted ROM error messages.TheKoopaKingdom1-3/+5
2017-02-27Doxygen: Amend minor issues (#2593)Mat M1-1/+1
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2016-12-15loader: Implement ReadProgramIdMerryMage1-0/+9
2016-11-28Kernel/Loader: Grab the system mode from the NCCH ExHeader.Subv1-6/+7
3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849
2016-11-20Kernel/Loader: Grab the system mode from the NCCH ExHeader.Subv1-0/+11
3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-1/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-4/+2
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-4/+7
2016-05-21Loader: Split SMDH into its own header and import helpers from QGameListEmmanuel Gil Peyrot1-47/+0
Also rewrite Qt wrappers to use those.
2016-05-21CitraQt: Simplify the game list loader codeEmmanuel Gil Peyrot1-11/+1
2016-05-21Loader: Add a GetFileType method to get the type of a loaded fileEmmanuel Gil Peyrot1-0/+6
2016-05-21Loader, Frontends: Refactor loader creation and game loadingEmmanuel Gil Peyrot1-3/+3
This allows frontends to keep a single loader and use it multiple times e.g. for code loading and SMDH parsing.
2016-05-04add icon & title to game listwwylele1-0/+57
2016-03-21loader: Make MakeMagic constexprLioncash1-1/+1
2015-10-11Loader: Implement encryption checkGareth Poole1-0/+1
2015-10-01Expose loader helper functions for identifying files.archshift1-0/+28
2015-07-14Loader: Remove unnecessary pointer indirection to IOFileYuri Kunde Schlesner1-8/+8
2015-07-14FS: Stream RomFS from file instead of loading all of it to memorycondut1-2/+5
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot1-1/+6
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot1-0/+1
2015-05-09Loader: Remove .bin file supportYuri Kunde Schlesner1-1/+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-1/+1
2015-05-09Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner1-0/+8
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-1/+1
2015-02-03core: Fix some warnings on OSXLioncash1-1/+1
2015-01-15Loader: Guess filetype from the magic, or fallback to the extension.Emmanuel Gil Peyrot1-7/+4
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-1/+6
2014-12-21License changepurpasmart961-1/+1
2014-12-08Loader: Add 3DSX supportichfly1-0/+1
2014-08-31Loader: Added support for loading raw BIN executables.bunnei1-0/+1
- Useful for debugging homebrew Qt: Updated GUI to support loading .bin files.
2014-08-28Loader: Added support for loading raw BIN executables.bunnei1-0/+1
- Useful for debugging homebrew Qt: Updated GUI to support loading .bin files.
2014-07-05NCCH: Updated ExeFS memory allocation to be safer.bunnei1-0/+1
2014-07-05Loader: Updated read methods to be constbunnei1-5/+5
- Required "file" handle to be made local and explicitly opened/closed as needed
2014-06-27Loader: Refactored interface such that data is no longer stored by loader.bunnei1-33/+21
NCCH: Removed extra qualification ‘Loader::AppLoader_NCCH::’.
2014-06-25Loader: Refactored loading functions to only read data from binary if called.bunnei1-8/+8
NCCH: Updated LoadExec to use Memory::WriteBlock function to load binary code.
2014-06-25Loader: Refactored use of const.bunnei1-3/+3
2014-06-25NCCH: Fixes reduce unnecessary logging and load logo/banner/etc. sections correctly.bunnei1-0/+1
Loader: Added ErrorNotUsed ReturnStatus type to specify when something is not used.
2014-06-25Loader: Implemented AppLoader interface for abstracting application loading.bunnei1-12/+91
- 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-14/+1
2014-06-17Loader: Moved elf and loader modules to a "loader" subdirectory.bunnei1-0/+0
2014-05-01- added option to load a code.bin file extracted from a CXI filebunnei1-11/+13
- updated load launcher.dat function to use ARM11 format hack
2014-04-22Add a quick way to load Launcher.dat filesMathieu Vaillancourt1-5/+6
2014-04-09fixed project includes to use new directory structurebunnei1-1/+1
2014-04-09got rid of 'src' folders in each sub-projectbunnei1-0/+0
2014-04-09fixed all license file headers in corebunnei1-27/+4
2013-10-06renamed FILETYPE_CTR_DIRECTORY to FILETYPE_DIRECTORY_CXIShizZy1-1/+1
2013-10-02added an early function for booting from a directoryShizZy1-7/+5
2013-09-20added a module for loading bootable binariesShizZy1-0/+76