Commit Graph
76 Commits
Author SHA1 Message Date
Abdessamad Derraz d0802c5360 feat: place core files per handed system dir
A platform can hand each libretro core a system directory of its own
(core_system_dirs). platform_layouts then gives one view per directory,
so the gap report, the builder, the manifest, slots and cross_reference
place a core's files below each folder it is handed, and a core handed
none gets no file. Resolution strips the folder again and searches the
collection by the core's own path.
2026-10-22 04:04:31 +02:00
Abdessamad Derraz d6a0639330 chore: merge audit fixes (packrules)
# Conflicts:
#	scripts/packextras.py
2026-10-21 11:52:28 +02:00
Abdessamad Derraz cd589b2742 chore: merge audit fixes (mame) 2026-10-21 11:48:30 +02:00
Abdessamad Derraz 56e8cbe046 feat: file mame device sets by their machines
The -listxml names, for every machine, its parent (romof), the devices of its default configuration (device_ref) and the cards its slots offer (slotoption). A machine takes the system of the first set on its romof chain a written entry lists, and passes it to each device it can instantiate. A device set reached from one system gets system:, from several the new per-entry systems:, from none neither, and keeps serving every system of the profile. The gap report, the core extras and slots read the entry's own systems, so generate_pack --system and the installer pick by them.
2026-10-21 11:33:39 +02:00
Abdessamad Derraz 7ca6adca56 fix: check narrowed packs against their own list
After --all-variants, --verify-packs printed "hashes checked during the
build" for the platform-only, truth and required-only packs and compared
none of them, so one missing a file its narrowed list requires passed.
Each pack is now held to the platform list narrowed the way it was built:
source and required_only, read from its name, reach the baseline, the
region grouping and the replay of the core extras.
2026-10-21 11:17:30 +02:00
Abdessamad Derraz 3fe88332e7 feat: accept platform system names in --system
generate_pack and verify read --system beside --platform through common.resolve_system_arg, built on platform_system_names, the mapping the manifest's system_names comes from. verify --platform --system now reports on the narrowed pack. Unknown names are refused with suggestions before the database is read.
2026-10-21 10:52:40 +02:00
Abdessamad Derraz b4e5e42c97 fix: leave out core files the core refuses by size
A core extra resolved by name shipped on existence platforms even when
the core's own size check turns the copy away. The RetroPie pack carried
the 128 KB Apple IIGS ROM as Basilisk II's ROM (min 512 KB). The builder,
the manifest and verify now read validation.core_size_refusal, which
accepts a copy any version of the same profile slot takes.
2026-10-21 10:46:52 +02:00
Abdessamad Derraz 236f30860e fix: check core files where the builder puts them
The pack integrity check rebuilt the core extras with no taken paths and
tested presence alone, so it credited core files at paths the platform's
own file holds and printed a core count the builder contradicted. It now
replays the builder's placement through packextras.hidden_extras and
compares each placed member with the copy the builder resolves.
2026-10-21 10:08:48 +02:00
Abdessamad Derraz 3b60facd34 fix: count core copies under their own category
The second pass, the archive-prefix pass and the agnostic scan built
extras without source_name or source_path, so verify found no gap report
entry for them and counted game data such as hiscore.dat as core files.
Every extra now carries its entry's category and key, and verify reads
the category from the extra the builder places.
2026-10-21 10:01:08 +02:00
Abdessamad Derraz 2af9509ef4 fix: resolve declarations through one function
verify resolved platform entries with common.resolve_local_file and put
the slot override first, and the region pass added a destination hint.
packresolve.resolve_declaration now serves the builder, the manifest,
verify and the region pass: release assets cached for a file absent from
bios/ count as shipped in all four, and a release asset keeps its answer
over a slot override.
2026-10-21 09:56:07 +02:00
Abdessamad Derraz 378a9e4da5 chore: merge audit fixes (integrity)
# Conflicts:
#	install/batocera.json
#	install/emudeck.json
#	install/lakka.json
#	install/recalbox.json
#	install/retroarch.json
#	install/retrobat.json
#	install/retrodeck.json
#	install/retropie.json
#	install/rocknix.json
#	install/romm.json
#	scripts/generate_pack.py
#	wiki/tools.md
2026-10-21 06:48:42 +02:00
Abdessamad Derraz 4ba935374e fix: keep pack order outside contested paths
Ranking contested core claims sorted the whole gap report, which
reordered every manifest. Only the claims on one contested path move now,
grouped where the first of them stood, and two spellings of a path are
one group where the filesystem folds case (RetroBat's 64DD_IPL_DEV.bin).

An entry without a destination (EmuDeck's system:md5 whitelist) no
longer counts as a pack path in verify, and step 5 prints one status for
counts and paths together. A full offline run compared all 12 archives
and 930 emulator packs path by path, every one equal.
2026-10-21 06:47:44 +02:00
Abdessamad Derraz 5e95574143 fix: the strongest proof takes a shared core path
A destination no platform declares went to the first claimant in profile
order whatever the proof: fbalpha2012 asks for hiscore.dat by name and
took the root of six packs over cores that pin it by sha1. Claims on a
contested path are now ranked by what the collection holds for each (a
held declared hash, then a path or every required archive member, then a
name, then a contradicted hash), and profile order only breaks ties.
Measured: 14 slots change file across the platforms, among them
hiscore.dat, kick13.rom on RetroPie, cgb_boot.bin and dmg_boot.bin on
EmuDeck, and ROCKNIX neogeo.zip and neocdz.zip.
2026-10-21 05:28:10 +02:00
Abdessamad Derraz 1c2360926b fix: a refused regional file wins no slot
emulator_region_drops counted as held any file that resolved. A regional
dump whose md5 the core's own check refuses won its region, the fallback
was withdrawn, and the emulator pack then refused the winner: no BIOS for
the system, and verify --emulator, reading the same drops, did not see
it. Held now means what the builder ships, as _ships decides on the
platform side.
2026-10-21 05:19:51 +02:00
Abdessamad Derraz 959934d43c refactor: compute the gap report once per build
The region grouping and phase 2 of each pack and manifest called
find_undeclared_files with the same arguments: 30 reports for the 15
manifests of --all --manifest, 2.8 s, now 15 and 1.7 s. The 15 manifests
are byte-identical before and after.
2026-10-21 05:18:53 +02:00
Abdessamad Derraz 38af19091d fix: compare pack paths, not only counts
Step 5 compared (ok, total) and the core file count. RetroArch, Lakka
and RetroPie read 526/526 on both sides while verify credited four paths
below SGB1.sfc and SGB2.sfc that the pack never writes: a declared file
blocks them as a directory. verify now places the platform files in the
builder's order with the same path rules, and a user_provided or
external declaration keeps its slot on both sides, so no core file takes
it in the report only.

verify --destinations writes the paths each pack holds by the report,
and step 5 compares them with the archive members (notes and data tree
members set aside). Every emulator profile, in each build it has, is
built in memory (PackRecord, nothing read or written) and compared with
verify --emulator path by path. Cost measured here: about 1 s per
platform archive and 11 s for the 930 emulator packs.
2026-10-21 05:18:02 +02:00
Abdessamad Derraz 274db1322f fix: the second extras pass reads installed marks
A file a core reads at several destinations is added again at each one by a second pass that worked from the raw profile entries, so files the emulator or the platform's package installs came back into the packs and manifests by that route: the installer's per-target replay disagreed with the builder on six files.
2026-10-20 08:12:03 +02:00
Abdessamad Derraz ddc7432825 feat: packs leave out what the emulator installs
A file or tree installed with the emulator is already on the user's machine, so packs, install manifests and verify's pack count leave it out. bundled is scoped by mode like any entry: Dolphin's Sys and PPSSPP's assets ship with the standalone releases, not with the libretro cores, so they now follow the libretro build only and still reach RetroArch packs. PrimeHack, standalone only, ships its own Sys.
2026-10-20 06:04:10 +02:00
Abdessamad Derraz 89050ea5d9 fix: count core files as the pack places them
The report counted claims, not files: several cores claim one path (rom.key by three Amiga cores, openbios.bin with and without a region) and the builder ships one file there. RetroArch read 1130 core files, 48 more than its pack. Game data ignored the in_pack marker, so RomM read 351 game data files in a pack that holds none. verify now takes both counts from its replay of the builder's placement, one per pack path.
2026-10-20 00:28:40 +02:00
Abdessamad Derraz 8fd8437351 refactor: share the core file lookup with verify
verify replayed the builder's placement of core files with a bare name lookup, without the archive index, the data directories or the core's own choice of copy. It compared other bytes than the pack's (blueMSX's MSX2P.rom from bios/ against the data tree's copy) and let an unresolved file take a path the builder leaves free. ExtraResolver now holds the builder's lookup and both call it.
2026-10-19 23:08:12 +02:00
Abdessamad Derraz 53f9746bfa fix: count a core file only where it is packed
verify kept its own copy of the placement rule and missed the flat RomM folder, so the report still counted 543 unreachable files as packed. It now asks the builder's ExtraPlacement. The README fraction counted every held core file, including those a platform cannot place or that a same-named packed file hides. It now counts what the pack holds.
2026-10-19 07:44:12 +02:00
Abdessamad Derraz 7d1e9f8816 fix: keep RomM files where its player reads them
RomM lists a platform's firmware folder without descending (base_handler.py:1002, recursive=False) and EmulatorJS writes the chosen file, or each zip member, under its bare name. 543 files of the RomM pack sat below a folder where no core could read them. The registry now marks RomM's folder flat, and such files are omitted with the reason below_platform_folder in the manifest and the installer.
2026-10-19 06:57:36 +02:00
Abdessamad Derraz 4231902a6c docs: write prose without dashes or semicolons
Profiles, the wiki, comments, docstrings, command output and schema descriptions carried em-dashes, clause-joining semicolons, unicode arrows, box-drawing banners and check-mark glyphs. Each sentence was rewritten rather than having its character swapped. Hashes, paths, source_ref values and every cited file:line are unchanged, which a comparison of each parsed profile against the previous revision confirms.

validate_pr comments now say PASS and FAIL in words, and source_ref values in a profile's structured blocks render as code. test_prose_style fails if any of these comes back, in tracked files or in the generated site.
2026-10-19 06:47:31 +02:00
Abdessamad Derraz 5ce2b44a57 fix: fill placeholders in emulator packs
LRPS2 declares only <bios>.bin, so its emulator pack shipped no PS2 BIOS. The images in the folder another PS2 profile proves by hash, of the declared size, now take the placeholder's place in the pack and in verify.
2026-10-19 04:11:19 +02:00
Abdessamad Derraz 4130abb7bc fix: count only shipped files as held by region 2026-10-18 19:52:31 +02:00
Abdessamad Derraz 6c7f1c9d06 fix: let a lone core file leave its system's drop 2026-10-18 19:49:17 +02:00
Abdessamad Derraz dbe26fddc9 fix: group system-less files alike in both modes 2026-10-18 19:47:09 +02:00
Abdessamad Derraz 8e067c1c3a fix: name the packs that fail verification 2026-10-18 16:21:54 +02:00
Abdessamad Derraz 8001b9d86d fix: compute verify's gap report once 2026-10-18 16:06:35 +02:00
Abdessamad Derraz e3b17b04d2 fix: file RomM extras under their own system 2026-10-18 15:19:19 +02:00
Abdessamad Derraz 3c856bbc10 fix: lay out both builds of a dual-mode emulator
Batocera, RetroBat, Recalbox and ROCKNIX offer some emulators both as a
libretro core and standalone. Filed as standalone only, the libretro
layout was dropped: libretro Dolphin had no dolphin-emu/Sys/GC files.
Platforms now name dual-mode emulators and each gets both layouts.
2026-10-18 13:19:53 +02:00
Abdessamad Derraz e0bf0ee191 fix: make a patched test patch what actually runs
A test isolated the extra collection by patching
resolve_platform_cores on packextras with create=True, while the
module imported it inside the function, so the real resolver ran.
The import is now module level, the test checks its stub was called,
and no test may create the attribute it patches.
2026-10-18 04:15:05 +02:00
Abdessamad Derraz 2dcb49fa4c fix: keep a held file in emulator region packs
Emulator mode reduced region groups without knowing which files the
collection holds, so a requested-region image nobody had collected
withdrew the held one and left the slot empty. Platform mode already
kept it; both emulator readers now pass the database.
2026-10-18 03:52:47 +02:00
Abdessamad Derraz a40a68c1f7 fix: group a system once whatever its spelling
The platform's files and the core extras for the Master System sat
in two region groups, sega-master-system and sega-mastersystem,
reduced apart. A US pack kept the declared Japanese BIOS. A core
extra's system group now takes the platform's spelling, in the pack,
the report and the installer's manifest fields alike.
2026-10-18 03:51:57 +02:00
Abdessamad Derraz 7d1b8435bc fix: rank same-named archives by what they hold
The name step only ranked archive copies by members declared
through archive sub-entries, and the contents an archive entry lists
never reached the resolver, so the first copy indexed won. contents
now ranks copies by crc32, or by member name where the code opens
by name, and the report and both extra passes carry it. With no
layout declared, a primary holding every ROM of the others wins;
two revisions keep the index order.
2026-10-18 02:30:53 +02:00
Abdessamad Derraz c507aebfba refactor: index companion files by directory 2026-10-17 23:56:41 +02:00
Abdessamad Derraz e6c29452f9 fix: never drop a held file for a missing region
Region filtering ranked every declared file, held or not, so a request
answered only by a missing file dropped the held fallback and emptied
the slot. Only held files now decide what gives way; the missing better
match stays reported.
2026-10-17 18:31:56 +02:00
Abdessamad Derraz 5cfcb9e746 fix: group missing regional core files by region 2026-10-17 18:28:49 +02:00
Abdessamad Derraz a58b65754b fix: count a core file filling a declaration
In existence mode the builder packs a core's file at a destination the
platform declares and does not hold, and counts the declaration met.
verify now reads the same placement and reports it OK, so both sides
agree on the platform's count.
2026-10-17 18:14:26 +02:00
Abdessamad Derraz 51f3249a7d fix: give a shared core slot to the pinned claim
hypseus-singe asks for gamecontrollerdb.txt by name alone and, first
in profile order, took the BIOS root of Batocera, RetroBat and
RetroPie with C-Dogs' small table while Solarus pins its own by sha1.
A destination two cores claim now goes to the one naming its content.
2026-10-17 08:27:08 +02:00
Abdessamad Derraz cb41a52b17 fix: skip region-dropped extras in the hidden report 2026-10-17 02:03:26 +02:00
Abdessamad Derraz 1699caaca2 fix: pick the archive holding a core's members 2026-10-16 19:22:45 +02:00
Abdessamad Derraz d86215235e fix: keep scan copies out of region choices 2026-10-16 14:28:18 +02:00
Abdessamad Derraz b173a2a851 fix: place libretro dolphin files where it reads 2026-10-16 14:03:17 +02:00
Abdessamad Derraz 48b00730ff fix: never copy a path-null entry to a pack root 2026-10-16 14:03:09 +02:00
Abdessamad Derraz 81b8dac434 fix: seed agnostic scans from the running build 2026-10-16 12:50:48 +02:00
Abdessamad Derraz d049270515 fix: report core files the platform pack displaces 2026-10-16 12:49:34 +02:00
Abdessamad Derraz 5cfaf97173 fix: replay system drops and keep file modes 2026-10-16 09:44:23 +02:00
Abdessamad Derraz 936f713a82 fix: keep archive members out of root copies 2026-10-16 08:39:46 +02:00
Abdessamad Derraz 149157279e fix: copy a settled core file to its root path 2026-10-16 07:42:26 +02:00