GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Releases · purelogiccode/CHDSharp Releases · purelogiccode/CHDSharp
CHDSharp v1.6.3a843cd6
This commit was created on GitHub.com and signed with GitHub’s verified signature.
CHDSharp v1.6.3 - What's NewReleased: 2026-11-03 - Full changelog - NuGet CHDSharp v1.6.3 is a small diagnostics release. Download (CLI)
Every bundle contains a framework-dependent single-file Fixed: expected
|
| Platform | Bundle |
|---|---|
| Windows x64 | CHDSharp_win-x64_v1.6.2.zip |
| Windows ARM64 | CHDSharp_win-arm64_v1.6.2.zip |
| Linux x64 | CHDSharp_linux-x64_v1.6.2.zip |
| Linux ARM64 | CHDSharp_linux-arm64_v1.6.2.zip |
| macOS Intel | CHDSharp_osx-x64_v1.6.2.zip |
| macOS Apple Silicon | CHDSharp_osx-arm64_v1.6.2.zip |
Every bundle contains a framework-dependent single-file CHDSharp / CHDSharp.exe
build (the .NET runtime is not embedded) plus LICENSE.txt, README.md, README.txt
and this document. The .NET 10 runtime
is required.
Every exception raised while writing extracted data was folded into
ChdError.Chderrwriteerror, so a codec, path, permission or disk failure all looked the same and
callers could not tell a damaged CHD from an unwritable output volume. This is what produced the
opaque track 3: Chderrwriteerror reports in consuming applications.
InvalidDataException (data/codec failure) maps to Chderrdecompressionerror; output I/O maps toChderrwriteerror.ReadAheadManager.TryGet and Clear can run while Dispose releases the semaphore. A permit
release after disposal is now ignored, so teardown cannot surface an unobserved
ObjectDisposedException.
ExtractToDirectoryWithReporting returns Chderrinvaliddata when a GD-ROM CHD has no readable
tracks instead of dereferencing a null track list.
dotnet build -c Release: 0 warnings, 0 errors; jb inspectcode --severity=WARNING: 0 findings.chdman parity battle: 3,174/3,174 checks passed, byte-identical output.chdman extractcd.
There was an error while loading. Please reload this page.
0570027 Released: 2026-11-02 - Full changelog - NuGet
CHDSharp v1.6.1 is a bug-fix release for the CLI's automatic bug reporting and a documentation
release for the API reference. Expected user mistakes no longer reach the Bug Report API, and the
full per-member API reference is now generated by DocFX and published with the docs site.
| Platform | Bundle |
|---|---|
| Windows x64 | CHDSharp_win-x64_v1.6.1.zip |
| Windows ARM64 | CHDSharp_win-arm64_v1.6.1.zip |
| Linux x64 | CHDSharp_linux-x64_v1.6.1.zip |
| Linux ARM64 | CHDSharp_linux-arm64_v1.6.1.zip |
| macOS Intel | CHDSharp_osx-x64_v1.6.1.zip |
| macOS Apple Silicon | CHDSharp_osx-arm64_v1.6.1.zip |
Every bundle contains a framework-dependent single-file CHDSharp / CHDSharp.exe
build (the .NET runtime is not embedded) plus LICENSE.txt, README.md, README.txt
and this document. The .NET 10 runtime
is required.
The Bug Report API had 383 CHDSharpCli reports and every one was a normal validation outcome, not
a defect: 382 Data size ... is not divisible by sector size 2048 and one
createdvd requires --input <file> --output <file>. Both paths already matched chdman
(chdman.cpp:2263, chdman.cpp:2088): same console text, same exit code 1, no partial output.
They were logged at Warning, and the sink forwards every Warning+ event.
logger.UserError(...), which keeps them atBugReportSink does--force, overridden format options,logger.Warning(...) and are still reported: Open failed,* failed: {Message}, verification failures, TOC and track extraction failures, andchdman parity is untouched (quick battle harness:The public surface is now documented per member at
purelogiccode.github.io/CHDSharp/api/, generated by
DocFX from the XML documentation of CHDSharpLib.
.config/dotnet-tools.json and driven by scripts/build-api-docs.ps1, so thePages workflow builds the Jekyll guides and the DocFX reference into one artifact andbuild_type: workflow); the wiki sync no longer requests a legacy<param> XML-documentation blocks in CHD.cs were removed, so DocFX metadata nowdotnet build -c Release: 0 warnings, 0 errors; jb inspectcode --severity=WARNING: 0 findings.chdman parity battle: 905/905 checks passed.CI gate: three-OS build/test across net8.0/net9.0/net10.0, InspectCode, NuGet packaging,chdman parity smoke.
There was an error while loading. Please reload this page.
Released: 2026-10-29 - Full changelog - NuGet
CHDSharp v1.6.0 is a reliability and supply-chain release: read-ahead teardown no longer blocks on
in-flight I/O, truncated CD sources report exactly where the layout ran out, and the repository
gained a full CI gate with CodeQL, Dependency Review, OpenSSF Scorecard, Dependabot, NuGet audit,
SHA-pinned actions and provenance-attested release assets.
| Platform | Bundle |
|---|---|
| Windows x64 | CHDSharp_win-x64_v1.6.0.zip |
| Windows ARM64 | CHDSharp_win-arm64_v1.6.0.zip |
| Linux x64 | CHDSharp_linux-x64_v1.6.0.zip |
| Linux ARM64 | CHDSharp_linux-arm64_v1.6.0.zip |
| macOS Intel | CHDSharp_osx-x64_v1.6.0.zip |
| macOS Apple Silicon | CHDSharp_osx-arm64_v1.6.0.zip |
Every bundle contains a framework-dependent single-file CHDSharp / CHDSharp.exe
build (the .NET runtime is not embedded) plus LICENSE.txt, README.md, README.txt
and this document. The .NET 10 runtime
is required.
ChdFile.Dispose() and ConfigureReadAhead(0) used to wait for every in-flight read-ahead read.
A stream that ignored cancellation could stall teardown indefinitely. The manager now cancels,
returns immediately, and lets the last background task dispose its semaphore and token source.
In-flight hunks are deduplicated, so two tasks can no longer race to cache the same hunk and leak a
permit. Shutdown cancellation is no longer logged as a decompression failure (important because
Warning+ events are forwarded to the CLI bug-report sink).
A short read while encoding a CD now reports the track, frame within the track, logical frame,
source offset (hex and decimal), sector size, bytes needed/read and the file length. Split-pregap
reads name the next track's file only when that file was actually used.
CI gate - three-OS build/test across .NET 8/9/10, InspectCode, NuGet packaging, mergedchdman parity battle.-warnaserror in CI.SECURITY.md documents the reporting process and how to verify a release.dotnet test across net8.0/net9.0/net10.0: 14,013/14,013 passedchdman output.jb inspectcode CSharp_CHDSharp.sln --severity=WARNING: 0 findings.
There was an error while loading. Please reload this page.
Released: 2026-10-21 - Full changelog - NuGet
CHDSharp v1.5.2 rolls up the v1.5.1 cue-layout parity fixes and adds a repo-wide code-quality pass plus fully automated wiki and
documentation-site deployment.
| Platform | Bundle |
|---|---|
| Windows x64 | CHDSharp_win-x64_v1.5.2.zip |
| Windows ARM64 | CHDSharp_win-arm64_v1.5.2.zip |
| Linux x64 | CHDSharp_linux-x64_v1.5.2.zip |
| Linux ARM64 | CHDSharp_linux-arm64_v1.5.2.zip |
| macOS Intel | CHDSharp_osx-x64_v1.5.2.zip |
| macOS Apple Silicon | CHDSharp_osx-arm64_v1.5.2.zip |
Every bundle contains a framework-dependent single-file CHDSharp / CHDSharp.exe
build (the .NET runtime is not embedded) plus LICENSE.txt, README.md, README.txt
and this document. The .NET 10 runtime
is required.
REM LEAD-OUT at or before the session's last trackThe parser compared the track's frame count with leadOut - index00 using two int values.
MAME compares a uint32_t frame count against a signed int32_t end frame
(cdrom.cpp:2748), so a negative end frame converts to a huge unsigned value and the trim is
skipped. Cues that declare REM LEAD-OUT 00:00:00 (or any address at or before the last track
of the session) therefore failed with:
Track 2: the session lead-out values leave a negative length (-11400 frames); the cue's
REM SESSION/LEAD-OUT values do not match the image.
while chdman createcd encoded the same cue, because the no-op lead-out leaves the cue's INDEX
positions in charge of the layout. The parser now performs the same unsigned comparison, so the
track layout and the CHD bytes match chdman.
The CD reader treated the last PadFrames frames of a track as zero-filled padding. In chdman
the pad start is an unsigned offset from the track start (chdman.cpp:471-472); when the pad is
larger than the track the offset wraps below the track start, the pad region is unreachable, and
every frame is read from the source file. The encoder now mirrors that rule, and the GD-ROM
data/pad/split ordering follows the same frame layout (splitStart = frames - splitFrames,
padStart = splitStart - padFrames).
The whole solution is now clean under the ReSharper command-line inspector:
jb inspectcode CSharp_CHDSharp.sln --severity=WARNING reports zero warnings or errors
(308 before the cleanup). The policy lives in the root .editorconfig:
VendoredZLib, VendoredLZMA, VendoredFlacVendoredZSTD are third-party ports; byte-for-byte chdman parity depends on them stayingLogEntry/LogEntries and the unreadPerFileResult.FilePath).main, thedocs/ and requests a Pages rebuild. The releasecolor-scheme metadata.docs/) starts with its CI/NuGet/platform badge row.AGENTS.md now records the version bump, verification, tag,chdman createcd byte-parity fixtures: zero lead-out, lead-out before the track, and theCHDSharpEncoderTest 454/454, CHDSharpTest 4214/4214, battle harness --quick 905/905 checks.dotnet test across net8.0/net9.0/net10.0: 14,004 passed, 0 failed; full battlechdman output.No public API changes. Replace the package; cues that encoded before produce the same bytes, and
the two layouts above now encode instead of throwing.
There was an error while loading. Please reload this page.
Released: 2026-10-16 · Full changelog · NuGet
CHDSharp v1.5.0 is the first release produced end-to-end by the GitHub Actions pipeline:
one tag push builds the six platform bundles, creates the GitHub release, publishes the
NuGet package, and updates the wiki and
the documentation site.
| Platform | Bundle |
|---|---|
| Windows x64 | CHDSharp_win-x64_v1.5.0.zip |
| Windows ARM64 | CHDSharp_win-arm64_v1.5.0.zip |
| Linux x64 | CHDSharp_linux-x64_v1.5.0.zip |
| Linux ARM64 | CHDSharp_linux-arm64_v1.5.0.zip |
| macOS Intel | CHDSharp_osx-x64_v1.5.0.zip |
| macOS Apple Silicon | CHDSharp_osx-arm64_v1.5.0.zip |
Every bundle contains a framework-dependent single-file CHDSharp / CHDSharp.exe
build (the .NET runtime is not embedded) plus LICENSE.txt, README.md, README.txt
and this document. The .NET 10 runtime
is required. On Linux/macOS run chmod +x CHDSharp if the binary is not executable after
unzipping.
The CLI's "a new version is available" notice now links directly to the download for
your platform. The bundle the release ships (CHDSharp_<os>-<arch>_v<version>.zip) is
exactly the name the update check looks up; previously it searched for the wrong asset
name built from the currently running version, so the direct link never resolved and
users were sent to the releases page instead.
Release workflow: bundles (win/linux/osx × x64/arm64),Directory.Build.props.docs/ folder is deployed twice from CI:CHDSHARP_NO_BUG_REPORTS=1 /CHDSHARP_NO_TELEMETRY=1, so local full-suite runs no longer file bug reports.v1.5.0 rolls up everything from v1.4.4 and v1.4.5:
REM SESSION / REM LEAD-IN / REM LEAD-OUT.img heuristic).chdman createcd.REM SINGLE-DENSITY AREA /REM HIGH-DENSITY AREA markers get the full is_gdicue layout (split pregap regions,CHGD metadata); verified byte-identical on a real 1.19 GB Redumpchdman extractcd round-trip.START parity — a bare START line (cdrdao's documented form) isparse_toc exactly.dotnet add package CHDSharp --version 1.5.0
Targets net8.0, net9.0 and net10.0 — pure C#, zero native dependencies. Every
codec (zlib, lzma, huffman, flac, zstd, AVHuff and the CD variants) is implemented
in-repo and ships inside the package.
There was an error while loading. Please reload this page.
Consolidates all changes since v1.4.2. Closes the partial-tail raw-encode corruption and the last FLAC byte-parity divergence. Battle harness green: 3174/3174 synthetic vs MAME 0.289.
EncodeRaw/createraw on inputs of ≥ 513 hunks whose length is not a hunk multiple could produce a self-consistent-but-wrong CHD: stale compression ring-buffer slots from the previous fill cycle leaked into partial final hunks. The fix landed alongside guardrail tests so the class of bug cannot silently return:
raw-encode long-tail x flac/zlib/zstd).The vendored FLAC encoder now matches chdman byte-for-byte on the remaining divergence: the fixed-predictor analysis window and the tukey window's cosf rounding (native cosf semantics replicated). Verified byte-identical on:
CHDSharpTest: 12,648/12,648 (436/436 per TFM on net8.0/net9.0/net10.0 → 1,308/1,308 aggregate via the console runners).CHDSharpEncoderTest: 1,308/1,308.CHDSharpBattleTest: 3174/3174, including raw-encode long-tail x * for all three codecs.dotnet add package CHDSharp --version 1.4.3
Targets net8.0, net9.0, net10.0. Pure C# - zero native dependencies.
Full Changelog: v1.4.2...v1.4.3
There was an error while loading. Please reload this page.
c470879): raw encoding now replicates chd.cpp's 256-hunk compression work buffer (RingBufferedRawReader) — ring slots past EOF keep stale bytes from the previous 128-hunk batch and the raw SHA-1 folds only valid bytes, exactly like m_compsha1.append(dest, numbytes). Also touches FlacLpcMath, LzmaEncoder and the FLAC encoder for byte-exact output.createhd size / CHS quirks (e4f3735): size parsing now matches chdman.cpp:2035 (sscanf("%I64u") reads leading digits only, so "512K" = 512 bytes) and small sizes are rounded up to the guessed CHS product (guess_chs parity), including the IDENT/GDDD wide-CHS case.e4f3735): AviWriter output is now byte-identical to chdman createld/extractld.info/verify options (e4f3735): full-argument option validation (duplicate -i/--input detection, per-command option sets), info returns exit code 1 on failure, verify parity with chdman's report_error handling.c470879): DVD_METADATA_TAG written with zero-length payload per chdman.c470879): failure paths now return chdman-consistent non-zero exit codes.CHDSharpEncoderTest/CHDSharpTest accompany the parity work.Missmatch.md replaces the deleted divergency.md and records the battle result: 2907 checks — 2907 passed, 0 failed against MAME 0.289.createraw now also accepts --hunk-size / --unit-size aliases alongside --hunksize / --unitsize / -hs / -us (ea375e1).extractcd filename template %t regex fixed (named capture groups; escaped %% handling) (ea375e1).hash command help corrected: --result text|json|sfv and --tracks flags (ea375e1).createhd geometry override via LogicalLengthBytes for byte-parity encoding of over-/under-sized sources (c470879).CHDSharpBattleTest multi-targets net8.0;net9.0;net10.0 with LangVersion=latest and copies the built CLI into its output for self-contained battle runs (e4f3735).aaad13d).2e3a1e9, b858192).docs/cli-commands.md (413 lines) plus expanded CHDSharpCli/README.md — full chdman/CHDSharp argument tables for every command (2bef641e).docs/chd-format.md; language simplified and stale DVD metadata notes corrected (d208521).docs/README.md) rewritten with CHD history; ReleaseNotes added to sidebar and _config.yml (ff51e98).3dedc71).dfb74b7).
There was an error while loading. Please reload this page.
GD-ROM support is now complete
extractcd correctly handles Dreamcast GD-ROM Redump images (REM SINGLE-DENSITY / HIGH-DENSITY, 45000-frame boundary, has_physical_pregap fixup). Works for both GDI and CUE/BIN.GDI vs CUEBIN vs TOC).Smarter copy and parent handling
copy now picks the right default codecs for each image type automatically (HD/DVD → lzma,zlib,huff,flac / CD/GD → cdlz,cdzl,cdfl / laserdisc → avhu), same as chdman.Hard disks (createhd / createraw)
createhd -i image.img now writes GDDD geometry metadata — output is now byte-identical to chdman (was 51 bytes short).createhd --ident now correctly reads CHS from the ATA IDENTIFY data.-c none (was silently accepting compressed codecs).createhd now validates interactions between -tp, -chs and -size / parent images.createraw now correctly requires --unitsize when no parent is given and validates hunk size (16 B – 1 MiB, multiple of unit size).listtemplates now shows all 17 templates (was missing 4 Quantum Fireball drives).CD / GD-ROM extraction (extractcd)
extractcd now defaults to cooked sectors (2048/2352 bytes, no subcode, audio byte-swapped) — now matches chdman extractcd for all 43 CDs + 3 GD-ROMs. Use --raw to keep 2448-byte raw frames.ExtractToDirectory(..., cooked: true) does the same — the default cooked: false is kept for backward compatibility.DVD
createdvd / BuildDvdMetadata now writes an empty DVD tag (length 0) instead of a 0x00 byte — matches chdman.Metadata
addmeta --valuetext no longer adds a trailing NUL (was text+'\0', now text).CLI — stricter, now matches chdman
createraw rejects -tp).-isb/-ish/-ib/-ih slicing now correctly rejects mixing bytes and hunks.10MB with trailing B is now handled, and --size plain numbers are strict.Diagnostics
info --verbose and verify --verbose now show per-codec hunk stats (SELF/PARENT/MINI buckets).stderr as Error: ....Docs / Code quality
createcd -c cdzl on audio CDs is now documented: container bytes may differ due to FLAC subframe choice, but SHA-1 / verify are identical.Meziantou.Analyzer to all projects.createhd blank with -c zlib, extractcd -tp 1, --splitbin without %t) will now fail — same as chdman. Fix the flags.ExtractToDirectory output to chdman extractcd, pass cooked: true.Full Changelog: v1.4.0...v1.4.1
There was an error while loading. Please reload this page.
Release date: August 26, 2026
This release is the biggest correctness milestone for CHDSharp: the CLI now has full chdman argument parity, the encoder is byte-for-byte identical to MAME for every codec, and a dedicated battle-test harness keeps 2611/2611 synthetic + 3003/3003 real-world parity checks passing against chdman.exe.
chdman CLI argument parityThe CLI (binary renamed from CHDSharpCli to CHDSharp) now accepts every chdman subcommand with matching option names and exit-code conventions:
info verify createraw createhd createcd
createdvd createld extractraw extracthd extractcd
extractdvd extractld copy addmeta delmeta
dumpmeta listtemplates
Common options mirror chdman exactly: --input/-i, --output/-o, --inputparent/-ip, --outputparent/-op, --compression/-c, --hunksize/-hs, --unitsize/-us, --numprocessors/-np, --force/-f, --verbose/-v, --chs, --sectorsize/-ss, and more.
The convenience commands from earlier versions remain available: directory scan, --list, --random, --parent, --toc, --cue, --classify, --detect, --hash, and --batch.
# chdman-style CHDSharp info -i game.chd CHDSharp verify -i game.chd CHDSharp createcd -o game.chd -i game.cue CHDSharp extractraw -o game.bin -i game.chd CHDSharp copy -o new.chd -i old.chd -c zstd CHDSharp addmeta -i game.chd -t GAME -vt "gauntlet" # convenience extensions CHDSharp D:\CHD CHDSharp --random game.chd CHDSharp --classify game.chd
Every encoder output now matches MAME's chdman byte-for-byte. This closes the three previously non-exact paths:
createld (laserdisc AVHuff) — fixed an off-by-four AVI idx1 base offset that shifted audio by one sample and misaligned video; the AVHuff codec now correctly compresses zero-padded single-frame hunks; and the mono-FLAC encoder now evaluates every fixed-predictor order per frame (matching libFLAC 1.4.3 for the mono/48 kHz avhu path).cdzs (CD Zstandard) — the in-repo VendoredZSTD port now emits frames byte-identical to C zstd for the same hunk buffers.zstd (raw Zstandard) — same fix; createraw -c zstd output is now byte-identical to chdman.chdman battle-test parity — 2611/2611 synthetic + 3003/3003 real-worldThe new CHDSharpBattleTest harness exhaustively cross-checks the CHDSharpLib decoder and the CHDSharp.Encoder encoder against chdman.exe:
chdman create* parity (ours and reference both verify clean)info parityIt runs on a deterministic corpus (seed 1337) and can also scan real-world CHD folders:
dotnet run --project CHDSharpBattleTest # 2611/2611 dotnet run --project CHDSharpBattleTest -- --quick # smoke run dotnet run --project CHDSharpBattleTest -- --real "D:\CHD" # real collection
The ZstdSharp.Port NuGet package has been replaced by the in-repo VendoredZSTD project — the ZstdSharp 0.7.6 source tree, a full C-to-C# port of the zstd 1.5.5 source (the same version MAME bundles), including both the encoder and the decoder.
The library now has zero external runtime NuGet dependencies. Every codec (zlib, lzma, huffman, flac, zstd, AVHuff, and all CD variants) is vendored in-repo in pure C#.
A code review across the CLI, library, and battle harness resolved 38 issues. Highlights:
0/1/3), CheckFile(Stream) catches IOException, VerifyList logs exception types verbatim.createcd defaults to cdlz,cdzl,cdfl; createhd --input routes to EncodeRaw; verify --inputparent is passed to CheckFileWithParent; all create/copy commands require --force to overwrite; extractcd --splitbin and GD-ROM .gdi updates; LzmaStream.Seek returns the correct position.StrongBox + Interlocked), DisposeAsync drains per-thread codec states, read-ahead no longer over-releases its semaphore.ReadHunk(Span) caches hunks on success, FindRepeatedBlocks validates map offset bounds, ValidateSizeLimits rejects Unitbytes == 0, MemoryMappedFile disposed on view failure, extractraw writes to a temp file first.Interlocked progress callbacks, version display uses Build, bug reports scrub PII, API keys no longer stored in plain text.--batch extension filtering, exact .chd extension checks, symlink skipping, complete help coverage, addmeta rejects non-ASCII tags.Plus: flaky-test fixes for .NET 8/9/10, and all compiler/analyzer/Rider warnings resolved across VendoredZSTD and VendoredZLib.
CHDSharpCli.exe → CHDSharp.exe. The subcommand syntax changed to the chdman style (CHDSharp createcd -o out.chd -i in.cue); the old --create/--createcd/--createhd/--copy forms are gone.ZstdSharp.Port package removed: replaced by the in-repo VendoredZSTD. Direct consumers of that package should switch to the library's own codecs.dotnet add package CHDSharp --version 1.4.0
Targets net8.0, net9.0, and net10.0. Zero native dependencies — runs on Windows, Linux, and macOS.
Full changelog: docs/ReleaseNotes.md
Full Changelog: v1.2.0...v1.4.0
There was an error while loading. Please reload this page.