# CD32 / CDTV Native-Akiko Release (MinimigCD-20260604, D-Cache-OFF garble-fix)

Drop-in MiSTer Minimig-AGA fork with native CD32 Akiko CD-DMA and native CDTV
CHD boot. This archive mirrors `/media/fat/` -- copy the folder contents
straight onto your MiSTer SD card and the launchers appear under
**Computer -> _CD32** and **Computer -> _CDTV**.

This build is an **RTL-only increment on top of the 2026-05-31 release**: it
eliminates the **D-Cache-OFF graphics garble** on heavy CD32 titles (Universe,
Simon the Sorcerer) via three committed fixes to the chip-RAM DMA arbiter. The
sidecar userspace binary is **byte-identical** to 20260531
(`MiSTer_MinimigCD_dotc_20260531`); only the FPGA bitstream changed. The core is
renamed to the dated `_Test/MinimigCD_20260604.rbf` and the launcher MGLs are
updated to reference it (the embedded CONF_STR is still `MinimigCD`, so the
MiSTer.ini redirect is unchanged). See `VERSION.txt` for fix details and
provenance.

## Install (sidecar -- never overwrites stock /media/fat/MiSTer)

1. Copy `_Test/MinimigCD_20260604.rbf` to `/media/fat/_Test/`.
2. Copy `MiSTer_MinimigCD_dotc_20260531` to `/media/fat/`, then `chmod +x` it.
3. Append `MiSTer.ini.snippet` to `/media/fat/MiSTer.ini`:

   ```ini
   [MinimigCD]
   main=MiSTer_MinimigCD_dotc_20260531
   ```

4. Copy `_Computer/_CD32/*.mgl` to `/media/fat/_Computer/_CD32/`.
5. Copy `_Computer/_CDTV/*.mgl` to `/media/fat/_Computer/_CDTV/`.
6. Copy `config/*.cfg` to `/media/fat/config/`.

On core load, stock `/media/fat/MiSTer` reads the RBF's CONF_STR
(`MinimigCD`), finds `[MinimigCD]` in MiSTer.ini, and `execl()`s into
`MiSTer_MinimigCD_dotc_20260531` in place. The FPGA bitstream stays loaded; stock
Minimig (CONF_STR `Minimig`) is unaffected.

> Upgrading from 20260531: this changes the **RTL** (the prior RBF was
> byte-identical going back to 20260530). Copy the new
> `_Test/MinimigCD_20260604.rbf` **and** the updated `_Computer/_CD32` + `_CDTV`
> MGLs (they now reference `MinimigCD_20260604`). The sidecar binary and the
> `[MinimigCD]` MiSTer.ini section are unchanged -- leave them in place. You may
> delete the old `_Test/MinimigCD.rbf`.

## The D-Cache toggle (why this build exists)

The real CD32 CPU (68EC020) has **no data cache**, so the authentic OSD setting
is **D-Cache OFF**. On heavy graphics+CDDA titles the OFF read path used to
intermittently corrupt chip-RAM reads, rendering the game garbled or black.
This build commits three arbiter mitigations (prevent-steal + bleed-fix + a
private DMA return register) that **eliminate the garble**: fresh-rig Universe
D-Cache-OFF x8 went from ~50% garbled/black to **7/8 clean, 0 garble**.

**One residual remains:** with D-Cache OFF, heavy titles can still black-screen
on ~1 boot in 8 (a timing-marginal capture-before-fill on the OFF read latch).
**Recommendation: run heavy titles with D-Cache ON (the default), which is
solid.** OFF is now garble-free but not yet 100% on the hardest titles. See
`VERSION.txt` -> Known issues.

## Notes

- The `.cfg` files carry per-game CD/CHD paths matching this SD/USB layout
  (`../usb0/...`). Adjust the kickstart path (offset 0x00C) and hardfile-slot-0
  CD path (offset 0x418) if your layout differs.
- Do NOT hot-swap between two games that share this core via `load_core`
  (e.g. CF -> Universe) -- that skips the FPGA reload and can carry stale core
  state across. Launch each game from a cold state or via a different core in
  between.
- CD-audio (carried forward, unchanged): Liberation (Captive II) in-game music
  plays through; CD32 Defender of the Crown no longer freezes at end-of-audio;
  CDTV Defender of the Crown plays both cast-list CDDA segments and advances.
- NVRAM save: in-session saves work and persist to SD (WinUAE-validated);
  auto-reload back into BRAM at boot is still broken on hardware.
