summaryrefslogtreecommitdiff
path: root/src/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #1415 from DarkLordZach/ipsGravatar bunnei2018-10-048-36/+255
|\ \ \ | | | | | | | | file_sys: Add support for loading IPS patches
| * | | nso: Optimize loading of IPS patchesGravatar Zach Hilman2018-10-025-51/+43
| | | | | | | | | | | | | | | | Avoid resource-heavy classes and remove quasi-duplicated code.
| * | | deconstructed_rom_directory: Force NSO loader to patch NSOsGravatar Zach Hilman2018-10-011-1/+3
| | | |
| * | | nso: Add framework to support patching of uncompressed NSOsGravatar Zach Hilman2018-10-012-2/+17
| | | |
| * | | patch_manager: Add PatchNSO functionGravatar Zach Hilman2018-10-013-0/+104
| | | | | | | | | | | | | | | | While PatchExeFS operated on the entire directory, this function operates on the uncompressed NSO. Avoids copying decompression code to PatchManager.
| * | | patch_manager: Use strings for patch type instead of enumGravatar Zach Hilman2018-10-012-29/+33
| | | |
| * | | file_sys: Implement function to apply IPS patchesGravatar Zach Hilman2018-10-012-0/+103
| | | |
| * | | nso: Replace NSOHeader padding bytes with build IDGravatar Zach Hilman2018-10-011-2/+1
| | |/ | |/|
* | | Merge pull request #1434 from DarkLordZach/dlc-edge-caseGravatar bunnei2018-10-031-1/+1
|\ \ \ | | | | | | | | aoc_u: Fix edge case with DLC that causes breaks
| * | | aoc_u: Fix edge case with DLC that causes breaksGravatar Zach Hilman2018-10-021-1/+1
| |/ / | | | | | | | | | In some games (Splatoon 2 and Splatoon 2 Splatfest World Premiere, notably), pass offset=0 and count=2047 into the ListAddOnContent method which should return all DLCs for the current title. The (presumably) intended behavior is to successfully return a empty array but because of a < v. <= in an if statement, a failure error code was returned causing these games to svcBreak. This fixes that if statement.
* | | Merge pull request #1433 from lioncash/fsGravatar bunnei2018-10-031-0/+2
|\ \ \ | | | | | | | | services/fsp_srv: Amend service function table
| * | | services/fsp_srv: Amend service function tableGravatar Lioncash2018-10-021-0/+2
| | |/ | |/| | | | | | | | | | Adds new functions that have been given names to the table. Information is based off what is provided on Switchbrew.
* | | Merge pull request #1436 from lioncash/viewGravatar bunnei2018-10-032-73/+101
|\ \ \ | | | | | | | | submission_package: Cleanup and bug fixes
| * | | submission_package: Avoid dangling std::string_view within SetTicketKeys()Gravatar Lioncash2018-10-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GetName() returns a std::string by value, not by reference, so after the std::string_view is constructed, it's not well defined to actually execute any member functions of std::string_view that attempt to access the data, as the std::string has already been destroyed. Instead, we can just use a std::string and erase the last four characters.
| * | | submission_package: Correct location of null check within SetTicketKeys()Gravatar Lioncash2018-10-031-3/+6
| | | | | | | | | | | | | | | | | | | | If a ticket file was ever a null pointer, we'd cause a null pointer dereference, as we were calling GetExtension() on the pointer instance.
| * | | submission_package: Use std::string's rfind() when looking for the extension ↵Gravatar Lioncash2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in InitializeExeFSAndRomFS() When searching for a file extension, it's generally preferable to begin the search at the end of the string rather than the beginning, as the whole string isn't going to be walked just to check for something at the end of it.
| * | | submission_package: Ensure the 'extracted' member variable is always initializedGravatar Lioncash2018-10-032-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error occurs when constructing the PartitionFilesystem instance, the constructor would be exited early, which wouldn't initialize the extracted data member, making it possible for other code to perform an uninitialized read by calling the public IsExtractedType() member function. This prevents that.
| * | | submission_package: Move ExeFS and RomFS initialization to its own functionGravatar Lioncash2018-10-032-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the other two bits of factored out code, this can also be put within its own function. We can also modify the code so that it accepts a const reference to a std::vector of files, this way, we can deduplicate the file retrieval. Now the constructor for NSP isn't a combination of multiple behaviors in one spot. It's nice and separate.
| * | | submission_package: Move NCA reading code to its own functionGravatar Lioncash2018-10-032-43/+48
| | | | | | | | | | | | | | | | | | | | | | | | This too, is completely separate behavior from what is in the constructor, so we can move this to its own isolated function to keep everything self-contained.
| * | | submission_package: Move ticket key setting to its own functionGravatar Lioncash2018-10-031-21/+28
| | | | | | | | | | | | | | | | | | | | This behavior is entirely independent of the surrounding code, so it can be put in its own function to keep the behavior separate.
| * | | submission_package: Invert conditionals within NSP's constructor to reduce ↵Gravatar Lioncash2018-10-031-45/+49
| |/ / | | | | | | | | | | | | | | | nesting We can use early continues here to reduce the amount of nesting.
* | | Merge pull request #1432 from lioncash/lblGravatar bunnei2018-10-031-19/+19
|\ \ \ | | | | | | | | service/lbl: Update service function table
| * | | service/lbl: Update service function tableGravatar Lioncash2018-10-021-19/+19
| | |/ | |/| | | | | | | | | | Amends the lbl service table to include new names of functions that were added to Switchbrew.
* | | Merge pull request #1435 from lioncash/xciGravatar bunnei2018-10-031-1/+3
|\ \ \ | |/ / |/| | card_image: Ensure program_nca_status is always initialized
| * | card_image: Ensure program_nca_status is always initializedGravatar Lioncash2018-10-021-1/+3
| |/ | | | | | | | | | | If any of the error paths before the NCA retrieval are taken, it'll result in program_nca_status being left in an inconsistent state. So we initialize it by default with a value indicating an error.
* | aoc_u: Extract AccumulateAOCTitleIDs to separate functionGravatar Zach Hilman2018-09-302-21/+28
| |
* | aoc_u: Implement GetAddOnContentBaseIdGravatar Zach Hilman2018-09-303-5/+8
| | | | | | Command #5
* | aoc_u: Implement Count, List and Prepare AddOnContentGravatar Zach Hilman2018-09-302-3/+78
| | | | | | | | Commands #2, #3, and #7
* | romfs_factory: Read from all locations with StorageId NoneGravatar Zach Hilman2018-09-301-26/+25
| | | | | | | | Previous behavior was to assert. Seems to mirror expected game behavior.
* | patch_manager: Add DLC recognition to PatchManagerGravatar Zach Hilman2018-09-302-0/+27
|/
* Merge pull request #1338 from raven02/service_viGravatar bunnei2018-09-301-1/+19
|\ | | | | Implement ISystemDisplayService::GetDisplayMode
| * Implement ISystemDisplayService::GetDisplayModeGravatar raven022018-09-301-1/+19
| |
* | kernel/svc: Implement svcGetThreadContext()Gravatar Lioncash2018-09-303-2/+37
| | | | | | | | | | | | | | | | | | Now that we have all of the rearranging and proper structure sizes in place, it's fairly trivial to implement svcGetThreadContext(). In the 64-bit case we can more or less just write out the context as is, minus some minor value sanitizing. In the 32-bit case we'll need to clear out the registers that wouldn't normally be accessible from a 32-bit AArch32 exectuable (or process).
* | kernel/process: Add a data member to determine if a process is 64-bit or not.Gravatar Lioncash2018-09-302-0/+11
| | | | | | | | | | | | | | | | | | | | | | This will be necessary for the implementation of svcGetThreadContext(), as the kernel checks whether or not the process that owns the thread that has it context being retrieved is a 64-bit or 32-bit process. If the process is 32-bit, then the upper 15 general-purpose registers and upper 16 vector registers are cleared to zero (as AArch32 only has 15 GPRs and 16 128-bit vector registers. not 31 general-purpose registers and 32 128-bit vector registers like AArch64).
* | kernel/process: Make data member variables privateGravatar Lioncash2018-09-3016-72/+117
| | | | | | | | | | | | | | 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.
* | arm_interface: Add missing fpsr/tpidr members to the ThreadContext structGravatar Lioncash2018-09-303-5/+15
| | | | | | | | | | | | | | | | | | Internally within the kernel, it also includes a member variable for the floating-point status register, and TPIDR, so we should do the same here to match it. While we're at it, also fix up the size of the struct and add a static assertion to ensure it always stays the correct size.
* | loader: Make the Load() function take a process as a regular reference, not ↵Gravatar Lioncash2018-09-2918-42/+28
| | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #1412 from lioncash/moveGravatar bunnei2018-09-292-3/+2
|\ \ | | | | | | kernel/object: Remove unnecessary std::move from DynamicObjectCast()
| * | kernel/object: Remove unnecessary std::move from DynamicObjectCast()Gravatar Lioncash2018-09-282-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | boost::static_pointer_cast for boost::intrusive_ptr (what SharedPtr is), takes its parameter by const reference. Given that, it means that this std::move doesn't actually do anything other than obscure what the function's actual behavior is, so we can remove this. To clarify, this would only do something if the parameter was either taking its argument by value, by non-const ref, or by rvalue-reference.
* | | Merge pull request #1395 from lioncash/vmGravatar bunnei2018-09-2917-158/+413
|\ \ \ | | | | | | | | process/vm_manager: Initial modifications to load NPDM metadata
| * | | memory: Dehardcode the use of fixed memory range constantsGravatar Lioncash2018-09-2411-75/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | svc: Report correct memory-related values within some of the cases in ↵Gravatar Lioncash2018-09-243-28/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svcGetInfo() Previously, these were reporting hardcoded values, but given the regions can change depending on the requested address spaces, these need to report the values that the memory manager contains.
| * | | memory: Dehardcode the use of a 36-bit address spaceGravatar Lioncash2018-09-245-20/+56
| | | | | | | | | | | | | | | | | | | | Given games can also request a 32-bit or 39-bit address space, we shouldn't be hardcoding the address space range as 36-bit.
| * | | process/vm_manager: Amend API to allow reading parameters from NPDM metadataGravatar Lioncash2018-09-2410-38/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1394 from lioncash/streamGravatar bunnei2018-09-271-1/+1
|\ \ \ \ | |_|/ / |/| | | stream: Preserve enum class type in GetState()
| * | | stream: Preserve enum class type in GetState()Gravatar Lioncash2018-09-231-1/+1
| |/ / | | | | | | | | | | | | | | | Preserves the meaning/type-safetiness of the stream state instead of making it an opaque u32. This makes it usable for other things outside of the service HLE context.
* | | Merge pull request #1389 from PhiBabin/valgrindGravatar Mat M2018-09-271-1/+1
|\ \ \ | | | | | | | | FPCR register was uninitialized at start up
| * | | FPCR register was uninitialized at start upGravatar Philippe Babin2018-09-221-1/+1
| | | |
* | | | fsmitm_romfsbuild: std::move std::vector instances in Build()Gravatar Lioncash2018-09-261-2/+2
| | | | | | | | | | | | | | | | | | | | Avoids making copies of large std::vector instances where it's trivially avoidable to do so.
* | | | fsmitm_romfsbuild: Replace manual value aligning with Common::AlignUp()Gravatar Lioncash2018-09-261-12/+11
| | | | | | | | | | | | | | | | | | | | Theres no need to do explicit bitwise arithmetic here, when we have a function that does this with a more descriptive name.