CD32-CDTV native release — 2026-05-24

Highlights
----------
- CDTV CDDA audio: support/minimig/cdtv_cd.cpp now produces real-time CD-DA
  from the audio tracks of CDTV CHDs. Pump streams at exact 75.0 sectors/s
  via UIO 0xF200 (verified by timestamp deltas), honours PLAY MSF/LSN/TRACK
  opcodes, handles stop/pause/resume, fires STCH on natural play-end. Audible
  on real hardware via Defender of the Crown CDTV title music.
- WinUAE-shaped SUBQ reply (0x87): real cd_audio_status
  (IN_PROGRESS/PAUSED/PLAY_COMPLETE/PLAY_ERROR/NO_STATUS), real track number
  resolved from the drive's track table at the live LBA, real disk/track MSF
  positions advancing with the pump. Replaces the M2-phase-1c stub that
  returned fixed track=01 index=01 MSF=00:00:00.
- Phase B v2: Akiko + CDTV bridge DMA writes to ram2/DDR3 now go through a
  proper REQ/ACK cross-clock handshake with 2-FF synchronizers between
  chipdma_arb (clk_sys, 28.4 MHz) and ddram_ctrl (clk_114, 113.5 MHz).
  This fixes the long-standing "Z2 fast RAM breaks every CD32 game" bug:
  Cannon Fodder boots end-to-end at mem=0x33 (4 MB Z2 fast) AND at the
  existing mem=0x83 (256 MB Z3) default. Earlier games that needed 0 fast
  may now work with Z2 fast — re-survey warranted but not urgent.

Artifacts
---------
Minimig_20260524.rbf    3576396 bytes   sha256-16=A036A70083AB6BED
MiSTer_CDTV_20260524    1047124 bytes   sha256-16=F8F5A52019E19B95

Source provenance
-----------------
Minimig-AGA_MiSTer @ 73b725c (cd32-native-mvp branch)
   "phase B v2: CDC handshake for bridge DMA writes to DDR3"
Main_MiSTer        @ c0bf953 (cd32-native-mvp branch)
   "cdtv: WinUAE-shaped SUBQ reply + STCH inject on natural play-end"

Install (sidecar binary — no stock-MiSTer overwrite)
----------------------------------------------------
This folder mirrors /media/fat/ — copy its contents into /media/fat/ and
the files land in the right subdirectories automatically.

Layout:
  CD32-CDTV-native-20260524/
    MiSTer_CDTV_20260524        -> /media/fat/MiSTer_CDTV_20260524
    MiSTer.ini.snippet          (append to /media/fat/MiSTer.ini)
    _Test/Minimig_20260524.rbf  -> /media/fat/_Test/Minimig_20260524.rbf
    _Test/*.mgl                 -> /media/fat/_Test/
    config/*.cfg                -> /media/fat/config/

Steps:
1. Copy the contents of this folder into /media/fat/ on your MiSTer
   (preserving the _Test/ and config/ subdirs).
2. chmod +x /media/fat/MiSTer_CDTV_20260524
3. Append MiSTer.ini.snippet to /media/fat/MiSTer.ini:
       [MinimigCD]
       main=MiSTer_CDTV_20260524
   The section name MUST be [MinimigCD], matching our RBF's CONF_STR.
   If you write [Minimig] by mistake, stock MiSTer keeps running with our
   RBF loaded and the in-core OSD renders empty — see README for details.
4. Pre-place each CHD next to the MGL that boots it. The MGLs use
   same_dir="1" so the CHD lookup is in the MGL's directory.
5. The MGLs reference _Test/Minimig_20260524 to avoid conflicting with a
   stock Minimig install in the same folder.

How the swap works: when our MinimigCD RBF loads, stock MiSTer reads
[MinimigCD] from MiSTer.ini, sees main=MiSTer_CDTV_20260524, and execl()s
into the sidecar binary in place. FPGA bitstream stays loaded during the
handoff. Different cores keep using the stock binary.

Blast-radius note: the INI section must match the RBF's embedded CONF_STR
("MinimigCD"). The upstream Minimig core uses CONF_STR "Minimig" and is
NOT affected by our [MinimigCD] section. If you'd prefer to avoid the
sidecar mechanism altogether, do a classic overwrite install (cp stock
MiSTer to MiSTer.bak first, then cp MiSTer_CDTV_20260524 over
/media/fat/MiSTer) and skip the MiSTer.ini snippet.

Tested
------
- CDTV-DuneMVP.mgl: boots to Dune intro credits + desert animation (CDTV
  native data path, unchanged from prior release).
- CDTV CDDA / DotC: Defender of the Crown CDTV verified end-to-end on real
  hardware. Title music (67s) + transition jingle (30s) both play through
  natural-end, BIOS processes the audio-finished events, game advances to
  the gameplay map at ~t=106s. Pump rate exact 75.0 sec/s. The CHD must
  contain real audio tracks (the `[!]` rip does).
- CannonFodder-CD32MVP.mgl: original CD32 native gate, boots at both
  mem=0x33 (Z2 fast 4 MB) and mem=0x83 (Z3 256 MB).
- 14 other CD32 launchers ship with per-game cpu/mem tunings as configured
  on the dev rig.

Known issues
------------
- (none specific to CDTV CDDA path as of 20260524)
- The remaining gfx-trio (James Pond 3, Deep Core, Universe) cosmetic
  defects persist — see project memory; tracked separately from CDDA work.
