aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/nsp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core] Support block-compressed NSZ and XCZ (#4552)PavelBARABANOV9 days1-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | - [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>
* [core, hle, video_core, memory] Improve multi-process, display layers, ↵Maufeat2026-08-291-2/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* [hle] Fixes for nxident, nxmp and nxplay, remove hbl.nsp workarounds (#3996)lizzie2026-06-121-2/+1
| | | | | | | | | | | | | | | adds `gpio` and `i2c` services implements `IApplicationFunctions::SetMediaPlaybackStateForApplicatio` stubs `IBtmSystemCore::GetDiscoveredAudioDevice` implements `nvhost_ctrl_gpu::PmuGetGpuLoad` IOCTL (0x20) implements `PSM::GetBatteryAgePercentage`, `PSM::GetBatteryVoltageState` and `PSM::GetBatteryChargeInfoFields` implements `ISystemSettingsServer::GetConsoleInformationUploadFlag`, `ISystemSettingsServer::SetConsoleInformationUploadFlag`, `ISystemSettingsServer::GetAutomaticApplicationDownloadFlag`, `ISystemSettingsServer::SetAutomaticApplicationDownloadFlag`, `&ISystemSettingsServer::GetUsb30EnableFlag`, `ISystemSettingsServer::SetUsb30EnableFlag` removes `hbl.nsp` specific workarounds Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3996 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [android/fs] external content loader + nca/xci patches (#3596)xbzk2026-03-041-11/+25
| | | | | | | | | | | | | | | | | | | | 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>
* loader: also register fs process for raw exefs partitionLiam2024-01-231-0/+8
|
* fsp-srv: use program registry for SetCurrentProcessLiam2024-01-111-1/+2
|
* core: improve debug workflowLiam2023-09-141-1/+2
|
* core: implement basic integrity verificationLiam2023-09-061-0/+36
|
* vfs: expand support for NCA readingLiam2023-08-151-4/+0
|
* 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.
* core: Remove unused includesameerj2021-11-031-1/+0
|
* file_sys: Support load game collection (#6582)Feng Chen2021-07-201-16/+18
| | | Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
* hle: kernel: Rename Process to KProcess.bunnei2021-05-051-2/+2
|
* loader: Resolve instances of variable shadowingLioncash2021-04-271-20/+33
| | | | | Eliminates variable shadowing cases across all the loaders to bring us closer to enabling variable shadowing as an error in core.
* core: loader: Implement support for loading indexed programs.bunnei2020-11-241-2/+3
|
* patch_manager: Remove usages of the global system instanceLioncash2020-11-181-6/+13
| | | | | | | With this, only 19 usages of the global system instance remain within the core library. We're almost there.
* core/loader: Remove dependencies on the global system instanceLioncash2020-09-161-4/+3
| | | | | | | | | Now all that remains is: 18 instances in file_sys code 14 instances in GDB stub code (this can be tossed wholesale) 4 instances in HLE code 2 instances in settings code.
* yuzu: Port old usages of Filesystem namespace to FilesystemControllerZach Hilman2019-09-211-1/+3
|
* Merge pull request #2576 from DarkLordZach/nsp-fix-1David2019-09-211-14/+13
|\ | | | | nsp: Fix various errors with loading and processing of extracted NSPs
| * nsp: Correct status codes for extracted NSPsZach Hilman2019-06-101-13/+12
| | | | | | | | 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-1/+1
| | | | | | | | Avoids 0 being used as title ID for all extracted NSPs.
* | file_sys: Rename other ContentRecordType membersBakugo2019-07-021-1/+2
| |
* | loader: Move NSO module tracking to AppLoaderZach Hilman2019-05-261-0/+4
|/ | | Also cleanup of general stuff
* core/core: Move process execution start to System's Load()Lioncash2019-04-111-15/+23
| | | | | | | | | This gives us significantly more control over where in the initialization process we start execution of the main process. Previously we were running the main process before the CPU or GPU threads were initialized (not good). This amends execution to start after all of our threads are properly set up.
* loader: Propagate NCA logo section to ReadBanner and ReadLogoZach Hilman2019-01-151-0/+9
|
* loader: Add accessor for Manual RomFSZach Hilman2018-12-281-0/+8
|
* loader: Add accessor for game control dataZach Hilman2018-12-271-2/+2
|
* loader: Add support for reading the name of game's developerZach Hilman2018-12-031-0/+7
|
* loader/nsp: Move secondary loader initialization to constructorZach Hilman2018-10-271-17/+20
| | | | Prevents nullptr bug when trying to dump the RomFS of an NSP resulting from secondary_loader not being initialized.
* patch_manager: Return a std::unique_ptr from ParseControlNCA() and ↵Lioncash2018-10-091-1/+1
| | | | | | | | | | | | | | | | GetControlMetadata() instead of a std::shared_ptr Neither of these functions require the use of shared ownership of the returned pointer. This makes it more difficult to create reference cycles with, and makes the interface more generic, as std::shared_ptr instances can be created from a std::unique_ptr, but the vice-versa isn't possible. This also alters relevant functions to take NCA arguments by const reference rather than a const reference to a std::shared_ptr. These functions don't alter the ownership of the memory used by the NCA instance, so we can make the interface more generic by not assuming anything about the type of smart pointer the NCA is contained within and make it the caller's responsibility to ensure the supplied NCA is valid.
* romfs_factory: Extract packed update setter to new functionZach Hilman2018-10-051-0/+6
|
* loader: Add getter for packed updateZach Hilman2018-10-051-0/+18
| | | | Reads the update included with the game if it has one and adds the new ErrorNoPackedUpdate status.
* loader: Add ReadRomFSIVFCOffset to NSP, XCI, and NAX loadersZach Hilman2018-10-051-2/+6
| | | | Fixes errors with certain updates
* loader: Make the Load() function take a process as a regular reference, not ↵Lioncash2018-09-291-3/+1
| | | | | | | | | | a SharedPtr A process should never require being reference counted in this situation. If the handle to a process is freed before this function is called, it's definitely a bug with our lifetime management, so we can put the requirement in place for the API that the process must be a valid instance.
* patch_manager: Centralize Control-type NCA parsingZach Hilman2018-09-041-15/+5
|
* main: Only show DRD deprecation warning onceZach Hilman2018-09-041-1/+1
|
* nsp: Comply with style and performance guidelinesZach Hilman2018-09-041-2/+9
|
* loader: Add AppLoader for NSP filesZach Hilman2018-09-041-0/+128