From 527526a8e2be1b251e18c2ee9f3e2dcbb5adac06 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 10 Oct 2026 14:05:57 +0200 Subject: [PATCH] fix: give each dolphin fork its own dsp rom table --- emulators/dolphin-mmjr.yml | 10 ++++----- emulators/dolphin-mmjr2.yml | 10 ++++----- emulators/dolphin.yml | 12 +++++----- emulators/ishiiruka.yml | 12 +++++----- emulators/primehack.yml | 12 +++++----- emulators/triforce.yml | 12 +++++----- schemas/emulator.schema.json | 43 ++++++++++++++++++++++++++++++------ 7 files changed, 70 insertions(+), 41 deletions(-) diff --git a/emulators/dolphin-mmjr.yml b/emulators/dolphin-mmjr.yml index e5486f77..8792f237 100644 --- a/emulators/dolphin-mmjr.yml +++ b/emulators/dolphin-mmjr.yml @@ -135,8 +135,8 @@ files: required: false hle_fallback: true size: 8192 - validation: [size] - known_hash_adler32: "0x66f334fe" + validation: [size, adler32] + known_hash_adler32: ["0x66f334fe", "0x128ea7a2"] adler32_byteswap: true description: "DSP instruction ROM" note: "DSP LLE only, and LLE aborts when the file is absent or not 8192 bytes. The adler32 is taken over the byte-swapped image and the value here is the Nintendo pair; five replacement pairs are also accepted." @@ -147,12 +147,12 @@ files: required: false hle_fallback: true size: 4096 - validation: [size] - known_hash_adler32: "0xf3b93527" + validation: [size, adler32] + known_hash_adler32: ["0xf3b93527", "0xa4a575f5"] adler32_byteswap: true description: "DSP coefficient ROM" note: "Read by DSP LLE alongside the instruction ROM, and by the AX ucode under HLE for polyphase resampling, which drops any file that is not 0x1000 bytes and plays on without it." - source_ref: "Source/Core/Common/CommonPaths.h:109, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:120-152, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:45-70, Source/Core/Core/DSP/DSPCore.h:49" + source_ref: "Source/Core/Common/CommonPaths.h:109, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:120-152, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:45-70, Source/Core/Core/DSP/DSPCore.h:49, Source/Core/Core/DSP/DSPCore.cpp:38-105" - name: codehandler.bin path: null diff --git a/emulators/dolphin-mmjr2.yml b/emulators/dolphin-mmjr2.yml index f3a97882..b64668fb 100644 --- a/emulators/dolphin-mmjr2.yml +++ b/emulators/dolphin-mmjr2.yml @@ -171,8 +171,8 @@ files: required: false hle_fallback: true size: 8192 - validation: [size] - known_hash_adler32: "0x66f334fe" + validation: [size, adler32] + known_hash_adler32: ["0x66f334fe", "0xe789b5a5"] adler32_byteswap: true description: "DSP instruction ROM" note: "DSP LLE only, and a file that is absent or not 8192 bytes fails initialisation, which aborts the emulation thread. The adler32 is taken over the byte-swapped image and the value here is the Nintendo pair; six replacement pairs are also accepted." @@ -183,12 +183,12 @@ files: required: false hle_fallback: true size: 4096 - validation: [size] - known_hash_adler32: "0xf3b93527" + validation: [size, adler32] + known_hash_adler32: ["0xf3b93527", "0xa4a575f5"] adler32_byteswap: true description: "DSP coefficient ROM" note: "Read by DSP LLE alongside the instruction ROM, and by the AX ucode under HLE for polyphase resampling, which drops any file that is not 0x1000 bytes and plays on without it." - source_ref: "Source/Core/Common/CommonPaths.h:121, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-120, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:42-69, Source/Core/Core/DSP/DSPCore.h:58" + source_ref: "Source/Core/Common/CommonPaths.h:121, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-120, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:42-69, Source/Core/Core/DSP/DSPCore.h:58, Source/Core/Core/DSP/DSPCore.cpp:28-102" - name: codehandler.bin path: null diff --git a/emulators/dolphin.yml b/emulators/dolphin.yml index aabc5bf6..9db68f9d 100644 --- a/emulators/dolphin.yml +++ b/emulators/dolphin.yml @@ -67,22 +67,22 @@ files: size: 8192 required: false hle_fallback: true - validation: [size] - known_hash_adler32: "0x66f334fe" + validation: [size, adler32] + known_hash_adler32: ["0x66f334fe", "0xe789b5a5"] adler32_byteswap: true note: "DSP instruction ROM for LLE audio. Free replacement (v0.4) included" - source_ref: "Source/Core/Common/CommonPaths.h:136, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:84-117" + source_ref: "Source/Core/Common/CommonPaths.h:136, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:84-117, Source/Core/Core/DSP/DSPCore.cpp:28-102" - name: "dsp_coef.bin" path: "GC/dsp_coef.bin" size: 4096 required: false hle_fallback: true - validation: [size] - known_hash_adler32: "0xf3b93527" + validation: [size, adler32] + known_hash_adler32: ["0xf3b93527", "0xa4a575f5"] adler32_byteswap: true note: "DSP coefficient ROM for LLE audio and HLE polyphase resampling. Free replacement included" - source_ref: "Source/Core/Common/CommonPaths.h:137, Source/Core/Core/DSP/DSPCore.cpp:32-33, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:55-62" + source_ref: "Source/Core/Common/CommonPaths.h:137, Source/Core/Core/DSP/DSPCore.cpp:32-33, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:55-62, Source/Core/Core/DSP/DSPCore.cpp:28-102" # -- GameCube Fonts -- # Bundled free alternatives exist but have padding differences causing misplaced text. diff --git a/emulators/ishiiruka.yml b/emulators/ishiiruka.yml index b3bc961b..475a9053 100644 --- a/emulators/ishiiruka.yml +++ b/emulators/ishiiruka.yml @@ -64,22 +64,22 @@ files: size: 8192 required: false hle_fallback: true - validation: [size] - known_hash_adler32: "0x66f334fe" + validation: [size, adler32] + known_hash_adler32: ["0x66f334fe", "0x128ea7a2"] adler32_byteswap: true note: "DSP instruction ROM for LLE audio. Free replacement included" - source_ref: "Source/Core/Common/CommonPaths.h:112, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:142-150, Source/Core/Core/DSP/DSPCore.cpp:48,67" + source_ref: "Source/Core/Common/CommonPaths.h:112, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:142-150, Source/Core/Core/DSP/DSPCore.cpp:48,67, Source/Core/Core/DSP/DSPCore.cpp:38-105" - name: "dsp_coef.bin" path: "GC/dsp_coef.bin" size: 4096 required: false hle_fallback: true - validation: [size] - known_hash_adler32: "0xf3b93527" + validation: [size, adler32] + known_hash_adler32: ["0xf3b93527", "0xa4a575f5"] adler32_byteswap: true note: "DSP coefficient ROM for LLE audio and HLE polyphase resampling. Free replacement included" - source_ref: "Source/Core/Common/CommonPaths.h:113, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:143-153, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:43-72, Source/Core/Core/DSP/DSPCore.cpp:48,68" + source_ref: "Source/Core/Common/CommonPaths.h:113, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:143-153, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:43-72, Source/Core/Core/DSP/DSPCore.cpp:48,68, Source/Core/Core/DSP/DSPCore.cpp:38-105" # -- GameCube Fonts -- # Bundled free alternatives exist but have padding differences causing misplaced text. diff --git a/emulators/primehack.yml b/emulators/primehack.yml index 5adda574..ccf112d9 100644 --- a/emulators/primehack.yml +++ b/emulators/primehack.yml @@ -68,22 +68,22 @@ files: size: 8192 required: false hle_fallback: true - validation: [size] - known_hash_adler32: "0x66f334fe" + validation: [size, adler32] + known_hash_adler32: ["0x66f334fe", "0xe789b5a5"] adler32_byteswap: true note: "DSP instruction ROM for LLE audio. Free replacement (v0.4) included" - source_ref: "Source/Core/Common/CommonPaths.h:135, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-117" + source_ref: "Source/Core/Common/CommonPaths.h:135, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-117, Source/Core/Core/DSP/DSPCore.cpp:28-102" - name: "dsp_coef.bin" path: "GC/dsp_coef.bin" size: 4096 required: false hle_fallback: true - validation: [size] - known_hash_adler32: "0xf3b93527" + validation: [size, adler32] + known_hash_adler32: ["0xf3b93527", "0xa4a575f5"] adler32_byteswap: true note: "DSP coefficient ROM for LLE audio. Free replacement included" - source_ref: "Source/Core/Common/CommonPaths.h:138, Source/Core/Core/DSP/DSPCore.cpp:32-38" + source_ref: "Source/Core/Common/CommonPaths.h:138, Source/Core/Core/DSP/DSPCore.cpp:32-38, Source/Core/Core/DSP/DSPCore.cpp:28-102" # -- GameCube Fonts -- # Bundled free alternatives exist but have padding differences causing misplaced text. diff --git a/emulators/triforce.yml b/emulators/triforce.yml index ade1f359..76f53083 100644 --- a/emulators/triforce.yml +++ b/emulators/triforce.yml @@ -227,12 +227,12 @@ files: path: "GC/dsp_rom.bin" description: "DSP instruction ROM" size: 8192 - validation: [size] - known_hash_adler32: "0x66f334fe" + validation: [size, adler32] + known_hash_adler32: ["0x66f334fe", "0xe789b5a5"] adler32_byteswap: true required: false hle_fallback: true - source_ref: "Source/Core/Common/CommonPaths.h:145, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-105,109-118, Source/Core/Core/DSP/DSPCore.h:44, Source/Core/Core/DSP/DSPCore.cpp:36-38" + source_ref: "Source/Core/Common/CommonPaths.h:145, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-105,109-118, Source/Core/Core/DSP/DSPCore.h:44, Source/Core/Core/DSP/DSPCore.cpp:36-38, Source/Core/Core/DSP/DSPCore.cpp:28-102" note: > LoadDSPRom rejects any file whose length differs from DSP_IROM_BYTE_SIZE and swaps every 16 bit word before storing it, so the Adler32 in the source is @@ -245,12 +245,12 @@ files: path: "GC/dsp_coef.bin" description: "DSP coefficient ROM" size: 4096 - validation: [size] - known_hash_adler32: "0xf3b93527" + validation: [size, adler32] + known_hash_adler32: ["0xf3b93527", "0xa4a575f5"] adler32_byteswap: true required: false hle_fallback: true - source_ref: "Source/Core/Common/CommonPaths.h:146, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-105,110-119, Source/Core/Core/DSP/DSPCore.h:58, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:61-62" + source_ref: "Source/Core/Common/CommonPaths.h:146, Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:87-105,110-119, Source/Core/Core/DSP/DSPCore.h:58, Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp:61-62, Source/Core/Core/DSP/DSPCore.cpp:28-102" note: > Also read by the HLE AX ucode for polyphase resampling. Adler32 is taken over the byte-swapped data (Source/Core/Core/HW/DSPLLE/DSPLLE.cpp:100-102). diff --git a/schemas/emulator.schema.json b/schemas/emulator.schema.json index 5f96a65d..3f8a838e 100644 --- a/schemas/emulator.schema.json +++ b/schemas/emulator.schema.json @@ -515,9 +515,24 @@ "pattern": "^[a-fA-F0-9]{8}$" }, "known_hash_adler32": { - "type": [ - "string", - "integer" + "description": "Adler-32 values the code accepts; a list when several revisions pass.", + "oneOf": [ + { + "type": [ + "string", + "integer" + ] + }, + { + "type": "array", + "items": { + "type": [ + "string", + "integer" + ] + }, + "minItems": 1 + } ] }, "validation": { @@ -648,12 +663,26 @@ "if": { "anyOf": [ { - "required": ["path"], - "properties": {"path": {"type": "string", "pattern": "/$"}} + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "pattern": "/$" + } + } }, { - "required": ["standalone_path"], - "properties": {"standalone_path": {"type": "string", "pattern": "/$"}} + "required": [ + "standalone_path" + ], + "properties": { + "standalone_path": { + "type": "string", + "pattern": "/$" + } + } } ] },