From 3101c10248bb6dfcbd428341223e3badcb99ada0 Mon Sep 17 00:00:00 2001 From: BillionClaw <267901332+BillionClaw@users.noreply.github.com> Date: Wed, 25 Mar 2026 06:14:43 +0800 Subject: [PATCH] fix(compat): add SLES-51114 audio compatibility settings Pro Evolution Soccer 2 (SLES-51114) has audio streaming issues when loading via OPL. Add Accurate Reads (COMPAT_MODE_1) as the default compat setting for this game, so audio plays correctly without requiring a per-game config file. Fixes #1686 --- src/supportbase.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/supportbase.c b/src/supportbase.c index 63cd6ad2e4..d3bfaec317 100644 --- a/src/supportbase.c +++ b/src/supportbase.c @@ -547,6 +547,17 @@ int sbProbeISO9660(const char *path, base_game_info_t *game, u32 layer1_offset) return result; } +// Known game-specific default compat settings. +// Returns compatmask to use when no per-game config exists. +static int sbGetDefaultCompatForGame(const char *gameid) +{ + // Pro Evolution Soccer 2 (Europe) - audio streaming issues need Accurate Reads + if (!strncmp("SLES_511.14", gameid, 11)) + return COMPAT_MODE_1; // Accurate Reads + + return 0; +} + static const struct cdvdman_settings_common cdvdman_settings_common_sample = CDVDMAN_SETTINGS_DEFAULT_COMMON; int sbPrepare(base_game_info_t *game, config_set_t *configSet, int size_cdvdman, void **cdvdman_irx, int *patchindex) @@ -560,6 +571,13 @@ int sbPrepare(base_game_info_t *game, config_set_t *configSet, int size_cdvdman, char gameid[5]; configGetDiscIDBinary(configSet, gameid); + // Apply known defaults for specific games when no per-game config exists. + if (compatmask == 0) { + int defaultCompat = sbGetDefaultCompatForGame(gameid); + if (defaultCompat != 0) + compatmask = defaultCompat; + } + for (i = 0, settings = NULL; i < size_cdvdman; i += 4) { if (!memcmp((void *)((u8 *)cdvdman_irx + i), &cdvdman_settings_common_sample, sizeof(cdvdman_settings_common_sample))) { settings = (struct cdvdman_settings_common *)((u8 *)cdvdman_irx + i);