mirror of
https://github.com/Abdess/retrobios.git
synced 2026-06-15 17:12:48 +00:00
fix: resolve descriptive names via dest_hint basename fallback
resolve_local_file now tries the path: field basename when name:
lookup fails. Fixes 139 PCem false positives where descriptive
names ("MDA font ROM") didn't match actual filenames (mda.rom).
Also add 3 QEMU firmware (MacROM.bin, bios_loongson3, pmon_2e).
Cross-reference path: fallback already added. 149/149 tests pass.
This commit is contained in:
parent
edd44d4137
commit
536c0c242e
5 changed files with 987 additions and 424 deletions
BIN
bios/QEMU/MacROM.bin
Normal file
BIN
bios/QEMU/MacROM.bin
Normal file
Binary file not shown.
BIN
bios/QEMU/bios_loongson3.bin
Normal file
BIN
bios/QEMU/bios_loongson3.bin
Normal file
Binary file not shown.
BIN
bios/QEMU/pmon_2e.bin
Normal file
BIN
bios/QEMU/pmon_2e.bin
Normal file
Binary file not shown.
1403
database.json
1403
database.json
File diff suppressed because it is too large
Load diff
|
|
@ -313,6 +313,14 @@ def resolve_local_file(
|
|||
aliases = file_entry.get("aliases", [])
|
||||
names_to_try = [name] + [a for a in aliases if a != name]
|
||||
|
||||
# When dest_hint contains a path, also try its basename as a name
|
||||
# (handles emulator profiles where name: is descriptive and path: is
|
||||
# the actual filename, e.g. name: "MDA font ROM", path: "mda.rom")
|
||||
if dest_hint:
|
||||
hint_base = dest_hint.rsplit("/", 1)[-1] if "/" in dest_hint else dest_hint
|
||||
if hint_base and hint_base not in names_to_try:
|
||||
names_to_try.append(hint_base)
|
||||
|
||||
md5_list = [m.strip().lower() for m in md5_raw.split(",") if m.strip()] if md5_raw else []
|
||||
files_db = db.get("files", {})
|
||||
by_md5 = db.get("indexes", {}).get("by_md5", {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue