https://gitlab.synchro.net/main/sbbs/-/commit/3da06552004331704a338949
Modified Files:
xtrn/syncivision/syncivision_lib.js xtrn/syncivision/tests/test_syncivision_lib.js
Log Message:
syncretro: collapse dump-quality variants in ROM discovery
A ROM set carries several dumps of the same game that differ only by
a trailing marker the title parser strips -- "... [!].int" beside
"... [a1].bin". Their bytes differ, so the content dedupe (size plus
a hash of the first 4 KB) cannot merge them, and the picker showed
two or three identical-looking lines per game, some of them known-
inferior rips. 12 of the 221 cartridges in the reference set were
affected.
sv_dump_rank() ranks a name's best trailing marker: 0 verified [!],
1 no marker, 2 alternate [a*] (or anything unrecognized), 3 overdump
[o*], 4 bad dump [b*]. sv_collapse_variants() groups by title + year
+ publisher (publisher stays in the key so different ports, e.g. the
Intv Corp and Atarisoft Pac-Man, are never merged) and keeps the
best-ranked entry per group, tying on the lexicographically smallest
name so the result never depends on directory() order. sv_discover()
calls it after the content dedupe and before the final sort.
This hides files that exist on disk -- it is a display-layer pick,
not a delete. The sysop's escape hatches are unchanged: [roms]
exclude= in syncretro.ini, or deleting the losing dump directly.
Tests cover the rank table (including stacked markers, where the
best marker present wins), the collapse itself, the Pac-Man-ports must-not-merge case, and a same-rank tie.
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net