mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
jaudio_NES: hack to link dspdriver
This commit is contained in:
+1
-1
@@ -771,7 +771,7 @@ config.libs = [
|
||||
Object(Matching, "jaudio_NES/internal/driverinterface.c"),
|
||||
Object(Matching, "jaudio_NES/internal/dsp_cardunlock.c"),
|
||||
Object(Matching, "jaudio_NES/internal/dsp_GBAKey.c"),
|
||||
Object(Equivalent, "jaudio_NES/internal/dspdriver.c", extra_cflags=["-vector on"]),
|
||||
Object(Matching, "jaudio_NES/internal/dspdriver.c", extra_cflags=["-vector on"]),
|
||||
Object(Matching, "jaudio_NES/internal/dspinterface.c"),
|
||||
Object(Matching, "jaudio_NES/internal/effect.c", extra_cflags=["-pragma \"scheduling 7400\""]),
|
||||
Object(Matching, "jaudio_NES/internal/fat.c"),
|
||||
|
||||
@@ -61,18 +61,18 @@ typedef enum DSPChannelAllocState {
|
||||
*/
|
||||
dspch_* AllocDSPchannel(u32 param_1, u32 param_2)
|
||||
{
|
||||
|
||||
jc_* jc = (jc_*)param_2;
|
||||
s32 i;
|
||||
u8 __stack_pad[1];
|
||||
jc_* p2 = (jc_*)param_2;
|
||||
s32* ip = &i;
|
||||
|
||||
if (param_1 == 0) {
|
||||
|
||||
for (i = 0; i < DSPCH_LENGTH; ++i) {
|
||||
if (DSPCH[i]._01 == DSPCHAN_Free) {
|
||||
DSPCH[i]._01 = DSPCHAN_MonoAllocated;
|
||||
DSPCH[i]._08 = p2;
|
||||
DSPCH[i]._03 = 1;
|
||||
dspch_* ch = &DSPCH[i];
|
||||
if (!ch->_01) {
|
||||
// what the hell is this LOL, whatever it matches
|
||||
ch = (dspch_*)&((volatile dspch_*)DSPCH)[i];
|
||||
ch->_01 = true;
|
||||
ch->_08 = jc;
|
||||
ch->_03 = 1;
|
||||
DSP_AllocInit(i);
|
||||
return &DSPCH[i];
|
||||
}
|
||||
@@ -82,13 +82,13 @@ dspch_* AllocDSPchannel(u32 param_1, u32 param_2)
|
||||
|
||||
for (i = 1; i < DSPCH_LENGTH; i += 2) {
|
||||
|
||||
if (DSPCH[i]._01 != DSPCHAN_Free || DSPCH[i - 1]._01 != DSPCHAN_Free)
|
||||
if (DSPCH[i]._01 || DSPCH[i - 1]._01)
|
||||
continue;
|
||||
|
||||
DSPCH[i]._01 = DSPCHAN_StereoRight;
|
||||
DSPCH[i - 1]._01 = DSPCHAN_StereoLeft;
|
||||
DSPCH[i]._08 = p2;
|
||||
DSPCH[i - 1]._08 = p2;
|
||||
DSPCH[i]._01 = 3;
|
||||
DSPCH[i - 1]._01 = 2;
|
||||
DSPCH[i]._08 = jc;
|
||||
DSPCH[i - 1]._08 = jc;
|
||||
DSP_AllocInit(i);
|
||||
DSP_AllocInit(i - 1);
|
||||
return &DSPCH[i - 1];
|
||||
|
||||
Reference in New Issue
Block a user