Skip to content

durdraw

durdraw is a versatile ASCII, Unicode, and ANSI art editor — and, unusually, an animation editor. It’s a full drawing environment in the terminal: a central drawing canvas, an F1–F10 character palette along the bottom status bar (<F1░F2▒F3▓F4█F5▀F6▄F7▌F8▐F9■F10·>), a color picker (esc-c / tab), and a frame timeline with transport controls ([|< << |> >> >|], F: 1/7). You paint characters onto a grid of cells (each cell = glyph + fg/bg color + attributes), step or play through frames, and tune per-frame timing.

Key subsystems:

  • Frame-based animation. Frames are numbered (F: 1/7); esc-n clones a frame, esc-N appends an empty one, esc-p plays/stops, esc-k/esc-j step, esc-D sets a per-frame delay (D: 0.00s), esc-+/esc-- change global speed, esc-R sets a play/edit range to loop a sub-sequence. Crucially, durdraw decouples timing from baud emulation: “Unlike traditional ANSI animation [that relies] on baud rate to govern the playback speed,” durdraw gives “the artist fine control over frame rate, and delays per frame.”
  • Character palette + character sets. F1–F10 are quick-insert glyph slots; esc-[ / esc-] cycle character groups; esc-S switches whole character sets loaded from ~/.durdraw/charsets/*.ini (each defines named [block N] glyph maps). esc-y eyedrops a glyph/color off the canvas.
  • CP437 ↔ Unicode. Natively mixes both; a --cp437 flag renders in IBM-PC encoding; DOS ANSI files are auto-converted to Unicode on load.
  • Theme system. ~/.durdraw/themes/*.dtheme.ini define UI colors (mainColor, borderColor, menuItemColor, …); 16- and 256-color variants; selected via durdraw.ini or --theme.
  • Curses rendering for robustness. ncurses-driven frame redraws are “less vulnerable to visual corruption from things like errant terminal characters, resized windows, line noise.”

durdraw is the direct model for a KN-86 art/animation authoring tool — the missing companion to the runtime-side clip system. Where KN-86’s clip-system defines how a pre-rendered terminal animation plays back on-device, durdraw is the reference for the authoring side: how an artist makes those clips.

  • Drawing-canvas paradigm on a cell grid. durdraw’s cell model (glyph + fg/bg + attrs, painted with arrows/mouse) is precisely KN-86’s framebuffer cell model. A KN-86 cart-art tool — desktop-side, producing assets for the .kn86 container — should adopt durdraw’s canvas IA wholesale: paint glyphs into a fixed grid matching the device’s canonical grid (per Canonical Hardware Specification), eyedrop, select/copy regions.
  • Frame-based animation = the clip-system authoring front end. durdraw’s frame list + per-frame delay + play-range is exactly the data model a KN-86 clip needs: an ordered set of full-grid frames, each with a delay, optionally looped. This maps onto the clip-system primitive and the reveal animation work (reveal-styles + ADR-0033 reveal NoshAPI primitive). durdraw is the worked authoring tool for producing clip/reveal assets; its .dur JSON (frames + metadata) is a near-perfect schema reference for a KN-86 clip source format.
  • Character-palette UI maps onto the Ferris Sweep / firmware action row. durdraw’s F1–F10 quick-glyph palette is the model for a glyph-picker surface. On KN-86 the function keys live differently (the Sweep is 34 keys with a Lisp-primitive left block — per Canonical Hardware Specification), but the pattern — a small, cyclable palette of “current drawing glyphs” advertised in a fixed strip — ports directly, and the strip is the firmware action row / CIPHER-LINE territory.
  • Per-frame timing decoupled from transport speed. durdraw’s per-frame D: delay plus a global speed multiplier is the right two-knob model for KN-86 clip playback — authors set the intrinsic timing of a clip, the runtime can still scale it. Worth folding into the clip format spec.

durdraw is a color art tool, so the adaptation here is the most substantial in the batch — and the most generative, because it forces the question “what is monochrome ANSI art?”

  • The palette becomes purely glyph-density, not glyph+color. durdraw’s power glyphs ░▒▓█▀▄▌▐■· are already the single-color artist’s toolkit: shading by character density () is exactly how KN-86 reframes “color” as character density (the core single-color principle). A KN-86 art tool keeps durdraw’s block/shade palette and drops the color picker entirely — the F-key slots all carry density/shape glyphs, and “shading” means choosing a denser block, not a brighter color.
  • CP437 box + block glyphs are the whole vocabulary. KN-86’s font is Press Start 2P + CP437 box-drawing (per Canonical Hardware Specification, software/api-reference/grammars/character-set.md). durdraw’s native CP437 support and its block/shade palette are a perfect fit — the art tool’s palette is the KN-86 code page.
  • Attributes (bold) and inversion replace fg/bg color. durdraw layers a bold attribute and fg/bg pairs per cell. KN-86 collapses these to amber-on-black + inversion (black-on-amber) as the only “second value” available — a one-bit-per-cell field instead of durdraw’s color+attr. The art tool exposes that one toggle (normal / inverted) where durdraw exposes a color picker.
  • The theme system collapses to one fixed amber theme (hardware-fixed), but durdraw’s theme file format (named UI-color keys) is the precedent for the aesthetic-mode toggle KN-86 varies within amber (warmth, scanlines, glyph weight) — cross-read os-models.md, 4trk.md.

Net: durdraw minus color is a KN-86 art tool. The subtraction is clean because durdraw’s most powerful drawing primitives (block-shading glyphs, CP437) are the single-color primitives.

durdraw isn’t scripted, but its declarative .ini character-set + .dur JSON data files are the extension model that matters here, and it lines up with KN-86’s data-driven cart philosophy:

  • Character sets as loadable data, auto-discovered. durdraw scans ~/.durdraw/charsets/ and registers every *.ini it finds ([block N]f1: 🭨 glyph maps). This is the same “drop a data file, it’s picked up” pattern KN-86 carts use for static data (sprites, PSG patterns, strings) in the .kn86 container (ADR-0006). A KN-86 art tool should let authors define custom glyph palettes as data the same way — and those palettes are exactly the kind of static asset a cart ships.
  • .dur JSON as a clip-source schema. durdraw serializes frames + per-frame delay + canvas metadata to JSON. KN-86’s clip/reveal assets want an equivalent author-facing source format that the toolchain compiles into the .kn86 container. durdraw’s .dur is a concrete, proven reference schema — frames array, per-frame delay, encoding flag, dimensions.
  • Where Lisp enters: the playback side is KEC Lisp. An author draws frames in a durdraw-style tool (data), and a cart’s Lisp handler drives playback via NoshAPI clip/reveal primitives (ADR-0005, ADR-0033). durdraw is the authoring half; cart Lisp is the runtime half. The clean split — art is data, behavior is Lisp — is the KN-86 model, and durdraw is the reference for the data half.
  • Batch 8. Lead reference for the art-canvas / character-palette / frame-animation cluster, and the strongest candidate to seed a real KN-86 cart-art authoring tool.
  • Cross-link software/cartridges/authoring/clip-system.md — durdraw is the authoring front end for exactly the clip primitive that doc specifies; its frame+delay+range model and .dur schema are direct inputs to a clip source format.
  • Cross-link ADR-0033 (reveal NoshAPI primitive) and reveal-styles.md — frame-based reveal animations are the same data shape as durdraw frames.
  • Cross-link software/api-reference/grammars/character-set.md — durdraw’s CP437/block palette is the KN-86 code page; the art tool’s palette and the font’s glyph set are the same inventory.
  • Cross-link os-models.md / 4trk.md for the theme-system → aesthetic-mode read-across.
  • A KN-86 cart-art tool, modeled on durdraw-minus-color, is worth a parking-lot / Notion note — it’s the most actionable build idea in the batch.

durdraw with the drawing canvas, F1–F10 character palette, and the frame timeline

TODO (human): Pull a screenshot from the durdraw README showing the canvas + the F1–F10 palette strip + the frame/timeline indicator (F: 1/7) in one frame. Drop at inspiration/screenshots/durdraw.png. The palette strip and the frame counter are the two elements this entry is about.