< all news

Copperline 0.9.0: the FPU deep-dive

0.9.0 is out. The headline this time is a long 68881/68882 FPU accuracy pass, alongside explicit joystick input selection, save states that restore without the original ROM, hard-disk volume names, and the usual round of CIA, Paula, keyboard, Denise, sprite, bitplane, RTC and display-timing fixes.

As with every release so far, this is a hardware-behaviour release: when something doesn't run, the fix models the underlying Amiga subsystem more faithfully rather than special-casing the title. That approach is slower, but each fix tends to repair a whole class of software instead of one program.

The FPU pass

Until now the FPU computed in the host's f64 double precision - close, but not what the silicon does. A real 68881 works in 80-bit extended precision, and software can tell the difference. The m68k core now has:

  • an 80-bit extended register file, with pure-Rust softfloat arithmetic behind it - no host FPU involved,
  • extended-precision kernels for exp, log, trig, inverse trig and the hyperbolics,
  • exact FMOVECR constants, matching the ROM tables in the real chip,
  • packed-decimal reals, memory and immediate-source monadic operations,
  • FPCR rounding-mode propagation and FPSR exception bytes,
  • exact FMOD / FREM quotient handling.

Save states are versioned, and 0.9.0 bumps the format to carry the 80-bit register snapshots. Older state files are refused with a version error rather than loaded across incompatible layouts.

The machine no longer guesses your joystick

Keyboard joystick emulation and a physical gamepad used to be implicit. Now there is a status-bar toggle, a menu entry, a launcher control and an [input] joystick = "gamepad" | "keyboard" config setting, so the input mode is something you choose rather than something that happens to you.

Save states without the ROM

--load-state can now restore a snapshot without opening the original Kickstart file first - the save state carries the whole machine, so Copperline only needs a placeholder for as long as it takes the state to replace it. Useful when a bug report comes with a state attached and you don't have the reporter's exact ROM at hand.

The small hardware fixes

The section nobody reads but everybody benefits from:

  • CIA one-shot timers keep the START bit visible through the auto-started interval - some software polls the running state to time the one-shot.
  • Floppy motor spin-up and spin-down state now flows through the same controller path that disk DMA and status reads actually use.
  • The keyboard MCU accepts short-but-real KDAT handshake pulses from the Amiga side, instead of insisting on the nominal pulse width from the Hardware Reference Manual.
  • POTGO-driven high pins hold their POTxDAT counters at zero, which is how software reads fully charged paddle and button lines.
  • Early hi-res DDFSTRT output is word-aligned, late-DDF first words sample complete plane latches, and per-frame collision accumulation is gated by CLXDAT observation.

Every one of those exists because some real program cared.

Housekeeping

The vendored m68k fork moved from vendor/m68k to crates/m68k and is packaged as copperline-m68k, making the dependency boundary explicit. The battery-backed RTC now reports host local time (with COPPERLINE_RTC_FIXED_SECS still there when a replay needs determinism). Directory and generated hard disks can carry configured AmigaDOS volume names. Menu popups size themselves to their widest label.

Get it

Builds for macOS, Linux and Windows are on the release page, and the Homebrew tap is updated. No config changes are required from 0.8.0; the new settings are optional and default to the old behaviour.

- Andrew Hutchings (LinuxJedi) · linuxjedi.co.uk