Skip to content

Add CHD support for SCSI disks and CD-ROMs#17

Merged
techomancer merged 3 commits into
techomancer:mainfrom
danifunker:add-chd
May 21, 2026
Merged

Add CHD support for SCSI disks and CD-ROMs#17
techomancer merged 3 commits into
techomancer:mainfrom
danifunker:add-chd

Conversation

@danifunker
Copy link
Copy Markdown
Contributor

Wraps libchdman-rs to mount .chd files anywhere a regular disk image is accepted. HD CHDs are writable (in-place for uncompressed, MAME-style .diff.chd sidecar for compressed parents); CD CHDs expose cooked 2048-byte sectors read-only.

Vibe coded this PR.

Tested execution on my Macintosh Pro M4. Figured you might like this

danifunker and others added 2 commits May 18, 2026 07:07
Wraps libchdman-rs to mount .chd files anywhere a regular disk image is
accepted. HD CHDs are writable (in-place for uncompressed, MAME-style
.diff.chd sidecar for compressed parents); CD CHDs expose cooked
2048-byte sectors read-only.

Vibe coded this PR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@danifunker
Copy link
Copy Markdown
Contributor Author

I just updated the PR to use my crate version, this saves a fair chunk of time as it's using prebuilt binaries for the libchdman-rs library.

@techomancer
Copy link
Copy Markdown
Owner

thanks!
looks great, can we make it optional feature though since some users may not want to pull github crates, and i think it is fine to compile everything, we have bigger crates already, so the prebuilt stuff is not necessary?
it is really useful because it should be easy for lots of folks to use ready to use mame chds

CHD support pulls in libchdman-rs (and a prebuilt native chdman blob),
which is unnecessary for users who only use raw disk images. Gate the
chd_disk module, DiskBackend::ChdHd/ChdCd variants, and the wd33c93a
mount path behind a new `chd` feature, off by default. Mounting a
`.chd` path without the feature returns an Unsupported error pointing
the user at `--features chd`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@danifunker
Copy link
Copy Markdown
Contributor Author

danifunker commented May 20, 2026

PR has been updated, build with
cargo build --release --features chd (updated readme as well for this)

I still think using the prebuilt is much better so that way you don't have to clone the entire mame and build it out, which on Windows is super slow.

@techomancer techomancer merged commit 76c2fc5 into techomancer:main May 21, 2026
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