Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support loading Zstandard-compressed ROMs #1667

Merged
merged 7 commits into from
Apr 28, 2023
Merged

Conversation

nadiaholmquist
Copy link
Collaborator

@nadiaholmquist nadiaholmquist commented Apr 15, 2023

This feature adds support for loading individual ROMs compressed using Zstandard.

Zstandard is able to achieve a good compression ratio while also having incredibly fast (de)compression speeds, so no noticeable delay is added when loading even very large compressed ROMs.

This is different from the archive support in that the compressed ROMs are standalone files, rather than archives, making it possible to use them exactly as if they were regular ROMs, while saving a bunch of space on disk. This is supported both for DS and GBA ROMs, though given GBA ROMs' generally small size it's mostly useful for the former.

I'm posting this as a PR rather than directly committing it to see what people think about this feature, it's relatively close to the existing archive feature, so it might be superfluous to have this too, but it's something I'd personally want to use.

To test this, install Zstandard (should be in all Linux package repositories and Homebrew for macOS), and then simply run zstd YourROM.nds, and you should be able to run the resulting YourROM.nds.zst in melonDS.

This is different from the archive support in that the compressed ROMs
are standalone files, rather than archives, making it possible to use
them exactly as if they were regular ROMs, while saving a bunch of space
on disk. This is supported both for DS and GBA ROMs, though given GBA
ROMs' generally small size it's mostly useful for the former.
what's even the point of find_package when distros don't ship CMake
scripts for a damn thing
@nadiaholmquist nadiaholmquist merged commit 38b0d21 into master Apr 28, 2023
7 checks passed
kvnp pushed a commit to kvnp/melonDS that referenced this pull request Dec 25, 2023
This is different from the archive support in that the compressed ROMs
are standalone files, rather than archives, making it possible to use
them exactly as if they were regular ROMs, while saving a bunch of space
on disk. This is supported both for DS and GBA ROMs, though given GBA
ROMs' generally small size it's mostly useful for the former.
@yazinnnn
Copy link

hi, i tried to load a .nds.zst file, but the melonDS had crashed

the git commit log

commit ea1755bed0378a2f3783e78c5e63c266583218ce (HEAD -> master, origin/master, origin/HEAD)
Author: RSDuck <RSDuck@users.noreply.github.com>
Date:   Tue Mar 12 09:23:20 2024 +0100

    call Start again NDS object after Reset
    fixes issue where game doesn't properly start after changing settings

.......

image

and here is the coredump file
melon.coredump.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants