mirror of https://github.com/zeldaret/mm.git
osspsetpc OK (#384)
This commit is contained in:
parent
e3830f6ab0
commit
78153a1bf4
|
@ -478,7 +478,7 @@ float __ull_to_f(unsigned long long l);
|
|||
// void osVoiceControlGain(void);
|
||||
// void osVoiceStartReadData(void);
|
||||
void* osViGetCurrentFramebuffer(void);
|
||||
s32 __osSpSetPc(void* data);
|
||||
s32 __osSpSetPc(void* pc);
|
||||
// void __osVoiceContWrite4(void);
|
||||
void __osGetHWIntrRoutine(s32 idx, OSMesgQueue** outQueue, OSMesg* outMsg);
|
||||
void __osSetHWIntrRoutine(s32 idx, OSMesgQueue* queue, OSMesg msg);
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/spsetpc/__osSpSetPc.s")
|
||||
s32 __osSpSetPc(void* pc) {
|
||||
register u32 spStatus = HW_REG(SP_STATUS_REG, u32);
|
||||
|
||||
if (!(spStatus & SP_STATUS_HALT)) {
|
||||
return -1;
|
||||
} else {
|
||||
HW_REG(SP_PC_REG, void*) = pc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue