mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2025-02-20 05:02:14 +00:00
_spu_FiDMA (#914)
Trying the remaining one from this again https://github.com/Xeeynamo/sotn-decomp/pull/859 https://decomp.me/scratch/ergMa
This commit is contained in:
parent
2d2eb200f1
commit
b3160407b5
@ -23,8 +23,9 @@ typedef struct tagSpuMalloc {
|
||||
u32 size;
|
||||
} SPU_MALLOC;
|
||||
|
||||
extern s32 D_80033550;
|
||||
extern void (* volatile _spu_transferCallback)();
|
||||
extern s32 _spu_inTransfer;
|
||||
extern s32 _spu_transferCallback;
|
||||
|
||||
void _SpuCallback(s32 arg0);
|
||||
extern void (*_spu_IRQCallback)();
|
||||
|
@ -9,7 +9,6 @@ extern s32 D_80033568[];
|
||||
extern s32 _spu_EVdma;
|
||||
extern s32 _spu_mem_mode_plus;
|
||||
extern s32 _spu_transMode;
|
||||
extern volatile s32 _spu_transferCallback;
|
||||
|
||||
s32 SpuClearReverbWorkArea(s32 rev_mode) {
|
||||
volatile s32 callback;
|
||||
|
@ -25,7 +25,33 @@ INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libspu/spu", _spu_init);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libspu/spu", _spu_writeByIO);
|
||||
|
||||
INCLUDE_ASM("asm/us/main/nonmatchings/psxsdk/libspu/spu", _spu_FiDMA);
|
||||
void _spu_FiDMA(void) {
|
||||
volatile s32 sp0;
|
||||
volatile s32 sp4;
|
||||
s32 var_v1;
|
||||
volatile SPU_RXX* rxx;
|
||||
|
||||
if (D_80033550 == 0) {
|
||||
WASTE_TIME();
|
||||
WASTE_TIME();
|
||||
WASTE_TIME();
|
||||
}
|
||||
|
||||
rxx = &_spu_RXX->rxx;
|
||||
rxx->spucnt &= 0xFFCF;
|
||||
|
||||
for (var_v1 = 0; rxx->spucnt & 0x30; var_v1++) {
|
||||
if (var_v1 + 1 > 0xF00) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_spu_transferCallback) {
|
||||
_spu_transferCallback();
|
||||
return;
|
||||
}
|
||||
DeliverEvent(0xF0000009U, 0x20U);
|
||||
}
|
||||
|
||||
extern s32* D_80033508;
|
||||
extern s32* D_8003350C;
|
||||
|
Loading…
x
Reference in New Issue
Block a user