aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/patch_manager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [fs] share parent resources with bundled programs (#4319)xbzk2026-09-181-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Normal games are Applications; Bundled games are Application + Programs; We've been treating both as the same thing, calling both programs, and making programs unable to see settings and saves from application. References: https://switchbrew.org/wiki/Filesystem_services https://switchbrew.org/wiki/NCM_services#ApplicationId https://switchbrew.org/wiki/Super_Mario_3D_All-Stars Ryujinx.HLE/HOS/ApplicationLoader.cs:GetMultiProgramInfo UPDATE: The first version was a big rework to make AppId/ProgId concepts proper, and it was successful in most tests, but it caused a regression with applets, which are programs that breed straight from no application. In order to simplify things i've reverted all the rework, added a helper to identify whether a program has a parent Application and bounded it to it's proper stores. Although this is no big deal coz it doesn't have impact on emulation, it permeates to several routines, so it needs to be tested broadly. Applets, Normal games, Bundled games, Blobbed NSPs/XCIs, Mods, Updates, Saves, DLCs,. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4319 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: lizzie <lizzie@eden-emu.dev>
* [file_sys] robust-er IPSwitch compiler (#3911)lizzie2026-08-301-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | this PR reworks IPS parser to be less stupid what do i mean by this? well generally give it a bit of love so it doesn't do a lot of unsound allocations also simplify the logic greatly (and use memcmp() string idiom instead of trusting the compiler so blindly...) no this doesn't mean to uber optimize IPS to handle 999 gb/s it's more so it doesn't outright crash with edge cases as the previous codebase was quite spaghetty also the major overhead is obviously the vector shenanigans and the I/O -- but thats out of scope Test that IPSwitch mods still properly work WITH ANY GAME IF THERE IS ANY REGRESSION IN SOME GAME/MOD THEN TELL ME Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3911 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [core/file_sys] implement IApplicationFunctions::GetPseudoDeviceId; common ↵lizzie2026-08-041-0/+10
| | | | | | | | | | | | | | | | PatchManager::GetNACP for base|updates (#4159) a bit of refactoring so there's less code duplication... probably a good idea to make it a lambda anyways maybe this is why QLauncher didn't have proper DLCs and updates? either way "GetPseudoDeviceId" is now implemented (still stubbed) with a proper hash instead of just 0 Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4159 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [file_sys] fix romfs_ext mods (#3914)smiRaphi2026-05-131-7/+8
| | | | | | | | | Makes them show up in the menu & also let's them load from SDMC Note: the android edit is totally untested and I've no clue of Kotlin but I don't see a reason why it shouldn't work Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3914 Reviewed-by: crueter <crueter@eden-emu.dev>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [android] patches bin button + version bug fixes (#3691)xbzk2026-03-091-45/+108
| | | | | | | | | | | | | | | This fixed the delete button enabled for external content (which is auto handled and the proper way to get rid of them is either by removing its folder from ext content list, or removing the file itself) by streaming patch source thru jni. Along the way stumbled upon another bug: If you have an external content update installed (say latest version for example) and you NAND install a previous update (like in silksong's hard mode update), the newest update version string would leak to the previous one. Did videos for both. Fixed both. Seems good to go. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3691 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Co-authored-by: xbzk <xbzk@eden-emu.dev> Co-committed-by: xbzk <xbzk@eden-emu.dev>
* [android/fs] external content loader + nca/xci patches (#3596)xbzk2026-03-041-13/+14
| | | | | | | | | | | | | | | | | | | | Foreword: WHY DON'T EVERYBODY USE ONE FOLDER FOR EACH GAME+CONTENTS? AIN'T THIS THE FORMAT GAMES COME WHEN YOU BUE THEM? DO YOU LIVE WITH ALL YOUR FRIENDS AND HAVE A 2ND HOUSE FOR ALL THE CHILDREN? Nice, i feel better now. This feat extends Maufeat's work on external content loading. It harmonically additions: "...also, if in each game folder X, you find a folder Y, and in this folder Y you detect ONLY a single game, then mount all external content for that game found in that folder Y and its subfolders." Permanent (not toggleable). External Content folders are supported equally. Also: -Reworked several routines for preserving single source of truth between android and other systems; -Fixed the annoying unknown format error for content files, by providing proper format detection. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3596 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: xbzk <xbzk@eden-emu.dev> Co-committed-by: xbzk <xbzk@eden-emu.dev>
* [desktop] Allow deletion of add-ons from the add-on menu (#3626)crueter2026-02-251-2/+4
| | | | | | | | | | | | | Adds a location param to the Patch struct which can be used to delete any installed mods at the user's request. You can delete multiple at once too, or just one by right-clicking You are not able to delete game updates, DLC, or SDMC mods. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3626 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [vfs] remove usage of 'dynamic_cast', use ankerl::map for files (#3594)lizzie2026-02-211-7/+7
| | | | | | | | | | | | | | Do I need to writeout everything wrong with `dynamic_cast`? Also the usual std::map -> `ankerl::unordered_dense::map` conversion, seems to work just fine - but of course test that updates/DLCs/mods/cheats/etc are still being applied :) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3594 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [fs/core] Load external content without NAND install (#2862)Maufeat2026-02-061-45/+413
| | | | | | | | | | | | | Adds the capability to add DLC and Updates without installing them to NAND. This was tested on Windows only and needs Android integration. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: wildcard <wildcard@eden-emu.dev> Co-authored-by: nekle <nekle@protonmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2862 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* [file_sys, cheats] fix cheat_xxx.txt not being able to be disabled from Qt ↵lizzie2025-12-311-4/+15
| | | | | | | | | | | | | | | frontend (#3223) fixes cheat_xxx.txt not appearing in Qt frontend - the cheat gets enabled but won't be able to be disabled from UI Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3223 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [core/filesystem] "easier" cheats folder structure like Ryujinx (#2795)lizzie2025-10-221-17/+24
| | | | | | | | | | Less annoying way to make cheats Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2795 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [romfs] Add romfslite mod folder support (Totk Ultracam) (#2730)JPikachu2025-10-141-2/+12
| | | | | | | | | | | | | | | | | Support the romfslite folder type introduced in Atmosphere 1.9.5 for memory-optimized mod loading. The emulator now detects and loads romfslite folders the same way as romfs folders. Utilised by Ultracam 3.0. Credit to Zephyron (Citron) Co-authored-by: Zephyron <zephyron@citron-emu.org> Co-authored-by: Zephyron <zephyron@citron-emu.org> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2730 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: JPikachu <jpikachu@eden-emu.dev> Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
* vfs: Move vfs files to their own directoryFearlessTobi2024-01-251-3/+3
|
* android: Add addon delete buttont8952024-01-191-10/+33
| | | | Required some refactoring of retrieving patches in order for the frontend to pass the right information to ContentManager for deletion.
* service: set: Rename filesgerman772024-01-061-1/+1
|
* file_sys: handle null romfsLiam2023-12-011-4/+0
|
* fsmitm_romfsbuild: avoid unnecessary copies of vfs pointersLiam2023-10-131-4/+4
|
* core: improve debug workflowLiam2023-09-141-2/+2
|
* patch_manager: apply manual HTML patches when presentLiam2023-08-211-1/+8
|
* vfs: expand support for NCA readingLiam2023-08-151-18/+21
|
* configure_system: Implement with for looplat9nq2023-07-211-2/+2
|
* patch_manager: remove unnecessary GetSize callsLiam2023-06-161-5/+4
|
* Merge pull request #10591 from keve1227/localized-game-iconsliamwhite2023-06-071-1/+32
|\ | | | | Localize game icons
| * Fix typoKevin Sundqvist Norlén2023-06-031-1/+1
| | | | | | Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
| * Pick game icon based on the configured system languageKeve12272023-06-031-1/+32
| |
* | vfs: add vfs_cached for romfs buildLiam2023-06-031-2/+3
|/
* core/file_sys: fix alignment of BuildIdLiam2022-08-211-2/+2
|
* core/file_sys: fix BuildId paddingLiam2022-08-191-8/+6
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | 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
|
* general: Fix clang/gcc build errorsameerj2022-03-201-0/+4
|
* core: Reduce unused includesameerj2022-03-191-1/+0
|
* Dump patched exefs rather than baseKelebek12022-02-151-9/+9
|
* patch_manager: Do not apply LayeredFS mods when dumpingMorph2021-06-281-2/+4
| | | | We should not apply any mods when dumping a game's RomFS.
* core: Simplify SDMC mod loadinglat9nq2021-06-281-19/+6
| | | | | | | | | | 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-281-2/+29
| | | | | | Enables loading a mod directly from `[yuzu data directory]/sdmc/atmosphere/contents/[title_id]`. For use with some homebrew mod managers.
* common: fs: Rework the Common Filesystem interface to make use of ↵Morph2021-05-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::filesystem (#6270) * 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
* common: Move settings to common from core.bunnei2021-04-141-1/+1
| | | | - Removes a dependency on core and input_common from common.
* file_sys: Consolidate common Title ID operationsMorph2020-12-081-2/+2
|
* patch_manager: Remove usages of the global system instanceLioncash2020-11-181-44/+37
| | | | | | | With this, only 19 usages of the global system instance remain within the core library. We're almost there.
* core/CMakeLists: Make some warnings errorsLioncash2020-10-131-1/+1
| | | | | | | | | 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.
* 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-141-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-141-53/+59
| | | | | 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-141-3/+12
| | | | | These functions are only used within this translation unit, so we can make them internally linked.
* file_sys: Replace inclusions with forward declarations where applicableLioncash2020-08-231-2/+1
| | | | Same behavior, minus unnecessary inclusions where not necessary.
* 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.
* Make copying directory string more conciselat9nq2020-05-281-2/+1
|
* Address requested changeslat9nq2020-05-281-3/+3
|