fix: let an alias settle only where the core reads

This commit is contained in:
Abdessamad Derraz committed 2026-10-10 09:47:50 +02:00
1 parent 836c56b3fa
commit ffa6516e09
12 files changed
+760 -222

No files matched your search

+10 -10
View File
@@ -86,18 +86,18 @@ Full list with per-file details: **[https://abdess.github.io/retrobios/](https:/
| Platform | On its BIOS list | Files its emulators load | Checked by | | Platform | On its BIOS list | Files its emulators load | Checked by |
|----------|-----------------:|-------------------------:|------------| |----------|-----------------:|-------------------------:|------------|
| Batocera | 353/353 | 12,287/12,718 | MD5 hash | | Batocera | 353/353 | 12,295/12,726 | MD5 hash |
| BizHawk | 118/118 | 800/801 | SHA1 hash | | BizHawk | 118/118 | 800/801 | SHA1 hash |
| EmuDeck | 168/168 | 430/432 | MD5 hash | | EmuDeck | 168/168 | 430/432 | MD5 hash |
| Lakka | 526/526 | 5,258/5,288 | file presence | | Lakka | 526/526 | 5,260/5,290 | file presence |
| MiSTer FPGA | 81/81 | - | MD5 hash | | MiSTer FPGA | 81/81 | - | MD5 hash |
| ROCKNIX | 38/38 | 5,695/5,725 | MD5 hash | | ROCKNIX | 38/38 | 5,697/5,727 | MD5 hash |
| Recalbox | 351/351 | 2,726/2,734 | MD5 hash | | Recalbox | 351/351 | 2,731/2,739 | MD5 hash |
| RetroArch | 526/526 | 5,258/5,288 | file presence | | RetroArch | 526/526 | 5,260/5,290 | file presence |
| RetroBat | 348/348 | 11,876/12,306 | MD5 hash | | RetroBat | 348/348 | 11,880/12,310 | MD5 hash |
| RetroDECK | 2,008/2,008 | 5,387/5,437 | MD5 hash | | RetroDECK | 2,008/2,008 | 5,400/5,450 | MD5 hash |
| RetroPie * | 526/526 | 9,175/9,317 | file presence | | RetroPie * | 526/526 | 9,181/9,323 | file presence |
| RomM | 381/381 | 746/752 | MD5 hash | | RomM | 381/381 | 748/754 | MD5 hash |
Each fraction is what the pack has over what is needed, counting required and optional files alike since both ship. The first column is the BIOS list the platform publishes. The second counts files its emulators load that this list never mentions, found by reading their source code, and it is routinely several times larger. A short fraction means files are still missing, and they are named in the [gap analysis](https://abdess.github.io/retrobios/gaps/). Each fraction is what the pack has over what is needed, counting required and optional files alike since both ship. The first column is the BIOS list the platform publishes. The second counts files its emulators load that this list never mentions, found by reading their source code, and it is routinely several times larger. A short fraction means files are still missing, and they are named in the [gap analysis](https://abdess.github.io/retrobios/gaps/).
That second number is a floor, not a ceiling: an emulator that accepts any file handed to it names none in its code, so nothing there can be counted. That second number is a floor, not a ceiling: an emulator that accepts any file handed to it names none in its code, so nothing there can be counted.
@@ -180,4 +180,4 @@ The scripts and tooling are released under the [MIT License](LICENSE).
The BIOS and firmware files are not covered by that license: they are third-party system software, preserved and provided for personal backup, archival, and interoperability with emulation software. [NOTICE](NOTICE) sets out their status and how to ask for a file to be removed. The BIOS and firmware files are not covered by that license: they are third-party system software, preserved and provided for personal backup, archival, and interoperability with emulation software. [NOTICE](NOTICE) sets out their status and how to ask for a file to be removed.
The reasoning, and where it is weakest, is in the [FAQ](https://abdess.github.io/retrobios/wiki/faq/#is-this-legal). The reasoning, and where it is weakest, is in the [FAQ](https://abdess.github.io/retrobios/wiki/faq/#is-this-legal).
*Auto-generated on 2026-10-10T07:00:25Z* *Auto-generated on 2026-10-10T07:32:51Z*
+124 -4
View File
@@ -237,10 +237,10 @@
} }
} }
], ],
"total_files": 12808, "total_files": 12816,
"total_size": 8059073630, "total_size": 8064662622,
"pack_files": 12810, "pack_files": 12818,
"pack_size": 8059073630, "pack_size": 8064662622,
"total_omitted": 30, "total_omitted": 30,
"omitted_files": [ "omitted_files": [
{ {
@@ -4641,6 +4641,36 @@
"commodore-amiga" "commodore-amiga"
] ]
}, },
{
"dest": "cd32.rom",
"sha1": "3525be8887f79b5929e017b42380a79edfee542d",
"sha256": "3586355514947b5ab48c8755dc004fab94f188b19e7bce491c8f9693499e830b",
"size": 524288,
"repo_path": "bios/Commodore/Amiga/amiga-os-310-cd32.rom",
"cores": [
"amiberry"
]
},
{
"dest": "cd32ext.rom",
"sha1": "5bef3d628ce59cc02a66e6e4ae0da48f60e78f7f",
"sha256": "d964826432559994ffe329f643fd4e42dbbff313362d9434945725d7119cae87",
"size": 524288,
"repo_path": "bios/Commodore/Amiga/amiga-ext-310-cd32.rom",
"cores": [
"amiberry"
]
},
{
"dest": "cdtv.rom",
"sha1": "7ba40ffa17e500ed9fed041f3424bd81d9c907be",
"sha256": "6e48bb768539e8dae352553e5fdfa860682edaf9e26b105fadd8e26103171765",
"size": 262144,
"repo_path": "bios/Commodore/Amiga/amiga-ext-130-cdtv.rom",
"cores": [
"amiberry"
]
},
{ {
"dest": "cdtvext.rom", "dest": "cdtvext.rom",
"sha1": "7ba40ffa17e500ed9fed041f3424bd81d9c907be", "sha1": "7ba40ffa17e500ed9fed041f3424bd81d9c907be",
@@ -43641,6 +43671,27 @@
"Clock Signal (CLK):file:MasterSystem/japanese-bios.sms" "Clock Signal (CLK):file:MasterSystem/japanese-bios.sms"
] ]
}, },
{
"dest": "MSX/MSX.ROM",
"sha1": "409e82adac40f6bdd18eb6c84e8b2fbdc7fb5498",
"sha256": "999564a371dd2fdf7fbe8d853e82a68d557c27b7d87417639b2fa17704b83f78",
"size": 32768,
"repo_path": "bios/Microsoft/MSX/MSX.ROM",
"cores": [
"clk"
],
"systems": [
"apple-ii",
"apple-iigs",
"archimedes",
"atari-st",
"coleco-colecovision",
"commodore-amiga",
"electron",
"enterprise-64-128",
"microsoft-msx"
]
},
{ {
"dest": "MSX/msx-japanese.rom", "dest": "MSX/msx-japanese.rom",
"sha1": "302afb5d8be26c758309ca3df611ae69cced2821", "sha1": "302afb5d8be26c758309ca3df611ae69cced2821",
@@ -43743,6 +43794,48 @@
"microsoft-msx" "microsoft-msx"
] ]
}, },
{
"dest": "MSX/MSX2.ROM",
"sha1": "6103b39f1e38d1aa2d84b1c3219c44f1abb5436e",
"sha256": "4bc4ae85ca5f28246cd3e7b7e017d298ddd375603657f84ef2c7954bc2d9b919",
"size": 32768,
"repo_path": "bios/Microsoft/MSX/MSX2.ROM",
"cores": [
"clk"
],
"systems": [
"apple-ii",
"apple-iigs",
"archimedes",
"atari-st",
"coleco-colecovision",
"commodore-amiga",
"electron",
"enterprise-64-128",
"microsoft-msx"
]
},
{
"dest": "MSX/MSX2EXT.ROM",
"sha1": "5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02",
"sha256": "6c6f421a10c428d960b7ecc990f99af1c638147f747bddca7b0bf0e2ab738300",
"size": 16384,
"repo_path": "bios/Microsoft/MSX/MSX2EXT.ROM",
"cores": [
"clk"
],
"systems": [
"apple-ii",
"apple-iigs",
"archimedes",
"atari-st",
"coleco-colecovision",
"commodore-amiga",
"electron",
"enterprise-64-128",
"microsoft-msx"
]
},
{ {
"dest": "MSX/fmpac.rom", "dest": "MSX/fmpac.rom",
"sha1": "9d789166e3caf28e4742fe933d962e99618c633d", "sha1": "9d789166e3caf28e4742fe933d962e99618c633d",
@@ -90393,6 +90486,19 @@
"mesen" "mesen"
] ]
}, },
{
"dest": "Mupen64plus/IPL.n64",
"sha1": "bf861922dcb78c316360e3e742f4f70ff63c9bc3",
"sha256": "806400ec0df94b0755de6c5b8249d6b6a9866124c5ddbdac198bde22499bfb8b",
"size": 4194304,
"repo_path": "bios/Nintendo/64DD/64DD_IPL_v12_JPN.bin",
"cores": [
"mupen64plus_next"
],
"systems": [
"nintendo-64dd"
]
},
{ {
"dest": "Mupen64plus/font.ttf", "dest": "Mupen64plus/font.ttf",
"sha1": "1d7f6fa0c34e3d50be52c16a0816bebac309fe41", "sha1": "1d7f6fa0c34e3d50be52c16a0816bebac309fe41",
@@ -96183,6 +96289,20 @@
"pc80" "pc80"
] ]
}, },
{
"dest": "quasi88/font.rom",
"sha1": "84b90f69671d4b72e8f219e1fe7cd667e976cf7f",
"sha256": "3227087599afd9304f260cdeb3bf1533e39e425cf444ceb3c24f55f561e71a0c",
"size": 2048,
"repo_path": "bios/NEC/PC-88/font.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88",
"pc80"
]
},
{ {
"dest": "quasi88/font2.rom", "dest": "quasi88/font2.rom",
"sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e", "sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e",
+47 -4
View File
@@ -237,10 +237,10 @@
} }
} }
], ],
"total_files": 3225, "total_files": 3229,
"total_size": 4193257987, "total_size": 4194052867,
"pack_files": 3227, "pack_files": 3231,
"pack_size": 4193257987, "pack_size": 4194052867,
"total_omitted": 1, "total_omitted": 1,
"omitted_files": [ "omitted_files": [
{ {
@@ -4569,6 +4569,16 @@
"commodore-amiga" "commodore-amiga"
] ]
}, },
{
"dest": "cd32.rom",
"sha1": "3525be8887f79b5929e017b42380a79edfee542d",
"sha256": "3586355514947b5ab48c8755dc004fab94f188b19e7bce491c8f9693499e830b",
"size": 524288,
"repo_path": "bios/Commodore/Amiga/amiga-os-310-cd32.rom",
"cores": [
"amiberry"
]
},
{ {
"dest": "cd32ext.rom", "dest": "cd32ext.rom",
"sha1": "5bef3d628ce59cc02a66e6e4ae0da48f60e78f7f", "sha1": "5bef3d628ce59cc02a66e6e4ae0da48f60e78f7f",
@@ -4579,6 +4589,16 @@
"amiberry" "amiberry"
] ]
}, },
{
"dest": "cdtv.rom",
"sha1": "7ba40ffa17e500ed9fed041f3424bd81d9c907be",
"sha256": "6e48bb768539e8dae352553e5fdfa860682edaf9e26b105fadd8e26103171765",
"size": 262144,
"repo_path": "bios/Commodore/Amiga/amiga-ext-130-cdtv.rom",
"cores": [
"amiberry"
]
},
{ {
"dest": "cdtvext.rom", "dest": "cdtvext.rom",
"sha1": "7ba40ffa17e500ed9fed041f3424bd81d9c907be", "sha1": "7ba40ffa17e500ed9fed041f3424bd81d9c907be",
@@ -24105,6 +24125,19 @@
"sinclair-zx-spectrum" "sinclair-zx-spectrum"
] ]
}, },
{
"dest": "colecovision.rom",
"sha1": "45bedc4cbdeac66c7df59e9e599195c778d86a92",
"sha256": "990bf1956f10207d8781b619eb74f89b00d921c8d45c95c334c16c8cceca09ad",
"size": 8192,
"repo_path": "bios/Coleco/ColecoVision/BIOS.col",
"cores": [
"gearcoleco"
],
"systems": [
"coleco-colecovision"
]
},
{ {
"dest": "eos.rom", "dest": "eos.rom",
"sha1": "ad3c20ef444f10af7ae8eb75c81e500d9b1bba3d", "sha1": "ad3c20ef444f10af7ae8eb75c81e500d9b1bba3d",
@@ -24293,6 +24326,16 @@
"gsplus" "gsplus"
] ]
}, },
{
"dest": "c600.rom",
"sha1": "d4181c9f046aafc3fb326b381baac809d9e38d16",
"sha256": "de1e3e035878bab43d0af8fe38f5839c527e9548647036598ee6fe7ec74d2a7d",
"size": 256,
"repo_path": "bios/Apple/Apple II/AppleIIe_DiskII.rom",
"cores": [
"gsplus"
]
},
{ {
"dest": "howard.o", "dest": "howard.o",
"sha1": "bdca7bbb647066cf7555ce5d555ce09de4ebc41b", "sha1": "bdca7bbb647066cf7555ce5d555ce09de4ebc41b",
+77 -4
View File
@@ -241,10 +241,10 @@
} }
} }
], ],
"total_files": 12398, "total_files": 12402,
"total_size": 8504485261, "total_size": 8504569229,
"pack_files": 12400, "pack_files": 12404,
"pack_size": 8504485261, "pack_size": 8504569229,
"total_omitted": 30, "total_omitted": 30,
"omitted_files": [ "omitted_files": [
{ {
@@ -43581,6 +43581,26 @@
"Clock Signal (CLK):file:MasterSystem/japanese-bios.sms" "Clock Signal (CLK):file:MasterSystem/japanese-bios.sms"
] ]
}, },
{
"dest": "MSX/MSX.ROM",
"sha1": "409e82adac40f6bdd18eb6c84e8b2fbdc7fb5498",
"sha256": "999564a371dd2fdf7fbe8d853e82a68d557c27b7d87417639b2fa17704b83f78",
"size": 32768,
"repo_path": "bios/Microsoft/MSX/MSX.ROM",
"cores": [
"clk"
],
"systems": [
"archimedes",
"atarist",
"bbcmicro",
"colecovision",
"electron",
"mastersystem",
"msx",
"msx2"
]
},
{ {
"dest": "MSX/msx-japanese.rom", "dest": "MSX/msx-japanese.rom",
"sha1": "302afb5d8be26c758309ca3df611ae69cced2821", "sha1": "302afb5d8be26c758309ca3df611ae69cced2821",
@@ -43679,6 +43699,46 @@
"msx2" "msx2"
] ]
}, },
{
"dest": "MSX/MSX2.ROM",
"sha1": "6103b39f1e38d1aa2d84b1c3219c44f1abb5436e",
"sha256": "4bc4ae85ca5f28246cd3e7b7e017d298ddd375603657f84ef2c7954bc2d9b919",
"size": 32768,
"repo_path": "bios/Microsoft/MSX/MSX2.ROM",
"cores": [
"clk"
],
"systems": [
"archimedes",
"atarist",
"bbcmicro",
"colecovision",
"electron",
"mastersystem",
"msx",
"msx2"
]
},
{
"dest": "MSX/MSX2EXT.ROM",
"sha1": "5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02",
"sha256": "6c6f421a10c428d960b7ecc990f99af1c638147f747bddca7b0bf0e2ab738300",
"size": 16384,
"repo_path": "bios/Microsoft/MSX/MSX2EXT.ROM",
"cores": [
"clk"
],
"systems": [
"archimedes",
"atarist",
"bbcmicro",
"colecovision",
"electron",
"mastersystem",
"msx",
"msx2"
]
},
{ {
"dest": "Oric/basic10.rom", "dest": "Oric/basic10.rom",
"sha1": "333116e6884d85aaa4dfc7578a91cceeea66d016", "sha1": "333116e6884d85aaa4dfc7578a91cceeea66d016",
@@ -92428,6 +92488,19 @@
"pc88" "pc88"
] ]
}, },
{
"dest": "quasi88/font.rom",
"sha1": "84b90f69671d4b72e8f219e1fe7cd667e976cf7f",
"sha256": "3227087599afd9304f260cdeb3bf1533e39e425cf444ceb3c24f55f561e71a0c",
"size": 2048,
"repo_path": "bios/NEC/PC-88/font.rom",
"cores": [
"quasi88"
],
"systems": [
"pc88"
]
},
{ {
"dest": "quasi88/font2.rom", "dest": "quasi88/font2.rom",
"sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e", "sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e",
+258 -111
View File
@@ -237,10 +237,10 @@
} }
} }
], ],
"total_files": 7791, "total_files": 7800,
"total_size": 8621760123, "total_size": 8626179963,
"pack_files": 7793, "pack_files": 7802,
"pack_size": 8621760123, "pack_size": 8626179963,
"total_omitted": 1, "total_omitted": 1,
"omitted_files": [ "omitted_files": [
{ {
@@ -25230,6 +25230,28 @@
"Clock Signal (CLK):file:MasterSystem/japanese-bios.sms" "Clock Signal (CLK):file:MasterSystem/japanese-bios.sms"
] ]
}, },
{
"dest": "bios/MSX/MSX.ROM",
"sha1": "409e82adac40f6bdd18eb6c84e8b2fbdc7fb5498",
"sha256": "999564a371dd2fdf7fbe8d853e82a68d557c27b7d87417639b2fa17704b83f78",
"size": 32768,
"repo_path": "bios/Microsoft/MSX/MSX.ROM",
"cores": [
"clk"
],
"systems": [
"amstrad-cpc",
"apple-ii",
"apple-iigs",
"atari-st",
"coleco-colecovision",
"commodore-amiga",
"enterprise-64-128",
"microsoft-msx",
"sega-master-system",
"sinclair-zx-spectrum"
]
},
{ {
"dest": "bios/MSX/msx-japanese.rom", "dest": "bios/MSX/msx-japanese.rom",
"sha1": "302afb5d8be26c758309ca3df611ae69cced2821", "sha1": "302afb5d8be26c758309ca3df611ae69cced2821",
@@ -25314,6 +25336,50 @@
"Clock Signal (CLK):file:MSX/msx-european.rom" "Clock Signal (CLK):file:MSX/msx-european.rom"
] ]
}, },
{
"dest": "bios/MSX/MSX2.ROM",
"sha1": "6103b39f1e38d1aa2d84b1c3219c44f1abb5436e",
"sha256": "4bc4ae85ca5f28246cd3e7b7e017d298ddd375603657f84ef2c7954bc2d9b919",
"size": 32768,
"repo_path": "bios/Microsoft/MSX/MSX2.ROM",
"cores": [
"clk"
],
"systems": [
"amstrad-cpc",
"apple-ii",
"apple-iigs",
"atari-st",
"coleco-colecovision",
"commodore-amiga",
"enterprise-64-128",
"microsoft-msx",
"sega-master-system",
"sinclair-zx-spectrum"
]
},
{
"dest": "bios/MSX/MSX2EXT.ROM",
"sha1": "5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02",
"sha256": "6c6f421a10c428d960b7ecc990f99af1c638147f747bddca7b0bf0e2ab738300",
"size": 16384,
"repo_path": "bios/Microsoft/MSX/MSX2EXT.ROM",
"cores": [
"clk"
],
"systems": [
"amstrad-cpc",
"apple-ii",
"apple-iigs",
"atari-st",
"coleco-colecovision",
"commodore-amiga",
"enterprise-64-128",
"microsoft-msx",
"sega-master-system",
"sinclair-zx-spectrum"
]
},
{ {
"dest": "bios/MSX/fmpac.rom", "dest": "bios/MSX/fmpac.rom",
"sha1": "9d789166e3caf28e4742fe933d962e99618c633d", "sha1": "9d789166e3caf28e4742fe933d962e99618c633d",
@@ -68652,6 +68718,19 @@
"mu" "mu"
] ]
}, },
{
"dest": "bios/Mupen64plus/IPL.n64",
"sha1": "bf861922dcb78c316360e3e742f4f70ff63c9bc3",
"sha256": "806400ec0df94b0755de6c5b8249d6b6a9866124c5ddbdac198bde22499bfb8b",
"size": 4194304,
"repo_path": "bios/Nintendo/64DD/64DD_IPL_v12_JPN.bin",
"cores": [
"mupen64plus_next"
],
"systems": [
"nintendo-64dd"
]
},
{ {
"dest": "bios/Mupen64plus/font.ttf", "dest": "bios/Mupen64plus/font.ttf",
"sha1": "1d7f6fa0c34e3d50be52c16a0816bebac309fe41", "sha1": "1d7f6fa0c34e3d50be52c16a0816bebac309fe41",
@@ -69705,6 +69784,97 @@
"nintendo-ds" "nintendo-ds"
] ]
}, },
{
"dest": "bios/np2kai/2608_bd.wav",
"sha1": "0a56c142ef40cec50f3ee56a6e42d0029c9e2818",
"sha256": "802fb0ce40878e98335fc56d11eff6382982e9f09ebc83055b0a469df13f7900",
"size": 19192,
"repo_path": "bios/NEC/PC-98/2608_bd.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_sd.wav",
"sha1": "3c79663ef74c0b0439d13351326eb1c52a657008",
"sha256": "e5877cd1e4821cbbc9a450491a189032c82906c05f7fc9f2e48ee0d06b3ad18c",
"size": 15558,
"repo_path": "bios/NEC/PC-98/2608_sd.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_top.wav",
"sha1": "aa4a8f766a86b830687d5083fd3b9db0652f46fc",
"sha256": "d7bcf2da99a09589096e9bcee98da43303c588cca4e89b1a263adace52038cd3",
"size": 57016,
"repo_path": "bios/NEC/PC-98/2608_top.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_hh.wav",
"sha1": "12f676cef249b82480b6f19c454e234b435ca7b6",
"sha256": "216c81ff9a84af0dfbf21dd8df6827c25fca9fdeefe9bc8426f7a00d6ff2264e",
"size": 36722,
"repo_path": "bios/NEC/PC-98/2608_hh.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_tom.wav",
"sha1": "9513fb4a3f41e75a972a273a5104cbd834c1e2c5",
"sha256": "8e2c9ccfa8caff03dbd0d945d7c1d4de15292817409fe6fabda07f008f97dbc6",
"size": 23092,
"repo_path": "bios/NEC/PC-98/2608_tom.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_rim.wav",
"sha1": "c65592330c9dd84011151daed52f9aec926b7e56",
"sha256": "6f7d1996001c74452a9ca68b41a2767925b5b947c699096a8ad15bbc658af5a3",
"size": 5288,
"repo_path": "bios/NEC/PC-98/2608_rim.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/ide.rom",
"sha1": "0877ffb4b4d1c18283468be3579b72ed8c22e3ac",
"sha256": "c15220d1c448bfd3aa268ef8de41dce14a9b3ba90171aaae539d6d94721ff4e0",
"size": 8192,
"repo_path": "bios/NEC/PC-98/ide.rom",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{ {
"dest": "bios/np2kai/scsi.rom", "dest": "bios/np2kai/scsi.rom",
"sha1": "3d7166f05daad1b022fa04c2569e788580158095", "sha1": "3d7166f05daad1b022fa04c2569e788580158095",
@@ -76247,6 +76417,58 @@
"qemu" "qemu"
] ]
}, },
{
"dest": "bios/quasi88/n88sub.rom",
"sha1": "bb7103a0818850a039c67ff666a31ce49a8d516f",
"sha256": "9dc63118728a171ce2ed437ad38ef280b8b7bcf4a5a95fedf18946501b010456",
"size": 2048,
"repo_path": "bios/NEC/PC-98/N88SUB.ROM",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{
"dest": "bios/quasi88/n88knj2.rom",
"sha1": "b86b932cb4ce34472e0fe0f01a4a4350e15dcb53",
"sha256": "5c31df4b892e730d1ba7f80fd5583e838ae5583ba52408088da74b9ff422e5fe",
"size": 131072,
"repo_path": "bios/NEC/PC-98/n88knj2.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{
"dest": "bios/quasi88/n88jisho.rom",
"sha1": "deef0cc2a9734ba891a6d6c022aa70ffc66f783e",
"sha256": "25773eaee3af617db08d26602d8f4cdc7d42ed946ca510d3b1d96fe1645af63c",
"size": 524288,
"repo_path": "bios/NEC/PC-98/n88jisho.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{
"dest": "bios/quasi88/font.rom",
"sha1": "84b90f69671d4b72e8f219e1fe7cd667e976cf7f",
"sha256": "3227087599afd9304f260cdeb3bf1533e39e425cf444ceb3c24f55f561e71a0c",
"size": 2048,
"repo_path": "bios/NEC/PC-88/font.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{ {
"dest": "bios/quasi88/font2.rom", "dest": "bios/quasi88/font2.rom",
"sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e", "sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e",
@@ -77742,6 +77964,38 @@
"sdlpal" "sdlpal"
] ]
}, },
{
"dest": "bios/SkyEmu/cgb_boot.bin",
"sha1": "80e3ee82416c1a74827a5459fde32f04bf51a1f6",
"sha256": "119470a9cf9f0d85f0c7ba5a6cadffeec07eb9862719086d1a9808189605e388",
"size": 2304,
"repo_path": "bios/Nintendo/Game Boy Color/cgb_boot.bin",
"cores": [
"skyemu"
],
"systems": [
"nintendo-ds",
"nintendo-gb",
"nintendo-gba",
"nintendo-gbc"
]
},
{
"dest": "bios/SkyEmu/dmg_rom.bin",
"sha1": "4ed31ec6b0b175bb109c0eb5fd3d193da823339f",
"sha256": "cf053eccb4ccafff9e67339d4e78e98dce7d1ed59be819d2a1ba2232c6fce1c7",
"size": 256,
"repo_path": "bios/Nintendo/Game Boy/GB_dmg.bin",
"cores": [
"skyemu"
],
"systems": [
"nintendo-ds",
"nintendo-gb",
"nintendo-gba",
"nintendo-gbc"
]
},
{ {
"dest": "bios/SkyEmu/nds7.bin", "dest": "bios/SkyEmu/nds7.bin",
"sha1": "24f67bdea115a2c847c8813a262502ee1607b7df", "sha1": "24f67bdea115a2c847c8813a262502ee1607b7df",
@@ -82439,84 +82693,6 @@
"nec-pc-98" "nec-pc-98"
] ]
}, },
{
"dest": "bios/np2kai/2608_bd.wav",
"sha1": "0a56c142ef40cec50f3ee56a6e42d0029c9e2818",
"sha256": "802fb0ce40878e98335fc56d11eff6382982e9f09ebc83055b0a469df13f7900",
"size": 19192,
"repo_path": "bios/NEC/PC-98/2608_bd.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_sd.wav",
"sha1": "3c79663ef74c0b0439d13351326eb1c52a657008",
"sha256": "e5877cd1e4821cbbc9a450491a189032c82906c05f7fc9f2e48ee0d06b3ad18c",
"size": 15558,
"repo_path": "bios/NEC/PC-98/2608_sd.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_top.wav",
"sha1": "aa4a8f766a86b830687d5083fd3b9db0652f46fc",
"sha256": "d7bcf2da99a09589096e9bcee98da43303c588cca4e89b1a263adace52038cd3",
"size": 57016,
"repo_path": "bios/NEC/PC-98/2608_top.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_hh.wav",
"sha1": "12f676cef249b82480b6f19c454e234b435ca7b6",
"sha256": "216c81ff9a84af0dfbf21dd8df6827c25fca9fdeefe9bc8426f7a00d6ff2264e",
"size": 36722,
"repo_path": "bios/NEC/PC-98/2608_hh.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_tom.wav",
"sha1": "9513fb4a3f41e75a972a273a5104cbd834c1e2c5",
"sha256": "8e2c9ccfa8caff03dbd0d945d7c1d4de15292817409fe6fabda07f008f97dbc6",
"size": 23092,
"repo_path": "bios/NEC/PC-98/2608_tom.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{
"dest": "bios/np2kai/2608_rim.wav",
"sha1": "c65592330c9dd84011151daed52f9aec926b7e56",
"sha256": "6f7d1996001c74452a9ca68b41a2767925b5b947c699096a8ad15bbc658af5a3",
"size": 5288,
"repo_path": "bios/NEC/PC-98/2608_rim.wav",
"cores": [
"np2kai"
],
"systems": [
"nec-pc-98"
]
},
{ {
"dest": "bios/PPSSPP/ppge_atlas.zim", "dest": "bios/PPSSPP/ppge_atlas.zim",
"sha1": "30a33f3651f8e1b0967a5dfe6ff714baebcce41a", "sha1": "30a33f3651f8e1b0967a5dfe6ff714baebcce41a",
@@ -82686,19 +82862,6 @@
"nec-pc-88" "nec-pc-88"
] ]
}, },
{
"dest": "bios/quasi88/n88jisho.rom",
"sha1": "deef0cc2a9734ba891a6d6c022aa70ffc66f783e",
"sha256": "25773eaee3af617db08d26602d8f4cdc7d42ed946ca510d3b1d96fe1645af63c",
"size": 524288,
"repo_path": "bios/NEC/PC-98/n88jisho.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{ {
"dest": "bios/same_cdi/bios/cdimono1.zip", "dest": "bios/same_cdi/bios/cdimono1.zip",
"sha1": "36771315484a1f57227e23278df91b84b5d7d3be", "sha1": "36771315484a1f57227e23278df91b84b5d7d3be",
@@ -82725,22 +82888,6 @@
"philips-cdi" "philips-cdi"
] ]
}, },
{
"dest": "bios/SkyEmu/cgb_boot.bin",
"sha1": "80e3ee82416c1a74827a5459fde32f04bf51a1f6",
"sha256": "119470a9cf9f0d85f0c7ba5a6cadffeec07eb9862719086d1a9808189605e388",
"size": 2304,
"repo_path": "bios/Nintendo/Game Boy Color/cgb_boot.bin",
"cores": [
"skyemu"
],
"systems": [
"nintendo-ds",
"nintendo-gb",
"nintendo-gba",
"nintendo-gbc"
]
},
{ {
"dest": "bios/SkyEmu/gba_bios.bin", "dest": "bios/SkyEmu/gba_bios.bin",
"sha1": "300c20df6731a33952ded8c436f7f186d25d3492", "sha1": "300c20df6731a33952ded8c436f7f186d25d3492",
+69 -17
View File
@@ -15,10 +15,10 @@
} }
], ],
"standalone_copies": [], "standalone_copies": [],
"total_files": 9892, "total_files": 9896,
"total_size": 8731913084, "total_size": 8732261244,
"pack_files": 12535, "pack_files": 12539,
"pack_size": 8772445611, "pack_size": 8772793771,
"total_omitted": 8, "total_omitted": 8,
"omitted_files": [ "omitted_files": [
{ {
@@ -44012,6 +44012,19 @@
"storage": "release", "storage": "release",
"release_asset": "easyrpg.soundfont" "release_asset": "easyrpg.soundfont"
}, },
{
"dest": "system.rom",
"sha1": "1f5f7013f18c08ff50d7942e76c4fbd782412414",
"sha256": "863df0975a305110a7da4591b704e8f5dc7302f03c63603aa2dcd03e84c36ff9",
"size": 65536,
"repo_path": "bios/IBM/PC/ibmpcjr/bios.rom",
"cores": [
"dosbox-staging"
],
"systems": [
"dos"
]
},
{ {
"dest": "IBM PC Cassette BASIC ROM", "dest": "IBM PC Cassette BASIC ROM",
"sha1": "07449ebca18f979b9ab748582b736e402f2bf940", "sha1": "07449ebca18f979b9ab748582b736e402f2bf940",
@@ -44064,6 +44077,19 @@
"dos" "dos"
] ]
}, },
{
"dest": "system/nds_bios_arm9.bin",
"sha1": "bfaac75f101c135e32e2aaf541de6b1be4c8c62d",
"sha256": "1693983a7707ae394786fa526c0552457888a51d4e410d715ef07acd5a540555",
"size": 4096,
"repo_path": "bios/Nintendo/DS/NDS_Bios9.bin",
"cores": [
"drastic"
],
"systems": [
"nintendo-ds"
]
},
{ {
"dest": "system/drastic_bios_arm9.bin", "dest": "system/drastic_bios_arm9.bin",
"sha1": "4dc29a1560e1cbd7afef1998f7a6c25c5db1cc3a", "sha1": "4dc29a1560e1cbd7afef1998f7a6c25c5db1cc3a",
@@ -44077,6 +44103,19 @@
"nintendo-ds" "nintendo-ds"
] ]
}, },
{
"dest": "system/nds_bios_arm7.bin",
"sha1": "24f67bdea115a2c847c8813a262502ee1607b7df",
"sha256": "ba65f690eb04ec92db67c0e299e21ad71de087d6d5de8a9cb17a62eaab563c17",
"size": 16384,
"repo_path": "bios/Nintendo/DS/NDS_Bios7.bin",
"cores": [
"drastic"
],
"systems": [
"nintendo-ds"
]
},
{ {
"dest": "system/drastic_bios_arm7.bin", "dest": "system/drastic_bios_arm7.bin",
"sha1": "31ae916c85d012582c7cdf47de6943ac6778253b", "sha1": "31ae916c85d012582c7cdf47de6943ac6778253b",
@@ -44090,6 +44129,19 @@
"nintendo-ds" "nintendo-ds"
] ]
}, },
{
"dest": "system/nds_firmware.bin",
"sha1": "87dae2500e889737af51f4a5b5845770a62482f5",
"sha256": "330c59198faec64b40e96cc875b422d340fc9ab1a9e32e9bd9b7baa1dbe6ba7f",
"size": 262144,
"repo_path": "bios/Nintendo/DS/NDS_Lite_Firmware.bin",
"cores": [
"drastic"
],
"systems": [
"nintendo-ds"
]
},
{ {
"dest": "game_database.xml", "dest": "game_database.xml",
"sha1": "b0ae5480c61bdb701b9a444a1a81c4970db06d77", "sha1": "b0ae5480c61bdb701b9a444a1a81c4970db06d77",
@@ -95593,6 +95645,19 @@
"qemu" "qemu"
] ]
}, },
{
"dest": "quasi88/font.rom",
"sha1": "84b90f69671d4b72e8f219e1fe7cd667e976cf7f",
"sha256": "3227087599afd9304f260cdeb3bf1533e39e425cf444ceb3c24f55f561e71a0c",
"size": 2048,
"repo_path": "bios/NEC/PC-88/font.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{ {
"dest": "quasi88/font2.rom", "dest": "quasi88/font2.rom",
"sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e", "sha1": "0a056b6d28b4b9e29a2d255bdaa25c24f176cf1e",
@@ -101404,19 +101469,6 @@
"sony-playstation-2" "sony-playstation-2"
] ]
}, },
{
"dest": "quasi88/font.rom",
"sha1": "84b90f69671d4b72e8f219e1fe7cd667e976cf7f",
"sha256": "3227087599afd9304f260cdeb3bf1533e39e425cf444ceb3c24f55f561e71a0c",
"size": 2048,
"repo_path": "bios/NEC/PC-88/font.rom",
"cores": [
"quasi88"
],
"systems": [
"nec-pc-88"
]
},
{ {
"dest": "scummvm/extra/MT32_CONTROL.ROM", "dest": "scummvm/extra/MT32_CONTROL.ROM",
"sha1": "b083518fffb7f66b03c23b7eb4f868e62dc5a987", "sha1": "b083518fffb7f66b03c23b7eb4f868e62dc5a987",
+36 -20
View File
@@ -17,10 +17,10 @@
} }
], ],
"standalone_copies": [], "standalone_copies": [],
"total_files": 5802, "total_files": 5803,
"total_size": 6570150809, "total_size": 6570151065,
"pack_files": 5804, "pack_files": 5805,
"pack_size": 6570150809, "pack_size": 6570151065,
"total_omitted": 0, "total_omitted": 0,
"omitted_files": [], "omitted_files": [],
"files": [ "files": [
@@ -54251,6 +54251,38 @@
"sdlpal" "sdlpal"
] ]
}, },
{
"dest": "SkyEmu/cgb_boot.bin",
"sha1": "80e3ee82416c1a74827a5459fde32f04bf51a1f6",
"sha256": "119470a9cf9f0d85f0c7ba5a6cadffeec07eb9862719086d1a9808189605e388",
"size": 2304,
"repo_path": "bios/Nintendo/Game Boy Color/cgb_boot.bin",
"cores": [
"skyemu"
],
"systems": [
"nintendo-ds",
"nintendo-gb",
"nintendo-gba",
"nintendo-gbc"
]
},
{
"dest": "SkyEmu/dmg_rom.bin",
"sha1": "4ed31ec6b0b175bb109c0eb5fd3d193da823339f",
"sha256": "cf053eccb4ccafff9e67339d4e78e98dce7d1ed59be819d2a1ba2232c6fce1c7",
"size": 256,
"repo_path": "bios/Nintendo/Game Boy/GB_dmg.bin",
"cores": [
"skyemu"
],
"systems": [
"nintendo-ds",
"nintendo-gb",
"nintendo-gba",
"nintendo-gbc"
]
},
{ {
"dest": "SkyEmu/nds7.bin", "dest": "SkyEmu/nds7.bin",
"sha1": "24f67bdea115a2c847c8813a262502ee1607b7df", "sha1": "24f67bdea115a2c847c8813a262502ee1607b7df",
@@ -57420,22 +57452,6 @@
"sega-saturn" "sega-saturn"
] ]
}, },
{
"dest": "SkyEmu/cgb_boot.bin",
"sha1": "80e3ee82416c1a74827a5459fde32f04bf51a1f6",
"sha256": "119470a9cf9f0d85f0c7ba5a6cadffeec07eb9862719086d1a9808189605e388",
"size": 2304,
"repo_path": "bios/Nintendo/Game Boy Color/cgb_boot.bin",
"cores": [
"skyemu"
],
"systems": [
"nintendo-ds",
"nintendo-gb",
"nintendo-gba",
"nintendo-gbc"
]
},
{ {
"dest": "SkyEmu/gba_bios.bin", "dest": "SkyEmu/gba_bios.bin",
"sha1": "300c20df6731a33952ded8c436f7f186d25d3492", "sha1": "300c20df6731a33952ded8c436f7f186d25d3492",
+17 -4
View File
@@ -15,10 +15,10 @@
} }
], ],
"standalone_copies": [], "standalone_copies": [],
"total_files": 1085, "total_files": 1086,
"total_size": 1582092326, "total_size": 1586286630,
"pack_files": 1087, "pack_files": 1088,
"pack_size": 1582092326, "pack_size": 1586286630,
"total_omitted": 53, "total_omitted": 53,
"omitted_files": [ "omitted_files": [
{ {
@@ -8166,6 +8166,19 @@
"apple-macintosh-ii" "apple-macintosh-ii"
] ]
}, },
{
"dest": "64dd/Mupen64plus/IPL.n64",
"sha1": "bf861922dcb78c316360e3e742f4f70ff63c9bc3",
"sha256": "806400ec0df94b0755de6c5b8249d6b6a9866124c5ddbdac198bde22499bfb8b",
"size": 4194304,
"repo_path": "bios/Nintendo/64DD/64DD_IPL_v12_JPN.bin",
"cores": [
"mupen64plus_next"
],
"systems": [
"nintendo-64dd"
]
},
{ {
"dest": "64dd/Mupen64plus/font.ttf", "dest": "64dd/Mupen64plus/font.ttf",
"sha1": "1d7f6fa0c34e3d50be52c16a0816bebac309fe41", "sha1": "1d7f6fa0c34e3d50be52c16a0816bebac309fe41",
+32 -8
View File
@@ -6,6 +6,8 @@ and file resolution - eliminates DRY violations across scripts.
from __future__ import annotations from __future__ import annotations
from collections import Counter
import hashlib import hashlib
import functools import functools
import json import json
@@ -1703,27 +1705,32 @@ def filter_systems_by_target(
def platform_declarations( def platform_declarations(
config: dict, db: dict, *, enrich: bool = True config: dict, db: dict, *, enrich: bool = True
) -> dict[str, list[tuple[int | None, str]]]: ) -> dict[str, list[tuple[int | None, str]]]:
"""Every file name a platform declares, with each declaration's size and destination. """Every file name a platform declares, with each declaration's size and slot.
A name alone does not say which file a declaration is: RetroArch declares A name alone does not say which file a declaration is: RetroArch declares
galaksija/ROM1.BIN, a 4 KiB ROM, and DOSBox reads a 32 KiB SC-55 ROM1.BIN. galaksija/ROM1.BIN, a 4 KiB ROM, and DOSBox reads a 32 KiB SC-55 ROM1.BIN.
The size, from the platform entry or else from the file its hash names, The size, from the platform entry or else from the file its hash names,
tells a declaration of the same file from a same-named one; None stands tells a declaration of the same file from a same-named one; None stands
for a size nobody knows. The destination, sanitized and case-folded, is for a size nobody knows. The slot is the declared destination, sanitized
the slot the declaration fills. and case-folded, relative to the directory core files go to: RetroDECK
writes bios/ in front of every destination, the others put it in
base_destination.
With ``enrich``, a declaration also answers for the canonical name and With ``enrich``, a declaration also answers for the canonical name and
the aliases the database knows its MD5 under. This handles a platform the aliases the database knows its MD5 under. This handles a platform
declaring a file under a different name than the emulator profile declaring a file under a different name than the emulator profile
(e.g. Batocera ROM1 vs gsplus ROM). (e.g. Batocera ROM1 vs gsplus ROM).
""" """
prefix = "" if config.get("base_destination") else declared_root(config).lower()
declared: dict[str, list[tuple[int | None, str]]] = {} declared: dict[str, list[tuple[int | None, str]]] = {}
by_md5 = db.get("indexes", {}).get("by_md5", {}) by_md5 = db.get("indexes", {}).get("by_md5", {})
files_db = db.get("files", {}) files_db = db.get("files", {})
for system in config.get("systems", {}).values(): for system in config.get("systems", {}).values():
for fe in system.get("files", []): for fe in system.get("files", []):
name = fe.get("name", "") name = fe.get("name", "")
dest = sanitize_pack_path(fe.get("destination") or name).lower() slot = sanitize_pack_path(fe.get("destination") or name).lower()
if prefix and slot.startswith(prefix + "/"):
slot = slot[len(prefix) + 1:]
# A zipped_file entry pins a member of the archive it names: its # A zipped_file entry pins a member of the archive it names: its
# md5 and its size, when stated, are not the archive's. # md5 and its size, when stated, are not the archive's.
by_hash: dict = {} by_hash: dict = {}
@@ -1738,16 +1745,33 @@ def platform_declarations(
(fe.get("sha1") or "").lower(), by_hash (fe.get("sha1") or "").lower(), by_hash
).get("size") ).get("size")
if name: if name:
declared.setdefault(name, []).append((size, dest)) declared.setdefault(name, []).append((size, slot))
if not enrich: if not enrich:
continue continue
known = by_hash for other in (by_hash.get("name", ""), *by_hash.get("aliases", [])):
for other in (known.get("name", ""), *known.get("aliases", [])):
if other: if other:
declared.setdefault(other, []).append((known.get("size"), dest)) declared.setdefault(other, []).append((by_hash.get("size"), slot))
return declared return declared
def declared_root(config: dict) -> str:
"""The directory nearly every declared destination starts with, if any.
A platform without base_destination writes it into each destination;
core files go under the same directory.
"""
roots = [
d.split("/", 1)[0]
for system in config.get("systems", {}).values()
for f in system.get("files", [])
if "/" in (d := f.get("destination", "") or "")
]
if not roots:
return ""
root, count = Counter(roots).most_common(1)[0]
return root if count / len(roots) > 0.9 else ""
def expand_platform_declared_names(config: dict, db: dict) -> set[str]: def expand_platform_declared_names(config: dict, db: dict) -> set[str]:
"""The names a platform declares, enriched as `platform_declarations`.""" """The names a platform declares, enriched as `platform_declarations`."""
return set(platform_declarations(config, db)) return set(platform_declarations(config, db))
+5 -22
View File
@@ -7,7 +7,7 @@ this module builds so the report and the pack withdraw the same files."""
from __future__ import annotations from __future__ import annotations
from common import PROFILE_IDENTITY_FIELDS from common import PROFILE_IDENTITY_FIELDS
from common import expand_platform_declared_names, platform_declarations from common import declared_root, expand_platform_declared_names, platform_declarations
from common import load_emulator_profiles from common import load_emulator_profiles
from common import resolution_is_hash_exact from common import resolution_is_hash_exact
from common import resolve_local_file from common import resolve_local_file
@@ -33,29 +33,12 @@ def _emulator_systems_index(emu_profiles: dict | None) -> dict[str, list[str]]:
return index return index
def _detect_extras_prefix(config: dict, base_dest: str) -> str: def _detect_extras_prefix(config: dict, base_dest: str) -> str:
"""Detect the effective BIOS prefix for core extras. """The prefix core-extra destinations take (may be empty).
When base_destination is empty (RetroDECK), infer the prefix from When base_destination is empty (RetroDECK), it is the dominant root of
the dominant root of YAML-declared destinations. Returns the prefix the YAML-declared destinations.
to prepend to every core-extra destination (may be empty).
""" """
if base_dest: return base_dest or declared_root(config)
return base_dest
dests: list[str] = []
for sys_data in config.get("systems", {}).values():
for f in sys_data.get("files", []):
d = f.get("destination", "")
if d and "/" in d:
dests.append(d)
if not dests:
return ""
from collections import Counter
roots = Counter(d.split("/", 1)[0] for d in dests)
most_common, count = roots.most_common(1)[0]
if count / len(dests) > 0.9:
return most_common
return ""
def _detect_slug_structure(config: dict) -> tuple[bool, dict[str, str]]: def _detect_slug_structure(config: dict) -> tuple[bool, dict[str, str]]:
"""Detect whether a platform uses per-system slug destinations. """Detect whether a platform uses per-system slug destinations.
+25 -16
View File
@@ -415,28 +415,37 @@ def _candidate_verdict(
if outside_gap_scope(file_entry, is_standalone): if outside_gap_scope(file_entry, is_standalone):
return "skip" return "skip"
if not include_all: if not include_all:
# A platform declaring any name the core answers to has met the # A platform declaring the name the core reads has met the
# requirement: quasi88 reads n88sub.rom or disk.rom, and System.dat # requirement where the declaration fills the entry's own slot,
# names disk.rom. Without the aliases the pack carried the ROM twice. # whose content the slot arbitration decides, or elsewhere at a size
# The archive answers by its name. A loose file answers where the # the core accepts: the builder copies that file to the core's path.
# declaration fills the entry's own slot, whose content the slot # Galaksija's 4 KiB ROM1.BIN does not stand for DOSBox's 32 KiB SC-55
# arbitration decides, or elsewhere at a size the core accepts: # one. The builder copies nothing for an alias, so an alias answers
# Galaksija's 4 KiB ROM1.BIN does not stand for DOSBox's 32 KiB # only where the core reads it: quasi88 reads n88sub.rom or disk.rom
# SC-55 one. # in quasi88/, and System.dat names quasi88/disk.rom. RetroDECK's
# root MSX.ROM is not CLK's MSX/MSX.ROM, and RetroBat's 16 KiB MSX
# DISK.ROM at the root is not the 256-byte Disk II ROM gsplus also
# accepts as c600.rom. The archive answers by its name.
if file_entry.get("archive") in declared_names: if file_entry.get("archive") in declared_names:
return "settled" return "settled"
slot = sanitize_pack_path(dest).lower() slot = sanitize_pack_path(dest or fname).lower()
directory = slot if dest.endswith("/") else slot.rpartition("/")[0]
for name in (fname, *file_entry.get("aliases", [])): for name in (fname, *file_entry.get("aliases", [])):
if name not in declared_names: if name not in declared_names:
continue continue
declarations = ( if not isinstance(declared_names, Mapping):
declared_names[name] return "settled"
if isinstance(declared_names, Mapping) if name == fname:
else [(None, "")] if any(
) where == slot or name_match_size_ok(file_entry, size)
for size, where in declared_names[name]
):
return "settled"
continue
read_at = f"{directory}/{name}".lower() if directory else name.lower()
if any( if any(
(slot and where == slot) or name_match_size_ok(file_entry, size) where == read_at and name_match_size_ok(file_entry, size)
for size, where in declarations for size, where in declared_names[name]
): ):
return "settled" return "settled"
return "keep" return "keep"
+60 -2
View File
@@ -77,12 +77,13 @@ class ADeclaredAliasSettlesTheRequirement(unittest.TestCase):
Path(tmp, "emulators").mkdir() Path(tmp, "emulators").mkdir()
Path(tmp, "emulators", "quasi88.yml").write_text( Path(tmp, "emulators", "quasi88.yml").write_text(
"emulator: QUASI88\ntype: libretro\nsystems: [nec-pc-88]\ncores: [quasi88]\n" "emulator: QUASI88\ntype: libretro\nsystems: [nec-pc-88]\ncores: [quasi88]\n"
"files:\n - name: n88sub.rom\n aliases: [N88SUB.ROM, disk.rom]\n" "files:\n - name: n88sub.rom\n path: quasi88/n88sub.rom\n"
" required: true\n" " aliases: [N88SUB.ROM, disk.rom]\n required: true\n"
) )
_emulator_profiles_cache.clear() _emulator_profiles_cache.clear()
self.addCleanup(_emulator_profiles_cache.clear) self.addCleanup(_emulator_profiles_cache.clear)
config = {"platform": "P", "verification_mode": "existence", "cores": "all_libretro", config = {"platform": "P", "verification_mode": "existence", "cores": "all_libretro",
"base_destination": "system",
"systems": {"nec-pc-88": {"files": [{"name": "disk.rom", "destination": "quasi88/disk.rom"}]}}} "systems": {"nec-pc-88": {"files": [{"name": "disk.rom", "destination": "quasi88/disk.rom"}]}}}
db = {"files": {}, "indexes": {"by_name": {}, "by_md5": {}, "by_crc32": {}, "by_path_suffix": {}}} db = {"files": {}, "indexes": {"by_name": {}, "by_md5": {}, "by_crc32": {}, "by_path_suffix": {}}}
previous = os.getcwd() previous = os.getcwd()
@@ -117,6 +118,7 @@ class ASameNamedFileOfAnotherSizeSettlesNothing(unittest.TestCase):
_emulator_profiles_cache.clear() _emulator_profiles_cache.clear()
self.addCleanup(_emulator_profiles_cache.clear) self.addCleanup(_emulator_profiles_cache.clear)
config = {"platform": "P", "verification_mode": "existence", "cores": "all_libretro", config = {"platform": "P", "verification_mode": "existence", "cores": "all_libretro",
"base_destination": "system",
"systems": {"galaksija": {"files": [ "systems": {"galaksija": {"files": [
{"name": "ROM1.BIN", "destination": destination, {"name": "ROM1.BIN", "destination": destination,
"size": declared_size, "md5": md5}]}}} "size": declared_size, "md5": md5}]}}}
@@ -151,5 +153,61 @@ class ASameNamedFileOfAnotherSizeSettlesNothing(unittest.TestCase):
self.assertEqual(self.undeclared(4096, destination="SC-55/ROM1.BIN"), []) self.assertEqual(self.undeclared(4096, destination="SC-55/ROM1.BIN"), [])
class AnAliasAnswersOnlyWhereTheCoreReadsIt(unittest.TestCase):
"""CLK reads MSX/MSX.ROM and answers to MSX.ROM; RetroDECK declares
bios/MSX.ROM at the root for fMSX. The alias settled CLK's entry and the
pack left CLK without an MSX BIOS: the builder copies a file declared
elsewhere to a core's path under the core's own name, never an alias."""
PROFILE = (
"emulator: CLK\ntype: libretro\nsystems: [msx]\ncores: [clk]\n"
"files:\n - name: msx.rom\n aliases: [MSX.ROM]\n path: MSX/MSX.ROM\n"
" required: true\n"
)
def undeclared(self, destination, base_destination="", size=None):
import os # noqa: PLC0415
import tempfile # noqa: PLC0415
from common import _emulator_profiles_cache # noqa: PLC0415
from verify import find_undeclared_files # noqa: PLC0415
with tempfile.TemporaryDirectory() as tmp:
Path(tmp, "emulators").mkdir()
Path(tmp, "emulators", "clk.yml").write_text(self.PROFILE)
_emulator_profiles_cache.clear()
self.addCleanup(_emulator_profiles_cache.clear)
config = {"platform": "P", "verification_mode": "md5", "cores": ["clk"],
"base_destination": base_destination,
"systems": {"msx": {"files": [
{"name": "MSX.ROM", "destination": destination, "size": size},
{"name": "other.rom", "destination": "bios/other.rom"}]}}}
db = {"files": {}, "indexes": {"by_name": {}, "by_md5": {}, "by_crc32": {}, "by_path_suffix": {}}}
previous = os.getcwd()
os.chdir(tmp)
try:
return [u["path"] for u in find_undeclared_files(config, "emulators", db, data_names=set())]
finally:
os.chdir(previous)
def test_an_alias_declared_at_another_path_leaves_the_entry_open(self):
self.assertEqual(self.undeclared("bios/MSX.ROM"), ["MSX/MSX.ROM"])
def test_an_alias_declared_where_the_core_reads_settles_it(self):
"""RetroDECK writes bios/ into every destination; core paths start below it."""
self.assertEqual(self.undeclared("bios/MSX/MSX.ROM"), [])
def test_an_alias_in_place_at_a_rejected_size_leaves_it_open(self):
"""RetroBat's root DISK.ROM is the 16 KiB MSX disk ROM; gsplus reads a
256-byte DISK.ROM or c600.rom there and checks the size."""
self.PROFILE = (
"emulator: GSplus\ntype: libretro\nsystems: [msx]\ncores: [clk]\n"
"files:\n - name: c600.rom\n aliases: [MSX.ROM]\n"
" size: 256\n validation: [size]\n"
)
self.assertEqual(self.undeclared("MSX.ROM", "bios", size=16384), ["c600.rom"])
self.assertEqual(self.undeclared("MSX.ROM", "bios", size=256), [])
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()