===============================================================================
  EI OLE OPTIMI!
  a Commodore 64 demo by Byteman / Wolfpack
===============================================================================

  Platform     Commodore 64, PAL (preferably C64C with 8580 SID)
  Format       1 MB EasyFlash cartridge (.crt)
  Runtime      approx. 45 seconds, then any key restarts it
  Files        eioleoptimi.crt   the entry
               eioleoptimi.mp4   1080p capture
               eioleoptimi.png   screenshot
               readme.txt        this file


-------------------------------------------------------------------------------
  WHAT IT IS
-------------------------------------------------------------------------------

Full-motion video with streamed digitised speech, running from a stock PAL C64.

A phone-shaped "social media UI" wraps 40 seconds of footage: a Koala title
screen, the clip at 12.5 fps with bilingual Finnish/English subtitles, and a
credits screen that waits for a keypress and plays the whole thing again.

The video is multicolour text mode with a 256-character "chunky" charset, two
2x2 sub-blocks per cell, so a frame costs 2 bytes per cell instead of 10.
Colour comes from per-band $D021-$D023 globals across 10 raster-split bands.
The speech is 11 kHz digi via Mahoney's $D418 volume-table technique, driven
from a CIA-timer NMI, costing about 46% of the CPU. A second charset selected
by $D018 raster splits draws the crisp top and bottom bars.


-------------------------------------------------------------------------------
  HOW TO RUN IT
-------------------------------------------------------------------------------

  Real hardware   Copy eioleoptimi.crt to a FAT32 SD card and load it from a
                  Kung Fu Flash, EasyFlash 3, or 1541 Ultimate II+.
                  POWER THE C64 OFF BEFORE INSERTING THE CARTRIDGE!!
                  It autostarts on power-on. No menu, no loader.

  Emulator        x64sc -pal -sidmodel 1 -cartcrt eioleoptimi.crt

  !! NOTE  This needs a PAL machine with an 8580 SID (i.e. a C64C).

PAL is not a runtime flag here. The encoder's pacing, the raster chain and the
CIA sample clock are all built around 50 Hz and 985248 Hz. NTSC will not work.

The 8580 requirement is about the digi. Mahoney's technique maps each sample
amplitude through a table measured from a specific SID revision, so the table
and the chip have to agree. This build ships the 8580 table. On a 6581 the demo
still runs and the picture is identical, but the speech is mapped through the
wrong analog curve and will sound wrong. A 6581 build exists and is a
data-only rebuild - ask us and we will hand it over.


-------------------------------------------------------------------------------
  AI TOOLS USED
-------------------------------------------------------------------------------

Disclosed in full, as the compo rules require.

CLAUDE CODE (Claude Opus 4.8, Anthropic)  -  used heavily inside VS Code

  The single biggest AI contribution to this production. Used throughout as a
  coding and engineering partner on:

    - the Python encoder toolchain in tools/ - video quantisation to the
      chunky charset, the band colour solver, Koala conversion, the audio
      filter chain and Mahoney table mapping, EasyFlash bank packing
    - the 6502 sources - the cartridge boot/relocator, the streaming player,
      the raster chain, the digi NMI, and the test rigs
    - the measurement instruments - the digi correlation scorer, the frame
      verifier, the sequencing regression test
    - the project documentation

  Written honestly: This demo would not exist in this form or in this
  timeframe without it. The creative direction, the footage, the edit, the
  subtitle wording and every judgement call about what the demo should be are
  ours. A lot of the code that realises those decisions was written with AI
  assistance, and a lot of the debugging was too.

  Worth noting, because it cuts the other way as well: the AI also produced
  several confidently wrong measurements during development, and the project
  keeps a written record of the claims that had to be withdrawn once the
  instrument behind them was checked against a known-good case. Verifying the
  tools was a real part of the work.

WHISPER  (whisper.cpp 1.9.1, large-v3-turbo)  -  used only for the first edit

  Finnish speech-to-text for the subtitle TEXT, run twice, once on raw audio
  and once on denoised. The final subtitles are tuned manually by Byteman.

  Not used for the timings. Whisper's word boundaries drift in quiet passages,
  so every cue's in/out point comes from a 0.05 s speech-band energy envelope
  instead. Several cues were hand-edited, and one deliberately keeps our own
  stylised spelling over Whisper's literal transcription.


  NO GENERATIVE IMAGE OR VIDEO TOOLS WERE USED.

  The footage and the photographs are our own. Shot on a phone camera during
  a Wolfpack trekking trip in Abisko by Riksa / Wolfpack. Everything you see
  on screen started as our own camera original and was put through
  our own encoder.


-------------------------------------------------------------------------------
  CREDITS AND THANKS
-------------------------------------------------------------------------------

  Code, encoder, edit    Byteman / Wolfpack
  Footage and stills     Riksa / Wolfpack crew, Abisko beautiful nature

  Pex "Mahoney" Tufvesson, for the $D418 volume-table technique and for
  publishing both the white paper and the measurement archive. The paper
  grants use explicitly; the tables in this build are his measurements.

  The VICE team, for an emulator accurate enough to develop this against.

  Greetings to all at ASM26, and love to Wolfpack.

  Live long and prosper!

===============================================================================
