https://gitlab.synchro.net/main/sbbs/-/commit/e6b9c8adcfa880a43a5420be
Modified Files:
src/doors/syncretro/main.c syncretro.h syncretro_config.c syncretro_input.c syncretro_io.c
Log Message:
syncretro: answer an unbound key, and trace what a terminal sends
Two changes to the input path, one a feature and one the tool that
explains it.
A player who presses a key that does nothing is asking what the keys
are, so answer: an unbound printable key now raises the key legend
instead of being silently dropped. That makes the pause screen and the
help screen the same screen -- both list the keys, and only the banner
and the footer differ -- so they collapse into one sr_screen_keys(),
and '?' behind the pause screen has nothing left to add. The legend
also carries the two hints a first-time player needs: many cartridges
read the RIGHT hand controller, and most games start on a keypad digit
rather than an action button.
The diagnostic is the more useful half. `keytrace.on` in the door's own directory turns on a log of every inbound byte, tagged with the key
mode in force, alongside the frame-pacing decisions (sent, dropped,
de-duped, acked) and a once-a-second sample of the pad the core sees.
It answers what no amount of source-reading can: what a given terminal
actually sends for a given key, and whether a frozen picture is a
stalled door or a core that has the input and draws nothing. Both of
those questions came up chasing a paddle that moved one tick per
press-and-hold in Brickout!, and the trace settled each of them after
static reasoning had guessed wrong three times.
A touch-file rather than an environment variable because bbs.exec()
starts a door through execvp() with the BBS's own environment, so a
sysop cannot set a variable without restarting the BBS -- and under
EX_BIN the door's stderr is discarded, so the output has to be a file.
Both paths resolve against the new sr_config_launch_dir() rather than
cwd: sr_config_apply() has already chdir'd into the per-user sandbox by
the time a key arrives, so a relative path would quietly land under data/user/NNNN/. The launch directory was already captured there; it
just had no accessor.
Off unless the switch file exists -- not even a file handle.
Co-Authored-By: Claude Opus 4.8 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net