• src/doors/syncduke/tests/

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Sunday, June 28, 2026 22:01:00
    https://gitlab.synchro.net/main/sbbs/-/commit/d38762b8b3deecfc5e59e949
    Added Files:
    src/doors/syncduke/tests/test_kitty.c
    Modified Files:
    src/doors/syncduke/Game/src/menues.c src/doors/syncduke/syncduke.h syncduke_input.c syncduke_io.c src/doors/syncduke/tests/test_keymap.c
    Log Message:
    syncduke: kitty keyboard protocol -- true key-up, hold-to-move, native turn

    Terminals that speak the kitty keyboard protocol (e.g. Contour) report explicit key press/repeat/release, so the door no longer has to fake key-up with a timeout.
    The door queries support at startup (CSI?u); on a reply it pushes the progressive-
    enhancement flags (CSI>11u: disambiguate + event-types + report-all-keys) and pops
    them on exit (CSI<u). Negotiation is gated -- terminals that don't answer keep the
    existing byte-path behavior, unchanged.

    Under kitty:
    - Movement (WASD/strafe/space) and the turn arrows drive Duke's real key state
    (kitty_press/kitty_release), held until the actual key-up -- crisp hold-to-move,
    and turning uses the engine's native turn-accel ramp instead of the door's
    synthetic rate, so it feels like the original. expire() still times out momentary
    press() keys (F-keys, Center) while leaving kitty-held keys down (far release_at).
    - Full key map for Contour's encodings: printables/numbers/space + numpad (the
    Private-Use-Area keypad codepoints, incl. numpad Enter) via CSI-u; arrows as
    CSI A/B/C/D with release; F1=CSI P, F2=CSI Q, F3=13~, F4=CSI S, F5=15~, F6=17~;
    PgUp/PgDn look, Home/End center. F-key release events are gated press-only so
    nothing double-fires.
    - Ctrl-A..F aliases now mirror the door's F-keys (Ctrl-A=help, Ctrl-D=tier cycle,
    Ctrl-B/C/E/F=Duke save/load) instead of raw Duke scancodes.
    - Home/End in a MENU jump to the first/last item (probeXduke); in gameplay they
    still Center_View.
    - The Ctrl-S stats strip shows "kbd:kitty" when negotiated.
    - Setup Controls greys + disables the byte-path feel knobs (KEY TAP/HOLD, TURN
    SPEED, FAST TURN) and shows a contextual "native key timing" note on hover, since
    those only compensate for terminals without key-up.

    tests/test_kitty.c drives the real pump with Contour's byte sequences and asserts
    the decoded scancodes / actions; test_keymap.c gains a stub for the new output path.
    Live-validated on Contour (hold-to-move, turn, F-keys, numpad, menus) with SyncTERM
    unchanged.

    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 L@VERT to Git commit to main/sbbs/m on Tuesday, June 30, 2026 22:32:00
    https://gitlab.synchro.net/main/sbbs/-/commit/1641cd3f67adbffee9e953bc
    Added Files:
    src/doors/syncduke/tests/test_evdev.c
    Modified Files:
    src/doors/syncduke/Game/src/menues.c player.c src/doors/syncduke/syncduke.h syncduke_input.c syncduke_io.c src/doors/syncduke/tests/test_kitty.c
    Log Message:
    syncduke: SyncTERM evdev physical-key input tier

    Deuce added physical-key event reporting to SyncTERM/CTerm (CTDA cap 8): once negotiated, presses/releases arrive as CSI=<evdev-code>K/k -- layout-independent
    scancodes with true key-up and no auto-repeat. Better for a game than the byte path (WASD works on AZERTY/Dvorak, real modifier-hold, no repeat noise) and than
    kitty (which SyncTERM doesn't speak).

    - syncduke_input.c: g_evdev_active + negotiation in the CTDA scan; evdev_edge()
    routes modifier keys -> a Shift/Ctrl/Alt mask, arrows/nav/F-keys -> scancodes
    & door actions, others -> ASCII via a US-QWERTY fold table, then reuses
    handle_key() so all hold/shortcut/map logic is shared with the kitty path.
    Also bounds the APC/string-sequence swallow so an unterminated one can't lock
    up input.
    - syncduke.h / syncduke_io.c: syncduke_evdev_active() decl; exit cleanup
    disables the reports.
    - Setup Controls (menues.c): under native key-up (kitty or evdev) KEY TAP/HOLD
    are moot (greyed "NATIVE"); TURN SPEED / FAST TURN stay live -- they tune the
    synthetic turn the door falls back to on a high-latency link.
    - Native-turn feel (player.c): under native key-up the engine's own ramp drives
    turning, so FAST TURN (a byte-path fix for gappy auto-repeat) is gated out of
    the native path -- it then only tunes the high-latency synthetic fallback,
    matching the Setup Controls hint. The native top turn speed is trimmed to 3/4
    (a clean key-hold accumulates turn faster than a real keyboard did).
    - Look/Aim like the original, under native key-up (the byte path keeps its pitch
    notch): PgUp/PgDn & numpad KP9/KP3 drive the engine's Look_Up/Down (hold to
    look, auto-centers on release); Home/End & KP7/KP1 drive Aim_Up/Down (hold to
    look, holds position) -- by holding the real bound scancodes so the engine
    does the authentic pitch. Legacy/byte terminals are unchanged (notch + Center).
    - tests/test_evdev.c (new) + test_kitty.c: cover negotiate, hold+release, native
    turn, high-latency synthetic turn, modifier folds, F-keys, menu-vs-gameplay,
    and the Look/Aim scancode paths. Both pass.

    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 L@VERT to Git commit to main/sbbs/m on Thursday, July 02, 2026 21:40:00
    https://gitlab.synchro.net/main/sbbs/-/commit/5d97c44569c1f5fdfb270761
    Added Files:
    src/doors/syncduke/tests/test_dukematch_lib.js
    Modified Files:
    xtrn/syncduke/syncduke_lib.js
    Log Message:
    syncduke: lobby model for dukematch (mode->/c flag, [dukematch] config, registry mode, frag text)

    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 L@VERT to Git commit to main/sbbs/m on Thursday, July 02, 2026 21:40:00
    https://gitlab.synchro.net/main/sbbs/-/commit/aa11a9251979026a4cf418a8
    Added Files:
    src/doors/syncduke/tests/test_waiting_room_lib.js
    Modified Files:
    xtrn/syncduke/syncduke_lib.js
    Log Message:
    syncduke: registry heartbeat + .claim coordination helpers for the waiting room

    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 L@VERT to Git commit to main/sbbs/m on Thursday, July 09, 2026 01:55:00
    https://gitlab.synchro.net/main/sbbs/-/commit/4e683c8c37ff7bc25e991273
    Added Files:
    src/doors/syncduke/tests/test_map_name.c
    Modified Files:
    src/doors/syncduke/syncduke.h syncduke_events.c syncduke_game.c
    Log Message:
    syncduke: name levels by the CON's level name, not "E#L#"

    The activity feed and the who's-online status both identified a level by
    its episode/level code ("Digital Man died on E3L1"), when the engine has
    had the real name all along: gamedef.c fills level_names[] from the CON's definelevelname directives, so E3L1 is "RAW MEAT". Report that instead --
    and because it comes from the CON rather than a table of our own, an
    add-on GRP or a custom CON names its levels for free.

    Consolidate the naming in syncduke_map_name() (syncduke_game.c) so the
    feed and the node status can't drift. A -map user map keeps its old name
    (the file's basename, ".map" stripped): its level slot is always 7, so
    neither level_names[] nor "E1L8" would mean anything for it. A slot the
    CON never defined still falls back to the E#L# code.

    The stored name needs trimming: on the PLATFORM_UNIX path the CON parser
    copies up to the newline, so a CRLF CON -- which every stock GRP is --
    leaves a trailing carriage return on the name. Unstripped it would land
    in node.exb and in the JSON of every event line.

    The node status gains a colon ("playing SyncDuke (Nukem 3D): RAW MEAT");
    the two words ran together without one.

    tests/test_map_name.c links the real syncduke_game.c against stubs of the engine globals it reads and covers a CRLF name, a bare name, an undefined
    slot, an out-of-range slot and a user map. Also verified end to end by
    driving the door binary into gameplay headless, where the engine's own
    table reads "HOLLYWOOD HOLOCAUST\r".

    Note this diverges from SyncDOOM, which still reports E1M1/MAP07: DOOM
    keeps its level names in a source string table, not in the WAD.

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