aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys
Commit message (Collapse)AuthorAgeFilesLines
* nup_writer: keep the dump's own layout for non-exefs/romfs entriesa55uka28 hours1-2/+5
|
* file_sys: reject NUP tables with wrapping bounds or cyclic directoriesSssnowyyy33 hours2-15/+82
| | | | | | | | | | | | | | | | | | 31b901b93b checked the TOC with unchecked arithmetic on counts and offsets read from the file. The record-table size (u64 count times record size) and u32 first_child + child_count can wrap, so the bounds checks pass and later reads go out of bounds; the same holds for the TOC range, name ranges, file extents and the meta range. A directory that lists its own ancestor as a child also made BuildDirTree recurse until the stack overflowed. Bound the counts by the TOC size before multiplying, compare ranges by subtraction, and widen the child range to u64. Walk the directory graph once after parsing with an explicit stack and reject cycles and nesting deeper than 128, so BuildDirTree can no longer recurse without bound. The file is rejected with ErrorNUPBadFormat. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
* file_sys: decompress large NUP zstd members onceSssnowyyy33 hours3-21/+153
| | | | | | | | | | | | | | | | | | | 31b901b93b only cached a zstd member while it fit the 512 MiB cache. Anything larger was never cached, so every Read() allocated the full uncompressed size and decompressed the whole extent again, which makes a multi-GB RomFS read in small chunks unusably slow. Members between 256 and 512 MiB evicted each other on alternate reads, and Insert copied the vector so memory briefly doubled. Two threads decompressing the same member also left a duplicate LRU entry and a wrong byte count. The writer emits one zstd frame per member, so there are no frame boundaries to seek by. Members larger than half the cache are now streamed once into a temporary file under the cache directory and read from there, using bounded memory. The file is removed when the container is released. Smaller members stay in the LRU, which now moves the vector in and ignores a duplicate insert. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
* file_sys: let the NUP packer override and probe the name, icon and versionkraibse36 hours2-3/+113
| | | | | | | | | | PackOptions::metadata overrides the title name, icon and display version found in the dump. A version override is written to the base and to the newest update, since the NUP loader reads the version from the newest update first. ProbeMetadata reads what a dump would be packed with, the version coming from the newest update that reports one, else the base. Assisted-by: Claude Sonnet 5.5 (wrote the metadata overrides, ProbeMetadata and their test)
* Merge nx2 into nx2-experimentalkraibse39 hours2-0/+1519
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved by area: - audio feature_support.h: nx2's native revision handling. - fiber.cpp: ours, which also drops the unused rewind stack. - host_memory.cpp: ours granule bitmap and HintCold, plus nx2's fallocate hole punching per whole dirty granule on Linux. - texture_cache.h: nx2's old-age eviction pass, then our Collect(). - kepler_compute.cpp: shared upscale slots, then Fortune's Weave's, then the Kirby Air Riders scan. - nx2_gsv.h: ours, plus nx2's GetBufferMaxResolution and graphics device ids (1-based). - nvhost_ctrl_gpu.cpp: engine support flag bits 40-44. - lower_to_maxwell.h: ours as the base, with nx2's seven lowering commits applied one at a time. Second texture descriptor buffers are read bindless in TEX, TLD.SCR (level zero) and SUST; FSEL keeps its operand modifiers; TXD takes any channel mask. lower_to_maxwell.h lowers 837 Fortune's Weave and 1183 Mario Kart World shader dumps with the same rejects as nx2 and ours (12 and 0). Assisted-by: Claude Sonnet 5.5 (conflict analysis and drafting)
| * file_sys: add a deterministic NUP packer, Convert to NUP in Qt and eden-cli ↵Jonas45 hours2-0/+1519
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --pack-nup (#271) * file_sys: add a NUP packer for loose dumps Packs a loose dump (exefs/romfs, base/, updates/<version>/ and dlc/<titleid>/<n>/) into a NUP v1 container with the aligned record layout. Every package is kept, files are deduplicated by SHA-256 and compressed with zstd unless that does not shrink them, and files over 256 MiB are stored raw. Output is byte-identical on every platform: compression is single-threaded with every frame parameter set explicitly, and zstd is always bundled so all builds use the same version. A low-storage mode deletes each source file once its extent is synced and journaled, and an interrupted run resumes from the journal. Assisted-by: Claude Opus 5.5 (wrote the packer, its EdenPack-free dump detection, the aligned record layout and the deterministic zstd setup; ran the Raiders and Donkey Kong Bananza packs and boot checks) * tests: cover the NUP packer Round-trips a dump through NupContainer, checks standalone updates, a bare exefs/romfs dump, low-storage resume and overwrite rejection, and pins the hash of a packed dump so changes to the output are deliberate. Assisted-by: Claude Opus 5.5 (wrote the tests, including the pinned output hash) * qt: add Convert to NUP to the game list Shown for loose dumps. Asks for confirmation with the estimated space, offers low-storage mode, runs in the background with progress and cancel, and resumes an interrupted low-storage conversion. Assisted-by: Claude Opus 5.5 (wrote the Convert to NUP action and its progress and resume handling) * cli: add --pack-nup <dump> [out.nup] Assisted-by: Claude Opus 5.5 (wrote the --pack-nup option)
| * nup_container: update record layouts to aligned NUP v1 fieldsa55uka2 days1-23/+43
| |
* | nup_container: update record layouts to aligned NUP v1 fieldsa55uka2 days1-23/+43
| |
* | Merge pull request #258 from Djihads80/nx2Assuka2 days2-0/+833
|\| | | | | bring nx2-experimental up to date
| * loader: add NUP (Unencrypted (Archival) Package) container supporta55uka2 days2-0/+833
| |
* | Merge remote-tracking branch 'origin/fix/vfs-real-forget-closed-paths' into ↵Takoroka2 days2-3/+9
|\ \ | | | | | | | | | test/linux-all-prs
| * | vfs_real: forget a path when its file is goneTakoroka2 days2-3/+9
| |/ | | | | | | | | | | | | | | | | | | The path cache holds weak references, but nothing erased an entry once its file was destroyed, so every path ever opened stayed in the cache until the filesystem was destroyed (title 1's loose RomFS: 206k paths, 24 MB of keys, kept after the game stops). The entry is erased when the file's last reference is dropped, unless the path was opened again meanwhile.
* | Merge remote-tracking branch 'origin/fix/vfs-real-file-path-only' into ↵Takoroka2 days2-16/+17
|\ \ | | | | | | | | | test/linux-all-prs
| * | vfs_real: keep only the path in a real fileTakoroka2 days2-16/+17
| |/ | | | | | | | | | | | | | | | | A real file kept its path three times: the path, its parent's path, and the path split into components, which only gave the file's name. A loose RomFS keeps one real file alive per file while the game runs: title 1's 206k files took 160 MB, now 48 MB. The name and the parent path are derived from the path when asked, so a directory no longer passes its own path to the files it opens.
* | Merge remote-tracking branch 'origin/fix/romfs-build-tree-cycle' into ↵Takoroka2 days1-12/+15
|\ \ | | | | | | | | | test/linux-all-prs
| * | file_sys: don't let a RomFS build's nodes own each otherTakoroka2 days1-12/+15
| |/ | | | | | | | | | | | | | | | | Each directory owned its parent and its children, and each file its parent, so the whole tree of every build kept itself alive after the build was done. Title 1's loose RomFS (206k files) left ~45 MiB per build. The context's lists own the nodes; the links between them are plain pointers.
* | file_sys: serve an empty archive for missing Switch 2 system dataTakoroka5 days1-0/+14
| | | | | | | | | | | | | | | | Switch 2 system data (ids 04...) is not part of Switch 1 firmware, and a title aborts when it cannot mount it: Nintendo Switch Sports Resort asks for 0400000000000849 right after boot. Synthesize an empty archive for such ids (logged), so it boots to its first screens. EDEN_NX2_EMPTY_SYSTEM_DATA=0 fails the request as before.
* | file_sys: don't format a null name for an unknown system archiveTakoroka5 days1-0/+5
|/ | | | | | | | SynthesizeSystemArchive logged the archive's name before checking it was one it knows: for any other data id the name is null, fmt throws, nothing catches it and the process ends (Nintendo Switch Sports Resort, ~10 s in, from fsp OpenDataStorageByDataId). Return no archive with a warning, so OpenDataStorageByDataId fails the request as before.
* vfs: keep the open-file cache below RLIMIT_NOFILE on Unixyvonne5 days1-5/+14
| | | | | | | | | | | | | The VFS cache allowed up to 8192 open files on Unix, and main() set the soft RLIMIT_NOFILE to exactly 8192. With large loose romfs dumps (e.g. ~205k files) the cache could exhaust every descriptor, so unrelated opens failed with EMFILE and games crashed on the failed loads. Size the cache from the actual soft limit with 512 descriptors spare, as is already done on Windows, and only raise the limit in main() instead of also lowering higher limits down to 8192. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* vfs: keep the open-file cache below the CRT limitTakoroka7 days1-2/+16
| | | | | | | | | The real VFS kept up to 8192 host files open, which is also the most the Windows C runtime allows (_setmaxstdio(8192)). A game read from a loose RomFS folder fills that within minutes (title 4: ~7300 handles after 160 s); from then on every other open failed with "too many files open" - its next scene pack, its save file, the shader cache - and the game waited forever on the load. Cap the cache 512 below _getmaxstdio() on Windows.
* Switch 2: window image sizes, queue semaphores, built-in fonts, memory budgetTakoroka7 days2-0/+6
| | | | | | | | | | | | - gsv 1510 CalculateRequirements: block-linear size/alignment for window images. - nvhost-gpu: Switch 2 channel event 7 is a real (unsignalled) event. - Puller mirrors NVN2 queue semaphore releases into the page the CPU and GPU wait on (the first two-page nx2:gpu region); EDEN_NX2_METHOD_TRACE logs methods. - pl:u 2000/2010 GetBuiltInFontSharedMemory/GetBuiltInFontData serve plain TTF copies of the shared fonts. - Switch 2 processes count the alias region in their max memory, so the game's nninitStartup heap (total - 6.3 GiB) has room for its sound heap. - gdbrsp.py: interrupt, threads, selthread, hits, continue_async, sleep.
* npdm: parse the Switch 2 ACID layoutTakoroka8 days1-2/+19
| | | | | | | | Switch 2 ACID blocks have a 0x300-byte signature/key area (Switch 1: 0x200), so the ACID header starts 0x100 bytes later. Without this the FAC offset was garbage and loading failed with ErrorBadFileAccessControl. Also read FAC/FAH relative to their ACID/ACI block, as the format (and the existing KAC read) does.
* [file_sys] added log for newer keys needed error (#4519)xbzk9 days1-0/+1
| | | | | | | | | | | | | - [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. ------------------- One log line which could have spared me from a lot of trouble. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4519 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
* [core] Support block-compressed NSZ and XCZ (#4552)PavelBARABANOV9 days2-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | - [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. ------------------- - Add NCZBLOCK (nsz -B / .xcz) reader: each read decodes only the covered blocks and re-encrypts CTR sections, no disk output. - Allow installing solid .nsz to NAND via DecompressNCZForInstall (lazy, incremental decode with frontier, O(n) instead of O(n^2)). - Accept BKTR updates with thousands of sections (MaxSectionCount = 0x10000). - Wire .nsz/.xcz into loader, registered cache, scanner, and NAND install (content_manager.h), and reject solid NCZ from the game list. - Bump the pinned zstd to 33618c8 in cpmfile.json, which includes the upstream AArch64 revert ([33618c89](https://github.com/facebook/zstd/commit/33618c89e511637f8a6ef955b3501766d71feb53)) for a ZSTD_decodeSequence branch optimization that could corrupt data on ARM64; without it, solid NCZ decoding on Android fails with "Data corruption detected". NCZ format and CTR counter semantics follow the reference nsz tool and its Rust port: - https://github.com/nicoboss/nsz (Decompressor.py, BlockDecompressorReader.py) - https://docs.rs/nsz-rs/0.3.0/src/nsz_rs/decompress.rs.html The last-block edge case (decompressed size is an exact multiple of block size) is handled as described in https://github.com/nicoboss/nsz/issues/210 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4552 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
* [common] Use `std::make_unique_for_overwrite<T>` in ScratchBuffer, remove ↵lizzie2026-09-252-10/+8
| | | | | | | | | | | | | | | | | | | | polyfill (#4432) Original `make_unique_for_overwrite.h` is well defined acc. to standard https://en.cppreference.com/cpp/memory/unique_ptr/make_unique, but by now most libc++ supports the function, so no need for polyfill. Test that this didn't break anything (for example, Megaman game that has video at the start), or anything using VIC/IPC. Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4432 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [ips_layer] read magic from IPS file and fix EOF check (#4469)PavelBARABANOV2026-09-231-4/+7
| | | | | | | | | | | | | | | | | - [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. ------------------- PatchIPS was reading the magic bytes from the target file instead of the IPS patch, and IsEOF used a strict > comparison that never matched for 3-byte IPS EOF markers. This caused IPS patches to be silently skipped, breaking the Russian localization mod for Persona 5. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4469 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [fs] revert #4319 savedata_factory changes (#4462)xbzk2026-09-202-15/+8
| | | | | | | | | | | | | | | | | | - [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. ------------------- This one reverts part of the PR 4319 which was aimed to allow child titles to inherit bundle settings. The fix seems good so far, but by applying it to save folders caused a trap: Now child's save folders move to bundle folder, hence saves will vanish, and the android/qt save tools are still pointing to old folders. Since the save part was only a compliance fix, instead of fiddle in master i'd rather revert this part now, then only touch this again if any bug show up. No worries. I'll be right here waiting. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4462 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [fs] share parent resources with bundled programs (#4319)xbzk2026-09-186-26/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - [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>
* [ips] fix .pchtxt with >256 bytes on a single line (#4445)lizzie2026-09-171-18/+18
| | | | | | | | | | | | | | | | It wasn't correct to assume pchtxt would've been less than 256 bytes per line. Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4445 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [fs] moved temp folder cleanup upstream (per-application level) to avoid ↵xbzk2026-09-101-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | per-program retrigger (#4375) - [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. ------------------- This issue was observed in MGS Master Collection Volume II, MGS4: Guns of the Patriots, Chapter 4: Shadow Moses That title is a bundle, and that specific chapter is a program (MGS 1st stage), launched by a program (MGS4), launched by an application (main title bundle). Upon decoding guest panic message, it was exposed that an abort was triggered after trying to create a save in nand/temp/gclvar.bak file. Further instrumentation exposed the error on that file's path, caused from a previous deletion of that folder. In the same session that folder had been already cleaned and created successfully, which evidences an undesired re-cleaning of the temp structure. The issue was the fact that the MGS4 to MGS transition also calls EnsureSaveData>...>SaveDataFactory creator, and that was destroying the previous created temp structure. After that stage, the return from MSG to MSG4 was causing the same issue again. By moving the deletion to the guest application level, the factory creation was called only once, as it should be, and the issue is gone. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4375 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: lizzie <lizzie@eden-emu.dev>
* [hle] Firmware 23.0.0 (#4390)lizzie2026-09-101-4/+8
| | | | | | | | | | | | | | | | | | Preparing when something inevitably requires *at least* this reporting of version/etc. Authored-by: @Maufeat Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- Co-authored-by: Maufeat <sahyno1996@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4390 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [ips_layer] remove trailing whitespace to fix hex parsing on TLTD mods (#4336)lizzie2026-09-091-5/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- ...another edge case, this time with `00297f24 34008052 // 60FPS` would get parsed as `34008052 ` which isn't quite correct Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4336 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [hle] correct IClientProcess::RegisterClient, impl cmd 3100,3102 for ns:vm ↵lizzie2026-09-091-0/+4
| | | | | | | | | | | | | | | | | | | (#4376) ldn had wrong signature ns:vm had missing function stubs that would make some games assert on missing impl Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4376 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [cmake] Fix some macOS compilation errors (#4350)lizzie2026-09-0511-3/+34
| | | | | | | | | | | | | | | | | | | | Don't compile GLSL/GLASM backends without OpenGL enabled. These codepaths are unused on non-OpenGL platforms. Fixes other miscellaneous errors that pop up on Clang 23 as well. Signed-off-by: Lizzie lizzie@eden-emu.dev Signed-off-by: crueter crueter@eden-emu.dev - [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. ------------------- Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4350 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [common] Switch to boost::unordered_flat containers (#4326)crueter2026-08-314-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces all instances of ankerl's unordered map/set with boost's `unordered_flat_*` classes. This uses std::hash since boost::hash is actually a lot slower. Also adds an abstraction layer in `Common` so future changes are quicker and easier. Other implementation details: - ankerl provided hash specializations for tuple and pair, so those were ported here - std::erase_if doesn't work on boost, so just used the ADL'd erase_if This should be about equal or superior performance as unordered_dense for everything except iteration. Signed-off-by: crueter <crueter@eden-emu.dev> - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4326 Reviewed-by: Lizzie and Samuel <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [core/file_sys] fix IPS not applying due to wrong NSObuild-id (#4323)lizzie2026-08-301-31/+57
| | | | | | | | | | | | | | | | | Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- NSO build id was being read wrongly... oops also fixed some minor issues as well Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4323 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [file_sys] robust-er IPSwitch compiler (#3911)lizzie2026-08-303-249/+165
| | | | | | | | | | | | | | | | | | | | | | | | 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, hle, video_core, memory] Improve multi-process, display layers, ↵Maufeat2026-08-297-16/+71
| | | | | | | | | | | | | | | | | | | | | dynamic shader cache and rework overlay (#4238) - [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. ------------------- - Dynamic shader cache reloading capability for qlaunch - Multi-process improvements (thanks to @frank1734), instead of just using the main application we now respect caller process (also did it for HID devices while I was at it) - Layer stack masks & shared buffer screenshot for video core, added different masks (screenshot, recording, etc.) this was discovered as an issue due to how in qlaunch the transition was not right between applications. May not be perfect but also fixes screenshots while using qlaunch - Reworked overlay display management (input and visibility) - instead of random numbers as I've previously did, I decided to add an AppletZIndex enum for better readability. Also split capability of input by touch and gamepad. - etc. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4238 Reviewed-by: Samuel <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [core/file_sys] implement IApplicationFunctions::GetPseudoDeviceId; common ↵lizzie2026-08-043-17/+29
| | | | | | | | | | | | | | | | 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>
* [fmt] use {#:x} instead of 0x{:#x} (#4170)lizzie2026-07-253-11/+11
| | | | | | | | | | continuation of #309 but applying to even more files than before :) also makes them lowercase because `0xfafafa` is better as `0XFAFAFA` Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4170 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [fs] fix crash on '#' comments in pchtxt patches (#4124)crueter2026-07-251-1/+1
| | | | | | | | | | | | | Adds `#` as a valid pchtxt comment, and fixes a crash that could occur when using odd-length values This patch was sent by Adam Kittelson <adam@apathydrive.com> Signed-off-by: crueter <crueter@eden-emu.dev> Co-authored-by: Cole Avenue <cole@melisand.re> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4124 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* [file_sys] Quick sandbox escape fix (#4223)Maufeat2026-07-251-3/+15
| | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4223 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [nce, fs] tico support, fix FS bug that would nuke entire 'switch' folder ↵xbzk2026-07-233-2/+19
| | | | | | | | | | | | | | | (#4086) Contains the minimal set of functionalities to allow tico installer succeed, and tico work normally EXCEPT for game launching (which me or someone else will investigate later) First three commits are from PR 4012. The other six, kinda dizzy to explain each one. All were implemented based on tico source, switchbrew and libnx. Hopefully the commit messages will do. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4086 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [msvc] fix error with new <T>bitfields (#4196)lizzie2026-07-131-1/+1
| | | | | | | | | fixes MSVC build errors Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4196 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [common] rework BitField and BitUtil, use concepts whenever possible (#4076)lizzie2026-07-092-6/+3
| | | | | | | | | | test no regressions especially on Liiinux Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4076 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [core/hle] update fw constants to 22.5.0, ams -> 1.11.2, implement /digest ↵lizzie2026-07-092-25/+35
| | | | | | | | | | | | | | file (#4165) adds `/digest` file implementation alongisde the hashes and constants for firmwareless installs and yes ams updated as well Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4165 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [game_list] fix crash and flashing from the directory watcher (#4099)BoiledElectricity2026-06-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | So the game list watcher could rebuild the content providers (CreateFactories) while the populate worker was still scanning them, and the worker would walk a torn-down RegisteredCache and segfault in OpenFileOrDirectoryConcat. Fixed by stopping and joining the worker before rebuilding. On macOS the watcher also re-armed itself every populate. Re-adding the same paths makes QFileSystemWatcher re-emit directoryChanged (the FSEvent comes in async, so the blockSignals guard misses it), so it just kept refreshing and the list flashed forever. Now it only re-arms when the watched dirs actually changed. Also null-guarded OpenFileOrDirectoryConcat so a torn-down cache cant null-deref there. Related: https://github.com/eden-emulator/Issue-Reports/issues/336 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4099 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [file_sys] Avoid crash on empty NACP language entries (#4062)bdm1102026-06-051-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an Android game library scan crash when reading XCI title metadata with empty or incomplete NACP language entries. Previously, NACP::GetLanguageEntry() could fall back to: language_entries.at(static_cast<u8>(Language::AmericanEnglish)) When language_entries was empty, this threw std::out_of_range and aborted the Android scan thread. The new fallback preserves the existing lookup order: 1. preferred language entry with non-empty application name 2. any entry with non-empty application name 3. first available entry 4. static empty LanguageEntry if no entries exist Tested locally with a Mainline RelWithDebInfo APK on Odin3 Android 15 using a large external TF-card ROM directory. The previous build crashed during fresh ROM scan; the patched build completes scanning normally. Related my issue: https://github.com/eden-emulator/Issue-Reports/issues/500 Co-authored-by: bdm110 <bdm110@prontmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4062 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [*] basic in-house cpp linting (#4039)lizzie2026-06-041-2/+2
| | | | | | | | | | | | - add `#pragma once` to remainder files - "correcter" defines (ANDROID), see https://groups.google.com/g/android-ndk/c/cf9_f1SLXls - extra miscelly fixups Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4039 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [file_sys] Increase max file limit to 8192 (#4011)crueter2026-05-251-1/+1
| | | | | | | | | Now hopefully the Redditors can get off my ass for five seconds Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4011 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>