Skip to content

v1.2.0

Choose a tag to compare

@drpetersonfernandes drpetersonfernandes released this 23 Jul 03:01
· 223 commits to main since this release

What's New — CHDSharp v1.2.0

Highlights

  • CD/GD-ROM track (TOC) parsing — Full track layout and sector type information from CHD metadata
  • Internal build consolidation — Centralized versioning and build properties via Directory.Build.props
  • Reproducible builds — Deterministic compilation and embedded SourceLink for debuggable NuGet packages

New Features

CD-ROM & GD-ROM Track Info

New ChdTrackInfo model and ChdTocParser parse the table of contents (TOC) embedded in CHD metadata, providing per-track details:

  • Track number, type (Mode1, Mode2, Audio, etc.)
  • Sector data size and subcode size
  • Pregap, postgap, and padding frame counts
  • GD-ROM support (CHGD/CHGT metadata tags)
  • Start frame offset for locating track data

Supports all metadata tag formats: CHTR/CHT2 (text key-value), CHCD (binary), and CHGD/CHGT (GD-ROM).

var tracks = chd.GetTrackInfo();
foreach (var track in tracks)
{
    Console.WriteLine($"{track.TrackNumber}: {track.GetTypeString()} " +
                      $"{track.Frames} frames, pregap={track.PreGap}");
}

Improved UnitBytes Calculation

UnitBytes property on ChdFile now derives sector size from metadata for all CHD versions:

  • V5 — Reads from header
  • V1–V4 — Detects HDD (512B), CD (2448B), or defaults to hunk size

New Enums

  • ChdTrackType — Matches MAME cdrom.h track types (Mode1, Mode1Raw, Mode2, Mode2Form1, Mode2Form2, Mode2FormMix, Mode2Raw, Audio)
  • ChdSubType — Subcode types (None, Normal, Raw)

Package Improvements

  • Centralized versioning — All 7 projects share version 1.2.0 via Directory.Build.props. Bump once and all projects update.
  • Deterministic builds — <Deterministic>true</Deterministic> enables byte-for-byte reproducible builds
  • Improved CI detection — ContinuousIntegrationBuild now detects GitHub Actions natively
  • Updated release notes — Package metadata accurately reflects v1.2.0 features
  • Stale artifacts removed — Old build artifacts cleaned from repository

Test Suite

  • Track info tests — Validates TOC parsing across all metadata formats and edge cases
  • CLI integration tests — End-to-end tests for the command-line tool
  • Expanded encoder tests — CRC16, SHA1, and Deflate validation in CHDSharpEncoderTest

Breaking Changes

None. All public APIs from v1.1.0 remain compatible.


Upgrading

dotnet add package CHDSharp --version 1.2.0

Full Changelog: v1.1.0...v1.2.0