eden-nx2-old/src/core/loader
Repository files (latest commit first)
Filename Latest commit message Latest commit date
PavelBARABANOV 58968bd127
[core] Support block-compressed NSZ and XCZ (#4552)
- [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](33618c89e5)) 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>
2026-10-26 17:23:18 +01:00
..
deconstructed_rom_directory.cpp [fmt] use {#:x} instead of 0x{:#x} (#4170) 2026-07-25 21:47:07 +02:00
deconstructed_rom_directory.h [hle] Fixes for nxident, nxmp and nxplay, remove hbl.nsp workarounds (#3996) 2026-06-12 23:48:24 +02:00
kip.cpp [fmt] use {#:x} instead of 0x{:#x} (#4170) 2026-07-25 21:47:07 +02:00
kip.h general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
loader.cpp [core] Support block-compressed NSZ and XCZ (#4552) 2026-10-26 17:23:18 +01:00
loader.h [core] Support block-compressed NSZ and XCZ (#4552) 2026-10-26 17:23:18 +01:00
nax.cpp vfs: expand support for NCA reading 2023-08-15 17:47:25 -04:00
nax.h vfs: expand support for NCA reading 2023-08-15 17:47:25 -04:00
nca.cpp [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
nca.h [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
nro.cpp [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
nro.h arm: Implement native code execution backend 2023-11-25 00:46:47 -05:00
nso.cpp [loader] add ZBIC (zstd variant) NSO decompression support for Switch 22.0+ (#4482) 2026-09-27 12:48:45 +02:00
nso.h [loader] add ZBIC (zstd variant) NSO decompression support for Switch 22.0+ (#4482) 2026-09-27 12:48:45 +02:00
nsp.cpp [core] Support block-compressed NSZ and XCZ (#4552) 2026-10-26 17:23:18 +01:00
nsp.h core: implement basic integrity verification 2023-09-06 16:49:27 -04:00
xci.cpp [android/fs] external content loader + nca/xci patches (#3596) 2026-03-04 22:51:35 +01:00
xci.h core: implement basic integrity verification 2023-09-06 16:49:27 -04:00