How mchiaramonte/mister-cdrdao works
Project type and purpose
• This is a CLI‐based packaging and deployment tool for MiSTer FPGA.
• Purpose: build a Linux cdrdao binary + package it with helper scripts and Redump data for easy deployment on MiSTer.
File structure
Top level
• .github/ – CI workflow definition and build helper.
• LICENSE, README.md – documentation and licensing.
• Scripts/ – all runtime scripts and configuration for MiSTer.
Under Scripts/
• .config/mister-cdrdao/ – Redump .dat files (MegaCD, PSX, etc.), binmerge, cdrdao stub, toc2cue, processcue.py.
• ripdisc.sh – the main entry script that runs on MiSTer.
README for insights
• Build flow: fetch cdrdao source, compile for Linux on MiSTer, bundle.
• Runtime flow: user adds entry in downloader.ini, runs update to pull .tar.gz onto MiSTer, then uses ripdisc.sh.
• Scripts chain: ripdisc.sh → cdrdao → binmerge/toc2cue → processcue.py → rename using .dat checksums.
Main components and their relationships
a. Components
1. GitHub Actions CI
2. Build Script (.github/build-mister-cdrdao.sh)
3. cdrdao source (external)
4. Helper binaries/scripts (binmerge, toc2cue, processcue.py)
5. Redump data files (.dat files)
6. Packager (creates .tar.gz)
7. MiSTer FPGA device
8. Downloader system on MiSTer (downloader.ini + update scripts)
9. ripdisc.sh (runtime entry)
b. Interactions & data flows
• CI pipeline triggers on push → runs build-mister-cdrdao.sh
• Build script clones cdrdao, compiles, then copies in helper scripts + .dat files
• Packager → .tar.gz artifact → published to GitHub releases (or raw URL)
• On MiSTer: downloader.ini points to artifact URL → user runs “update” → artifact downloaded & extracted
• ripdisc.sh invoked from MiSTer UI → calls cdrdao to rip disc, then helper tools process tracks → final BIN/CUE renamed
c. Architectural patterns
• Separation of build vs. runtime: CI builds/packaging in GitHub, target deployment on MiSTer
• Configuration-driven: .config/mister-cdrdao/*.dat guides runtime behavior & renaming
• CLI orchestration: shell and Python scripts chained for modularity
d. Key technologies
• GitHub Actions (YAML workflow)
• Bash scripts (build-mister-cdrdao.sh, ripdisc.sh)
• cdrdao (C library/tool)
• Python (processcue.py)
• Custom utilities (binmerge, toc2cue)
• MiSTer FPGA downloader interface