# CD32 Native-Akiko MVP — Test Build

Experimental MiSTer Minimig-AGA fork that implements native CD32 Akiko CD-DMA
instead of the IDEFix97 / CD32-Emulator workaround. Boots Cannon Fodder
(1993, Virgin) end-to-end on real MiSTer hardware via a single MGL launcher.

**Status**: WORK IN PROGRESS. CF boots and saves persist across reboots
(Phase 32.5: NVRAM load-back wired up; chipdma_arb timing fix improves
emu PLL setup slack from -0.981 ns to -0.400 ns).

## Files

| File | Path on MiSTer | Purpose |
|---|---|---|
| `MiSTer` | `/media/fat/MiSTer` | Patched Main_MiSTer userspace (Akiko bridge) |
| `Minimig.rbf` | `/media/fat/_Test/Minimig.rbf` | Patched Minimig-AGA core (NATIVE_CD32=1) |
| `CannonFodder-CD32MVP.cfg` | `/media/fat/config/CannonFodder-CD32MVP.cfg` | CF launch config (binds CHD) |
| `CannonFodder-CD32MVP.mgl` | `/media/fat/_Computer/CannonFodder-CD32MVP.mgl` | CF launcher entry |
| `CD32-NoCD-MVP.cfg` | `/media/fat/config/CD32-NoCD-MVP.cfg` | No-CD test config (kickstart only) |
| `CD32-NoCD-MVP.mgl` | `/media/fat/_Computer/CD32-NoCD-MVP.mgl` | No-CD test launcher |

## Prerequisites

- MiSTer SD card with a CD32 Kickstart ROM at:
  `/media/usb0/Games/Amiga/roms/Caldor/cd32_swapped.rom`
  (390KB, byte-swapped CD32 Kickstart 3.1)
- Cannon Fodder CHD at:
  `/media/usb0/Games/Amiga/CHD/Cannon Fodder (1993)(Virgin)[Amiga-CD32].chd`

Adjust paths in the `.cfg` files if your layout differs (kickstart at offset
0x00C as a NUL-terminated relative path; hardfile slot 0 path at offset
0x418).

## Install

1. Back up your existing `/media/fat/MiSTer` and any `/media/fat/Minimig*.rbf`.
2. Copy `MiSTer` to `/media/fat/MiSTer`, `chmod +x` it.
3. Copy `Minimig.rbf` to `/media/fat/_Test/Minimig.rbf` (or replace the
   production `Minimig_<date>.rbf` if you want it to be the default).
4. Copy the two `.cfg` files to `/media/fat/config/`.
5. Copy the two `.mgl` files to `/media/fat/_Computer/`.
6. Reboot MiSTer (`killall MiSTer` works; no supervisor on this device).

## Test

- **CF gate (works)**: from MiSTer menu, navigate to Computer → CannonFodder-CD32MVP.
  Cannon Fodder should boot to the HEROES selection menu within ~3 minutes.
- **No-CD splash (works)**: Computer → CD32-NoCD-MVP shows the spinning-CD
  splash with audio.
- **NVRAM save/load (works as of Phase 32.5)**: in-game saves persist to
  `/media/fat/saves/Minimig/cd32.nvr` and reload on next boot. If the file
  is missing or wrong size, BRAM keeps its synthesized FlashFile-magic init
  so a fresh game still boots clean.

## Known issues

- emu PLL setup slack is -0.400 ns (improved from -0.981 ns in earlier
  builds). Real-hardware tests pass; further reduction would require
  another targeted register-stage cut in the chipdma_arb / akiko boundary.
