• src/doors/syncretro/retro_options.c retro_options.hsrc/doors/syncretro

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tuesday, July 21, 2026 01:41:46
    https://gitlab.synchro.net/main/sbbs/-/commit/305d224115e459dcea6fa0a7
    Added Files:
    src/doors/syncretro/retro_options.c retro_options.h
    Modified Files:
    src/doors/syncretro/CMakeLists.txt main.c retro_env.c syncretro.h syncretro_config.c syncretro_door.c
    Log Message:
    syncretro: answer the core's option queries, and pin them in syncretro.ini

    The door answered false to every GET_VARIABLE, on the documented assumption that a core then falls back to its own defaults. That assumption is not reliable. Measured with probe_core against MAME 2003-Plus: answering false leaves av_info.sample_rate at 0.0 and the core emits ZERO audio samples --
    a silent door -- while answering each query with the value the core itself advertised yields 48000 Hz and exactly 792.0 audio frames per video frame.
    It reads all 23 options it advertises. "Answer nothing" and "answer the default" are not the same thing.

    New retro_options.c/.h keeps what a core advertises (SET_VARIABLES, and defensively SET_CORE_OPTIONS[_V2][_INTL]) and hands it back on GET_VARIABLE, overridden by whatever the console pinned. GET_VARIABLE_UPDATE now gets a definite "no" rather than an unanswered call -- MAME 2003-Plus polls it
    every frame.

    Pins come from syncretro.ini's [options], NOT the command line, and that is forced rather than chosen: the BBS assembles a door's command line into xtrn.cpp's fullcmdline[MAX_PATH + 1] and truncates it there silently at 260 characters. The lobby's line for one arcade game already runs to ~240, so
    two pinned options took it to 334 and the ROM argument -- the last thing on
    the line -- was cut off, giving a door that reported "(no ROM)" for content whose full path the BBS had just logged (it logs the untruncated string and passes the truncated one). A -option flag remains for a door run by hand.

    Note the ini section is read with iniGetNamedStringList(), not
    iniGetSection(): the latter returns the section's raw lines, comments and
    all, untrimmed around the '='.

    sr_options_report() logs "N advertised, N pinned, N read" and WARNS about a pinned key the core does not advertise -- a typo is otherwise perfectly
    silent, leaving the core on a default nobody chose.

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