• xtrn/syncivision/tests/test_syncretro_lobby.jsexec/load/game_lobby.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Jul 28 02:32:26 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/64c73eb25da2ce2e0ba11fee
    Added Files:
    xtrn/syncivision/tests/test_syncretro_lobby.js
    Modified Files:
    exec/load/game_lobby.js syncretro_lib.js syncretro_lobby.js xtrn/syncarcade/README.md syncretro.example.ini xtrn/syncivision/README.md syncretro.example.ini xtrn/syncivision/tests/test_syncretro_lib.js xtrn/syncnes/README.md syncretro.example.ini
    Log Message:
    syncretro: make the lobby's strings and header art sysop-configurable

    Every string the lobby displays is now a key in a new [text] section of syncretro.ini, and a sysop can head or foot the picker with a display file
    of their own. Both default to exactly what the lobby drew before, so an
    install that configures nothing looks unchanged.

    The [text] keys are written with a COLON rather than an equals sign, which
    is what makes xpdev's ini parser treat the value as a C string literal and
    run it through c_unescape_str(): "\1h" is then the Ctrl-A attribute code
    and "\xb3" the CP437 byte, spelled the way ctrl/text.dat already spells
    them. A colon also preserves a trailing space, which several of these
    strings need. Nothing here decodes anything.

    A blank value means "draw nothing here" -- that is how the live "Top
    played" row is turned off. The section is read with iniGetObject()'s
    blanks argument, since a blank value is otherwise dropped and then cannot
    be told apart from an absent key.

    The header and footer are files dropped in the door's own directory, lobby_header.* and lobby_footer.*, found without configuring anything:
    the door-side equivalent of xtrn_sec.js's xtrn_head and xtrn_tail, but
    resolved in the door dir rather than text/menu, because an external's decoration belongs to the external. game_lobby.js gains display_file() for
    it, so SyncDuke and SyncDOOM can take the same treatment. It follows the extension order sbbs_t::menu() uses -- including the .msg/.asc pair
    reversing for an ASCII-only terminal, which must not be handed a .msg's
    CP437 box-drawing characters.

    Two details the C decided rather than preference:

    syncretro_cell() now measures how many columns its format spends on
    everything but the title, instead of assuming the six the shipped format happens to use. A sysop who changes the separator -- or a collection past
    999 cartridges -- would otherwise silently break the column grid.

    Page geometry is measured with console.row, NOT console.line_counter. Terminal::inc_row() counts a line only when lncntr or lastcrcol is already non-zero, so a header file opening with a blank line measures short, and a geometry corrected to a short measurement is worse than no correction at
    all. That measurement overrules the built-in row counts only when a
    display file is installed; a stock install keeps the constants it has
    always drawn to. printfile() is passed P_NOCRLF, which it otherwise
    answers with a line break whenever the cursor is not already at the top of
    the screen.

    Documented in each console install's syncretro.example.ini and README, and covered by a new test_syncretro_lobby.js: 46 assertions over the ini
    escapes and blank overrides, the cell measurement, display-file resolution
    per terminal type, and the row arithmetic.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

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