From 4197d0b8fcd3178414d7051ba7aee024d4a70e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 21 Oct 2026 14:45:44 +0200 Subject: [PATCH] Compat: Look PS1 games up as POPS They're all run by the firmware's PS1 emulator, whose workarounds don't depend on the game, so compat.ini settings for it go under POPS00000 (letters and digits like other IDs). Only the compat.ini lookup uses it: savestates, save data and everything else keep the game's own ID. Co-Authored-By: Claude Opus 5.5 (1M context) --- Core/Compatibility.h | 4 ++++ Core/System.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 4c2ff6ee39..d59dc8fa19 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -22,6 +22,10 @@ #include #include +// compat.ini's ID for every PS1 game: they're all run by the firmware's same PS1 emulator. In the +// usual letters-and-digits form, so it parses like any other ID. +constexpr const char *POPS_COMPAT_ID = "POPS00000"; + // Compatibility flags are controlled by assets/compat.ini. // Alternatively, if PSP/System/compat.ini exists, it is merged on top, to enable editing // the file on Android for tests. diff --git a/Core/System.cpp b/Core/System.cpp index 8760cf1d32..5f23bc1735 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -514,6 +514,10 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin // Headless replays frame dumps to compare them with references and with the PSP, which a game's // workarounds would skew: DarkStalkers' present hack replaces the game's final upscale. g_CoreParameter.compat.Clear(); + } else if (type == IdentifiedFileType::PSP_PS1_PBP) { + // The PS1 emulator's workarounds don't depend on the PS1 game it runs. Only compat.ini sees this ID: + // savestates, save data and everything else use the game's own ID. + g_CoreParameter.compat.Load(POPS_COMPAT_ID); } else { g_CoreParameter.compat.Load(discId); }