Skip to content

OpenCDi v0.2.0 - Cross-Platform Frontend, Machine Harness, Audio DRC & Hardware Fixes

Latest

Choose a tag to compare

@sigsantilio sigsantilio released this 01 Nov 17:56

OpenCDi v0.2.0 - Release Notes

OpenCDi v0.2.0 represents a major architectural milestone. This release replaces the legacy monolithic windowing system with a modern cross-platform frontend (winit + softbuffer), introduces a headless automated testing harness (harness.exe), resolves in-game audio stuttering across the entire software library (Zelda: The Wand of Gamelon, Link: The Faces of Evil, Escape from Cyber City), synchronizes gunshots in FMV rail shooters (Mad Dog 2), refines MPEG-1 / DVC video decoding, and adds custom NVRAM file support via CLI.


Highlights and Key Changes in v0.2.0

1. Cross-Platform Windowing & Modern Frontend (winit + softbuffer)

  • Migrated from minifb to winit (0.30) and softbuffer (0.4.8).
  • Native Linux Support (X11 & Wayland): OpenCDi now builds and runs natively on modern Linux distributions (such as Kubuntu, Ubuntu, Fedora, and Arch) without requiring Wine or Windows GUI emulation, resolving Linux build failures.
  • Foundation for macOS / Apple Silicon: Gated platform-specific Win32 APIs, enabling native POSIX / ARM64 compilation.
  • Enhanced Window Controls: Added RetroArch-style shortcuts:
    • F11 / Alt+Enter: Fullscreen toggle
    • P: Pause / Resume emulation
    • Space (hold): Fast-forward
    • F8: Save Screenshot (PPM)
    • F12: Save Screenshot (BMP)
    • F5 / H: Restart Console (Reset)
    • Esc: Quit

2. Headless Machine Test Harness (harness.exe)

  • Extracted the core machine execution loop into an independent module (Machine::run_frame).
  • Introduces harness.exe for automated batch testing, frame comparison, and audio verification without requiring a window or audio device.
  • Supports scripted input playback and peek reads without CPU side-effects.

3. Complete Elimination of Audio Stuttering in Zelda Games

  • CDIC ADPCM Soundmap Architecture (Zelda: The Wand of Gamelon / Link: The Faces of Evil): In Zelda games, music is synthesized via CDIC Sound Maps rather than streamed disc sectors.
  • Fixed handling of CDIC register 0x3FFA (ZBUF / AUDCTL): buffer reactivation now preserves ADPCM predictor filter states, eliminating harsh DC offset pops and dropouts.
  • Continuous soundmap playback avoids premature termination between buffer reloads.
  • Dynamic Rate Control (DRC) & SFX Prebuffering: Implemented a dedicated 1536-sample prebuffer and continuous proportional DRC on the host soundmap/SFX queue to absorb clock jitter without starvation.

4. Additional Audio & Gunshot Emulation Fixes

  • Level B/C Mono ADPCM Decoding (Escape from Cyber City): Corrected byte packing for mono ADPCM streams, eliminating harsh audio distortion and buffer starvation at decision points and forks.
  • Gunshot Detection & Controller Timing (Mad Dog McCree / Mad Dog 2): Synchronized slave mouse coordinate registers with video scanlines to ensure reliable gunshot registration during FMV interactive scenes.

5. MPEG-1 & DVC Digital Video Cartridge Improvements

  • Motion Compensation Edge Clamping (The Lost Ride / Lost Eden): Half-pel macroblock neighbors outside picture boundaries are now clamped instead of dropping the macroblock.
  • Mid-stream Sequence Headers: Added dynamic decoder resizing when sequence headers change within a video stream.
  • DVC Display Window: Hardware windowing (PICSZ, matte keying) is accurately applied to high-resolution display fields.
  • Slave Channel 2 Reset: Slave MCU pulls the system reset line upon channel 2 reset commands, restarting the player cleanly.

6. Persistent NVRAM Customization (--nvram <path>)

  • Added command-line parameter --nvram <path> allowing users and frontends (e.g. RetroArch / Pegasus / LaunchBox) to specify custom NVRAM save locations per game.
  • Includes safety-guarded menu action File -> Clear Console Memory (Reset NVRAM)....

Tester Feedback & Bug Reporting

Community feedback remains essential for catalog coverage and edge-case discovery.
Click Send Feedback (F1) on the main menu bar or press F1 at any time to open the dedicated tester portal:

https://cdi-tester-feedback.pages.dev/


Package Contents

The OpenCDi_v0.2.0_Windows_x64.zip package contains:

  • opencdi.exe (OpenCDi v0.2.0 64-bit release binary)
  • harness.exe (Headless test harness binary)
  • opencdi_controls.ini (Default controller configuration)
  • Avvia_OpenCDi.bat (Quick launcher script)
  • icon.ico (High-resolution icon)
  • bios/ (Target directory for system ROMs)
  • README.txt (Complete configuration and usage guide)

Special Acknowledgments

  • ArnoldDeRuiter: Special thanks for the Machine Harness architecture, Linux windowing migration (PR #3 & #4), and DVC/MPEG emulation improvements (PR #5).
  • MAME (MAMEDev): Hardware register architecture draws reference from MAME's Philips CD-i drivers licensed under the BSD 3-Clause License (cdi.cpp, mcd212.cpp, cdicdic.cpp, scc68070.cpp).
  • CDi_MiSTer: Heartfelt thanks to ash2020 and the CDi_MiSTer project for FPGA hardware reverse-engineering and CD-i ASIC research.