diff --git a/emulators/aethersx2.yml b/emulators/aethersx2.yml index 96af44ebe..65ca2bc76 100644 --- a/emulators/aethersx2.yml +++ b/emulators/aethersx2.yml @@ -60,7 +60,7 @@ notes: | Detection is by content. The scan lists the BIOS folder with a *.* mask, keeps files between 4 and 8 MB, and accepts an image whose romdir carries a RESET - entry followed by a readable ROMVER, and the fifth ROMVER character gives the + entry followed by ROMVER, and the fifth ROMVER character gives the zone among T10K, Test, Japan, USA, Europe, HK, Free and China. An image named in the configuration is opened at its own path, without the size filter and without the romdir test. No name and no hash is matched anywhere. The image is @@ -111,10 +111,17 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 5 + missing_reset: ends_walk + terminated_names: false + extinfo: false + unreadable_romver: ignored + truncated_walk: ends_walk description: "PS2 BIOS image" - note: "Any image whose romdir holds RESET and ROMVER is accepted, whatever its name. The 4 to 8 MB range gates the folder scan, while an image named in the configuration skips both that range and the romdir test." - source_ref: "source aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, source aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, source aethersx2/pcsx2/ps2/BiosTools.cpp:272-316, aethersx2 v1.5-3606 usr/share/aethersx2 0xa45ffc" + note: "Any image whose romdir holds RESET and ROMVER is accepted, whatever its name. A name starting with RESET opens the table, and ROMVER bytes past the end of the file are zero-filled without turning the image away. The 4 to 8 MB range gates the folder scan, while an image named in the configuration skips both that range and the romdir test." + source_ref: "source aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, source aethersx2/pcsx2/ps2/BiosTools.cpp:62-175, source aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, source aethersx2/pcsx2/ps2/BiosTools.cpp:272-316, aethersx2 v1.5-3606 usr/share/aethersx2 0xa45ffc" - name: ps2-0230a-20080220.rom1 path: bios/ps2-0230a-20080220.rom1 diff --git a/emulators/armsx2.yml b/emulators/armsx2.yml index 04ca1de72..5ee879e61 100644 --- a/emulators/armsx2.yml +++ b/emulators/armsx2.yml @@ -179,7 +179,16 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + refused_serials: ["20111012-094243"] + refused_zones: ["TZ"] description: "PS2 BIOS image" note: >- Any image whose romdir holds RESET and ROMVER is accepted, whatever its @@ -188,7 +197,7 @@ files: configuration skips that range. Read into the 4 MB ROM region and truncated to it. Shorter than 2465792 bytes disables the OSDSys parameter HLE. A COH-H image is passed over by the console scan. - source_ref: "source pcsx2/ps2/BiosTools.cpp:18-19, source pcsx2/ps2/BiosTools.cpp:101-240, source pcsx2/ps2/BiosTools.cpp:448-483, source pcsx2/ps2/BiosTools.cpp:571-662" + source_ref: "source pcsx2/ps2/BiosTools.cpp:18-19, source pcsx2/ps2/BiosTools.cpp:25-39, source pcsx2/ps2/BiosTools.cpp:101-240, source pcsx2/ps2/BiosTools.cpp:448-483, source pcsx2/ps2/BiosTools.cpp:571-662" - name: r27v1602f.8g found_by: content @@ -198,7 +207,16 @@ files: required: false min_size: 2097152 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + refused_serials: ["20111012-094243"] + zones: ["TZ"] config_key: "Filenames/ArcadeBIOS" description: "Namco System 256 board BIOS" note: >- @@ -218,7 +236,16 @@ files: required: false min_size: 2097152 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + refused_serials: ["20111012-094243"] + zones: ["TZ"] config_key: "Filenames/ArcadeBIOS" description: "Namco System 246 board BIOS" note: >- @@ -235,7 +262,16 @@ files: required: false min_size: 2097152 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + refused_serials: ["20111012-094243"] + zones: ["TZ"] config_key: "Filenames/ArcadeBIOS" description: "Sony COH-H A-000-010 board BIOS" note: >- diff --git a/emulators/emucorex.yml b/emulators/emucorex.yml index 0c0a34738..42bced0d5 100644 --- a/emulators/emucorex.yml +++ b/emulators/emucorex.yml @@ -153,7 +153,14 @@ files: required: true min_size: 2097152 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "PS2 BIOS image" note: >- Any image whose romdir holds RESET and ROMVER is accepted, whatever its diff --git a/emulators/lrps2-416291a.yml b/emulators/lrps2-416291a.yml index 5b4a7919f..96bc6f3f1 100644 --- a/emulators/lrps2-416291a.yml +++ b/emulators/lrps2-416291a.yml @@ -62,7 +62,14 @@ files: description: "PS2 BIOS binary" min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk config_key: "pcsx2_bios" source_ref: "source libretro/main.cpp:1800-1838, source libretro/main.cpp:360-365, source libretro/main.cpp:1927-1931, source pcsx2/ps2/BiosTools.cpp:31-32, 60-187, 231-323, source pcsx2/Pcsx2Config.cpp:994-1000, 1042, 1051-1061" note: > diff --git a/emulators/lrps2-9485a53.yml b/emulators/lrps2-9485a53.yml index 7ffef6c18..426138f50 100644 --- a/emulators/lrps2-9485a53.yml +++ b/emulators/lrps2-9485a53.yml @@ -62,7 +62,14 @@ files: description: "PS2 BIOS binary" min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk config_key: "pcsx2_bios" source_ref: "source libretro/main.cpp:1801-1839, source libretro/main.cpp:360-365, source libretro/main.cpp:1928-1932, source pcsx2/ps2/BiosTools.cpp:31-32, 60-187, 231-323, source pcsx2/Pcsx2Config.cpp:994-1000, 1042, 1051-1061" note: > diff --git a/emulators/lrps2.yml b/emulators/lrps2.yml index 870f6f956..58cc5208d 100644 --- a/emulators/lrps2.yml +++ b/emulators/lrps2.yml @@ -72,7 +72,14 @@ files: description: "PS2 BIOS binary" min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk config_key: "pcsx2_bios" source_ref: "source pcsx2/ps2/BiosTools.cpp:32-33, 64-187, 257-289, 349-415, source libretro/main.cpp:525-536" note: > diff --git a/emulators/nethersx2-turnip-classic.yml b/emulators/nethersx2-turnip-classic.yml index 81114f2b3..527927143 100644 --- a/emulators/nethersx2-turnip-classic.yml +++ b/emulators/nethersx2-turnip-classic.yml @@ -173,13 +173,20 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: false + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "PS2 BIOS image" note: >- Any image whose romdir holds RESET and a readable ROMVER is accepted, whatever its name. The 4 to 8 MB range gates the folder scan, and an image named in the configuration skips both that range and the romdir test. - source_ref: "upstream aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, upstream aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, nethersx2-turnip-classic v0.7 libemucore.so 0x81bc00-0x81bc24 (size window), nethersx2-turnip-classic v0.7 libemucore.so 0x81c1c0 (acceptance flag set outright)" + source_ref: "upstream aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, upstream aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, nethersx2-turnip-classic v0.7 libemucore.so 0x81bc00-0x81bc24 (size window), nethersx2-turnip-classic v0.7 libemucore.so 0x81be00-0x81c204 (romdir walk), nethersx2-turnip-classic v0.7 libemucore.so 0x81c1c0 (acceptance flag set outright)" - name: ps2-0230a-20080220.rom1 path: bios/ps2-0230a-20080220.rom1 diff --git a/emulators/nethersx2-turnip.yml b/emulators/nethersx2-turnip.yml index ffda7922a..a9450063b 100644 --- a/emulators/nethersx2-turnip.yml +++ b/emulators/nethersx2-turnip.yml @@ -154,13 +154,20 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "PS2 BIOS image" note: >- Any image whose romdir holds RESET and a readable ROMVER is accepted, whatever its name. The 4 to 8 MB range gates the folder scan, and an image named in the configuration skips both that range and the romdir test. - source_ref: "upstream aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, upstream aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, nethersx2-turnip v0.7 libemucore.so 0x828e20-0x828e44 (size window), nethersx2-turnip v0.7 libemucore.so 0x829244-0x829248 (device type result discarded)" + source_ref: "upstream aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, upstream aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, nethersx2-turnip v0.7 libemucore.so 0x828e20-0x828e44 (size window), nethersx2-turnip v0.7 libemucore.so 0x829020-0x8292bc (romdir walk), nethersx2-turnip v0.7 libemucore.so 0x829244-0x829248 (device type result discarded)" - name: ps2-0230a-20080220.rom1 path: bios/ps2-0230a-20080220.rom1 diff --git a/emulators/nethersx2.yml b/emulators/nethersx2.yml index 861fca70d..87f5be289 100644 --- a/emulators/nethersx2.yml +++ b/emulators/nethersx2.yml @@ -134,7 +134,14 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "PS2 BIOS image" note: >- Any image whose romdir holds RESET and a readable ROMVER is accepted, @@ -142,7 +149,7 @@ files: named in the configuration skips both that range and the romdir test. The sixth ROMVER character is not examined here, the patch having replaced the test that rejected images carrying D. - source_ref: "upstream aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, upstream aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, nethersx2 v2.2n-4248 libemucore.so 0x828d80-0x828f10, nethersx2 v2.2n-4248 libemucore.so 0x829244-0x829248" + source_ref: "upstream aethersx2/pcsx2/ps2/BiosTools.cpp:27-28, upstream aethersx2/pcsx2/ps2/BiosTools.cpp:235-260, nethersx2 v2.2n-4248 libemucore.so 0x828d80-0x828f10, nethersx2 v2.2n-4248 libemucore.so 0x829020-0x8292bc, nethersx2 v2.2n-4248 libemucore.so 0x829244-0x829248" - name: ps2-0230a-20080220.rom1 path: bios/ps2-0230a-20080220.rom1 diff --git a/emulators/pcee2.yml b/emulators/pcee2.yml index d4236c595..445e6e8bb 100644 --- a/emulators/pcee2.yml +++ b/emulators/pcee2.yml @@ -106,10 +106,15 @@ files: found_by: content path: "pcsx2/bios/.bin" description: "PS2 BIOS image" - min_size: 4194304 - max_size: 8388608 required: true - validation: [size] + validation: [romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk source_ref: "source pcee2-libretro/Libretro.cpp:712-783, source pcsx2/ps2/BiosTools.cpp:16-17, source pcsx2/ps2/BiosTools.cpp:80-207, source pcsx2/ps2/BiosTools.cpp:268-304, source pcsx2/ps2/BiosTools.cpp:327-379" note: > Any file of pcsx2/bios whose romdir carries RESET and ROMVER. The 4 to @@ -123,6 +128,15 @@ files: system: namco-system256 agnostic: true required: false + validation: [romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + zones: ["TZ"] description: "Namco System 256 board BIOS" source_ref: "source pcee2-libretro/Libretro.cpp:712-730, source pcee2-libretro/Libretro.cpp:2333, source pcsx2/ps2/BiosTools.cpp:149-153, source pcsx2/ps2/BiosTools.cpp:176-180" note: > @@ -137,6 +151,15 @@ files: system: namco-system246 agnostic: true required: false + validation: [romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + zones: ["TZ"] description: "Namco System 246 Rack C board BIOS" source_ref: "source pcee2-libretro/Libretro.cpp:712-730, source pcee2-libretro/Libretro.cpp:2333, source pcsx2/ps2/BiosTools.cpp:149-153, source pcsx2/ps2/BiosTools.cpp:176-180" note: > @@ -149,6 +172,15 @@ files: system: namco-system246 agnostic: true required: false + validation: [romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk + zones: ["TZ"] description: "Sony COH-H A-000-010 board BIOS" source_ref: "source pcee2-libretro/Libretro.cpp:712-730, source pcee2-libretro/Libretro.cpp:2333, source pcsx2/ps2/BiosTools.cpp:149-153, source pcsx2/ps2/BiosTools.cpp:176-180" note: > diff --git a/emulators/pcsx2-legacy.yml b/emulators/pcsx2-legacy.yml index 75024d13b..0e499cfe7 100644 --- a/emulators/pcsx2-legacy.yml +++ b/emulators/pcsx2-legacy.yml @@ -80,9 +80,18 @@ files: found_by: content system: sony-playstation-2 required: true + validation: [romdir] + romdir: + reset_compare: 5 + missing_reset: rejects + terminated_names: false + extinfo: false + unreadable_romver: rejects + truncated_walk: rejects + offset_width: 32 description: "PS2 console BIOS" - note: "Any file in the BIOS folder whose romdir holds RESET and ROMVER is accepted, whatever its name or size. Naming convention ps2-VVVVr-YYYYMMDD.bin carries version, region and date." - source_ref: "pcsx2/ps2/BiosTools.cpp:261-323, pcsx2/ps2/BiosTools.cpp:74-167" + note: "Any file of the BIOS folder whose name holds a dot (the *.* mask of wxDir) and whose romdir holds RESET and ROMVER is listed, whatever its size. The table is read from the start of the file until a name starting with RESET, within 512 Ki entries, then walked to ROMVER, and any read past the end of the file throws EndOfStream. Naming convention ps2-VVVVr-YYYYMMDD.bin carries version, region and date." + source_ref: "pcsx2/gui/Panels/BiosSelectorPanel.cpp:151-177, pcsx2/ps2/BiosTools.cpp:325-341, pcsx2/ps2/BiosTools.cpp:74-167, pcsx2/ps2/BiosTools.cpp:261-323, common/src/Utilities/pxStreams.cpp:87-105, common/include/Utilities/Exceptions.h:360" - name: ps2-0230a-20080220.rom1 system: sony-playstation-2 diff --git a/emulators/pcsx2-libretro-408e3b2.yml b/emulators/pcsx2-libretro-408e3b2.yml index b90a4468f..ea88c3ac4 100644 --- a/emulators/pcsx2-libretro-408e3b2.yml +++ b/emulators/pcsx2-libretro-408e3b2.yml @@ -63,15 +63,26 @@ files: found_by: content path: "ps2/.bin" required: true + validation: [romdir] + romdir: + reset_compare: 5 + missing_reset: rejects + terminated_names: false + extinfo: false + unreadable_romver: rejects + truncated_walk: rejects + offset_width: 32 description: "PS2 BIOS binary" - min_size: 4194304 - max_size: 8388608 config_key: "pcsx2_bios" - source_ref: "source libretro/main.cpp:262-303, source libretro/main.cpp:317-328, source libretro/main.cpp:653-654, source pcsx2/ps2/BiosTools.cpp:74-167, 261-319, 340-356, source pcsx2/MemoryTypes.h:21" + source_ref: "source libretro/main.cpp:262-303, source libretro/main.cpp:317-328, source libretro/main.cpp:653-654, source pcsx2/ps2/BiosTools.cpp:74-167, 261-319, 340-356, source common/src/Utilities/pxStreams.cpp:74-93, source common/include/Utilities/Exceptions.h:346, source pcsx2/MemoryTypes.h:21" note: > - Any file in ps2/ whose romdir holds RESET and ROMVER, picked by the - pcsx2_bios core option. No size is checked: RESET is looked for in the - first 8 MB (pcsx2/ps2/BiosTools.cpp:79-84) and the first 4 MB are + Any file in ps2/ whose name holds a dot (the *.* mask of wxDir) and + whose romdir holds RESET and ROMVER, picked by the pcsx2_bios core + option. No size is checked. The table is read 16 bytes at a time from + the start of the file until a name starting with RESET, within 512 Ki + entries, then walked to an entry named ROMVER, whose 14 bytes are read + at the sum of the sizes before it. Every read past the end of the file + throws EndOfStream and the file is not listed. The first 4 MB are mapped. - name: ".rom1" diff --git a/emulators/pcsx2.yml b/emulators/pcsx2.yml index bdffd87c9..8d13dde46 100644 --- a/emulators/pcsx2.yml +++ b/emulators/pcsx2.yml @@ -31,7 +31,14 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk source_ref: "pcsx2/ps2/BiosTools.cpp:16-17,80-197,258-283,317-370" note: "Accepts any file 4-8 MB with valid romdir (RESET + ROMVER). Naming convention ps2-VVVVr-YYYYMMDD.bin (version, region, date)." diff --git a/emulators/pcsx2x6.yml b/emulators/pcsx2x6.yml index 3b433f832..0521c845b 100644 --- a/emulators/pcsx2x6.yml +++ b/emulators/pcsx2x6.yml @@ -85,7 +85,14 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "COH-H arcade board BIOS" aliases: - COH-H31000.BIN diff --git a/emulators/teknoparrot.yml b/emulators/teknoparrot.yml index 9e1508c3a..f54cfbf91 100644 --- a/emulators/teknoparrot.yml +++ b/emulators/teknoparrot.yml @@ -166,7 +166,14 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "COH-H arcade board BIOS" aliases: - COH-H31000.BIN diff --git a/emulators/yaps2.yml b/emulators/yaps2.yml index fc47f171c..4a5f4c8ff 100644 --- a/emulators/yaps2.yml +++ b/emulators/yaps2.yml @@ -187,7 +187,14 @@ files: required: true min_size: 4194304 max_size: 8388608 - validation: [size] + validation: [size, romdir] + romdir: + reset_compare: 10 + missing_reset: ends_walk + terminated_names: true + extinfo: true + unreadable_romver: ends_walk + truncated_walk: ends_walk description: "PS2 BIOS image" note: >- Any image whose romdir holds RESET and ROMVER is accepted, whatever its