diff --git a/configure.py b/configure.py index 8b8eda8f..461517dc 100755 --- a/configure.py +++ b/configure.py @@ -1194,6 +1194,7 @@ config.libs = [ Object(Matching, "musyx/runtime/dsp_import.c"), Object(Matching, "musyx/runtime/hw_dolphin.c"), Object(Matching, "musyx/runtime/hw_memory.c"), + Object(Matching, "musyx/runtime/hw_lib_dummy.c"), Object(Matching, "musyx/runtime/CheapReverb/creverb_fx.c"), Object(Matching, "musyx/runtime/CheapReverb/creverb.c"), Object(Matching, "musyx/runtime/StdReverb/reverb_fx.c"), diff --git a/include/musyx/hardware.h b/include/musyx/hardware.h index da88f97d..dc4f1d36 100644 --- a/include/musyx/hardware.h +++ b/include/musyx/hardware.h @@ -35,6 +35,8 @@ void hwSetFilter(unsigned long v, unsigned char mode, unsigned short coefA, unsi void hwLowPassFrqToCoef(unsigned long frq, unsigned short* _a0, unsigned short* _b1); #endif +extern u32 aramSize; +extern u8* aramBase; #ifdef __cplusplus } #endif diff --git a/include/musyx/musyx_priv.h b/include/musyx/musyx_priv.h index 5fc82e2b..f28df748 100644 --- a/include/musyx/musyx_priv.h +++ b/include/musyx/musyx_priv.h @@ -513,7 +513,7 @@ typedef struct SYNTH_VOICE { u32 id; // offset 0xF4, size 0x4 VID_LIST* vidList; // offset 0xF8, size 0x4 VID_LIST* vidMasterList; // offset 0xFC, size 0x4 -#if MUSY_VERSION <= MUSY_VERSION_CHECK(2, 0, 0) +#if MUSY_VERSION > MUSY_VERSION_CHECK(1, 5, 3) && MUSY_VERSION <= MUSY_VERSION_CHECK(2, 0, 0) u16 allocId; // offset 0x100, size 0x2 #else u32 allocId; diff --git a/include/musyx/synth.h b/include/musyx/synth.h index 7a8c7e74..fc1c9d0d 100644 --- a/include/musyx/synth.h +++ b/include/musyx/synth.h @@ -36,7 +36,7 @@ bool synthIsFadeOutActive(u8 vGroup); /* TODO: Move this where it belongs */ void hwSetAUXProcessingCallbacks(u8 studio, SND_AUX_CALLBACK auxA, void* userA, SND_AUX_CALLBACK auxB, void* userB); - +u32 voiceBlock(u8 prio); MSTEP* dataGetMacro(u16 mid); u32 voiceAllocate(u8 priority, u8 maxVoices, u16 allocId, u8 fxFlag); diff --git a/src/musyx/runtime/hw_lib_dummy.c b/src/musyx/runtime/hw_lib_dummy.c new file mode 100644 index 00000000..c8856bd3 --- /dev/null +++ b/src/musyx/runtime/hw_lib_dummy.c @@ -0,0 +1,4 @@ +#include "musyx/musyx.h" + +u32 aramSize = 0; +u8* aramBase = NULL; diff --git a/src/musyx/runtime/synthvoice.c b/src/musyx/runtime/synthvoice.c index f7fad91c..6a837897 100644 --- a/src/musyx/runtime/synthvoice.c +++ b/src/musyx/runtime/synthvoice.c @@ -350,7 +350,7 @@ void synthInitAllocationAids() { voiceMusicRunning = 0; } -u32 voiceBlock(unsigned char prio) { +u32 voiceBlock(u8 prio) { u32 voice; if ((voice = voiceAllocate(prio, 0xFF, 0xFFFF, 1)) != 0xFFFFFFFF) {