# CD32 Native-Akiko — CPU Speed Release (2026-05-18)

**Build date:** 2026-05-18 (visible in OSD as `v260518`)

Authenticity release. The OSD now has a single **`CPU Speed: 14 MHz / Full`**
toggle that lets users match a real A1200 020 at stock 14 MHz against
SysInfo / AIBB benchmark references, while keeping fast memory pacing
intact so games still run normally in that mode.

**Inherits everything from `CD32-native-cmdparity`** (CR2 boot fix, WinUAE
command-handler parity, 4-window PBX cache, NVRAM saves, Akiko bridge,
Cannon Fodder boot, per-game FastRAM matrix). This release changes both
`MiSTer` (ARM userspace) and `Minimig.rbf`.

## What changed

### 1. `CPU Speed: 14 MHz / Full` OSD toggle replaces the old Turbo entry

CFG byte (offset `0x141E`) bit 5 = stock-speed enable.

- **CPU Speed: Full (default, bit 5 = 0)** — unchanged behavior.
  ~13.7 MIPS / ~5.5x A1200 by SysInfo. turbochip + turbokick force-ON
  post-boot (chip RAM + Kickstart shadowed to fast SRAM), no CPU throttle.
- **CPU Speed: 14 MHz (bit 5 = 1)** — `cpu_wrapper` applies a 10-cycle
  cooldown to `TG68k.clkena_in`. After every pipeline tick, the CPU
  stalls for 9 sysclks before the next tick can fire. Net pipeline rate
  drops ~10x to ~1.38 MIPS / 1.09x A1200 - basically a real A1200 020.
  - turbochip + turbokick stay ON in 14 MHz mode (chip RAM + Kickstart
    stay fast-shadowed), so only the CPU pipeline is throttled. This
    means the speed match is correct independently of FastRAM size or
    D-Cache state.
  - AIBB performance graphs render right on the stock A1200 reference
    profile in this mode (Integer, Sieve, Dhrystone, etc.).
  - The `CPU/MHz` number SysInfo/AIBB show (~7-8 MHz) is a back-calc
    from MIPS assuming stock 020 cycles-per-instruction; TG68k is
    slightly more efficient per clkena tick than a real 020, so the
    derived MHz reads lower. The MIPS and per-graph throughput are
    what's actually correct.
- The previous experimental `I-Cache` OSD entry (CACR ICE mask) is
  removed - it didn't produce reliable A1200 matching.

This is purely an authenticity option. No bundled CFG sets bit 5; default
behavior is unchanged. Toggle in the OSD `System` menu, save config,
reload the core.

### 2. CFG byte layout in 14 MHz mode

```
cpu_byte (offset 0x141E):
  [1:0] CPU type      (00 = 68000, 01 = 68010, 11 = 68020)
  [2]   unused
  [3]   unused (was I-Cache experiment; reverted)
  [4]   D-Cache       (0 = OFF, 1 = ON)
  [5]   CPU Speed     (0 = Full / ~13.7 MIPS,  1 = 14 MHz / ~1.38 MIPS)
  [7:6] unused
```

Examples: `0x13` = 020 + D-Cache off + Full speed (default).
`0x33` = 020 + D-Cache off + 14 MHz stock-speed mode.

## Files

| File | Path on MiSTer | Purpose |
|---|---|---|
| `MiSTer` | `/media/fat/MiSTer` | Patched ARM userspace (OSD: CPU Speed toggle) |
| `Minimig.rbf` | `/media/fat/_Test/Minimig.rbf` | Minimig-AGA core (clkena cooldown throttle) |
| `VERSION.txt` | - | Build date + sha256-16 hashes |
| `*-CD32MVP.cfg` | `/media/fat/config/` | Per-game launch configs (per-game mem byte) |
| `*-CD32MVP.mgl` | `/media/fat/_Computer/` | Per-game MGL launchers |

Bundled launcher set inherited unchanged from `CD32-native-cmdparity`:
Cannon Fodder, Sim City, Microcosm, Liberation: Captive 2, Litil Divil,
Beneath a Steel Sky, Chuck Rock 1, Chuck Rock 2, Fire & Ice, Banshee,
Fields of Glory, Defender of the Crown, Deep Core, Alien Breed SE,
Beavers, plus the CD32 No-CD test launcher.

## How to use

1. Drop `Minimig.rbf` into `/media/fat/_Test/`.
2. Drop `MiSTer` into `/media/fat/` (replaces the running userspace).
3. Drop the per-game `.cfg` files into `/media/fat/config/`.
4. Drop the per-game `.mgl` files into `/media/fat/_Computer/`.
5. Reboot or `killall MiSTer && nohup /media/fat/MiSTer > /var/log/mister_full.log 2>&1 &`.
6. From the menu, launch any of the bundled MGLs.
7. In the OSD `System` menu, set `CPU Speed: 14 MHz` if you want
   stock-A1200 timing (e.g. for AIBB / SysInfo runs against the
   built-in reference profiles), save config, reload core.

## Verification

- **Default (Full)**: AIBB shows ~7.09 MHz, perf graphs match 020 28 MHz
  expectation. SysInfo: 13.68 MIPS.
- **14 MHz mode, FastRAM != 0**: AIBB perf graphs sit on the stock-A1200
  reference profile. SysInfo: 1.38 MIPS / 1.09x A1200 / 8.4 MHz derived.
- **14 MHz mode, FastRAM = 0**: same 1.38 MIPS reading (turbochip stays
  ON in this build - only pipeline is throttled).
- **CR2 cold-boot**: still 5/5 (no regression from cmdparity).
- **CF intro**: renders normally at t=120 s (no regression).
- Build slack: -0.197 ns on emu PLL counter[0] (pre-existing corner).

## Known not-yet-fixed items

Inherited from cmdparity:

- **gfx-trio** (Jim Power / JP3 / Universe) - unchanged. Chipset trace
  ring still gated `0` in `rtl/agnus.v`.
- **Three remaining WinUAE-parity gaps** in cmd handlers (idempotent
  PAUSE early-return, `cdaudiostop()` at cmd_multi entry, SUBQ-during-
  data-read qcode validity). None implicated in CR2 boot; deferred.
- **Theme Park M4** - content-shaped, not bridge-shaped. Real CD32 BIOS
  also fails to boot it (verified in WinUAE 6.0.3).
