Describe the Bug
Bundled patches targeting secondary ELF CRCs are not displayed in the patch list when they are loaded from the built-in patches.zip, even with Show Patches For All CRCs enabled.
The affected patches are already merged in the official pcsx2_patches repository and distributed through PCSX2's patches.zip, so no manual patch installation is required to reproduce the issue.
Two current examples are:
The King of Fighters NESTS Collection
Japanese NeoGeo Online Collection Vol. 7 release, NTSC-J, SLPS-25661.
The following secondary-ELF patch files are already bundled:
SLPS-25661_59A9AFA2.pnach
SLPS-25661_709D7990.pnach
SLPS-25661_9FACED85.pnach
They contain:
No-Interlacing - KOF 2001 NeoGeo Version
No-Interlacing - KOF 2000 NeoGeo Version
No-Interlacing - KOF '99 NeoGeo Version
The main CRC patch is also bundled:
SLPS-25661_333700CC.pnach
When the game is selected in PCSX2, the main CRC patch can be listed, but the three secondary-ELF patches above are missing from the UI even with Show Patches For All CRCs enabled.
The secondary patches can still be loaded and applied if they were previously enabled, which shows that the files themselves are valid and available in patches.zip; they are simply not being enumerated for the UI.
The Last Blade 1 & 2
Japanese NeoGeo Online Collection Vol. 2: Bakumatsu Roman Gekka no Kenshi 1-2 release, NTSC-J, SLPS-25503.
This secondary-ELF patch is already bundled:
SLPS-25503_1D223324.pnach
It contains:
This patch is also not shown from the bundled patches.zip with Show Patches For All CRCs enabled.
However, if the exact same .pnach files are copied manually into the local patches directory, they appear correctly in the patch list.
So the issue is not with the patches themselves, but with the difference between local patch enumeration and bundled ZIP patch enumeration.
Looking at Patch.cpp, local patches use FindPatchFilesOnDisk(), which supports the SERIAL_*.pnach lookup when All CRCs is requested.
The patches.zip path in EnumeratePnachFiles() instead performs an exact SERIAL_CRC.pnach lookup for the current CRC and does not enumerate the other files sharing the same serial.
A possible solution would be to enumerate SERIAL_*.pnach entries from patches.zip when Show Patches For All CRCs is requested for the UI, while leaving runtime loading unchanged so only the patch matching the currently active ELF CRC is actually loaded.
I previously proposed this approach in #14656. That PR was lost after I accidentally deleted the fork containing its source branch, and I recreated it as #14913.
The replacement PR was closed because, under the current contribution policy, new contributors cannot submit AI-assisted code. I completely understand that decision, so I am opening this issue instead to document the bug and the possible approach. The implementation proposed there did resolve the issue in this case.
Reproduction Steps
No external patches are required; the affected files are already bundled with PCSX2.
The King of Fighters NESTS Collection
- Use the Japanese
SLPS-25661 release.
- Open Game Properties → Patches.
- Enable Show Patches For All CRCs.
- The bundled KOF 2001, KOF 2000 and KOF '99 NeoGeo Version patches are not shown.
Alternatively:
The Last Blade 1 & 2
- Use the Japanese
SLPS-25503 release.
- Open Game Properties → Patches.
- Enable Show Patches For All CRCs.
- The bundled
SLPS-25503_1D223324.pnach patch is not shown.
Copying the affected .pnach files from the bundled patch set into the local patches directory makes them appear correctly.
Expected Behavior
Show Patches For All CRCs should enumerate all SERIAL_*.pnach files associated with the selected game, regardless of whether they come from the local patches directory or the built-in patches.zip.
This should affect UI enumeration only. Runtime loading should continue to load only the patch matching the currently active ELF CRC.
PCSX2 Revision
v2.7.445
Operating System
Windows 11
If Linux - Specify Distro
No response
Logs & Dumps
No response
Describe the Bug
Bundled patches targeting secondary ELF CRCs are not displayed in the patch list when they are loaded from the built-in
patches.zip, even with Show Patches For All CRCs enabled.The affected patches are already merged in the official
pcsx2_patchesrepository and distributed through PCSX2'spatches.zip, so no manual patch installation is required to reproduce the issue.Two current examples are:
The King of Fighters NESTS Collection
Japanese NeoGeo Online Collection Vol. 7 release, NTSC-J,
SLPS-25661.The following secondary-ELF patch files are already bundled:
They contain:
The main CRC patch is also bundled:
When the game is selected in PCSX2, the main CRC patch can be listed, but the three secondary-ELF patches above are missing from the UI even with Show Patches For All CRCs enabled.
The secondary patches can still be loaded and applied if they were previously enabled, which shows that the files themselves are valid and available in
patches.zip; they are simply not being enumerated for the UI.The Last Blade 1 & 2
Japanese NeoGeo Online Collection Vol. 2: Bakumatsu Roman Gekka no Kenshi 1-2 release, NTSC-J,
SLPS-25503.This secondary-ELF patch is already bundled:
It contains:
This patch is also not shown from the bundled
patches.zipwith Show Patches For All CRCs enabled.However, if the exact same
.pnachfiles are copied manually into the localpatchesdirectory, they appear correctly in the patch list.So the issue is not with the patches themselves, but with the difference between local patch enumeration and bundled ZIP patch enumeration.
Looking at
Patch.cpp, local patches useFindPatchFilesOnDisk(), which supports theSERIAL_*.pnachlookup when All CRCs is requested.The
patches.zippath inEnumeratePnachFiles()instead performs an exactSERIAL_CRC.pnachlookup for the current CRC and does not enumerate the other files sharing the same serial.A possible solution would be to enumerate
SERIAL_*.pnachentries frompatches.zipwhen Show Patches For All CRCs is requested for the UI, while leaving runtime loading unchanged so only the patch matching the currently active ELF CRC is actually loaded.I previously proposed this approach in #14656. That PR was lost after I accidentally deleted the fork containing its source branch, and I recreated it as #14913.
The replacement PR was closed because, under the current contribution policy, new contributors cannot submit AI-assisted code. I completely understand that decision, so I am opening this issue instead to document the bug and the possible approach. The implementation proposed there did resolve the issue in this case.
Reproduction Steps
No external patches are required; the affected files are already bundled with PCSX2.
The King of Fighters NESTS Collection
SLPS-25661release.Alternatively:
The Last Blade 1 & 2
SLPS-25503release.SLPS-25503_1D223324.pnachpatch is not shown.Copying the affected
.pnachfiles from the bundled patch set into the localpatchesdirectory makes them appear correctly.Expected Behavior
Show Patches For All CRCs should enumerate all
SERIAL_*.pnachfiles associated with the selected game, regardless of whether they come from the localpatchesdirectory or the built-inpatches.zip.This should affect UI enumeration only. Runtime loading should continue to load only the patch matching the currently active ELF CRC.
PCSX2 Revision
v2.7.445
Operating System
Windows 11
If Linux - Specify Distro
No response
Logs & Dumps
No response