aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader
AgeCommit message (Collapse)Author
2018-11-18Merge pull request #1620 from DarkLordZach/ldr-robunnei
ldr_ro: Complete LDR:RO implementation
2018-11-15Merge pull request #1618 from DarkLordZach/dump-nsobunnei
patch_manager: Add support for dumping uncompressed NSOs
2018-11-15process: Make MirrorMemory take state to map new memory asZach Hilman
Credits to Subv
2018-11-13Merge pull request #1608 from DarkLordZach/save-data-readerbunnei
[ns|fsp_srv]: Implement various functions to boot Checkpoint
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L
* 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-29patch_manager: Add support for dumping decompressed NSOsZach Hilman
When enabled in settings, PatchNSO will dump the unmodified NSO that it was passed to a file named <build id>.nso in the dump root for the current title ID.
2018-10-29loader/nro: Call RegisterRomFS from LoadZach Hilman
Allows NRO homebrew to use the RomFS in the ASET section.
2018-10-27loader/nsp: Move secondary loader initialization to constructorZach Hilman
Prevents nullptr bug when trying to dump the RomFS of an NSP resulting from secondary_loader not being initialized.
2018-10-25nro: Make LoadNro method accessible outside of apploader code.bunnei
2018-10-16XCI: Add function for checking the existence of the program NCALioncash
The only reason the getter existed was to check whether or not the program NCA was null. Instead, we can just provide a function to query for the existence of it, instead of exposing it entirely.
2018-10-15nso: Return an optional address from LoadModuleLioncash
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-14nso: Make LoadModule take a VfsFile by const referenceLioncash
2018-10-14nro: Make LoadNro take a VfsFile by const referenceLioncash
This function doesn't need to care about ownership semantics, so we can just pass it a reference to the file itself, rather than a std::shared_ptr alias.
2018-10-12kernel/process: Make CodeSet a regular non-inherited objectLioncash
These only exist to ferry data into a Process instance and end up going out of scope quite early. Because of this, we can just make it a plain struct for holding things and just std::move it into the relevant function. There's no need to make this inherit from the kernel's Object type.
2018-10-09patch_manager: Return a std::unique_ptr from ParseControlNCA() and ↵Lioncash
GetControlMetadata() instead of a std::shared_ptr Neither of these functions require the use of shared ownership of the returned pointer. This makes it more difficult to create reference cycles with, and makes the interface more generic, as std::shared_ptr instances can be created from a std::unique_ptr, but the vice-versa isn't possible. This also alters relevant functions to take NCA arguments by const reference rather than a const reference to a std::shared_ptr. These functions don't alter the ownership of the memory used by the NCA instance, so we can make the interface more generic by not assuming anything about the type of smart pointer the NCA is contained within and make it the caller's responsibility to ensure the supplied NCA is valid.
2018-10-07nso/nro: Use default allocation size for arg_dataZach Hilman
2018-10-07cmd: Support passing game arguments from command lineZach Hilman
Uses -p (--program) and following string as args.
2018-10-07nso/nro: Add NSO arguments structure to data sectionZach Hilman
Only added if arguments string is non-empty and a pass is requested by loader.
2018-10-05romfs_factory: Extract packed update setter to new functionZach Hilman
2018-10-05loader: Add getter for packed updateZach Hilman
Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
2018-10-05loader: Add ReadRomFSIVFCOffset to NSP, XCI, and NAX loadersZach Hilman
Fixes errors with certain updates
2018-10-02nso: Optimize loading of IPS patchesZach Hilman
Avoid resource-heavy classes and remove quasi-duplicated code.
2018-10-01deconstructed_rom_directory: Force NSO loader to patch NSOsZach Hilman
2018-10-01nso: Add framework to support patching of uncompressed NSOsZach Hilman
2018-10-01nso: Replace NSOHeader padding bytes with build IDZach Hilman
2018-09-30kernel/process: Make data member variables privateLioncash
Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
2018-09-29loader: Make the Load() function take a process as a regular reference, not ↵Lioncash
a SharedPtr 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-24memory: Dehardcode the use of fixed memory range constantsLioncash
The locations of these can actually vary depending on the address space layout, so we shouldn't be using these when determining where to map memory or be using them as offsets for calculations. This keeps all the memory ranges flexible and malleable based off of the virtual memory manager instance state.
2018-09-24process/vm_manager: Amend API to allow reading parameters from NPDM metadataLioncash
Rather than hard-code the address range to be 36-bit, we can derive the parameters from supplied NPDM metadata if the supplied exectuable supports it. This is the bare minimum necessary for this to be possible. The following commits will rework the memory code further to adjust to this.
2018-09-21Added support for uncompressed NSOs (#1374)David
* Added support for uncompressed NSOs * Moved compressed section check to NsoHeader
2018-09-19nax: Avoid re-parsing NAX data with GetFileType()Lioncash
An instance of the NAX apploader already has an existing NAX instance in memory. Calling directly into IdentifyType() directly would re-parse the whole file again into yet another NAX instance, only to toss it away again. This gets rid of unnecessary/redundant file parsing and allocations.
2018-09-19nax: Avoid unnecessary calls to AsNCA() in IdentifyType()Lioncash
AsNCA() allocates an NCA instance every time it's called. In the current manner it's used, it's quite inefficient as it's making a redundant allocation. We can just amend the order of the conditionals to make it easier to just call it once.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi
2018-09-13kernel/thread: Include thread-related enums within the kernel namespaceLioncash
Previously, these were sitting outside of the Kernel namespace, which doesn't really make sense, given they're related to the Thread class which is within the Kernel namespace.
2018-09-04bktr: Fix bucket overlap errorZach Hilman
2018-09-04drd: Parse title ID from program metadataZach Hilman
2018-09-04patch_manager: Centralize Control-type NCA parsingZach Hilman
2018-09-04game_list: Fix version display on non-NAND titlesZach Hilman
2018-09-04bktr: Implement IVFC offset shiftingZach Hilman
Fixes base game read errors
2018-09-04bktr: Fix missing includes and optimize styleZach Hilman
2018-09-04loader: Add BKTR-specific error messages and codesZach Hilman
2018-09-04loader: Ignore patches on NRO and DRDZach Hilman
2018-09-04patch_manager: Add usages of patches to ExeFSZach Hilman
2018-09-04main: Only show DRD deprecation warning onceZach Hilman
2018-09-04nsp: Comply with style and performance guidelinesZach Hilman
2018-09-04loader: Add AppLoader for NSP filesZach Hilman
2018-09-04card_image: Parse XCI secure partition with NSPZach Hilman
Eliminated duplicate code and adds support for Rev1+ carts
2018-09-04drd: Load title ID from program metadataZach Hilman
Previously only loaded from control metadata
2018-09-04loader: Add NSP file type and NSP-specific errorsZach Hilman
2018-09-02vfs_real: Forward declare IOFileLioncash
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.