spec512 - PNG to modified Spectrum 512 image converter
======================================================

What it does
  Converts a 320x200 PNG into the image.spu that main.s incbin's.

    spec512 <input.png> [--spu] [--dat] [-o <outdir>]

  --spu writes image.spu; --dat writes the raw bitmap + palette tables; -o picks
  the output directory.  Pipeline: linear light, OkLab distance, window-aware
  Lloyd seed + dither-aware annealing per line.

Project-specific geometry
  Every line uses TWO palette reloads, not Spectrum 512's usual three: the
  beam-locked replay emits a YM sample every scanline, leaving no CPU for a third
  sub-palette reload.  So the rightmost third of each line shows set 1 again (see
  find_index / the `two` flag in spec512.hpp).  The top 6 lines are the scroll-
  text band (fixed palette, no image); the picture is shifted down to clear it.

Build
  make            (needs a C++23 compiler and libpng)
