Skip to content

fix: read the GameCube FST so junk detection can find file ends - #29

Merged
encounter merged 1 commit into
encounter:mainfrom
rom-weaver:fix-gc-fst-junk
Sep 16, 2026
Merged

encounter merged 1 commit into
encounter:mainfrom
rom-weaver:fix-gc-fst-junk

Conversation

@brandonocasey

@brandonocasey brandonocasey commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Noticed while benchmarking against dolphin-tool that one GameCube disc came out 8.4% bigger from nod at the same codec/level/block size. Turns out DiscReader::new never fills in raw_fst for GameCube discs, so junk detection has no file ends to work with — any sector that starts with file data gets its junk tail compressed as real data instead of packed as a seed.

This reads the FST the same way the Wii path already does. That disc goes from 118 MB to 108.4 MB (dolphin-tool gets 108.9 MB), and the RVZ still converts back to a SHA-1-identical ISO.

cargo test --workspace passes, cargo +nightly fmt is clean.

@encounter

Copy link
Copy Markdown
Owner

Good catch, thank you!

@encounter
encounter merged commit e460036 into encounter:main Sep 16, 2026
44 checks passed
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.

2 participants