• src/doors/syncduke/syncduke_io.c

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Jun 28 00:21:31 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9702f5ad2884a73ef51a3a35
    Modified Files:
    src/doors/syncduke/syncduke_io.c
    Log Message:
    syncduke: aspect-preserve the sixel tier (fit, don't stretch to fill)

    The sixel tier sized the encoded frame to out_w x out_h -- the terminal's pixel canvas capped at 640x480 -- and nearest-scaled Duke's native 320x200 into it, which is 4:3 on a tall terminal: the game came out vertically stretched (e.g. encoded 320x240 at >=80x50 instead of ~320x200).

    Run the sixel through the same termgfx_geom_fit/center as the JXL tier: fit 320x200 into the real graphics canvas (XTSMGRAPHICS via syncduke_canvas_w/h, not
    the rows*16 text-area estimate) preserving 8:5, capped at 640 wide, then encode at 1/scale of that. The displayed sixel is now a constant 640x400 letter-boxed and centered, exactly like SyncDOOM.

    Side effects, all good:
    - no vertical stretch (keeps 8:5 on tall terminals);
    - the prior 80x50/60 over-hang is gone -- a fit is <= canvas by construction,
    so the frame can no longer scale past the real ~640x400 SyncTERM canvas;
    - ~18% less sixel bandwidth on tall terminals (320x198 vs 320x240).

    Both image tiers now share termgfx_geom_fit, lining SyncDuke up with SyncDOOM ahead of wiring Doom to the same helper.

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

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Jun 28 22:01:38 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/e4d6c705328c0cc1c7b5f486
    Modified Files:
    src/doors/syncduke/syncduke_io.c
    Log Message:
    syncduke: bound the sixel encode to its buffer (fix full-res co-op SIGSEGV)

    The full-res sixel opt-in (5cbc69c24) encodes sxh=sdh without the half-res /2, so
    on a large canvas (sdw at the 1024 width cap, sdh ~691 with the aspect/stretch fit)
    sxw*sxh exceeded the fixed syncduke_scaled[1024*640] buffer and overran into the
    adjacent globals -- g_out got clobbered with palette bytes, and the next out_put
    memcpy faulted (SIGSEGV in syncduke_present, seen at co-op level entry). Root-caused
    from the core: &g_out sits 48 bytes past the buffer end.

    Hard-bound the encoded area to the buffer (sxw*sxh <= OUT_W_MAX*OUT_H_MAX) so it can
    never overrun again, and raise OUT_H_MAX 640->768 so a full-res encode on a maxed
    window isn't needlessly shrunk by that clamp.

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

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