1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-03 01:54:37 +00:00
oot/src/libultra_code/__osSpSetPc.c

16 lines
291 B
C
Raw Normal View History

2020-03-17 00:31:30 -04:00
#include <ultra64.h>
#include <global.h>
#include <ultra64/hardware.h>
s32 __osSpSetPc(void* pc) {
register u32 spStatus = HW_REG(SP_STATUS_REG, u32);
2020-03-17 00:31:30 -04:00
2020-03-22 22:19:43 +01:00
if (!(spStatus & SP_STATUS_HALT)) {
2020-03-17 00:31:30 -04:00
return -1;
} else {
HW_REG(SP_PC_REG, void*) = pc;
}
2020-03-17 00:31:30 -04:00
return 0;
}