Skip to content

[BUG]: Bundled patches for secondary ELF CRCs are not listed with All CRCs #14914

Description

@Immersion95

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:

240p Progressive Scan

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

  1. Use the Japanese SLPS-25661 release.
  2. Open Game Properties → Patches.
  3. Enable Show Patches For All CRCs.
  4. The bundled KOF 2001, KOF 2000 and KOF '99 NeoGeo Version patches are not shown.

Alternatively:

The Last Blade 1 & 2

  1. Use the Japanese SLPS-25503 release.
  2. Open Game Properties → Patches.
  3. Enable Show Patches For All CRCs.
  4. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions