• src/doors/syncdoom/i_video.c render_sixel.c render_sixel.h syncdoom.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Monday, June 22, 2026 23:13:13
    https://gitlab.synchro.net/main/sbbs/-/commit/2d0d5c575e2cc51178be164c
    Modified Files:
    src/doors/syncdoom/i_video.c render_sixel.c render_sixel.h syncdoom.c Log Message:
    syncdoom: make the sixel tier work on SyncTERM

    Three fixes that together make SyncTERM render the sixel tier correctly
    (it previously garbled and/or scrolled), and let older SyncTERM reach it.

    - Stable, define-once palette. The encoder rebuilt a per-frame palette from
    the RGB framebuffer and re-emitted all 256 color-register definitions every
    frame -- with register numbers assigned in scan order, so the same Doom color
    was a different register each frame. That churn corrupted SyncTERM's decoder
    (garbled colors every few frames). Now we encode from Doom's native 8-bit
    indices (i_video.c exposes the live palette + a change counter) against a
    fixed 1:1 register<->index palette, and (re)define the registers ONLY when
    Doom actually changes the palette (damage/pickup/radsuit/menu). A steady
    scene sends band data alone -- identical palette every frame, ~4KB smaller.

    - DECSDM (private mode 80) reset while the sixel tier is active. It defaults
    to set, which scrolls the page + appends a newline whenever a full-screen
    sixel reaches the bottom -- i.e. every frame. Resetting it pins the sixel at
    the page origin and stops the per-frame scroll. Restored on exit/tier-change.

    - CTDA sixel auto-detect. SyncTERM advertises sixel only via its private CTerm
    Device Attributes (ESC[<c -> capability 4 = pixel ops), not the xterm DA1
    flag, so older (no-JXL) SyncTERM used to fall back to text. Probe ESC[<c and
    accept cap 4, so those versions auto-select sixel. 1.4+ still prefers JXL
    (the tier ladder probes JXL first).

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net