summaryrefslogtreecommitdiff
path: root/src/core/loader (follow)
Commit message (Collapse)AuthorAgeFilesLines
* loader/nso: Remove left-in debug pragmaGravatar Lioncash2019-04-301-2/+0
| | | | Unintentionally introduced in 552d5071fa171165e4054392d8bb6bf2ecc924e2
* core/core: Move process execution start to System's Load()Gravatar Lioncash2019-04-1117-98/+128
| | | | | | | | | This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
* Merge pull request #1957 from DarkLordZach/title-providerGravatar bunnei2019-04-091-2/+4
|\ | | | | file_sys: Provide generic interface for accessing game data
| * patch_manager: Dump NSO name with build IDGravatar Zach Hilman2019-03-271-2/+4
| |
* | core: Add missing override specifiers where applicableGravatar Lioncash2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | Applies the override specifier where applicable. In the case of destructors that are defaulted in their definition, they can simply be removed. This also removes the unnecessary inclusions being done in audin_u and audrec_u, given their close proximity.
* | Merge pull request #2093 from FreddyFunk/disk-cache-better-compressionGravatar bunnei2019-04-031-10/+7
|\ \ | | | | | | Better LZ4 compression utilization for the disk based shader cache and the yuzu build system
| * | Addressed feedbackGravatar unknown2019-03-291-4/+4
| | |
| * | core: Do not link LZ4 to core. Use common/data_compression for nso segment ↵Gravatar unknown2019-03-291-10/+7
| |/ | | | | | | decompression instead.
* | Merge pull request #2281 from lioncash/memoryGravatar bunnei2019-04-013-3/+3
|\ \ | |/ |/| kernel/codeset: Make CodeSet's memory data member a regular std::vector
| * kernel/codeset: Make CodeSet's memory data member a regular std::vectorGravatar Lioncash2019-03-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | The use of a shared_ptr is an implementation detail of the VMManager itself when mapping memory. Because of that, we shouldn't require all users of the CodeSet to have to allocate the shared_ptr ahead of time. It's intended that CodeSet simply pass in the required direct data, and that the memory manager takes care of it from that point on. This means we just do the shared pointer allocation in a single place, when loading modules, as opposed to in each loader.
* | Merge pull request #2280 from lioncash/nsoGravatar bunnei2019-03-232-59/+81
|\ \ | | | | | | loader/nso: Minor refactoring
| * | loader/nso: Place translation unit specific functions into an anonymous ↵Gravatar Lioncash2019-03-221-20/+21
| | | | | | | | | | | | | | | | | | | | | namespace Makes it impossible to indirectly violate the ODR in some other translation unit due to these existing.
| * | loader/nso: Clean up use of magic constantsGravatar Lioncash2019-03-221-4/+6
| | | | | | | | | | | | | | | Now that the NSO header has the proper size, we can just use sizeof on it instead of having magic constants.
| * | file_sys/patch_manager: Deduplicate NSO headerGravatar Lioncash2019-03-222-50/+57
| | | | | | | | | | | | | | | | | | This source file was utilizing its own version of the NSO header. Instead of keeping this around, we can have the patch manager also use the version of the header that we have defined in loader/nso.h
| * | loader/nso: Fix definition of the NSO header structGravatar Lioncash2019-03-221-3/+15
| |/ | | | | | | | | | | | | | | The total struct itself is 0x100 (256) bytes in size, so we should be providing that amount of data. Without the data, this can result in omitted data from the final loaded NSO file.
* / file_sys/cheat_engine: Remove use of global system accessorsGravatar Lioncash2019-03-221-4/+4
|/ | | | | Instead, pass in the core timing instance and make the dependency explicit in the interface.
* Merge pull request #1933 from DarkLordZach/cheat-engineGravatar bunnei2019-03-211-0/+12
|\ | | | | file_sys: Implement parser and interpreter for game memory cheats
| * vm_manager: Remove cheat-specific ranges from VMManagerGravatar Zach Hilman2019-03-053-11/+4
| |
| * loader/nso: Set main code region in VMManagerGravatar Zach Hilman2019-03-043-2/+21
| | | | | | | | For rom directories (and by extension, XCI/NSP/NAX/NCA) this is for the NSO with name 'main', for regular NSOs, this is the NSO.
* | kernel: Move CodeSet structure to its own source filesGravatar Lioncash2019-03-203-0/+3
| | | | | | | | | | | | | | | | Given this is utilized by the loaders, this allows avoiding inclusion of the kernel process definitions where avoidable. This also keeps the loading format for all executable data separate from the kernel objects.
* | loader: Remove Linker classGravatar Lioncash2019-03-192-183/+0
| | | | | | | | Given the class is now currently unused, it can be removed.
* | loader: Remove Linker inheritance from NRO and NSO loadersGravatar Lioncash2019-03-192-4/+4
|/ | | | | | Neither the NRO or NSO loaders actually make use of the functions or members provided by the Linker interface, so we can just remove the inheritance altogether.
* loader: Propagate NCA logo section to ReadBanner and ReadLogoGravatar Zach Hilman2019-01-159-0/+61
|
* web_browser: Add bounds checking to applet interfaceGravatar Zach Hilman2018-12-282-2/+0
|
* loader: Add accessor for Manual RomFSGravatar Zach Hilman2018-12-285-0/+30
|
* Merge pull request #1928 from lioncash/capsGravatar bunnei2018-12-273-2/+9
|\ | | | | kernel: Handle kernel capability descriptors
| * kernel/process: Hook up the process capability parser to the process itselfGravatar Lioncash2018-12-213-2/+9
| | | | | | | | | | While we're at it, we can also toss out the leftover capability parsing from Citra.
* | loader: Add accessor for game control dataGravatar Zach Hilman2018-12-275-9/+14
|/
* Merge pull request #1819 from DarkLordZach/disable-addonsGravatar bunnei2018-12-105-0/+26
|\ | | | | patch_manager: Add support for disabling patches
| * loader: Add support for reading the name of game's developerGravatar Zach Hilman2018-12-035-0/+26
| |
* | loaders: Make GetFileType() a const qualified member functionGravatar Lioncash2018-12-0510-10/+10
| | | | | | | | | | | | No implementations actually modify instance state (and it would be questionable to do that in the first place given the name), so we can make this a const member function.
* | loader/nso: Remove dependency on the System classGravatar Lioncash2018-12-023-8/+11
| | | | | | | | | | Similar to the NRO changes, we can also pass the process explicitly as a parameter from Load instead of indirecting through the System class.
* | loader/nro: Make the static LoadNro function internally linkedGravatar Lioncash2018-12-022-7/+5
| | | | | | | | | | This simply acts as a forwarding function for the Load() function, so this doesn't need to be directly exposed.
* | loader/nro: Remove dependency on the System classGravatar Lioncash2018-12-022-10/+13
|/ | | | | | Load() is already given the process instance as a parameter, so instead of coupling the class to the System class, we can just forward that parameter to LoadNro()
* Merge pull request #1620 from DarkLordZach/ldr-roGravatar bunnei2018-11-181-2/+5
|\ | | | | ldr_ro: Complete LDR:RO implementation
| * process: Make MirrorMemory take state to map new memory asGravatar Zach Hilman2018-11-151-2/+5
| | | | | | | | Credits to Subv
* | Merge pull request #1618 from DarkLordZach/dump-nsoGravatar bunnei2018-11-151-1/+1
|\ \ | |/ |/| patch_manager: Add support for dumping uncompressed NSOs
| * patch_manager: Add support for dumping decompressed NSOsGravatar Zach Hilman2018-10-291-1/+1
| | | | | | | | 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.
* | Merge pull request #1608 from DarkLordZach/save-data-readerGravatar bunnei2018-11-131-0/+5
|\ \ | | | | | | [ns|fsp_srv]: Implement various functions to boot Checkpoint
| * | loader/nro: Call RegisterRomFS from LoadGravatar Zach Hilman2018-10-291-0/+5
| |/ | | | | | | Allows NRO homebrew to use the RomFS in the ASET section.
* / global: Use std::optional instead of boost::optional (#1578)Gravatar Frederic L2018-10-301-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
* loader/nsp: Move secondary loader initialization to constructorGravatar Zach Hilman2018-10-271-17/+20
| | | | Prevents nullptr bug when trying to dump the RomFS of an NSP resulting from secondary_loader not being initialized.
* nro: Make LoadNro method accessible outside of apploader code.Gravatar bunnei2018-10-252-6/+18
|
* XCI: Add function for checking the existence of the program NCAGravatar Lioncash2018-10-161-2/+1
| | | | | | 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.
* nso: Return an optional address from LoadModuleGravatar Lioncash2018-10-155-16/+29
| | | | | If a malformed NSO is attempted to be loaded, we shouldn't continue onwards. We should be reporting an error and bailing out.
* nso: Make LoadModule take a VfsFile by const referenceGravatar Lioncash2018-10-143-11/+9
|
* nro: Make LoadNro take a VfsFile by const referenceGravatar Lioncash2018-10-142-6/+6
| | | | | | 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.
* kernel/process: Make CodeSet a regular non-inherited objectGravatar Lioncash2018-10-123-43/+31
| | | | | | | | 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.
* patch_manager: Return a std::unique_ptr from ParseControlNCA() and ↵Gravatar Lioncash2018-10-094-4/+4
| | | | | | | | | | | | | | | | 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.
* nso/nro: Use default allocation size for arg_dataGravatar Zach Hilman2018-10-074-14/+20
|