| 1 | # Changelog |
| 2 | |
| 3 | All notable changes to libchdr are documented here. |
| 4 | Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); |
| 5 | versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 6 | |
| 7 | ## [0.3.0] - Unreleased |
| 8 | |
| 9 | First formally tagged release. Project has been depended on by |
| 10 | RetroArch, DuckStation, Flycast, SwanStation and others for years; |
| 11 | this tag exists so Linux distros can ship a stable reference point |
| 12 | instead of a dated snapshot. |
| 13 | |
| 14 | ### Added |
| 15 | |
| 16 | - CHDv5 read support (backported from MAME C++). |
| 17 | - Zstandard (zstd) compression codec. |
| 18 | - `CHDR_WANT_RAW_DATA_SECTOR`, `CHDR_WANT_SUBCODE`, |
| 19 | `CHDR_VERIFY_BLOCK_CRC` CMake options for reduced-scope builds. |
| 20 | - `WITH_SYSTEM_ZLIB` and `WITH_SYSTEM_ZSTD` CMake options for distros. |
| 21 | - `BUILD_FUZZER` CMake option (libFuzzer + ASan) and `tests/fuzz.c`. |
| 22 | - `BUILD_LTO` CMake option. |
| 23 | - `chd_read_header_core_file_callbacks` public API. |
| 24 | - pkg-config file (`libchdr.pc`) installed alongside the library. |
| 25 | - Unity-build script (`unity.c`). |
| 26 | |
| 27 | ### Changed |
| 28 | |
| 29 | - Library is now split across per-codec translation units |
| 30 | (`src/libchdr_codec_*.c`) instead of one monolithic `libchdr_chd.c`. |
| 31 | - Internal codec headers moved from `include/libchdr/` to `src/` so |
| 32 | they are no longer part of the installed header set (#144). |
| 33 | - `cd_codec_decompress` signature is now stable across builds; it no |
| 34 | longer changes with the `WANT_SUBCODE` preprocessor flag (#144). |
| 35 | - `lzma_allocator` now embeds `ISzAlloc` as its first member, matching |
| 36 | the LZMA SDK's expected layout (#144). |
| 37 | - Bundled `zlib` replaced with `miniz` 3.1.1 (single-file). |
| 38 | - Bundled `zstd` replaced with a single-file version of itself |
| 39 | (1.5.7). |
| 40 | - Bundled LZMA updated to 25.01. |
| 41 | - Bundled `dr_flac` updated to 0.13.3 (includes fix for |
| 42 | CVE-2025-14369 integer overflow). |
| 43 | - pkg-config `Version:` now emits the full `MAJOR.MINOR.PATCH`. |
| 44 | - Exported symbols are restricted to `chd_*` via a linker version |
| 45 | script on ELF targets, `-exported_symbol _chd_*` on macOS. |
| 46 | |
| 47 | ### Fixed |
| 48 | |
| 49 | - `chd_read_header_core_file_callbacks` now works for CHD versions |
| 50 | below 4 (#146). |
| 51 | - v1/v2 header: `hunkbytes` is computed in `uint64_t` and rejected if |
| 52 | the product of `seclen * obsolete_hunksize` overflows `uint32_t` or |
| 53 | is zero (#148). |
| 54 | - `metadata_find_entry` caps traversal at 65536 entries, preventing |
| 55 | unbounded seek+read loops on malformed CHDs with cyclic |
| 56 | `next`-pointer chains (#148). |
| 57 | - `fseeko` / `ftello` are now declared under strict C11 builds |
| 58 | (`-Werror=implicit-function-declaration`) and on Debian armhf |
| 59 | `time64` rebuilds: feature test macros are defined before any |
| 60 | system header include, and the `fseeko64`/`ftello64` branch has |
| 61 | been removed in favor of LFS-aliased `fseeko`/`ftello` (#92, #117). |
| 62 | - `chd_get_metadata` fallback now uses `snprintf` instead of |
| 63 | `sprintf`. |
| 64 | - `fseek` errors are now propagated as `CHDERR_READ_ERROR`. |
| 65 | - Only reads as much header data as the declared header length. |
| 66 | - Various memory and overflow bugs in hunk decoding (#132). |
| 67 | |
| 68 | ### Removed |
| 69 | |
| 70 | - Bundled `zlib-1.3.1/` directory (dead since the switch to miniz). |
| 71 | |
| 72 | ### Known limitations |
| 73 | |
| 74 | - **AVHuff codec is not implemented** (#69). CHDs produced with the |
| 75 | `CHDCOMPRESSION_AV` codec (CHDv1-v4) or the `avhu` codec tag (CHDv5) |
| 76 | return `CHDERR_UNSUPPORTED_FORMAT`. In practice this only affects |
| 77 | laserdisc CHDs (Dragon's Lair, Space Ace, Time Traveler, and other |
| 78 | MAME/Daphne/Hypseus Singe targets). All other consumers (PS1, PS2, |
| 79 | Saturn, Dreamcast, arcade HD, etc.) are unaffected. |
| 80 | |
| 81 | ## ABI |
| 82 | |
| 83 | `SOVERSION = PROJECT_VERSION_MAJOR`. Bumped only on ABI breaks. The |
| 84 | `v0.x` series ships as `libchdr.so.0`; a future `v1.0.0` would ship |
| 85 | as `libchdr.so.1`. The public header set is restricted to |
| 86 | `include/libchdr/` and the public symbol set to `chd_*`. |
| 87 | |
| 88 | [0.3.0]: https://github.com/rtissera/libchdr/releases/tag/v0.3.0 |