feat: check PS2 BIOS images by their romdir

Each PCSX2 fork declares how its LoadBiosVersion reads the table:
the strncmp length on RESET, the NUL test on names, EXTINFO, and what a
read past the end does, from the source at the pin or the shipped
libemucore.so for NetherSX2 and its Turnip builds. The Recalbox libretro
PCSX2 and PCEE2 check no size, so their 4 to 8 MB bounds are gone, and
the PCEE2 and ARMSX2 arcade images require the COH-H zone.
This commit is contained in:
Abdessamad Derraz committed 2026-11-10 12:52:46 +01:00
1 parent ec9fe03673
commit 45db717db9
16 files changed
+206 -34

No files matched your search

+11 -4
View File
@@ -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
+41 -5
View File
@@ -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: >-
+8 -1
View File
@@ -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
+8 -1
View File
@@ -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: >
+8 -1
View File
@@ -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: >
+8 -1
View File
@@ -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: >
+9 -2
View File
@@ -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
+9 -2
View File
@@ -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
+9 -2
View File
@@ -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
+35 -3
View File
@@ -106,10 +106,15 @@ files:
found_by: content
path: "pcsx2/bios/<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: >
+11 -2
View File
@@ -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
+17 -6
View File
@@ -63,15 +63,26 @@ files:
found_by: content
path: "ps2/<bios>.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: "<bios>.rom1"
+8 -1
View File
@@ -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)."
+8 -1
View File
@@ -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
+8 -1
View File
@@ -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
+8 -1
View File
@@ -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