From 0fbb62d7dc0b16dc9bd8a79e77a215a8c5f03b7a Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Fri, 20 Mar 2026 18:05:17 +0100 Subject: [PATCH] Stop compiling some DSP-related files. Replace it all with stubs. --- CMakeLists.txt | 3 ++- files.cmake | 4 ---- src/dusk/audio/DspStub.cpp | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 src/dusk/audio/DspStub.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 12c4154994..1ee357e1a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,8 @@ add_library(game_debug STATIC ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES} src/dusk/audio/DuskDsp.hpp src/dusk/audio/DuskDsp.cpp src/dusk/audio/Adpcm.cpp - src/dusk/audio/Adpcm.hpp) + src/dusk/audio/Adpcm.hpp + src/dusk/audio/DspStub.cpp) target_compile_definitions(game_debug PRIVATE TARGET_PC AVOID_UB=1 VERSION=0 $<$:DEBUG=1>) # Make these properties PUBLIC so that the regular game target also sees them. diff --git a/files.cmake b/files.cmake index cae7f66aed..2290f68b53 100644 --- a/files.cmake +++ b/files.cmake @@ -507,10 +507,6 @@ set(JSYSTEM_DEBUG_FILES libs/JSystem/src/JAudio2/JASDSPInterface.cpp libs/JSystem/src/JAudio2/JASDriverIF.cpp libs/JSystem/src/JAudio2/JASSoundParams.cpp - libs/JSystem/src/JAudio2/dspproc.cpp - libs/JSystem/src/JAudio2/dsptask.cpp - libs/JSystem/src/JAudio2/osdsp.cpp - libs/JSystem/src/JAudio2/osdsp_task.cpp libs/JSystem/src/JAudio2/JAIAudible.cpp libs/JSystem/src/JAudio2/JAIAudience.cpp libs/JSystem/src/JAudio2/JAISe.cpp diff --git a/src/dusk/audio/DspStub.cpp b/src/dusk/audio/DspStub.cpp new file mode 100644 index 0000000000..c2dec809f2 --- /dev/null +++ b/src/dusk/audio/DspStub.cpp @@ -0,0 +1,35 @@ +#include "JSystem/JAudio2/dspproc.h" +#include "JSystem/JAudio2/osdsp_task.h" +#include "JSystem/JAudio2/dsptask.h" +#include "global.h" +#include "os.h" + +void DSPReleaseHalt2(u32) { + CRASH("We do not directly emulate the DSP"); +} +void DsetupTable(u32, u32, u32, u32, u32) { + // Nada. +} +void DsetMixerLevel(f32) { + // Nada for now, but maybe we should care about this? +} +void DsyncFrame2ch(u32, u32, u32) { + CRASH("We do not directly emulate the DSP"); +} +void DsyncFrame4ch(u32, u32, u32, u32, u32) { + CRASH("We do not directly emulate the DSP"); +} + +void DspBoot(void (*)(void*)) { + CRASH("We do not directly emulate the DSP"); +} +void DspFinishWork(u16) { + CRASH("We do not directly emulate the DSP"); +} +int DSPSendCommands2(u32*, u32, void (*)(u16)) { + CRASH("We do not directly emulate the DSP"); +} + +void DsyncFrame2(u32, u32, u32) { + CRASH("We do not directly emulate the DSP"); +}