summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* savedata_factory: Detect future save data pathsMorph2022-10-172-9/+53
| | | | Enable compatibility for new account/device save paths planned on a future implementation.
* Merge pull request #6142 from lat9nq/prog_meta_ref_bind_addressbunnei2022-10-072-15/+51
|\ | | | | program_metadata: Avoid reference binding to misaligned address
| * program_metadata: Unpack FileAccessHeader and FileAccessControllat9nq2022-02-132-15/+51
| | | | | | | | | | | | Avoids a reference binding to a misaligned addresses. Unpacking one requires unpacking the other, otherwise there'll be a misaligned address on the leftover one.
* | core: ns: Implement pl:s serviceNarr the Reg2022-09-031-1/+1
| |
* | core/file_sys: fix alignment of BuildIdLiam2022-08-212-3/+3
| |
* | core/file_sys: fix BuildId paddingLiam2022-08-192-11/+7
| |
* | ips_layer: Delimit parsed hex value stringMorph2022-08-121-1/+2
| | | | | | | | Delimits the hex value string on spaces, slashes, carriage returns or newlines, allowing for comments to be added in-line.
* | chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
* | core: Replace all instances of ResultCode with Resultgerman772022-06-271-9/+9
| |
* | general: fix compilation on GCC 12Liam2022-06-141-1/+1
| |
* | common: Change semantics of UNREACHABLE to unconditionally crashLiam2022-06-143-3/+3
| |
* | general: Convert source file copyright comments over to SPDXMorph2022-04-2379-277/+158
| | | | | | | | | | 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.
* | patch_manager: Apply layered exefs patches from 'atmosphere' SD directorytech-ticks2022-04-071-25/+38
| |
* | registered_cache: Prevent nullptr dereference when accumulating filesMorph2022-03-271-2/+4
| | | | | | | | For whatever reason, nca_file/dir can be nullptr in the list of files/dirs. I have not determined the cause of this yet, so add a nullptr check for these prior to dereferencing them.
* | general: Fix clang/gcc build errorsameerj2022-03-201-0/+4
| |
* | common: Reduce unused includesameerj2022-03-191-0/+2
| |
* | core: Reduce unused includesameerj2022-03-192-2/+0
| |
* | Dump patched exefs rather than baseKelebek12022-02-151-9/+9
|/
* general: Replace NonCopyable struct with equivalentsLioncash2022-02-021-3/+15
|
* program_metadata: Add default ThreadInfo kernel capabilityOatmealDome2021-11-111-1/+4
|
* general: Get the current process program id directly from the systemMorph2021-11-041-2/+1
| | | | This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
* general: Rename GetTitleID to GetProgramIDMorph2021-11-041-1/+1
|
* core: Fix transitive include build errorsameerj2021-11-041-0/+2
|
* core: Remove unused includesameerj2021-11-0412-12/+0
|
* general: Remove MakeResult helpersMorph2021-11-023-9/+7
| | | | This is made obsolete by the presence of implicit constructors.
* file_sys: control_metadata: Add BrazilianPortugueseMorph2021-10-292-2/+4
|
* Merge pull request #7102 from Morph1984/remove-boxcatbunnei2021-10-022-101/+0
|\ | | | | Remove Boxcat BCAT backend
| * file_sys: Remove vfs_libzipMorph2021-09-292-101/+0
| |
* | style: Remove extra space preceding the :: operatorMorph2021-09-291-1/+1
|/
* vfs: Partially implement GetFileTimeStampRawMorph2021-09-145-0/+46
| | | | Gets rid of homebrew warnings using this func
* file_sys/kernel_executable: Add missing <string> includeMorph2021-09-111-0/+1
|
* file_sys: Support load game collection (#6582)Feng Chen2021-07-204-46/+57
| | | Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
* content_archive: Remove unnecessary include to <ranges>ReinUsesLisp2021-07-121-1/+0
| | | | Fixes build issues on clang.
* patch_manager: Do not apply LayeredFS mods when dumpingMorph2021-06-282-3/+6
| | | | We should not apply any mods when dumping a game's RomFS.
* filesystem: Open a read-only directory for SDMC modsMorph2021-06-282-14/+16
| | | | This prevents mod files from being locked due to the read-only share flag in Windows.
* core: Simplify SDMC mod loadinglat9nq2021-06-282-20/+8
| | | | | | | | | | If someone else wants to support other mod formats in the SDMC directory, that can be added later. For now, just allow RomFS modding here and force people to do other types of mods the old way. Addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
* core: Support LayeredFS mod from SDMC directorylat9nq2021-06-283-2/+37
| | | | | | Enables loading a mod directly from `[yuzu data directory]/sdmc/atmosphere/contents/[title_id]`. For use with some homebrew mod managers.
* General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash2021-06-231-5/+8
| | | | Also removes some deprecated API usages.
* Merge pull request #6493 from Morph1984/fs-nodiscardbunnei2021-06-231-6/+1
|\ | | | | common: fs: Miscellaneous changes
| * vfs_real: Fix Mode to FileAccessMode conversionMorph2021-06-221-6/+1
| | | | | | | | These enforce requiring the file to exist prior to opening.
* | hle: api_version: Add HLE API version constantsMorph2021-06-161-33/+15
|/
* general: Remove extraneous includesMorph2021-06-132-2/+0
|
* Fix GCC undefined behavior sanitizer.Markus Wick2021-06-101-1/+3
| | | | | | | | | * Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
* fspsrv: Implement DisableAutoSaveDataCreation (#6355)Chloe2021-06-032-1/+8
| | | - Used by Mii Edit
* general: Replace RESULT_UNKNOWN with ResultUnknownMorph2021-06-022-5/+5
| | | | Transition to PascalCase for result names.
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-2610-140/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Merge pull request #6319 from Morph1984/no-install-basebunnei2021-05-172-0/+8
|\ | | | | main: Prevent installing base titles into NAND
| * main: Prevent installing base titles into NANDMorph2021-05-162-0/+8
| | | | | | | | Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
* | core: Make variable shadowing a compile-time errorLioncash2021-05-1612-25/+34
|/ | | | | | 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.
* hle: kernel: Rename Process to KProcess.bunnei2021-05-062-2/+2
|
* Merge pull request #6269 from lioncash/file-shadowbunnei2021-05-0321-114/+132
|\ | | | | file_sys: Resolve cases of variable shadowing
| * file_sys: Resolve cases of variable shadowingLioncash2021-05-0221-114/+132
| | | | | | | | Brings us closer to enabling -Wshadow as an error in the core code.
* | service: filesystem: Return proper error codes for CreateFileMorph2021-05-011-0/+1
|/ | | | | | This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists). This fixes saving and the loading of existing saves in New Pokemon Snap
* Merge pull request #6230 from Morph1984/default-resource-sizebunnei2021-04-242-3/+6
|\ | | | | program_metadata: Set a default resource size when a NPDM is not present
| * program_metadata: Set a default resource size when a NPDM is not presentMorph2021-04-232-3/+6
| | | | | | | | Sets a default size of 0x1FE00000 bytes (510 MiB) for the system_resource_size when a NPDM is not present.
* | program_metadata: Explicitly specify copy/move functionsLioncash2021-04-231-0/+6
|/ | | | | | | | The generation of the copy assignment operators are deprecated on being generated when a user-provided destructor is present. We can explicitly specify that we desire this behavior to keep the class forward compatible with future standards.
* common: Move settings to common from core.bunnei2021-04-151-1/+1
| | | | - Removes a dependency on core and input_common from common.
* pctl: Rework how pctl works to be more accurateChloe Marcec2021-03-262-0/+10
| | | | Introduces the usage of compatibilities to allow it the module to be closer to how it works on hardware.
* Merge pull request #6070 from Morph1984/sysver-11.0.1bunnei2021-03-171-5/+5
|\ | | | | system_version: Update to 11.0.1
| * system_version: Update to 11.0.1Morph2021-03-141-5/+5
| |
* | system_archive: Update NgWord archive versionMorph2021-03-141-2/+2
|/
* vfs_real: When moving files or directories, don't assume file opening will succeedcomex2021-01-231-4/+10
| | | | | | | Found this via a warning, but it's a substantive fix. Since this is only for a cache, it should be safe to silently drop the entry if opening fails. I think.
* core: Silence Wclass-memaccess warningsReinUsesLisp2021-01-151-2/+2
| | | | | This requires making several types trivial and properly initialize them whenever they are called.
* common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp2021-01-151-12/+12
| | | | INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
* file_sys/registered_cache: Silence virtual functions without override warningsReinUsesLisp2021-01-091-4/+4
|
* core: Silence warnings when compiling without assertsReinUsesLisp2021-01-052-2/+3
|
* system_archive: Add + and - buttons to the Nintendo Extended OSS fontMorph2020-12-182-315/+343
|
* system_archive: Update Nintendo Extended OSS fontMorph2020-12-172-182/+347
| | | | Co-authored-by: Its-Rei <kupfel@gmail.com>
* Merge pull request #5119 from Morph1984/fs-opendatastoragewithprogramindexbunnei2020-12-154-2/+84
|\ | | | | fsp_srv: Implement OpenDataStorageWithProgramIndex
| * fsp_srv: Implement OpenDataStorageWithProgramIndexMorph2020-12-082-0/+26
| | | | | | | | - Used by RollerCoaster Tycoon 3: Complete Edition
| * file_sys: Consolidate common Title ID operationsMorph2020-12-082-2/+58
| |
* | Merge pull request #5183 from lioncash/alias2bunnei2020-12-1219-127/+133
|\ \ | | | | | | vfs: Use existing type aliases consistently
| * | vfs: Use existing type aliases consistentlyLioncash2020-12-1019-127/+133
| | | | | | | | | | | | | | | Makes use of the VirtualDir and VirtualFile aliases across the board instead of having a few isolated places that don't use it.
* | | Revert "Merge pull request #5176 from Morph1984/fix-createfile"Morph2020-12-121-6/+2
|/ / | | | | | | | | This reverts commit 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76, reversing changes made to 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a.
* | vfs_real: Fix CreateFile for files without a file extensionMorph2020-12-091-2/+6
| |
* | core: Remove unnecessary enum casts in log callsLioncash2020-12-081-8/+11
|/ | | | | Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
* video_core: Resolve more variable shadowing scenarios pt.3Lioncash2020-12-051-6/+6
| | | | | Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
* system_version: Update to 11.0.0Chloe Marcec2020-12-051-6/+6
|
* savedata_factory: Eliminate usage of the global system instanceLioncash2020-11-272-11/+18
| | | | Now there's only two meaningful instances left in core.
* core: loader: Implement support for loading indexed programs.bunnei2020-11-254-7/+10
|
* patch_manager: Remove usages of the global system instanceLioncash2020-11-183-48/+52
| | | | | | | With this, only 19 usages of the global system instance remain within the core library. We're almost there.
* Revert "core: Fix clang build"bunnei2020-10-215-37/+23
|
* core: Fix clang buildLioncash2020-10-185-23/+37
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* core/CMakeLists: Make some warnings errorsLioncash2020-10-134-7/+9
| | | | | | | | | Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors.
* Merge pull request #3929 from FearlessTobi/ticket-keysbunnei2020-10-132-32/+30
|\ | | | | file_sys/nsp: Make SetTicketKeys actually do something
| * file_sys/nsp: Make SetTicketKeys actually do somethingFearlessTobi2020-07-182-32/+30
| | | | | | | | | | Previously, the method wasn't modifying any class state and therefore not having any effects when called. Since this has been the case for a very long time now, I'm not sure if we couldn't just remove this method altogether.
* | submission_package: Fix updates integrated into cartridge images.Morph2020-09-241-3/+22
| |
* | General: Make use of std::nullopt where applicableLioncash2020-09-224-14/+18
| | | | | | | | | | | | | | | | Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
* | ips_layer: Eliminate a redundant copy in Parse()Lioncash2020-09-221-2/+4
| | | | | | | | Prevents unnecessary copying of the line being parsed.
* | Merge pull request #4675 from Morph1984/fix-boot-multicontentbunnei2020-09-221-5/+5
|\ \ | | | | | | submission_package: Account for multi-content NSPs
| * | submission_package: Account for multi-content NSPsMorph2020-09-181-5/+5
| | | | | | | | | | | | | | | | | | | | | Previously we assumed a submission package can only contain one Program NCA with a single TitleID. However, Super Mario 3D All-Stars contains four Program NCAs, each with their unique TitleIDs. This accounts for the existence of multi-content games such as this one. - Fixes booting Super Mario 3D All-Stars from the games list.
* | | control_metadata: Resolve typo in Portuguese language nameLioncash2020-09-171-1/+1
| | | | | | | | | | | | This isn't used anywhere, so this is a trivial fix.
* | | file_sys/romfs_factory: Eliminate usage of the global system accessorLioncash2020-09-172-28/+43
| | |
* | | file_sys/bis_factory: Eliminate usage of the global system accessorLioncash2020-09-172-6/+6
| | |
* | | Merge pull request #4658 from lioncash/copy3Rodrigo Locatti2020-09-162-44/+43
|\ \ \ | | | | | | | | nca_patch: Reduce stack usage size within SearchBucketEntry()
| * | | nca_patch: Significantly reduce the stack usage size within SearchBucketEntry()Lioncash2020-09-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this function was using ~16KB of stack (16528 bytes), which was caused by the function arguments being taken by value rather than by reference. We can make this significantly lighter on the stack by taking them by reference.
| * | | nca_patch: Make SearchBucketEntry() internally linkedLioncash2020-09-152-44/+43
| | | | | | | | | | | | | | | | | | | | This is only used internally and doesn't depend on any class state, so we can make it fully internal.
* | | | cheat_engine: Remove unnecessary system argument to CheatParser's Parse functionLioncash2020-09-151-9/+5
|/ / / | | | | | | | | | | | | This isn't used within the function at all in any implementations, so we can remove it entirely.
* | | patch_manager: Resolve implicit truncations in FormatTitleVersion()Lioncash2020-09-151-3/+4
| | | | | | | | | | | | | | | | | | We make it explicit that we're truncating arithmetic here to resolve compiler warnings (even if the sizes weren't u32/u64 arithmetic generally promotes to int :<)
* | | patch_manager: Make use of type aliasesLioncash2020-09-152-69/+79
| | | | | | | | | | | | | | | We can use these to avoid typing the same type redundantly. This way, if these ever change, only a single location needs to be modified.
* | | patch_manager: Make a few functions internally linkedLioncash2020-09-152-15/+12
|/ / | | | | | | | | These functions are only used within this translation unit, so we can make them internally linked.
* | file_sys/patch_manager: Add missing includeReinUsesLisp2020-09-031-0/+1
| | | | | | | | Fixes build issues
* | Merge pull request #4564 from lioncash/file-includebunnei2020-09-0325-37/+64
|\ \ | | | | | | file_sys: Replace inclusions with forward declarations where applicable
| * | file_sys: Replace inclusions with forward declarations where applicableLioncash2020-08-2325-37/+64
| | | | | | | | | | | | Same behavior, minus unnecessary inclusions where not necessary.
* | | Merge pull request #4563 from lioncash/rcachebunnei2020-08-251-17/+16
|\ \ \ | | | | | | | | registered_cache: Make use of designated initializers
| * | | registered_cache: Make use of ends_with for string suffix checkingLioncash2020-08-231-2/+1
| | | | | | | | | | | | | | | | Simplifies code.
| * | | registered_cache: Make use of designated initializersLioncash2020-08-231-15/+15
| |/ / | | | | | | | | | Removes the need for comments to indicate the fields being assigned.
* | | vfs_real: Resolve sign conversion warningsLioncash2020-08-181-2/+2
| | |
* | | vfs_real: Avoid redundant map lookupsLioncash2020-08-181-30/+46
|/ / | | | | | | | | Avoids some trivially avoidable map lookups by keeping the result of find operations around and querying them.
* | common/fileutil: Convert namespace to Common::FSLioncash2020-08-167-119/+130
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | General: Tidy up clang-format warnings part 2Lioncash2020-08-131-3/+3
| |
* | Merge pull request #4488 from lioncash/filebunnei2020-08-094-41/+41
|\ \ | | | | | | vfs_vector: Make creation of array vfs files less verbose
| * | vfs_vector: Make creation of array vfs files less verboseLioncash2020-08-054-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | We can add a helper function to make creation of these files nicer. While we're at it, we can eliminate an unnecessary std::array copy in the constructor. This makes the overhead on some of these functions way less intensive, given some arrays were quite large. e.g. The timezone location names are 9633 bytes in size.
* | | Merge pull request #4484 from lioncash/aesutilbunnei2020-08-062-4/+6
|\ \ \ | |/ / |/| | aes_util: Allow SetIV() to be non-allocating
| * | aes_util: Allow SetIV to be non-allocatingLioncash2020-08-032-4/+6
| | | | | | | | | | | | | | | | | | In a few places, the data to be set as the IV is already within an array. We shouldn't require this data to be heap-allocated if it doesn't need to be. This allows certain callers to reduce heap churn.
* | | Merge pull request #4476 from lioncash/tzbunnei2020-08-051-17/+25
|\ \ \ | | | | | | | | time_zone_binary: Make use of designated initializers
| * | | time_zone_binary: Make use of designated initializersLioncash2020-08-031-17/+25
| |/ /
* | | Merge pull request #4470 from lioncash/qualifierDavid2020-08-041-2/+2
|\ \ \ | | | | | | | | patch_manager: Resolve -Wignored-qualifier warnings
| * | | patch_manager: Resolve -Wignored-qualifier warningsLioncash2020-08-031-2/+2
| | |/ | |/| | | | | | | | | | Top level const will always be ignored in this case, so it can be removed.
* | | Merge pull request #4456 from Morph1984/stub-really-long-fs-funcbunnei2020-08-042-29/+51
|\ \ \ | | | | | | | | fsp-srv: Stub Read/WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute
| * | | fs: Rename SaveDataDescriptor to SaveDataAttributeMorph2020-07-302-29/+51
| | |/ | |/|
* | | Merge pull request #4468 from lioncash/regcachebunnei2020-08-031-10/+15
|\ \ \ | | | | | | | | registered_cache: Resolve -Wmaybe_uninitialized warnings
| * | | registered_cache: Resolve -Wmaybe_uninitialized warningsLioncash2020-08-031-10/+15
| | |/ | |/| | | | | | | While we're at it, we can avoid a redundant map lookup.
* | | Merge pull request #4467 from lioncash/modebunnei2020-08-032-18/+21
|\ \ \ | |_|/ |/| | file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with Mode
| * | file_sys/mode: Make use of DECLARE_ENUM_FLAG_OPERATORS with ModeLioncash2020-08-032-18/+21
| |/ | | | | | | Same behavior, minus a hand-rolled operator.
* | xts_archive: Check if the file is nullptr prior to parsingMorph2020-07-291-5/+9
| | | | | | | | Fixes an access violation where the file no longer exists at the specified path while being parsed.
* | registered_cache: Add support for removing folder ncasMorph2020-07-292-53/+54
|/
* Merge pull request #4309 from Morph1984/fix-romfs-bugbunnei2020-07-174-10/+10
|\ | | | | fs: Fix RomFS building when zero byte files are present
| * fs: Fix RomFS building when zero byte files are presentMorph2020-07-124-10/+10
| | | | | | | | | | | | When zero byte files are present, the key (offset) for that file is identical to the file right after. A std::map isn't able to fit key-value pairs with identical keys (offsets), therefore, the solution is to use std::multimap which permits multiple entries with the same key. This most prominently fixes Pokemon Sword and Shield weather with any RomFS mod applied.
* | Check for empty section0 and CNMT prior to installMorph2020-07-161-3/+19
| |
* | clang formatMorph2020-07-151-3/+3
| |
* | Use proper install result when overwriting filesMorph2020-07-151-1/+1
| |
* | Remove global system instance and address feedbackMorph2020-07-152-14/+10
| |
* | registered_cache: Remove previous update/dlc if it exists on installMorph2020-07-152-13/+83
| | | | | | | | - This checks for and removes old updates or dlc based on title id. If a content meta nca exists within the registered cache, it will attempt to remove all the ncas associated with the content meta before installing a new update/dlc
* | Merge pull request #4282 from Morph1984/fs-sizebunnei2020-07-142-11/+16
|\ \ | | | | | | filesystem: Set various NAND partition sizes to their defaults
| * | bis_factory: Set User NAND free space to be 1 MiB less than total.Morph2020-07-101-1/+3
| | |
| * | sdmc_factory: Set the SDMC total size to 1 TiBMorph2020-07-101-1/+3
| | | | | | | | | | | | We should not be limited by the SDMC's partition size, set this to 1 TiB. Hardware is limited to the max allowed by the MBR partition table which is 2 TiB.
| * | bis_factory: Use hardware default NAND partition sizesMorph2020-07-101-10/+11
| |/ | | | | | | | | | | Sets the total space of user and system partitions to their hardware defaults. Furthermore, return the total space as free space for the user partition to prevent it from reaching zero. Some games like Bioshock 2 check for the available free space prior to save creation, and we should not be limited by arbitrary limits.
* / vfs_real: Fix MoveFileMorph2020-07-101-10/+17
|/ | | | | | The file wasn't closed prior to being renamed / moved, throwing an error that states "The process cannot access the file because it is being used by another process." Fix this by closing the file prior to a rename / move operation. Fixes saving in Luigi's Mansion 3 and KATANA KAMI: A Way of the Samurai Story.
* key_manager: Correct casing of instance()Lioncash2020-07-017-7/+7
| | | | Our codebase uppercases member function names.
* Merge pull request #3967 from FearlessTobi/keys-singletonDavid2020-07-0110-18/+16
|\ | | | | crypto: Make KeyManager a singleton class
| * crypto: Make KeyManager a singleton classFearlessTobi2020-05-2010-18/+16
| | | | | | | | | | | | Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list. With this change, it is only loaded once. On my system, this decreased game list loading times by a factor of 20.
* | Merge pull request #4099 from MerryMage/macOS-buildbunnei2020-06-201-1/+1
|\ \ | | | | | | Fix compilation on macOS
| * | shared_font: Service::NS::EncryptSharedFont takes a size_t&MerryMage2020-06-181-1/+1
| | |
* | | mii_model: Remove redundant std::moveMerryMage2020-06-191-1/+1
|/ / | | | | | | Named return value optimization automatically applies here.
* | Make copying directory string more conciselat9nq2020-05-281-2/+1
| |
* | Address requested changeslat9nq2020-05-282-4/+4
| |
* | *nix systems can read any-case patch directorieslat9nq2020-05-282-8/+32
| | | | | | | | | | | | Changes many patch_manager functions to use a case-less variant of GetSubdirectory. Fixes patches not showing up on *nix systems when patch directories are named with odd cases, i.e. `exeFS'.
* | Merge pull request #3946 from ogniK5377/sysverdat-10-0-2bunnei2020-05-211-7/+7
|\ \ | | | | | | file_sys: Update SystemVersion archive to version 10.0.2
| * | file_sys: Update SystemVersion archive to version 10.0.2David Marcec2020-05-161-7/+7
| |/
* | file_sys: savefata_factory: Update to support DeviceSaveData.bunnei2020-05-111-3/+6
| |
* | file_sys: control_metadata: Expose device_save_data_size.bunnei2020-05-112-0/+5
|/
* file_sys: program_metadata: Add a helper function for generating reasonable default metadata.bunnei2020-04-212-1/+16
| | | | - We need this for homebrew process initialization.
* core: memory: Move to Core::Memory namespace.bunnei2020-04-172-6/+6
| | | | - helpful to disambiguate Kernel::Memory namespace.
* CMakeLists: Specify -Wextra on linux buildsLioncash2020-04-163-12/+18
| | | | | | | | | | | Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
* file_sys: patch_manager: Return early when there are no layers to apply.bunnei2020-04-141-0/+6
|
* file_sys: fix LayeredFS error when loading some games made with… (#3602)enler2020-04-071-1/+2
| | | * fix LayeredFS error when loading some games made with the Unity
* Revert "system_archive: Fix Korean and Chinese fonts"bunnei2020-01-315-880167/+27164
|
* Merge pull request #3151 from FearlessTobi/fix-koreanbunnei2020-01-305-27164/+880167
|\ | | | | system_archive: Fix Korean and Chinese fonts
| * Disable clang-format for font filesFearlessTobi2020-01-243-0/+6
| |
| * system_archive: Fix Chinese fontFearlessTobi2020-01-192-13582/+694524
| | | | | | | | Adds the proper OSS font for the Chinese language.
| * system_archive: Fix Korean fontFearlessTobi2020-01-192-13582/+185637
| | | | | | | | Fixes Korean fonts when using Open-source system archives.
* | system_archive: Add a basic HLE implementation for time zone binary.bunnei2020-01-043-1/+673
|/
* Merge pull request #3171 from lioncash/internal-linkbunnei2019-11-282-6/+5
|\ | | | | filesys/romfs: Make ProcessFile and ProcessDirectory internally linked
| * filesys/romfs: Remove unused includesLioncash2019-11-272-4/+2
| | | | | | | | | | These inclusions aren't used at all within the public interface, so they can be removed.
| * filesys/romfs: Make ProcessFile and ProcessDirectory internally linkedLioncash2019-11-271-2/+3
| | | | | | | | | | These functions aren't used outside of this file, so we can place them within an anonymous namespace.
* | patch_manager: Adds check for disabled cheats to prevent them from being enabled (#3178)Morph2019-11-281-5/+11
| | | | | | | | | | | | * Adds check for disabled cheats to prevent them from being added to the CheatList * Address feedback
* | file_sys/directory: Make EntryType an enum classLioncash2019-11-271-1/+1
|/ | | | | This can trivially be an enum class rather than a regular enum, making it more strongly typed.
* Merge pull request #3091 from lioncash/core-conversionbunnei2019-11-157-18/+16
|\ | | | | core: Make most implicit type conversion warnings errors on MSVC
| * loader; Resolve sign conversion/truncation errorsLioncash2019-11-123-6/+6
| |
| * file_sys: Resolve sign conversion warningsLioncash2019-11-124-12/+10
| | | | | | | | Resolves a few trivial sign conversion/mismatch errors.
* | Merge pull request #3093 from lioncash/mbedtlsbunnei2019-11-142-6/+6
|\ \ | | | | | | core: Migrate off deprecated mbedtls functions
| * | core: Migrate off deprecated mbedtls functionsLioncash2019-11-122-6/+6
| |/ | | | | | | | | These functions are marked for deprecation and it's recommended that the *_ret variants be used instead.
* / xts_archive: Remove redundant std::string constructorLioncash2019-11-131-2/+1
|/ | | | | We can just call the .data() member of path instead of constructing a completely new string.
* common_func: Use std::array for INSERT_PADDING_* macros.bunnei2019-11-042-30/+28
| | | | - Zero initialization here is useful for determinism.
* savedata_factory: Automatically create certain savedataZach Hilman2019-10-221-0/+12
| | | | | After further hardware investigation, it appears that some games, perhaps those more lazily coded, will not call EnsureSaveData, meaning that they expect the normal (current) save to be automatically made. Additionally, some games do not create a cache or temporary save before use. In these 3 specific instances, the save is created automatically for the game if it doesn't exist.
* Merge pull request #2897 from DarkLordZach/oss-ext-fonts-1bunnei2019-10-1415-5/+73410
|\ | | | | pl_u: Move open source font archives and fix NAND error
| * pl_u: Fix mismatched rebase size error in font encryptionZach Hilman2019-10-131-8/+6
| |
| * pl_u: Use kernel physical memoryZach Hilman2019-10-131-4/+7
| |
| * pl_u: Use OSS system archives if real archives don't existZach Hilman2019-10-131-2/+1
| |
| * system_archive: Synthesize shared fonts system archivesZach Hilman2019-10-133-5/+101
| |
| * externals: Move OSS font data to file_sys in coreZach Hilman2019-10-1312-0/+73309
| |
* | Merge pull request #2930 from DarkLordZach/gamecard-partitionsbunnei2019-10-144-26/+128
|\ \ | |/ |/| file_sys: Add code to access raw gamecard partitions and lazily load them
| * card_image: Implement system update commands in XCIZach Hilman2019-10-132-3/+37
| |
| * card_image: Add accessors for raw partitions in XCIZach Hilman2019-09-232-0/+36
| |
| * card_image: Lazily load partitions in XCIZach Hilman2019-09-232-26/+41
| |
| * pfs: Provide accessors for file sizes and offsetsZach Hilman2019-09-232-0/+17
| |
* | core: Remove Core::CurrentProcess()Lioncash2019-10-061-2/+3
| | | | | | | | | | | | This only encourages the use of the global system instance (which will be phased out long-term). Instead, we use the direct system function call directly to remove the appealing but discouraged short-hand.
* | hle/service: Replace global system instance calls with instance-based onesLioncash2019-10-062-3/+3
| | | | | | | | | | | | | | | | | | | | Migrates the HLE service code off the use of directly accessing the global system instance where trivially able to do so. This removes all usages of Core::CurrentProcess from the service code, only 8 occurrences of this function exist elsewhere. There's still quite a bit of "System::GetInstance()" being used, however this was able to replace a few instances.
* | bcat: Implement DeliveryCacheProgressImpl structureZach Hilman2019-09-301-4/+4
| | | | | | Huge thanks to lioncash for re-ing this for me.
* | boxcat: Use Etag header names for file digestZach Hilman2019-09-301-14/+10
| |
* | filesystem: Add getter for BCAT temporary directoryZach Hilman2019-09-302-0/+7
| |
* | vfs: Add function to extract ZIP file into virtual filesystemZach Hilman2019-09-302-0/+96
|/
* Revert "Merge pull request #2709 from DarkLordZach/oss-ext-fonts-1"David Marcec2019-09-2215-73412/+5
| | | | | This reverts commit fa1c60c33ef88c6cd0b72da46842dc9098db712d, reversing changes made to e34899067b60a69bca02761bd1290c6824bb559a.
* Merge pull request #2535 from DarkLordZach/cheat-v2David2019-09-224-743/+21
|\ | | | | cheat_engine: Use Atmosphere's Cheat VM and fix cheat crash
| * dmnt_cheat_vm: Default initialize structure valuesZach Hilman2019-09-221-2/+1
| |
| * patch_manager: Update cheat parsing for new VMZach Hilman2019-09-222-15/+20
| |
| * cheat_engine: Move to memory and strip VMZach Hilman2019-09-222-726/+0
| | | | | | This is to go with the Atmosphere VM port, now it just contains the callbacks needed for the interface between DmntCheatVm and yuzu, along with the cheat parsers.
* | Merge pull request #2709 from DarkLordZach/oss-ext-fonts-1David2019-09-2215-5/+73412
|\ \ | |/ |/| system_archive: Move shared font data to system_archive and fix extended font data
| * pl_u: Use kernel physical memoryZach Hilman2019-09-221-4/+7
| |
| * pl_u: Use OSS system archives if real archives don't existZach Hilman2019-09-221-2/+1
| |
| * system_archive: Synthesize shared fonts system archivesZach Hilman2019-09-223-5/+101
| |
| * externals: Move OSS font data to file_sys in coreZach Hilman2019-09-2212-0/+73309
| |
* | configure_debug: Move reporting option to loggingZach Hilman2019-09-221-4/+4
| |
* | filesystem: Add const qualification to various accessorsZach Hilman2019-09-216-12/+15
| |
* | yuzu: Port old usages of Filesystem namespace to FilesystemControllerZach Hilman2019-09-213-11/+25
| |
* | card_image: Add accessors for gamecard certificateZach Hilman2019-09-212-0/+9
| | | | | | | | Used by fsp-srv/IDeviceOperator
* | card_image: Add functions to query gamecard update partitionZach Hilman2019-09-212-0/+24
| | | | | | | | Includes version and meta title ID, used by fsp-srv/IDeviceOperator
* | content_archive: Add accessors for Rights ID and SDK VersionZach Hilman2019-09-212-0/+10
| |
* | sdmc_factory: Add SD Card size gettersZach Hilman2019-09-212-0/+12
| |
* | bis_factory: Add getters for NAND partition sizesZach Hilman2019-09-212-0/+38
| |
* | submisson_package: Fix edge case with improperly sized filenamesZach Hilman2019-09-211-1/+2
| | | | | | Prevents a crash if the filename is less than 9 characters long.
* | sdmc_factory: Add accessor for SDMC Album directoryZach Hilman2019-09-212-0/+6
| |
* | sdmc_factory: Add accessor for SDMC PlaceholderCacheZach Hilman2019-09-212-1/+10
| |
* | sdmc_factory: Add accessor for content directoryZach Hilman2019-09-212-0/+7
| |
* | savedata_factory: Implement savedata creation and don't create dir on openZach Hilman2019-09-212-26/+40
| | | | | | Matches hardware behavior and eliminates some nasty behavior we were doing that wasn't hw-accurate at all.
* | patch_manager: Add short-circuit edge-case to GetPatchVersionNamesZach Hilman2019-09-211-0/+2
| | | | | | If title ID is 0, there are no add ons, prevents wasting time looking for them.
* | patch_manager: Add error checking to load dir to prevent crashesZach Hilman2019-09-211-0/+15
| | | | | | Prevents a crash if the load dir would be nullptr, instead logs an error and returns appropriately.
* | registered_cache: Process *.cnmt.nca filesZach Hilman2019-09-211-16/+23
| | | | | | Needed to use the RegisteredCache/PlaceholderCache on gamecards.
* | registered_cache: Implement PlaceholderCache to manage placeholder and installing contentZach Hilman2019-09-212-0/+175
| |
* | bis_factory: Fix mod loader edge-case with homebrew title IDsZach Hilman2019-09-211-1/+1
| | | | | | Fixes a bug where homebrew that has a title ID with the update bit set can cause issues with the PatchManager
* | bis_factory: Add accessors for BIS placeholder cachesZach Hilman2019-09-212-1/+20
| |
* | bis_factory: Add accessor for NAND Image DirectoryZach Hilman2019-09-212-0/+6
| |
* | bis_factory: Add accessors for BIS content directoriesZach Hilman2019-09-212-0/+11
| |
* | bis_factory: Add accessors for BIS partitionsZach Hilman2019-09-212-0/+61
|/
* Merge pull request #2576 from DarkLordZach/nsp-fix-1David2019-09-211-0/+26
|\ | | | | nsp: Fix various errors with loading and processing of extracted NSPs
| * nsp: Correct status codes for extracted NSPsZach Hilman2019-06-101-0/+5
| | | | | | | | Avoids all extracted NSPs being marked as error file type because they don't have program NCAs.
| * nsp: Use title ID from NPDM metadata for extracted type NSPsZach Hilman2019-06-101-0/+21
| | | | | | | | Avoids 0 being used as title ID for all extracted NSPs.
* | Merge pull request #2707 from DarkLordZach/oss-miimodelDavid2019-09-053-1/+61
|\ \ | | | | | | system_archive: Add open-source reimplementation of MiiModel data
| * | system_archive: Add open-source reimplementation of MiiModel dataZach Hilman2019-07-103-1/+61
| | |
* | | Implement MapPhysicalMemory/UnmapPhysicalMemoryMichael Scire2019-07-072-1/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements svcMapPhysicalMemory/svcUnmapPhysicalMemory for Yuzu, which can be used to map memory at a desired address by games since 3.0.0. It also properly parses SystemResourceSize from NPDM, and makes information available via svcGetInfo. This is needed for games like Super Smash Bros. and Diablo 3 -- this PR's implementation does not run into the "ASCII reads" issue mentioned in the comments of #2626, which was caused by the following bugs in Yuzu's memory management that this PR also addresses: * Yuzu's memory coalescing does not properly merge blocks. This results in a polluted address space/svcQueryMemory results that would be impossible to replicate on hardware, which can lead to game code making the wrong assumptions about memory layout. * This implements better merging for AllocatedMemoryBlocks. * Yuzu's implementation of svcMirrorMemory unprotected the entire virtual memory range containing the range being mirrored. This could lead to games attempting to map data at that unprotected range/attempting to access that range after yuzu improperly unmapped it. * This PR fixes it by simply calling ReprotectRange instead of Reprotect.
* | file_sys: Rename other ContentRecordType membersBakugo2019-07-022-3/+3
| |
* | file_sys/registered_cache: Improve missing metadata errorBakugo2019-07-011-2/+2
| | | | | | | | This can happen when installing NSPs too, not just XCIs.
* | file_sys/submission_package: Don't warn about missing DeltaFragment NCAsBakugo2019-07-011-4/+7
| | | | | | | | DeltaFragments are not useful to us and are often not included in patch NSPs.
* | file_sys/registered_cache: Ignore DeltaFragment NCAs during installationBakugo2019-07-011-0/+3
| | | | | | | | DeltaFragments are only used to download and apply partial patches on a real console, and are not useful to us at all. Most patch NSPs do not include them, and when they do, it's a waste of space to install them.
* | file_sys: Rename ContentRecordType::Patch to DeltaFragmentBakugo2019-07-011-1/+1
| | | | | | | | Avoids potential confusion, since patches and DeltaFragments are not the same thing. Actual full patches are listed under the Program type.
* | glue: Correct missing bytes in ApplicationLaunchParameterZach Hilman2019-06-262-7/+10
| |
* | registered_cache: Add getter to determine source slot in content provider unionZach Hilman2019-06-252-0/+17
| | | | | | | | Used to determine StorageId source for application data.
* | patch_manager: Add getter for title versionZach Hilman2019-06-252-2/+14
| |
* | Merge pull request #2546 from DarkLordZach/kipsbunnei2019-06-214-0/+347
|\ \ | | | | | | loader, file_sys: Add support for parsing and loading KIP (Kernel Internal Process) files
| * | kernel_executable: Optimize BLZ decompressionZach Hilman2019-06-071-6/+5
| | |
| * | game_list: Accept *.kip as a file extension of executablesZach Hilman2019-06-051-1/+1
| | |
| * | program_metadata: Add function to load meta from raw parametersZach Hilman2019-06-052-0/+20
| | | | | | | | | | | | Needed for KIP loading as KIPs do not have an NPDM but do have the essential parts of the data within.
| * | file_sys: Add classes to parse KIP1 and INI1 filesZach Hilman2019-06-052-0/+328
| | |
* | | Update content_archive.cppjonsn0w2019-06-201-2/+2
| | | | | | | | | log clutter in debug logs when theres really no need
* | | Addressed issuesDavid Marcec2019-06-171-1/+1
| | |
* | | Impl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & Partial impl of GetAccumulatedSuspendedTickChangedEventDavid Marcec2019-06-162-1/+7
| | | | | | | | | | | | IPC-100 was changed to InitializeApplicationInfoOld instead of InitializeApplicationInfo. IPC-150 makes an indentical call to IPC-100 however does extra processing. They should not have the same name as it's quite confusing to debug.
* | | Merge pull request #2581 from lioncash/hexZach Hilman2019-06-155-17/+22
|\ \ \ | | | | | | | | common/hex_util: Combine HexVectorToString() and HexArrayToString()
| * | | common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash2019-06-125-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
* | | | Merge pull request #2582 from lioncash/reservedbunnei2019-06-141-1/+0
|\ \ \ \ | | | | | | | | | | file_sys/ips_layer: Remove unnecessary reserve() call
| * | | | file_sys/ips_layer: Remove unnecessary reserve() callLioncash2019-06-131-1/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | Given 'replace' is assigned to on the following line, this isn't necessary, given the underlying data is going to be overwritten entirely.
* | | | Merge pull request #2577 from lioncash/fsZach Hilman2019-06-131-17/+29
|\ \ \ \ | |/ / / |/| | | file_sys/card_image: Minor cleanup
| * | | file_sys/card_image: Remove obsolete TODOLioncash2019-06-121-1/+1
| | | | | | | | | | | | | | | | We already support Rev 1+.
| * | | file_sys/card_image: Deduplicate casts within AddNCAFromPartition()Lioncash2019-06-111-3/+6
| | | | | | | | | | | | | | | | Makes for nicer reading.
| * | | file_sys/card_image: Make bracing consistentLioncash2019-06-111-4/+8
| | | | | | | | | | | | | | | | Makes for more consistent reading.
| * | | file_sys/card_image: Assign collapsed NCA contents directly to ncas memberLioncash2019-06-111-3/+1
| | | | | | | | | | | | | | | | Same thing, significantly less noisy.
| * | | file_sys/card_image: Deduplicate type castLioncash2019-06-111-4/+6
| | | | | | | | | | | | | | | | | | | | Same thing, less duplication. We can also std::move raw into the PartitionFilesystem constructor.
| * | | file_sys/card_image: Get rid of a magic numberLioncash2019-06-111-1/+1
| | | | | | | | | | | | | | | | We can just use the size of the array to dehardcode it.
| * | | file_sys/card_image: Use std::array deduction guidesLioncash2019-06-111-1/+6
| | |/ | |/| | | | | | | Same thing, less code.
* / | file_sys/nca_metadata: Update CNMT structuresLioncash2019-06-111-2/+7
|/ / | | | | | | | | Names a few more entries in relevant structures. Information based off SwitchBrew and my own RE.
* / Implement IApplicationFunctions::GetDesiredLanguageMichael Scire2019-05-232-0/+5
|/
* Merge pull request #1957 from DarkLordZach/title-providerbunnei2019-04-107-174/+307
|\ | | | | file_sys: Provide generic interface for accessing game data
| * patch_manager: Dump NSO name with build IDZach Hilman2019-03-282-5/+6
| |
| * core: Port current uses of RegisteredCache to ContentProviderZach Hilman2019-03-274-17/+22
| |
| * file_sys: Create ContentProvider interface and default implementationsZach Hilman2019-03-272-152/+279
| |
* | Merge pull request #2340 from lioncash/viewbunnei2019-04-061-1/+3
|\ \ | | | | | | file_sys/fsmitm_romfsbuild: Utilize a string_view in romfs_calc_path_hash
| * | file_sys/fsmitm_romfsbuild: Utilize a string_view in romfs_calc_path_hash()Lioncash2019-04-051-1/+3
| | | | | | | | | | | | | | | The given string instance doesn't need to be copied entirely, we can just use a view instead.
* | | Merge pull request #2341 from lioncash/comparebunnei2019-04-062-11/+0
|\ \ \ | | | | | | | | file_sys/nca_metadata: Remove unnecessary comparison operators for TitleType
| * | | file_sys/nca_metadata: Remove unnecessary comparison operators for TitleTypeLioncash2019-04-052-11/+0
| |/ / | | | | | | | | | | | | | | | enum class elements from the same enum can already be compared against one another without the need for explicitly defined comparison operators.
* | | Merge pull request #2339 from lioncash/rankbunnei2019-04-062-5/+14
|\ \ \ | | | | | | | | service/fsp_srv: Update SaveDataInfo and SaveDataDescriptor structs
| * | | service/fsp_srv: Don't pass SaveDataDescriptor instances by value.Lioncash2019-04-052-2/+2
| | | | | | | | | | | | | | | | | | | | Passing around a 64 byte data struct by value is kind of wasteful, instead pass a reference to the struct.
| * | | service/fsp_srv: Update SaveDataInfo and SaveDataDescriptor structsLioncash2019-04-052-3/+12
| | |/ | |/| | | | | | | | | | I realized that I updated the documentation on SwitchBrew a while ago, but never actually updated the structs within yuzu.
* | | file_sys/program_metadata: Remove obsolete TODOsLioncash2019-04-052-15/+14
| |/ |/| | | | | | | | | | | BitField has been trivially copyable since e99a14862841841d74be8d0ea9426c2d23546b5e, so we can eliminate these TODO comments and use ReadObject() directly instead of memcpying the data.
* | file_sys/control_metadata: Amend naming of membersLioncash2019-04-042-12/+24
|/ | | | | | | | | | | Quite a bit of these were out of sync with Switchbrew (and in some cases entirely wrong). While we're at it, also expand the section of named members. A segment within the control metadata is used to specify maximum values for the user, device, and cache storage max sizes and journal sizes. These appear to be generally used by the am service (e.g. in CreateCacheStorage, etc).
* core/cheat_engine: Make MemoryReadImpl and MemoryWriteImpl internally linkedLioncash2019-03-241-0/+2
| | | | | These don't need to be visible outside of the translation unit, so they can be enclosed within an anonymous namespace.
* Merge pull request #2221 from DarkLordZach/firmware-versionbunnei2019-03-234-1/+73
|\ | | | | set_sys: Implement GetFirmwareVersion(2) for libnx hosversion
| * set_sys: Use official nintendo version stringZach Hilman2019-03-113-8/+18
| |
| * system_version: Correct sizes on VectorVfsFile constructionZach Hilman2019-03-111-4/+4
| |
| * set_sys: Implement GetFirmwareVersion(2) for libnx hosversionZach Hilman2019-03-103-1/+63
| | | | | | Uses the synthesized system archive 9 (SystemVersion) and reports v5.1.0-0.0
* | Merge pull request #2280 from lioncash/nsobunnei2019-03-231-14/+11
|\ \ | | | | | | loader/nso: Minor refactoring
| * | file_sys/patch_manager: Deduplicate NSO headerLioncash2019-03-221-14/+8
| | | | | | | | | | | | | | | | | | 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
| * | file_sys/patch_manager: Remove two magic valuesLioncash2019-03-221-2/+5
| | | | | | | | | | | | These correspond to the NSOBuildHeader.
* | | file_sys/cheat_engine: Silence truncation and sign-conversion warningsLioncash2019-03-222-5/+6
| | |
* | | file_sys/cheat_engine: Remove use of global system accessorsLioncash2019-03-224-37/+45
|/ / | | | | | | | | Instead, pass in the core timing instance and make the dependency explicit in the interface.
* | Merge pull request #1933 from DarkLordZach/cheat-enginebunnei2019-03-224-0/+778
|\ \ | | | | | | file_sys: Implement parser and interpreter for game memory cheats
| * | vm_manager: Remove cheat-specific ranges from VMManagerZach Hilman2019-03-052-37/+44
| | |
| * | cheat_engine: Add parser and interpreter for game cheatsZach Hilman2019-03-052-0/+713
| | |
| * | patch_manager: Display cheats in game list add-onsZach Hilman2019-03-051-0/+2
| | |
| * | patch_manager: Add support for loading cheats listsZach Hilman2019-03-052-0/+56
| |/ | | | | | | Uses load/<title_id>/<mod_name>/cheats as root dir, file name is all upper or lower hex first 8 bytes build ID.
* / file_sys/content_archive: Amend name of Data_Unknown5 enum entryLioncash2019-03-192-2/+15
|/ | | | While we're at it, give each entry some documentation.
* file_sys/vfs_vector: Fix ignored offset on WriteFrederic L2019-02-251-1/+1
|
* Merge pull request #2025 from DarkLordZach/loader-banner-logobunnei2019-01-202-0/+16
|\ | | | | loader: Add getters for application banner and logo
| * content_archive: Add getter for logo section of NCAZach Hilman2019-01-152-0/+16
| |
* | file_sys/directory: Remove unused DirectoryBackend classLioncash2019-01-181-23/+0
|/ | | | This isn't used at all, so we can just get rid of it.
* romfs: Add SingleDiscard extraction typeZach Hilman2018-12-282-2/+6
| | | | Needed for manual RomFS extraction, as Full generates an extra directory and Truncated generates variable results.
* file_sys/program_metadata: Print out more descriptive address space descriptionsLioncash2018-12-281-3/+7
| | | | | | | Provides extra information that makes it easier to tell if an executable being run is using a 36-bit address space or a 39-bit address space. While we don't support AArch32 executables yet, this also puts in distinguishing information for the 32-bit address space types as well.
* Merge pull request #1928 from lioncash/capsbunnei2018-12-272-0/+17
|\ | | | | kernel: Handle kernel capability descriptors
| * kernel/process: Hook up the process capability parser to the process itselfLioncash2018-12-212-0/+17
| | | | | | | | | | While we're at it, we can also toss out the leftover capability parsing from Citra.
* | am: Implement GetSaveDataSize and ExtendSaveDataZach Hilman2018-12-273-3/+3
| | | | | | These functions come in a pair and are needed by Smash Ultimate, Minecraft, and Skyrim, amongst others.
* | savedata_factory: Partially implement IVFC save sizes using filesZach Hilman2018-12-272-0/+38
| | | | | | This stores a file in the save directory called '.yuzu_save_size' which stores the two save sizes (normal area and journaled area) sequentially as u64s.
* | control_metadata: Update NACP fields with latest Switchbrew dataZach Hilman2018-12-272-6/+29
| |
* | control_metadata: Use value member instead of unique_ptr to store structZach Hilman2018-12-272-10/+13
| | | | | | Serves no actual purpose in this instance besides making NACP's copy assignment deleted, which is not intended behavior.
* | vfs: Add reinterpret_casts to WriteArray and ObjectZach Hilman2018-12-271-2/+2
| | | | | | Allows these functions to compile when T is not u8.
* | Fixed uninitialized memory due to missing returns in canaryDavid Marcec2018-12-191-0/+1
|/ | | | Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
* patch_manager: Prevent use of a dangling pointer within PatchRomFSLioncash2018-12-111-4/+3
| | | | | | | | | | | fmt::format() returns a std::string instance by value, so calling .c_str() on it here is equivalent to doing: auto* ptr = std::string{}.c_str(); The data being pointed to isn't guaranteed to actually be valid anymore after that expression ends. Instead, we can just take the string as is, and provide the necessary formatting parameters.
* Merge pull request #1846 from lioncash/dirbunnei2018-12-111-2/+2
|\ | | | | file_sys/directory: Amend path buffer size for directory entries
| * file_sys/directory: Amend path buffer size for directory entriesLioncash2018-12-031-2/+2
| | | | | | | | | | The path buffer is actually 0x301 (769) characters in length, with the extra character being intended for the null-terminator.
* | Merge pull request #1819 from DarkLordZach/disable-addonsbunnei2018-12-112-11/+50
|\ \ | | | | | | patch_manager: Add support for disabling patches
| * | patch_manager: Obey disabled add-ons list when patching gameZach Hilman2018-12-032-11/+50
| | |
* | | Merge pull request #1885 from lioncash/data_idbunnei2018-12-111-1/+3
|\ \ \ | | | | | | | | file_sys/save_data_factory: Update SaveDataSpaceId enum
| * | | file_sys/save_data_factory: Update SaveDataSpaceId enumLioncash2018-12-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends it with missing values deduced from RE (ProperSystem being from SwitchBrew for naming) (SdCardUser wasn't that difficult to discern given it's used alongside SdCardSystem when creating the save data indexer, based off the usage of the string "saveDataIxrDbSd" nearby).
* | | | savedata_factory: Add support for CacheStorageZach Hilman2018-12-071-0/+2
| | | |
* | | | savedata_factory: Delete TemporaryStorage on startupZach Hilman2018-12-071-1/+5
| | | | | | | | | | | | | | | | Mimics hardware behavior.
* | | | system_archive: Implement open source NgWord2Zach Hilman2018-12-063-1/+41
|/ / /
* | | ng_word: Deduplicate use of a constant valueLioncash2018-12-051-1/+1
| | | | | | | | | | | | | | | We've already given the constant to the vector itself, so we don't need to re-hardcode it in the array.
* | | system_archive: Use a regular function pointer instead of std::function for file-scope system archive arrayLioncash2018-12-051-3/+2
| | | | | | | | | | | | | | | | | | | | | This allows the array to be constexpr. std::function is also allowed to allocate memory, which makes its constructor non-trivial, we definitely don't want to have all of these execute at runtime, taking up time before the application can actually load.
* | | Merge pull request #1704 from DarkLordZach/oss-sysarchivebunnei2018-12-056-1/+213
|\ \ \ | | | | | | | | file_sys: Implement open source system archives
| * | | file_sys: Implement system archive synthesizer for NgWord (806)Zach Hilman2018-11-235-6/+61
| | | |
| * | | file_sys: Add framework for synthesizing open source archivesZach Hilman2018-11-162-0/+105
| | | |
| * | | vfs_vector: Add VFS backend for std::arrayZach Hilman2018-11-161-0/+52
| | | | | | | | | | | | | | | | Allows using constexpr/static const data with VFS.
* | | | Merge pull request #1838 from lioncash/dedupbunnei2018-12-051-27/+26
|\ \ \ \ | |_|/ / |/| | | file_sys/registered_cache: Eliminate variable shadowing
| * | | file_sys/registered_cache: Eliminate variable shadowingLioncash2018-12-021-27/+26
| | |/ | |/| | | | | | | | | | Also inverts if statements where applicable to allow unindenting code a little bit.
* | | Merge pull request #1835 from lioncash/cache-globalbunnei2018-12-032-11/+10
|\ \ \ | | | | | | | | filesystem: De-globalize registered_cache_union
| * | | filesystem: De-globalize registered_cache_unionLioncash2018-12-022-11/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | We can just return a new instance of this when it's requested. This only ever holds pointers to the existing registed caches, so it's not a large object. Plus, this also gets rid of the need to keep around a separate member function just to properly clear out the union. Gets rid of one of five globals in the filesystem code.
* | | file_sys: Override missing mutating functions to be stubbed out for ReadOnlyVfsDirectory by defaultLioncash2018-12-012-0/+25
| | | | | | | | | | | | Ensures that read only indeed means read only.
* | | service/fsp_srv: Implement CleanDirectoryRecursivelyLioncash2018-12-012-4/+37
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same behavior-wise as DeleteDirectoryRecursively, with the only difference being that it doesn't delete the top level directory in the hierarchy, so given: root_dir/ - some_dir/ - File.txt - OtherFile.txt The end result is just: root_dir/
* | Merge pull request #1814 from lioncash/ptrbunnei2018-11-282-28/+26
|\ \ | | | | | | file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()
| * | file_sys/registered_cache: Remove unused <map> includeLioncash2018-11-271-1/+0
| | |
| * | file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()Lioncash2018-11-272-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These parameters don't need to utilize a shared lifecycle directly in the interface. Instead, the caller should provide a regular reference for the function to use. This also allows the type system to flag attempts to pass nullptr and makes it more generic, since it can now be used in contexts where a shared_ptr isn't being used (in other words, we don't constrain the usage of the interface to a particular mode of memory management).
* | | control_metadata: Correct typo in language name (Portugese -> Portuguese)Lioncash2018-11-271-7/+17
|/ / | | | | | | | | | | | | | | | | While we're at it, organize the array linearly, since clang formats the array elements quite wide length-wise with the addition of the missing 'u'. Technically also fixes patch lookup and icon lookup with Portuguese, though I doubt anyone has actually run into this issue.
* | Merge pull request #1747 from DarkLordZach/exefs-lfsbunnei2018-11-241-2/+47
|\ \ | | | | | | patch_manager: Add support for applying LayeredFS patches to ExeFS
| * | patch_manager: Show LayeredExeFS patch in add-ons columnZach Hilman2018-11-211-3/+14
| | | | | | | | | The decision was made to name them LayeredExeFS instead of just LayeredFS to differentiate from normal RomFS-based mods. The name may be long/unweildy, but conveys the meaning well.
| * | patch_manager: Apply LayeredExeFS patchesZach Hilman2018-11-201-0/+25
| | | | | | | | | | | | This will scan the <mod>/exefs dir for all files and then layer those on top of the game's exefs and use this as the new exefs. This allows for overriding of the compressed NSOs or adding new files. This does use the same dir as IPS/IPSwitch patch, but since the loader will not look for those they are ignored.
| * | settings: Add option to dump ExeFS of games upon launchZach Hilman2018-11-201-0/+9
| | | | | | | | | | | | When enabled, all exefs(es) will be copied to yuzu/dump/<title_id>/exefs.
* | | file_sys/card_image: Provide named members for the GamecardInfo structLioncash2018-11-211-1/+12
|/ / | | | | | | Fills out the struct according to information provided by SwitchBrew
* | Merge pull request #1632 from DarkLordZach/keys-manager-optimizationsbunnei2018-11-168-10/+23
|\ \ | | | | | | game_list: Optimize game list refresh
| * | file_sys: Use common KeyManager in NCA container typesZach Hilman2018-11-026-7/+18
| | | | | | | | | | | | Creates a single KeyManager for the entire container and then passes it into the NCA constructor, eliminating several unnecessary KeyManager reads.
| * | content_archive: Add optional KeyManager parameter to constructorZach Hilman2018-11-022-3/+5
| |/ | | | | | | Allows resuing a common KeyManager when a large amount of NCAs are handled by the same class. Should the parameter not be provided, a new KeyManager will be constructed, as was the default behavior prior to this.
* | file_sys/errors: Remove currently unused filesystem error codesLioncash2018-11-161-10/+0
| | | | | | | | | | Rather than keeping around unused values, we can just introduce them as needed.
* | file_sys/errors: Get rid of the ErrCodes namespaceLioncash2018-11-161-17/+5
| | | | | | | | | | | | There's no real point to keeping the separate enum around, especially given the name of the error code itself is supposed to document what the value actually represents.
* | file_sys/errors: Extract FS-related error codes to file_sys/errors.hLioncash2018-11-161-1/+8
| | | | | | | | Keeps filesystem-related error codes in one spot.
* | Merge pull request #1618 from DarkLordZach/dump-nsobunnei2018-11-153-2/+24
|\ \ | | | | | | patch_manager: Add support for dumping uncompressed NSOs
| * | patch_manager: Add support for dumping decompressed NSOsZach Hilman2018-10-291-0/+13
| | | | | | | | | | | | 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.
| * | bis_factory: Add getter for mod dump root for a title IDZach Hilman2018-10-292-2/+11
| | | | | | | | | | | | Equates to yuzu_dir/dump/<title id>/
* | | Merge pull request #1608 from DarkLordZach/save-data-readerbunnei2018-11-144-14/+28
|\ \ \ | |_|/ |/| | [ns|fsp_srv]: Implement various functions to boot Checkpoint
| * | ns: Implement command 400: GetApplicationControlDataZach Hilman2018-10-292-2/+2
| | | | | | | | | Returns the raw NACP bytes and the raw icon bytes into a title-provided buffer. Pulls from Registration Cache for control data, returning all zeros should it not exist.
| * | savedata_factory: Expose accessors for SaveDataSpaceZach Hilman2018-10-292-14/+21
| | |
| * | control_metadata: Add GetRawBytes function to NACPZach Hilman2018-10-292-0/+7
| |/ | | | | | | Returns the raw bytes of the NACP file. Needed for GetApplicationControlData which returns the raw, unprocessed NACP to the game.
* | general: Remove unused boost inclusions where applicableLioncash2018-10-301-1/+0
| | | | | | | | Cleans up unused includes and trims off some dependencies on externals.
* | global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-3011-84/+76
|/ | | | | | | | | | | | | | | | * 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
* file_sys/patch_manager: Remove unnecessary if-statements (#1586)Frederic L2018-10-281-7/+6
| | | | | | * remove unnecessary if-statements * Addressed feedback
* Merge pull request #1430 from DarkLordZach/remove-promote-dirbunnei2018-10-2617-95/+1
|\ | | | | vfs: Remove InterpretAsDirectory and related functions
| * vfs: Remove InterpretAsDirectory and related functionsZach Hilman2018-10-1917-95/+1
| | | | | | | | When writing VFS, it initally seemed useful to include a function to in-place convert container files into directories in one homogenous directory structure, but re-evaluating it now there have been plenty of chances to use it and there has always been a better way. Removing as it is unused and likely will not be used.
* | ips_layer: Use rle_size instead of data_size in RLE patch applicationZach Hilman2018-10-251-1/+1
| | | | | | | | Prevents a potential bug when using RLE records in an IPS patch.
* | vfs: Handle failure of file reading within VfsRawCopy()Lioncash2018-10-241-2/+6
| | | | | | | | Also gets rid of an unused variable.
* | Merge pull request #1515 from DarkLordZach/dlc-lfsbunnei2018-10-243-4/+24
|\ \ | |/ |/| patch_manager: Add support for LayeredFS on DLC RomFS
| * qt: Add support for dumping a DLC Data RomFSZach Hilman2018-10-182-0/+5
| |
| * registered_cache: Deduplicate results of ListEntry and ListEntryFilterZach Hilman2018-10-172-2/+16
| | | | | | | | Prevents a Entry from appearing in the list twice if the user has it installed in two places (e.g. User NAND and SDMC)
| * patch_manager: Add support for using LayeredFS with DataZach Hilman2018-10-171-2/+3
| |
* | Merge pull request #1511 from lioncash/contentbunnei2018-10-192-258/+292
|\ \ | | | | | | content_archive: Minor reorganization changes
| * | content_archive: Simpify assignment of bktr_base_romfs in the constructorLioncash2018-10-161-2/+1
| | | | | | | | | | | | | | | std::move doesn't actually dereference the data, so it doesn't matter whether or not the type is null.
| * | content_archive: Make IsValidNCA() an internally linked functionLioncash2018-10-162-3/+1
| | | | | | | | | | | | | | | This is only ever used within the cpp file, so it can just be an internal function.
| * | content_archive: Simplify rights ID checkLioncash2018-10-161-2/+2
| | | | | | | | | | | | This is the same as using std::any_of with an inverted predicate.
| * | content_archive: Split loading into separate functionsLioncash2018-10-162-253/+290
| | | | | | | | | | | | | | | | | | The constructor alone is pretty large, the reading code should be split into its consistuent parts to make it easier to understand it without having to build a mental model of a 300+ line function.
| * | content_archive: Pass and take NCASectionHeader instance by referenceLioncash2018-10-162-3/+3
| |/ | | | | | | | | Each header is 512 bytes in size, which is kind of an excessive amount to copy all the time when it's possible to avoid doing so.
* | Merge pull request #1510 from lioncash/xcibunnei2018-10-182-5/+7
|\ \ | | | | | | XCI: Add function for checking the existence of the program NCA
| * | XCI: Add function for checking the existence of the program NCALioncash2018-10-162-5/+7
| |/ | | | | | | | | | | 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.
* | Merge pull request #1509 from DarkLordZach/device-save-databunnei2018-10-181-1/+12
|\ \ | |/ |/| savedata_factory: Add DeviceSaveData and fix TemporaryStorage
| * savedata_factory: Add TemporaryStorage SaveDataSpaceIdZach Hilman2018-10-161-1/+4
| | | | | | | | Required for TemporaryStorage saves (in addition to SaveDataType)
| * savedata_factory: Add support for DeviceSaveDataZach Hilman2018-10-161-0/+8
| | | | | | | | Uses the same path as SaveData except with UID 0. Adds a warning if UID is not 0.
* | Merge pull request #1443 from DarkLordZach/lower-loader-logs-1bunnei2018-10-162-3/+9
|\ \ | | | | | | content_archive/patch_manager: Lower log levels to eliminate some unnecessary logs
| * | patch_manager: Move non-Program RomFS patch log to DebugZach Hilman2018-10-131-2/+8
| | | | | | | | | | | | Normal Program-type patches will still be logged to aid in debugging, but for others (mainly Control), it was moved to Debug.
| * | content_archive: Move get key log to Trace levelZach Hilman2018-10-131-1/+1
| | | | | | | | | | | | Avoids printing live keys in the general log.
* | | file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicableLioncash2018-10-167-30/+30
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | The data retrieved in these cases are ultimately chiefly owned by either the RegisteredCache instance itself, or the filesystem factories. Both these should live throughout the use of their contained data. If they don't, it should be considered an interface/design issue, and using shared_ptr instances here would mask that, as the data would always be prolonged after the main owner's lifetime ended. This makes the lifetime of the data explicit and makes it harder to accidentally create cyclic references. It also makes the interface slightly more flexible than the previous API, as a shared_ptr can be created from a unique_ptr, but not the other way around, so this allows for that use-case if it ever becomes necessary in some form.
* | file_sys/control_metadata: Get rid of magic constantsLioncash2018-10-161-3/+6
| | | | | | | | | | These are just the size of the data being passed in, so we can specify that via the size() member function.
* | aoc: Read DLC base title ID from RegisteredCacheZach Hilman2018-10-152-0/+5
| | | | | | Falls back to title ID + 0x1000, which is what HOS does.
* | Merge pull request #1409 from DarkLordZach/key-derivationbunnei2018-10-132-9/+22
|\ \ | |/ |/| crypto: Add support for full key derivation
| * vfs: Move forward declarations to separate fileZach Hilman2018-10-072-9/+22
| |
* | Merge pull request #1461 from lioncash/warnbunnei2018-10-101-3/+3
|\ \ | | | | | | ips_layer: Silence truncation and conversion warnings
| * | ips_layer: Silence truncation and conversion warningsLioncash2018-10-091-3/+3
| | | | | | | | | | | | Makes type conversions explicit to avoid compiler warnings.
* | | Merge pull request #1464 from lioncash/uniquebunnei2018-10-102-11/+9
|\ \ \ | | | | | | | | patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptr
| * | | patch_manager: Return a std::unique_ptr from ParseControlNCA() and GetControlMetadata() instead of a std::shared_ptrLioncash2018-10-092-11/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | ips_layer: Avoid constructing std::vector instances where not necessaryLioncash2018-10-091-6/+25
| | | | | | | | | | | | | | | | | | We can just compare the existing std::vector instance with a constexpr std::array containing the desired match. This is lighter resource-wise, as we don't need to allocate on the heap.
* | | ips_layer: Remove unnecessary explicit std::pair constructor in std::arrayLioncash2018-10-091-5/+13
| | | | | | | | | | | | | | | Makes the layout of the array consistent, by making all elements match, instead of special-casing the first one.
* | | ips_layer: Add missing includesLioncash2018-10-092-7/+17
| | | | | | | | | | | | | | | | | | Adds missing includes to prevent potential compilation issues in the future. Also moves the definition of a struct into the cpp file, so that some includes don't need to be introduced within the header.
* | | ips_layer: std::move data within PatchIPS() and Apply()Lioncash2018-10-091-2/+5
|/ / | | | | | | | | We don't need to make a copy of the read data, so we can std::move it into the make_shared call here.
* | Merge pull request #1423 from DarkLordZach/romfs-file-extsbunnei2018-10-085-10/+38
|\ \ | | | | | | fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFS
| * | patch_manager: Avoid romfs_ext requirement for patchingZach Hilman2018-10-041-4/+1
| | |
| * | fsmitm_romfsbuild: Extract stubs and IPS to romfs_ext dirZach Hilman2018-10-045-21/+38
| | |
| * | fsmitm_romfsbuild: Add support for stubbing and IPS patches in LFSZach Hilman2018-10-041-0/+14
| | |
* | | Merge pull request #1424 from DarkLordZach/ips-witchbunnei2018-10-084-23/+299
|\ \ \ | |_|/ |/| | ips_layer: Add support for IPSwitch executable patches
| * | ips_layer: Fix inaccuracies with comments and flagsZach Hilman2018-10-043-16/+51
| | | | | | | | | Specifically bugs/crashes that arise when putting them in positions that are legal but not typical, such as midline, between patch data, or between patch records.
| * | ips_layer: Deduplicate resource usageZach Hilman2018-10-043-31/+37
| | |
| * | ips_layer: Add support for escape sequences and midline commentsZach Hilman2018-10-043-8/+41
| | | | | | | | | | | | More accurately follows IPSwitch specification.
| * | patch_manager: Add support for IPSwitch format patchesZach Hilman2018-10-041-22/+56
| | |
| * | ips_layer: Add IPSwitchCompiler to process IPSwitch formatZach Hilman2018-10-042-0/+168
| |/
* | romfs_factory: Extract packed update setter to new functionZach Hilman2018-10-055-6/+15
| |
* | patch_manager: Add support for NSP packed updatesZach Hilman2018-10-051-2/+2
| | | | | | | | Reads as Update (NSP) in add-ons
* | patch_manager: Add support for packed updatesZach Hilman2018-10-054-5/+18
|/ | | | Will prefer any installed update over the packed version.
* Merge pull request #1415 from DarkLordZach/ipsbunnei2018-10-044-31/+233
|\ | | | | file_sys: Add support for loading IPS patches
| * nso: Optimize loading of IPS patchesZach Hilman2018-10-022-45/+38
| | | | | | | | Avoid resource-heavy classes and remove quasi-duplicated code.
| * patch_manager: Add PatchNSO functionZach Hilman2018-10-012-0/+102
| | | | | | | | 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 enumZach Hilman2018-10-012-29/+33
| |
| * file_sys: Implement function to apply IPS patchesZach Hilman2018-10-012-0/+103
| |
* | Merge pull request #1436 from lioncash/viewbunnei2018-10-042-73/+101
|\ \ | | | | | | submission_package: Cleanup and bug fixes
| * | submission_package: Avoid dangling std::string_view within SetTicketKeys()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()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 in InitializeExeFSAndRomFS()Lioncash2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | 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 initializedLioncash2018-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 functionLioncash2018-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 functionLioncash2018-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 functionLioncash2018-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 nestingLioncash2018-10-031-45/+49
| | | | | | | | | | | | We can use early continues here to reduce the amount of nesting.
* | | Merge pull request #1435 from lioncash/xcibunnei2018-10-041-1/+3
|\ \ \ | |_|/ |/| | card_image: Ensure program_nca_status is always initialized
| * | card_image: Ensure program_nca_status is always initializedLioncash2018-10-031-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 functionZach Hilman2018-10-011-1/+2
| |
* | aoc_u: Implement GetAddOnContentBaseIdZach Hilman2018-10-011-2/+3
| | | | | | Command #5
* | romfs_factory: Read from all locations with StorageId NoneZach Hilman2018-10-011-26/+25
| | | | | | | | Previous behavior was to assert. Seems to mirror expected game behavior.
* | patch_manager: Add DLC recognition to PatchManagerZach Hilman2018-10-012-0/+27
|/
* kernel/process: Make data member variables privateLioncash2018-09-302-2/+2
| | | | | | | 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.
* Merge pull request #1395 from lioncash/vmbunnei2018-09-292-3/+7
|\ | | | | process/vm_manager: Initial modifications to load NPDM metadata
| * process/vm_manager: Amend API to allow reading parameters from NPDM metadataLioncash2018-09-242-3/+7
| | | | | | | | | | | | | | | | | | 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.
* | fsmitm_romfsbuild: std::move std::vector instances in Build()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()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.
* | patch_manager: Invert conditionals within ApplyLayeredFS()Lioncash2018-09-261-27/+30
| | | | | | | | | | Avoids the need to nest code quite a bit by early-exiting in error cases.
* | vfs_vector: Amend initializer list order in VectorVfsFile's constructor initializer listLioncash2018-09-261-1/+1
| | | | | | | | | | Orders the initializer list members to be in the same order that they would be initialized in. Avoids compiler warnings.
* | fsmitm_romfsbuild: Avoid type truncation warningsLioncash2018-09-261-7/+10
| | | | | | | | | | Cast where explicitly necessary and in other cases we can simply modify the algorithm to accomodate larger data.
* | fsmitm_romfsbuild: Remove unnecessary constructors and initializers for RomFSBuildFileContext and RomFSBuildDirectoryContextLioncash2018-09-261-5/+3
| | | | | | | | | | There's no need to duplicate in-class initializers with a constructor initializer list. std::strings also initialize to empty by default.
* | fsmitm_romfsbuild: Remove unnecessary loops in Build()Lioncash2018-09-261-6/+0
| | | | | | | | | | | | The std::vector instances are already initially allocated with all entries having these values, there's no need to loop through and fill them with it again when they aren't modified.
* | fsmitm_romfsbuild: Make auto variable into a std::size_t variable within Build()Lioncash2018-09-261-1/+1
| | | | | | | | | | | | | | | | | | auto x = 0; auto-deduces x to be an int. This is undesirable when working with unsigned values. It also causes sign conversion warnings. Instead, we can make it a proper unsigned value with the correct width that the following expressions operate on.
* | vfs/etc: Append std:: to size_t usagesLioncash2018-09-266-22/+23
| | | | | | | | | | Given we just recently had a patch backport this from citra, let's try and keep the convention uniform.
* | vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFileLioncash2018-09-267-60/+58
| | | | | | | | | | | | Given these are only added to the class to allow those functions to access the private constructor, it's a better approach to just make them static functions in the interface, to make the dependency explicit.
* | vfs_static: Remove template byte parameter from StaticVfsFileLioncash2018-09-254-42/+42
| | | | | | | | | | | | | | | | | | | | This converts it into a regular constructor parameter. There's no need to make this a template parameter on the class when it functions perfectly well as a constructor argument. This also reduces the amount of code bloat produced by the compiler, as it doesn't need to generate the same code for multiple different instantiations of the same class type, but with a different fill value.
* | fsmitm: Cleanup and modernize fsmitm portZach Hilman2018-09-2420-376/+376
| |
* | qt: Add UI elements for LayeredFS and related toolsZach Hilman2018-09-222-2/+2
| |
* | romfs: Implement CreateRomFSZach Hilman2018-09-222-4/+25
| |
* | file_sys: Port Atmosphere-NX fs_mitm implementationZach Hilman2018-09-222-0/+474
| |
* | bis_factory: Add mod directory VFS getterZach Hilman2018-09-222-3/+14
| |
* | patch_manager: Add LayeredFS mods supportZach Hilman2018-09-222-1/+44
| |
* | vfs_concat: Rewrite and fix ConcatenatedVfsFileZach Hilman2018-09-222-14/+59
| |
* | vfs_layered: Add LayeredVfsDirectoryZach Hilman2018-09-222-0/+178
| | | | | | | | Reads multiple dirs through as if a waterfall.
* | vfs_vector: Add VectorVfsFileZach Hilman2018-09-222-0/+75
| | | | | | | | Maps a vector into the VFS interface.
* | vfs_static: Add StaticVfsFileZach Hilman2018-09-221-0/+77
| | | | | | | | Always returns the template argument byte for all reads. Doesn't support writes.
* | vfs: Add and rewite VfsRawCopy functionsZach Hilman2018-09-222-6/+36
| |
* | vfs: Add GetEntries methodZach Hilman2018-09-224-0/+32
|/ | | | Maps name string to directory or file.
* Merge pull request #1364 from lioncash/contentbunnei2018-09-2125-1/+45
|\ | | | | file-sys: Default heavy-weight class destructors in the cpp file
| * file-sys: Default heavy-weight class destructors in the cpp fileLioncash2018-09-2025-1/+45
| | | | | | | | | | | | | | | | | | | | Several classes have a lot of non-trivial members within them, or don't but likely should have the destructor defaulted in the cpp file for future-proofing/being more friendly to forward declarations. Leaving the destructor unspecified allows the compiler to inline the destruction code all over the place, which is generally undesirable from a code bloat perspective.
* | Merge pull request #1358 from DarkLordZach/temp-storagebunnei2018-09-201-4/+7
|\ \ | | | | | | savedata_factory: Add TemporaryStorage SaveDataType
| * | savedata_factory: Add TemporaryStorage SaveDataTypeZach Hilman2018-09-191-4/+7
| | | | | | | | | Seems to be used by NSO NES Emulator
* | | Merge pull request #1363 from lioncash/controlbunnei2018-09-202-14/+17
|\ \ \ | | | | | | | | control_metadata: Move language name array definition to the cpp file
| * | | control_metadata: Remove unnecessary else within GetLanguageEntry()Lioncash2018-09-201-8/+8
| | | | | | | | | | | | | | | | | | | | There's no need to indent the code here, given the if case contains a return statement at the end of it.
| * | | control_metadata: Move language name array definition to the cpp fileLioncash2018-09-202-6/+9
| | |/ | |/| | | | | | | | | | | | | | | | This was used in two different translation units (deconstructed_rom_directory and patch_manager). This means we'd be pointlessly duplicating the whole array twice due to it being defined within the header.
* | | xts_archive: Remove unused variables from CalculateHMAC256()Lioncash2018-09-191-3/+0
| | | | | | | | | | | | | | | | | | These variables aren't used, which still has an impact, as std::vector cannot be optimized away by the compiler (it's constructor and destructor are both non-trivial), so this was just wasting memory.
* | | xts_archive: Make AsNCA() return a std::unique_ptr instead of a std::shared_ptrLioncash2018-09-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | std::shared_ptr isn't strictly necessary here and is only ever used in contexts where the object doesn't depend on being shared. This also makes the interface more flexible, as it's possible to create a std::shared_ptr from a std::unique_ptr (std::shared_ptr has a constructor that accepts a std::unique_ptr), but not the other way around.
* | | xts_archive: Ensure NAX's type member is always initializedLioncash2018-09-191-1/+1
| | | | | | | | | | | | Ensures that the member always has a deterministic value.
* | | xts_archive: Amend initializer order of NAX's constructorLioncash2018-09-191-2/+2
|/ / | | | | | | | | Orders the initializer list in the same order the members would be initialized. Avoids compiler warnings.
* / Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-1521-128/+130
|/
* file_sys/nca_patch: Amend constructor initializer list orderLioncash2018-09-061-2/+2
| | | | | | Orders the elements in the initializer list in the order they're specified in the class. This prevents compiler warnings about initialization order.
* file_sys/nca_patch: Remove unnecessary includesLioncash2018-09-062-2/+9
| | | | | romfs.h doesn't need to be included in the header, the only real dependency here is common's swap.h that needs to be included.
* file_sys/patch_manager: Add missing includesLioncash2018-09-062-0/+5
| | | | These includes were previously being satisfied indirectly.
* Merge pull request #1242 from lioncash/file-sysbunnei2018-09-062-8/+17
|\ | | | | file_sys/submission_package: Replace includes with forward declarations where applicable
| * file_sys/submission_package: Correct constructor initialization list orderLioncash2018-09-051-2/+2
| | | | | | | | | | Orders the elements in the sequence to match the order in which they'll actually be initialized in.
| * file_sys/submission_package: Replace includes with forward declarations where applicableLioncash2018-09-052-6/+15
| |
* | bktr: Fix bucket overlap errorZach Hilman2018-09-045-6/+6
| |
* | patch_manager: Centralize Control-type NCA parsingZach Hilman2018-09-042-22/+66
| |
* | nsp: Fix error masking issue with XCI filesZach Hilman2018-09-043-6/+13
| | | | | | | | Now display correct error instead of catch-all MissingProgramNCA
* | game_list: Fix version display on non-NAND titlesZach Hilman2018-09-042-7/+23
| |
* | bktr: Add logging on successful patchZach Hilman2018-09-043-7/+24
| |
* | bktr: Implement IVFC offset shiftingZach Hilman2018-09-045-8/+20
| | | | | | | | Fixes base game read errors
* | bktr: Fix missing includes and optimize styleZach Hilman2018-09-046-96/+102
| |
* | patch_manager: Add usages of patches to ExeFSZach Hilman2018-09-042-1/+11
| |
* | file_sys: Add class to manage game patchesZach Hilman2018-09-042-0/+132
| | | | | | | | Right now only includes Updates, but should eventually contain all of the other patches we need.
* | file_sys: Add BKTR patching mechanismZach Hilman2018-09-042-0/+352
| |
* | content_archive: Add BKTR header parsing to NCAZach Hilman2018-09-042-19/+160
| |
* | registration: Add RegisteredCacheUnionZach Hilman2018-09-042-0/+154
|/ | | | Aggregates multiple caches into one interface
* main: Only show DRD deprecation warning onceZach Hilman2018-09-045-2/+5
|
* control_metadata: Use alternate language names if AmericanEnglish isn't availableZach Hilman2018-09-042-4/+17
|
* card_image: Add program title ID getterZach Hilman2018-09-042-0/+6
|
* nsp: Comply with style and performance guidelinesZach Hilman2018-09-044-25/+37
|
* registration: Add support for installing NSP filesZach Hilman2018-09-042-10/+16
|
* card_image: Parse XCI secure partition with NSPZach Hilman2018-09-042-7/+33
| | | | Eliminated duplicate code and adds support for Rev1+ carts
* file_sys: Add Nintendo Submission Package (NSP)Zach Hilman2018-09-042-0/+296
|
* file_sys: Replace includes with forward declarations where applicableLioncash2018-09-0417-21/+51
| | | | | Cuts down on include dependencies, resulting in less files that need to be rebuilt when certain things are changed.
* vfs_real: Forward declare IOFileLioncash2018-09-024-7/+22
| | | | | | 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.
* core/core: Replace includes with forward declarations where applicableLioncash2018-08-312-0/+2
| | | | | | | | | | | The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
* Merge pull request #1188 from lioncash/unusedbunnei2018-08-281-1/+0
|\ | | | | vfs_real: Remove unused variable in CreateDirectoryRelative()
| * vfs_real: Remove unused variable in CreateDirectoryRelative()Lioncash2018-08-271-1/+0
| |
* | registered_cache: Get rid of variable shadowing in ProcessFiles()Lioncash2018-08-271-3/+3
|/ | | | Prevents compiler warnings.
* file_sys/crypto: Fix missing/unnecessary includesZach Hilman2018-08-254-0/+6
|
* xci: Ignore NCA files with updates in secureZach Hilman2018-08-241-0/+3
|
* content_archive: Add update title detectionZach Hilman2018-08-242-0/+11
| | | | This is needed because the title IDs of update NCAs will not use the update title ID. The only sure way to tell is to look for a partition with BKTR crypto.
* key_manager: Create keys dir if it dosen't existZach Hilman2018-08-231-0/+1
| | | | On call to WriteKeyToFile, so that the autogenerated file can be written.
* file_sys: Cut down on includes and copiesZach Hilman2018-08-233-0/+6
|
* crypto: Eliminate magic constantsZach Hilman2018-08-232-16/+19
|
* file_sys: Implement NAX containersZach Hilman2018-08-232-0/+232
|
* registration: Add GetEntryUnparsed methodsZach Hilman2018-08-232-0/+15
| | | | Returns the file before calling parser on it.
* sdmc_factory: Add SDMC RegisteredCache getterZach Hilman2018-08-232-1/+14
|
* vfs: Add GetOrCreateDirectoryRelative methodZach Hilman2018-08-233-9/+13
|
* xts_encryption_layer: Implement XTSEncryptionLayerZach Hilman2018-08-231-1/+1
|
* xci: Fix error masking issueZach Hilman2018-08-232-0/+11
| | | | Prevents NCA-related errors from being masked into MissingProgramNCA or MissingKeyFile
* Merge pull request #1136 from tech4me/masterbunnei2018-08-222-4/+4
|\ | | | | qt/main: Port part of citra(#3411), open savedata works
| * qt/main: Port part of citra(#3411), open savedata workstech4me2018-08-212-4/+4
| |
* | vfs: Replace mode.h include with forward declarations where applicableLioncash2018-08-212-2/+4
| | | | | | | | | | Avoids the need to rebuild these source files if the mode header changes.
* | sdmc_factory: Remove unnecessary core includeLioncash2018-08-212-1/+1
|/ | | | | This doesn't require the central core header to be included, it just needs the vfs headers.
* service/filesystem: Use forward declarations where applicableLioncash2018-08-211-0/+1
| | | | | | | | Avoids the need to rebuild multiple source files if the filesystem code headers change. This also gets rid of a few instances of indirect inclusions being relied upon
* romfs_factory: Remove unnecessary includes and use forward declarations where applicableLioncash2018-08-213-3/+12
| | | | | | Avoids the need to rebuild whatever includes the romfs factory header if the loader header ever changes. We also don't need to include the main core header. We can instead include the headers we specifically need.
* registration: Add Data_Unknown5 NCAContentTypeZach Hilman2018-08-203-2/+3
|
* filesystem: Add support for loading of system archivesZach Hilman2018-08-193-4/+49
|
* common: Namespace hex_util.h/.cppLioncash2018-08-161-8/+10
| | | | | It's in the common code, so it should be under the Common namespace like everything else.
* Merge pull request #1005 from DarkLordZach/registered-fmtbunnei2018-08-1617-17/+1066
|\ | | | | file_sys: Add support for registration format
| * registration: Various style and documentation improvementsZach Hilman2018-08-123-18/+22
| | | | | | | | | | | | Fix logic in RealVfsFilesystem Create methods Remove magic numbers Fix regex errors
| * registration: Add support for force overwrite of installedZach Hilman2018-08-122-22/+48
| |
| * vfs_real: Add CreateFullPath to Create* operationsZach Hilman2018-08-122-13/+6
| |
| * control_metadata: Remove unnecessary reference to base fileZach Hilman2018-08-122-2/+1
| |
| * romfs: Remove cyclic shared_ptr leak in romfs codeZach Hilman2018-08-123-8/+8
| |
| * registration: Update documentation and styleZach Hilman2018-08-125-42/+69
| |
| * nca_metadata: Remove unnecessary reference to base fileZach Hilman2018-08-122-3/+2
| |
| * bis_factory: Create NAND dirs if they don't existZach Hilman2018-08-121-2/+9
| |
| * registration: Take RawCopy function as parameterZach Hilman2018-08-122-10/+15
| | | | | | | | Instead of defaulting to VfsRawCopy
| * registered_cache: Fix missing reading from yuzu_metaZach Hilman2018-08-121-7/+16
| |
| * file_sys: Comply to style guidelinesZach Hilman2018-08-126-27/+38
| |
| * qt: Add 'Install to NAND' option to menuZach Hilman2018-08-121-1/+1
| | | | | | | | Prompts for title type on NCA files.
| * file_sys: Add RegisteredCacheZach Hilman2018-08-122-0/+543
| | | | | | | | Manages NAND NCA get and install.
| * file_sys: Add support for parsing NCA metadata (CNMT)Zach Hilman2018-08-122-0/+230
| |
| * card_image: Add accessor for all NCAs in XCIZach Hilman2018-08-122-0/+5
| |
| * vfs_real: Add CreateFullPath to CreateFileZach Hilman2018-08-121-3/+6
| | | | | | | | Fixes bugs with calling CreateFile when the immediate directory does not exist.
| * bis_factory: Add partial implementation of BISFactoryZach Hilman2018-08-122-0/+54
| | | | | | | | Creates and stores RegisteredCaches for user and system NAND, as creation of a RegisteredCache is expensive.
| * vfs: Add ConcatenatedVfsFileZach Hilman2018-08-122-0/+134
| |
* | loader: Make ResultStatus directly compatible with fmtLioncash2018-08-151-2/+5
| | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #1032 from lioncash/sanitizebunnei2018-08-131-10/+10
|\ \ | | | | | | vfs: Use sanitized paths within MoveFile() and MoveDirectory()
| * | vfs: Use sanitized paths within MoveFile() and MoveDirectory()Lioncash2018-08-121-10/+10
| |/ | | | | | | | | | | Previously these were being unused (or partially unused). While we're at it, use better naming to make it visibly obvious which variant of the path is being used.
* | Merge pull request #1031 from lioncash/verbositybunnei2018-08-132-7/+7
|\ \ | | | | | | card_image: Simplify return statement of GetSubdirectories()
| * | card_image: Use type aliases to shorten definitionsLioncash2018-08-122-6/+6
| | | | | | | | | | | | We have the aliases, so we may as well use 'em.
| * | card_image: Simplify return statement of GetSubdirectories()Lioncash2018-08-121-1/+1
| |/ | | | | | | | | We don't need to write out the construction long-form, we can just let the language itself work it out off the return type.
* | vfs: Make VfsFilesystem constructor explicitLioncash2018-08-121-1/+1
| | | | | | | | | | Makes it consistent with the other VFS interfaces and prevents implicit construction.
* | vfs: Make type hierarchy objects classes instead of structsLioncash2018-08-123-9/+15
| | | | | | | | | | | | struct should be used when the data type is very simple or otherwise has no invariants associated with it. Given these are used to form a hierarchy, class should be used instead.
* | made ResultStatus a u16David Marcec2018-08-122-2/+2
|/
* loader: Add more descriptive errorsZach Hilman2018-08-105-35/+95
| | | Full list of new errors and descriptions in core/loader/loader.h
* Merge pull request #990 from lioncash/entrybunnei2018-08-101-3/+9
|\ | | | | fsp_srv: Emplace entries first when building index instead of emplacing last
| * fsp_srv: Use std::string_view's copy() function instead of strncpy()Lioncash2018-08-091-3/+9
| | | | | | | | | | | | Given elements inserted into a vector are zeroed out, we can just copy MAX_LEN - 1 elements and the data will already be properly null terminated.
* | vfs: Fix documentationZach Hilman2018-08-091-2/+2
| |
* | vfs: Fix typo in VfsFilesystem docsZach Hilman2018-08-091-1/+1
| |
* | file_util: Use enum instead of bool for specifing path behaviorZach Hilman2018-08-091-17/+27
| |
* | vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectoryZach Hilman2018-08-091-2/+10
| |
* | file_sys: Add missing include in savedata_factoryZach Hilman2018-08-091-0/+1
| |
* | vfs: Add unreachable assert to file permissions converterZach Hilman2018-08-091-1/+3
| |
* | vfs: Add RealVfsFilesystem implementationZach Hilman2018-08-092-81/+290
| |
* | vfs: Add VfsFilesystem interface and default implementationZach Hilman2018-08-092-3/+211
|/
* Merge pull request #850 from DarkLordZach/icon-metabunnei2018-08-084-0/+13
|\ | | | | Add Icons and Metadata Support
| * loader: Add icon and title support to XCIZach Hilman2018-08-073-0/+6
| |
| * Use const where applicableZach Hilman2018-08-071-1/+1
| |
| * Avoid parsing RomFS to directory in NCAZach Hilman2018-08-071-0/+7
| |
* | content_archive: Add support for titlekey cryptographyZach Hilman2018-08-042-7/+39
|/
* Merge pull request #849 from DarkLordZach/xcibunnei2018-08-046-44/+446
|\ | | | | XCI and Encrypted NCA Support
| * Add missing parameter to files.push_back()Zach Hilman2018-08-011-5/+5
| |
| * Use more descriptive error codes and messagesZach Hilman2018-08-011-2/+8
| |
| * Use ErrorEncrypted where applicable and fix no keys crashZach Hilman2018-08-013-17/+33
| |
| * Add missing includes and use const where applicableZach Hilman2018-08-014-9/+14
| |
| * Make XCI comply to review and style guidelinesZach Hilman2018-08-014-45/+30
| |
| * Extract mbedtls to cpp fileZach Hilman2018-08-011-1/+2
| |
| * Remove files that are not usedZach Hilman2018-08-016-36/+425
| |
* | vfs_vector: Remove unused variable in FindAndRemoveVectorElement()Lioncash2018-08-021-2/+2
| | | | | | | | This wasn't being used for anything, so it can be removed.
* | vfs_vector: Avoid unnecessary copies where applicableLioncash2018-08-021-2/+5
|/ | | | | The lambda elements should be taken by const reference here, and we can move the virtual directory passed to ReplaceFileWithSubdirectory()
* partition_filesystem: Remove dynamic_cast in PrintDebugInfo()Lioncash2018-07-291-3/+2
| | | | | | | We shouldn't be upcasting our file instances. Given a PartitionFilesystem is currently designed to accept any arbitrary VfsFile instances, casting to a more specific type than that is just bad design, and shows an interface design issue.
* RomFS ExtractionZach Hilman2018-07-2811-20/+347
|
* Merge pull request #785 from lioncash/fsbunnei2018-07-241-3/+3
|\ | | | | partition_filesystem: Use std::move where applicable
| * partition_filesystem: Use std::move where applicableLioncash2018-07-241-3/+3
| | | | | | | | | | Avoids copying a std::string instance and avoids unnecessary atomic reference count incrementing and decrementing.
* | VFS Regression and Accuracy Fixes (#776)Zach Hilman2018-07-242-20/+33
|/ | | | | | | | | | | | | | | | * Regression and Mode Fixes * Review Fixes * string_view correction * Add operator& for FileSys::Mode * Return std::string from SanitizePath * Farming Simulator Fix * Use != With mode operator&
* NRO Assets and NACP file formatZach Hilman2018-07-232-0/+123
| | | | | | Cleanup Review fixes
* vfs: Correct file_p variable usage within InterpretAsDirectory()Lioncash2018-07-221-2/+5
| | | | | | | | | ReplaceFileWithSubdirectory() takes a VirtualFile and a VirtualDir, but it was being passed a string as one of its arguments. The only reason this never caused issues is because this template isn't instantiated anywhere yet. This corrects an issue before it occurs.
* file_util, vfs: Use std::string_view where applicableLioncash2018-07-226-89/+150
| | | | | Avoids unnecessary construction of std::string instances where applicable.
* file_util: Use a u64 to represent number of entriesLioncash2018-07-221-3/+3
| | | | | This avoids a truncating cast on size. I doubt we'd ever traverse a directory this large, however we also shouldn't truncate sizes away.
* Merge pull request #754 from lioncash/partbunnei2018-07-212-8/+20
|\ | | | | partition_filesystem, vfs_real: Minor changes
| * vfs_real: Remove redundant copying of std::vector instances in GetFiles() and GetSubdirectories()Lioncash2018-07-211-2/+3
| | | | | | | | | | We already return by value, so we don't explicitly need to make the copy.
| * partition_filesystem, vfs_real: Add missing standard includesLioncash2018-07-212-0/+4
| |
| * partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicableLioncash2018-07-212-2/+3
| | | | | | | | Avoids unnecessary atomic increment and decrement operations.
| * partition_filesystem, vfs_real: Use std::distance() instead of subtractionLioncash2018-07-212-4/+10
| | | | | | | | This is a little bit more self-documenting on what is being done here.
* | Merge pull request #755 from lioncash/ctorbunnei2018-07-211-8/+8
|\ \ | | | | | | file_sys/errors: Remove redundant object constructor calls
| * | file_sys/errors: Remove redundant object constructor callsLioncash2018-07-211-8/+8
| |/ | | | | | | | | Given we're already constructing the error code, we don't need to call the constructor inside of it.
* | vfs_offset: Simplify TrimToFit()Lioncash2018-07-211-1/+2
| | | | | | | | | | We can simply use std::clamp() here, instead of using an equivalent with std::max() and std::min().
* | vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const referenceLioncash2018-07-214-4/+4
| | | | | | | | | | Given the data is intended to be directly written, there's no need to take the std::vector by value and copy the data.
* | vfs: Use variable template variants of std::is_trivially_copyableLioncash2018-07-211-13/+6
| | | | | | | | Provides the same behavior, but with less writing
* | vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member functions to be const qualifiedLioncash2018-07-211-3/+3
|/ | | | | These functions don't modify the data being pointed to, so these can be pointers to const data
* Merge pull request #737 from lioncash/movebunnei2018-07-202-3/+5
|\ | | | | filesys/loader: std::move VirtualFile instances in constructors where applicable
| * vfs_offset: std::move file and name parameters of OffsetVfsFileLioncash2018-07-202-3/+5
| | | | | | | | | | Avoids potentially unnecessary atomic reference count incrementing and decrementing, as well as string copying.
* | partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()Lioncash2018-07-201-1/+1
|/ | | | | This should be returned here, otherwise pfs_dirs is effectively only ever added to, but never read.
* Merge pull request #703 from lioncash/constbunnei2018-07-192-2/+2
|\ | | | | savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
| * savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member functionLioncash2018-07-192-2/+2
| | | | | | | | This function doesn't alter class state.
* | Merge pull request #702 from lioncash/initializebunnei2018-07-192-24/+15
|\ \ | | | | | | partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
| * | partition_filesystem: Ensure all class members of PartitionFilesystem are initializedLioncash2018-07-192-24/+15
| |/ | | | | | | | | | | | | | | | | Previously is_hfs and pfs_header members wouldn't be initialized in the constructor, as they were stored in locals instead. This would result in things like GetName() and PrintDebugInfo() behaving incorrectly. While we're at it, initialize the members to deterministic values as well, in case loading ever fails.
* | Merge pull request #701 from lioncash/movingbunnei2018-07-192-2/+10
|\ \ | | | | | | content_archive: Minor changes
| * | content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const referenceLioncash2018-07-191-1/+1
| | | | | | | | | | | | | | | There's no need to take this by value when it's possible to avoid unnecessary copies entirely like this.
| * | content_archive: Add missing standard includesLioncash2018-07-191-0/+5
| | |
| * | content_archive: std::move VirtualFile in NCA's constructorLioncash2018-07-191-1/+4
| |/ | | | | | | | | Gets rid of unnecessary atomic reference count incrementing and decrementing.
* / vfs: Deduplicate accumulation code in VfsDirectory's GetSize()Lioncash2018-07-191-6/+6
|/ | | | We can just use a generic lambda to avoid writing the same thing twice.
* Virtual Filesystem 2: Electric Boogaloo (#676)Zach Hilman2018-07-1930-1211/+1267
| | | | | | | | | | * Virtual Filesystem * Fix delete bug and documentate * Review fixes + other stuff * Fix puyo regression
* General Filesystem and Save Data Fixes (#670)Zach Hilman2018-07-178-106/+123
|
* FileSys: Append the requested path to the filesystem base path in DeleteFile.Subv2018-07-141-2/+4
| | | | We were trying to delete things in the current directory instead of the actual filesystem directory. This may fix some savedata issues in some games.
* Merge pull request #559 from Subv/mount_savedatabunnei2018-07-121-0/+1
|\ | | | | Services/FS: Return the correct error code when trying to mount a nonexistent savedata.
| * Services/FS: Return the correct error code when trying to mount a nonexistent savedata.Subv2018-06-191-0/+1
| |
* | savedata_factory: Always create a save directory for games.bunnei2018-07-081-0/+9
| |
* | Revert "Virtual Filesystem (#597)"bunnei2018-07-0823-1127/+996
| | | | | | | | This reverts commit 77c684c1140f6bf3fb7d4560d06d2efb1a2ee5e2.
* | Virtual Filesystem (#597)Zach Hilman2018-07-0623-996/+1127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Update clang formatJames Rowe2018-07-033-10/+8
| |
* | Rename logging macro back to LOG_*James Rowe2018-07-038-55/+55
| |
* | Add support for decrypted NCA files (#567)Zach Hilman2018-06-212-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Build: Fixed some MSVC warnings in various parts of the code.Subv2018-06-202-6/+6
|/
* general: Make formatting of logged hex values more straightforwardLioncash2018-05-021-9/+9
| | | | | | This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
* file-sys: convert a StringFromFormat call into fmt::format in GetFullPath()Lioncash2018-04-251-4/+1
| | | | | Lessens the amount to read and gets rid of the PRIX64 macro, allowing us to use a single string for the whole path, making it easier to read.
* file-sys: Move logging macros over to the new fmt-capable onesLioncash2018-04-258-64/+58
|
* Service/FS: implement IFileSystem::RenameFilemailwl2018-04-245-7/+15
|
* disk_filesystem: Remove unused total_entries_in_directory member from Disk_DirectoryLioncash2018-04-201-1/+0
|
* disk_filesystem: Remove redundant initializer in Disk_Directory's constructorLioncash2018-04-201-1/+1
|
* disk_filesystem: Make constructors explicit where applicableLioncash2018-04-201-2/+2
|
* file_sys: Use NGLOGshinyquagsire232018-04-171-5/+5
|
* file_sys: tweaksshinyquagsire232018-04-162-6/+7
|
* file_sys: Add HFS/PFS helper componentshinyquagsire232018-04-162-0/+211
|
* fsp_srv: Implement DeleteFile.bunnei2018-04-155-8/+12
| | | | - Used by Binding of Isaac.
* fsp_srv: Implement GetSize and SetSize.bunnei2018-03-311-2/+3
|
* FS: Move the file open mode calculation to a separate function.Subv2018-03-231-7/+14
|
* FS: Implemented IFileSystem::CreateDirectory.Subv2018-03-215-7/+14
|
* FS: Implement DiskFileSystem's OpenDirectory interface.Subv2018-03-205-6/+19
|
* FS: Implement DiskFileSystem::GetEntryType for existing files/directories.Subv2018-03-201-2/+4
|
* FS: Updated the Directory Entry structure to match the Switch.Subv2018-03-205-30/+84
|
* FS: Support the file Append open mode.Subv2018-03-202-2/+23
|
* FS: Added an SDMC archive factory and registered it to the SDMC archive on startup.Subv2018-03-202-0/+71
|
* core: Move process creation out of global state.bunnei2018-03-141-1/+2
|
* FS: Use the correct error code when trying to open files that don't exist.Subv2018-03-042-26/+6
|
* FS: Make EnsureSaveData create the savedata folder when called for the first time.Subv2018-03-045-15/+30
|
* SaveData: Use the current titleid when opening the savedata archive.Subv2018-03-021-2/+3
|
* Filesystem: Added a SaveData Factory and associated Disk_FileSystem.Subv2018-03-027-14/+315
|
* file_sys: Style tweaksshinyquagsire232018-02-262-11/+5
| | | | Asdf
* file_sys: Add support for parsing NPDM filesshinyquagsire232018-02-252-0/+274
|
* file_sys: Clang format fixes.bunnei2018-01-213-4/+4
|
* file_sys: Cleanup to better match Switch file system constructs.bunnei2018-01-219-57/+128
| | | | file_sys: Add factory class for RomFS file system.
* file_sys: Remove disk_archive, savedata_archive, and title_metadata.bunnei2018-01-216-829/+0
|
* archive_backend: Minor changes to match Switch IFileSystem.bunnei2018-01-215-26/+26
|
* file_sys: Repurpose 3DS IVFC code for Switch ROMFS.bunnei2018-01-212-49/+41
|
* Format: Run the new clang format on everythingJames Rowe2018-01-211-1/+1
|
* Update title_metadata.hN00byKing2018-01-171-0/+1
|
* core: Gut out cryptop, since it doesn't compile with C++17.bunnei2018-01-131-50/+1
|
* hle: Use Switch formatted result codes.bunnei2017-11-013-74/+24
|
* core: Refactor MakeMagic usage and remove dead code.bunnei2017-10-152-697/+0
|
* Remove lots more 3DS-specific code.bunnei2017-10-1318-1935/+0
|
* Merge remote-tracking branch 'upstream/master' into nxbunnei2017-10-1010-22/+1198
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/core/CMakeLists.txt # src/core/arm/dynarmic/arm_dynarmic.cpp # src/core/arm/dyncom/arm_dyncom.cpp # src/core/hle/kernel/process.cpp # src/core/hle/kernel/thread.cpp # src/core/hle/kernel/thread.h # src/core/hle/kernel/vm_manager.cpp # src/core/loader/3dsx.cpp # src/core/loader/elf.cpp # src/core/loader/ncch.cpp # src/core/memory.cpp # src/core/memory.h # src/core/memory_setup.h
| * file_sys, loader: add support for reading TMDs to determine app pathsshinyquagsire232017-10-011-2/+13
| |
| * file_sys: add class for Title Metadata (TMD)shinyquagsire232017-10-012-0/+337
| |
| * file_sys/ncch_container: add RomFS, ExeFS override to allow for backward compatibility with existing .romfs system archive dumpsshinyquagsire232017-10-012-69/+206
| |
| * file_sys/archive_ncch: use NCCHContainer instead of loading .romfs filesshinyquagsire232017-10-011-6/+12
| |
| * HLE/Archives: Allow multiple loaded applications to access their SelfNCCH archive independently.Subv2017-09-252-13/+39
| | | | | | | | | | | | | | | | The loaders now register each loaded ROM with the SelfNCCH factory, which keeps the data around for the duration of the emulation session. When opening the SelfNCCH archive, the factory queries the current program's programid and uses that as a key to the map that contains the NCCHData structure (RomFS, Icon, Banner, etc). 3dsx files do not have a programid and will use a default of 0 for this value, thus, only 1 3dsx file with RomFS is loadable at the same time.
| * Loader/NCCH: Add support for loading application updates (#2927)Max Thomas2017-09-254-5/+587
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.Subv2017-08-211-0/+2
| |
| * Handle invalid filenames when renaming files/directoriesJames2017-07-312-4/+78
| |
* | nso: Refactor and allocate .bss section.bunnei2017-09-301-3/+6
|/
* Addressed Bunnei's review comments, and made some other tweaks:TheKoopaKingdom2017-06-031-6/+6
| | | | | - 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.
* Switched to the ERROR_NOT_FOUND constant from errors.h.TheKoopaKingdom2017-06-031-2/+2
|
* Moved whitelist checks from FS_User to the Archive_NCCH handler.TheKoopaKingdom2017-06-031-1/+35
|
* Made some changes from review comments:TheKoopaKingdom2017-06-031-1/+2
| | | | | | | | - 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.
* FileSys: Move all result description to errors.hYuri Kunde Schlesner2017-05-255-61/+96
|
* file_sys: lower log level for setting host pathwwylele2017-03-084-4/+4
|
* Doxygen: Amend minor issues (#2593)Mat M2017-02-271-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.
* loader: use self NCCH archivewwylele2017-02-132-81/+0
|
* file_sys: add Self NCCH archivewwylele2017-02-133-0/+312
|
* core: fix savedata_archive.cpp warnings about unhandled enumeration values on OSXKloen2017-01-291-0/+12
|
* core: fix archive_sdmc.cpp warnings about unhandled enumeration value on OSXKloen2017-01-291-0/+12
|
* core: fix archive_extsavedata.cpp warning on OSXKloen2017-01-291-0/+2
|
* Address clang-format issues.bunnei2016-12-221-4/+3
|
* core: Remove HLE module, consolidate code & various cleanups.bunnei2016-12-224-5/+5
|
* archive_source_sd_savedata: Add static method to get a specific save data pathMerryMage2016-12-152-0/+7
|
* file_sys: Make a few single-argument constructors explicitLioncash2016-12-078-10/+10
| | | | Prevents implicit conversions.
* FileSys: Implement OtherSaveDatawwylele2016-11-293-0/+200
|
* FileSys: abstract SD save data archive sourcewwylele2016-11-294-78/+132
|
* FileSys: rename SaveDataCheck archive to NCCH archivewwylele2016-11-192-15/+15
| | | | According to the observation from game and 3dbrew "Used for accessing general NCCH data"
* FileSys: remove unused DiskArchivewwylele2016-11-192-179/+0
| | | | All "subclasses" of DiskArchive are splitted out. This class is useless
* FileSys: w->rw permission lift only happens in SDMC archivewwylele2016-11-194-2/+14
|
* FileSys: add SDMCWriteOnlyArchivewwylele2016-11-193-0/+129
|
* FileSys: add SDMCArchivewwylele2016-11-193-1/+301
| | | | Now DiskArchive only serves for SDMC, then it should be just a "SDMCArchive"
* FileSys: add ExtSaveDataArchivewwylele2016-11-191-1/+114
| | | | ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
* FileSys: add SaveDataArchivewwylele2016-11-195-4/+359
| | | | The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
* FileSys: remove Open from FileBackendwwylele2016-11-194-64/+44
| | | | Same as directory, file shouldn't expose Open either.
* FileSys: remove Open from DirectoryBackendwwylele2016-11-194-25/+5
| | | | Open should not be an interface exposed by Directory because it is the Archive thats implement the methed to open the directory. The service API of 3DS also implies this - Open is not a function of directory service, but is of FS main service
* FileSys: add PathParserwwylele2016-11-192-0/+159
|
* FileSys: make Archive interfaces return error codewwylele2016-11-015-55/+82
| | | | and make the mode parameter a reference since it is a BitField union
* fs: implement DeleteDirectoryRecursivelywwylele2016-10-025-0/+19
|
* Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner2016-09-219-9/+9
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-2120-44/+9
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner2016-09-198-43/+30
|
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-1820-136/+217
|
* FileSys/Path: Replace Memory::GetPointer with Memory::ReadBlockMerryMage2016-05-211-6/+6
|
* Merge pull request #1643 from MerryMage/make_uniqueMathew Maidment2016-04-068-19/+17
|\ | | | | Common: Remove Common::make_unique, use std::make_unique
| * Common: Remove Common::make_unique, use std::make_uniqueMerryMage2016-04-058-19/+17
| |
* | archive_extsavedata: Fix member initialization orderLioncash2016-03-211-1/+2
|/ | | | shared appears in the initializer list before mount_point
* HLE/FS: Change the error code returned when an ExtSaveData archive is not found.Subv2016-03-204-29/+37
| | | | This allows Fire Emblem to boot again.
* HLE/FS: Corrected some style concerns.Subv2016-03-204-8/+8
|
* HLE/FS: Implemented GetFormatInfoSubv2016-03-2013-14/+130
| | | | Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
* HLE/FS: Return the proper error codes when opening files.Subv2016-03-206-25/+39
|
* HLE/FS: Return the proper error codes on file Read/Write operations.Subv2016-03-205-16/+24
| | | | These operations are limited by the open flags specified while opening the file.
* HLE/FS: Corrected the error codes for DeleteFileSubv2016-03-205-8/+21
|
* HLE/FS: Corrected the error codes for CreateFileSubv2016-03-201-1/+4
|
* HLE/FS: FS::CreateFile takes an u64 for the file size.Subv2016-03-205-5/+5
|
* Merge pull request #1297 from Subv/savesbunnei2016-03-011-2/+4
|\ | | | | DiskDirectory: Initialize the directory member with valid info.
| * DiskDirectory: Initialize the directory member with valid info.Subv2016-01-161-2/+4
| |
* | archive_backend: Remove unnecessary const from return typesLioncash2016-01-252-8/+8
|/ | | | This doesn't return by reference so const isn't really necessary
* Implement FS_User::GetFreeBytesarchshift2015-10-285-0/+18
|
* ivfc_archive: Fix a printf specifierLioncash2015-09-301-1/+1
|
* disk_archive: Remove unimplemented constructor declarationsLioncash2015-09-101-2/+0
|
* Services/FS: Correctly tell the guest app whether a file was correctly opened or not.Subv2015-08-291-1/+1
| | | | Closes #1067
* Archive: Correct a few incorrect types in function signaturesYuri Kunde Schlesner2015-07-145-21/+21
| | | | Buffer lengths should be size_t, and file offsets should be u64.
* Loader: Remove unnecessary pointer indirection to IOFileYuri Kunde Schlesner2015-07-142-2/+2
|
* FS: Stream RomFS from file instead of loading all of it to memorycondut2015-07-145-23/+27
|
* Core: Properly configure address space when loading a binaryYuri Kunde Schlesner2015-07-121-2/+2
| | | | | | The code now properly configures the process image to match the loaded binary segments (code, rodata, data) instead of just blindly allocating a large chunk of dummy memory.
* Core: Cleanup file_sys includes.Emmanuel Gil Peyrot2015-06-2817-30/+52
|
* CitraQt: Cleanup includes.Emmanuel Gil Peyrot2015-06-281-0/+1
|
* Common: Cleanup memory and misc includes.Emmanuel Gil Peyrot2015-06-281-0/+2
|
* Common: Fix FileUtil includes, and everything relying on those.Emmanuel Gil Peyrot2015-06-284-0/+4
|
* ExtSavedata: Save the icon passed to CreateExtSaveData to the correct folder.Subv2015-06-021-3/+6
| | | | Organize the ExtSaveData folders as they are stored in the console.
* Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot2015-05-293-5/+5
|
* Memmap: Re-organize memory function in two filesYuri Kunde Schlesner2015-05-151-1/+1
| | | | | | | 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.
* Kernel: Remove g_program_idYuri Kunde Schlesner2015-05-091-2/+3
| | | | This has been obsoleted by the field in Process.
* Common: Remove common.hYuri Kunde Schlesner2015-05-078-1/+7
|
* Clean-up includesYuri Kunde Schlesner2015-05-072-4/+2
|
* FileSys: De-inline Path membersYuri Kunde Schlesner2015-05-072-125/+136
|
* FileSys: Clean-up includes, de-inline destructorsYuri Kunde Schlesner2015-05-073-7/+14
|
* Headers: Add some forgotten overrides, thanks clang!Emmanuel Gil Peyrot2015-04-141-1/+1
|
* Services/FS: Implemented DeleteExtSaveData, CreateSystemSaveData and DeleteSystemSaveDataSubv2015-03-144-2/+76
| | | | Also fixed a bug with CreateExtSaveData that made it unable to create ExtSaveData archives in the SDMC directory.
* Archives: Properly implemented the SystemSaveData archive.Subv2015-02-262-19/+28
| | | | Ported to the new factory pattern we have for archives.
* FS: Allow multiple instances of the same archive type to be open at onceYuri Kunde Schlesner2015-02-1015-129/+163
|
* Services: Stubbed more services.Subv2015-01-242-2/+19
| | | | Implemented FSUser::CreateExtSaveData
* Merge pull request #376 from Subv/arc_reorderbunnei2015-01-077-16/+50
|\ | | | | Archives: Change the folder layout of some archives.
| * Archives/Exdata: Don't set concrete_mount_point in the ctorSubv2015-01-061-1/+1
| |
| * Archives: Addressed some commentsSubv2015-01-064-13/+13
| |
| * SaveDataCheck: Fixed a typoSubv2015-01-051-1/+1
| |
| * Archives: Make SYSTEM_ID and SDCARD_ID stringsSubv2015-01-044-5/+7
| |
| * Archives: Changed the way paths are built for the archives.Subv2015-01-046-12/+44
| | | | | | | | Each archive now takes a mount point of either NAND or SDMC, and builds its own directory structure there, trying to simulate an HLE-friendly hardware layout
| * SaveDataCheck: Move the files to nand/titleSubv2015-01-041-1/+2
| | | | | | | | under /nand/title/high/low/content/00000000.app.romfs
| * Archives: Change the folder layout of some archives.Subv2015-01-031-2/+1
| | | | | | | | This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW
* | FileSys: Fix crash bug in DiskFile exposed by #400Yuri Kunde Schlesner2015-01-031-4/+0
| |
* | FileSys: Fix a few memory leaksYuri Kunde Schlesner2015-01-032-6/+7
|/
* IVFCArchive: Use a critical log to notify of invalid operations.Subv2015-01-031-9/+9
|
* SaveDataCheck: Remove unneeded constructor from a classSubv2015-01-031-2/+0
|
* Archives: Added some documentation to IVFCArchiveSubv2015-01-031-0/+5
|
* Archives: Reduced duplicate code in RomFS and SaveCheck.Subv2015-01-0311-333/+229
| | | | Fixed a few warnings and cleaned up the code
* SaveDataCheck: Preliminary work in this archive.Subv2015-01-032-4/+28
| | | | | | This allows Steel Diver to boot further, some files are needed. This is still not ready and needs a big cleanup, this will possibly be delayed until the way we handle archives is fixed (with factory classes instead of ahead-of-time creation of archives)
* Archives: Implemented ExtSaveData and SharedExtSaveDataSubv2014-12-308-15/+168
| | | | | | | | They will be stored in /extsavedata/SDMC and /extsavedata/NAND respectively. Also redirect some APT_A functions to their APT_U equivalents. Implemented the gamecoin.dat file in SharedExtSaveData in the PTM module. Implemented formatting the savegame. Retake a previous savegame if it exists instead of reporting them as not formatted every time a game is loaded.
* FileSys: Clean up according to the coding style, and remove redundant namespaced names.Emmanuel Gil Peyrot2014-12-249-169/+97
|
* CFG: Create a new subfolder cfg inside service to handle cfgSubv2014-12-211-0/+1
| | | | Moved most of the shared CFG code there, implemented a few CFG:I functions
* Style: Addressed some commentsSubv2014-12-211-2/+7
|
* CFG: Refactored how the config file works.Subv2014-12-211-1/+1
| | | | It is now kept in memory as per 3dbrew, all updates happen on memory, then they can be saved using UpdateConfigNANDSavegame.
* CFG: Implemented the GetConfigInfoBlk2 function.Subv2014-12-213-3/+9
| | | | | | Added a "config" file to the CFG process service (CFG:U), and added a few default blocks to it. Implemented GetSystemModel and GetModelNintendo2DS
* Merge pull request #291 from purpasmart96/licensebunnei2014-12-2117-17/+17
|\ | | | | License change
| * License changepurpasmart962014-12-2117-17/+17
| |
* | Merge pull request #271 from archshift/createfbunnei2014-12-215-0/+44
|\ \ | | | | | | Added CreateFile to the FS_USER service
| * | Added CreateFile to the FS_USER servicearchshift2014-12-215-0/+44
| | | | | | | | | | | | Tested with hwtests.
* | | Merge pull request #315 from chinhodado/masterbunnei2014-12-201-1/+10
|\ \ \ | |/ / |/| | Clean up some warnings
| * | Clean up some warningsChin2014-12-201-1/+10
| |/
* / Common: Add a clone of std::make_uniqueYuri Kunde Schlesner2014-12-201-2/+3
|/
* SystemSaveData: Added a TODO to move it to the NAND.Subv2014-12-181-1/+3
| | | | Maybe sometime when we actually implement that
* SaveData: Implemented the SystemSaveData archive.Subv2014-12-183-2/+65
| | | | It will be stored in the /syssavedata folder. This archive is user by various Services and possibly games via the FS:U service.
* Filesystem/Archives: Implemented the SaveData archiveSubv2014-12-1812-473/+344
| | | | | | | | | | 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
* FS.Archive: Clean up treatment of archives and their handlesYuri Kunde Schlesner2014-12-167-190/+21
| | | | | | | - Refactor FS::Archive internals to make Archive creation and lifetime management clearer. - Remove the "Archive as a File" hack. - Implement 64-bit Archive handles.
* Service.FS: Rename FileSys::File to FileBackendYuri Kunde Schlesner2014-12-168-15/+15
|
* Service.FS: Rename FileSys::Directory to DirectoryBackendYuri Kunde Schlesner2014-12-168-15/+15
|
* Service.FS: Rename FileSys::Archive to ArchiveBackendYuri Kunde Schlesner2014-12-163-6/+6
|
* Service.FS: Do archive registration using IdCode instead of nameYuri Kunde Schlesner2014-12-163-25/+4
|
* Convert old logging calls to new logging macrosYuri Kunde Schlesner2014-12-135-24/+28
|
* Merge pull request #264 from Subv/filesbunnei2014-12-091-3/+6
|\ | | | | Kernel/File: Fixed file read/write hwtests
| * Kernel/File: Fixed file read/write hwtestsSubv2014-12-081-3/+6
| | | | | | | | | | | | The 3DS allows the user to read from files opened with the Write access modifier, even if he did not specify the Read access modifier. Open the files in binary mode so that we can prevent CR/LF problems in Windows, where a line-end is replaced by these two bytes instead of just 0xA, this was causing problems with the GetSize test
* | Make OpenDirectory fail if the directory doesn't existarchshift2014-12-076-3/+35
|/ | | | | | | This is in line with what the hardware itself does. It does this by splitting the initial directory opening into Directory.Open(), which will return false if a stat fails. Then, Archive::OpenDirectory will return nullptr, and archive.cpp will return an error code .
* Merge pull request #222 from archshift/renamexyzbunnei2014-12-055-0/+66
|\ | | | | Implemented RenameFile and RenameDirectory in FS:USER
| * Updated archive.cpp functions for proper error handlingarchshift2014-12-042-24/+0
| |
| * Implemented RenameDirectory in FS:USERarchshift2014-11-255-0/+45
| |
| * Implemented RenameFile in FS:USERarchshift2014-11-255-0/+45
| |
* | Fixed formatting and switch statement warningsvaguilar2014-11-272-1/+3
|/
* Merge pull request #191 from archshift/deletexyzbunnei2014-11-245-0/+80
|\ | | | | Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.
| * Added DeleteFile and DeleteDirectory functions to FS:USER and the archives.archshift2014-11-235-0/+80
| |
* | Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2014-11-192-2/+2
| |
* | Merge pull request #209 from lioncash/warnTony Wasserka2014-11-181-1/+1
|\ \ | | | | | | directory_sdmc: Fix a signed/unsigned mismatch comparison
| * | directory_sdmc: Fix a signed/unsigned mismatch comparisonLioncash2014-11-181-1/+1
| |/
* / Remove extraneous semicolonsLioncash2014-11-183-3/+3
|/
* FileSys: Updated backend code to use FileSys::Path instead of string for paths.bunnei2014-11-189-24/+24
|
* FileSys: Added DebugStr method to Path class.bunnei2014-11-181-0/+29
|
* Use std::u16string for conversion between UTF-8 and UTF-16, FS:USER functionsarchshift2014-11-131-0/+99
|
* Added CreateDirectory function to service/fs.cpp, and in Archive.archshift2014-11-025-0/+40
|
* Fix some warningsSean2014-10-302-2/+2
|
* Use config files to store whether SDMC is enabled or notarchshift2014-10-231-2/+8
| | | | Before, it used to use whether the directory actually existed. As a result, .citra-emu/sdmc was never auto-created (something quite confusing to me until I read through the logs).
* Common: Add a helper function to generate a 8.3 filename from a long one.Emmanuel Gil Peyrot2014-10-063-29/+27
| | | | Core: Fix the SDMC Directory implementation to make blargSnes work.
* FileSys: Add static asserts for the Directory struct, and fix its fields position.Emmanuel Gil Peyrot2014-10-061-2/+8
|
* FileSys: split the constructor into an Open method, in order to notify the opener something went wrong.Emmanuel Gil Peyrot2014-10-066-14/+54
| | | | Kernel: Return an invalid handle to OpenFile when it failed to open.
* FileSys/Kernel: Implement SetSize service call for File objects.Emmanuel Gil Peyrot2014-10-065-0/+41
|
* FileSys: Add forgotten docstrings.Emmanuel Gil Peyrot2014-10-067-4/+35
|
* Fix warnings in core and commonLioncash2014-09-281-1/+1
|
* Core: Add a method to obtain a Directory from an Archive.Emmanuel Gil Peyrot2014-09-175-0/+44
|
* Core: Add a Directory object, with both a stub and a passthrough implementations.Emmanuel Gil Peyrot2014-09-175-0/+259
|
* Core: Add a passthrough backend for the filesystem, exposed as SDMC.Emmanuel Gil Peyrot2014-09-174-0/+298
|
* Core: Add a new File class, obtainable from an Archive, and a stub implementation.Emmanuel Gil Peyrot2014-09-176-0/+205
|
* Added FS functions to Archive and Archive_RomFSarchshift2014-08-233-8/+57
|
* Marked AppLoader_ELF, AppLoader_NCCH, and Archive_RomFS virtual functions as "override".bunnei2014-07-051-4/+4
|
* Marked AppLoader_ELF, AppLoader_NCCH, and Archive_RomFS classes as "final"bunnei2014-07-051-1/+1
|
* Loader: Updated read methods to be constbunnei2014-07-052-2/+2
| | | | - Required "file" handle to be made local and explicitly opened/closed as needed
* FileSys: Added preliminary support for applications reading the RomFS archive.bunnei2014-07-054-138/+150
| | | | | | | | | | 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.
* Core: Removed unused directory_file_system and meta_file_system modules.bunnei2014-06-274-1453/+0
| | | | Core: Updated CMakeLists.txt to remove directory_file_system and meta_file_system modules.
* fixes to build on linuxbunnei2014-04-232-22/+22
|
* fixed project includes to use new directory structurebunnei2014-04-095-20/+15
|
* got rid of 'src' folders in each sub-projectbunnei2014-04-095-0/+1596