From 926e7ac6af102956b08cc053d81527ec3be855a2 Mon Sep 17 00:00:00 2001 From: Jonas <104419015+jojo-chaechae@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:39:49 +0600 Subject: file_sys: add a deterministic NUP packer, Convert to NUP in Qt and eden-cli --pack-nup (#271) * file_sys: add a NUP packer for loose dumps Packs a loose dump (exefs/romfs, base/, updates// and dlc///) 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 [out.nup] Assisted-by: Claude Opus 5.5 (wrote the --pack-nup option) --- src/core/launch_params.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/launch_params.h') diff --git a/src/core/launch_params.h b/src/core/launch_params.h index 4da30fc1c2..8d503770d8 100644 --- a/src/core/launch_params.h +++ b/src/core/launch_params.h @@ -23,6 +23,8 @@ struct LaunchParams { std::optional selected_user{}; std::optional override_gdb_port{}; std::optional log_filter{}; + // --pack-nup []: packs a loose dump instead of booting a game (eden-cli). + std::optional pack_nup_source{}; u16 port = Network::DefaultRoomPort; bool use_multiplayer = false; bool fullscreen = false; -- cgit v1.2.3