Rename `func_80089CF8` to `nuSiSendMesg` and clean it up
This commit is contained in:
parent
6eb644c5cf
commit
3896f82bbc
|
|
@ -172,8 +172,6 @@ extern void __calls_osViBlack(bool black);
|
|||
|
||||
extern void __osViSwapBuffer_3(void** buffers);
|
||||
|
||||
extern s32 func_80089CF8(s16 arg0, s32 arg1);
|
||||
|
||||
extern void __start_copy_global_controller_data(void);
|
||||
extern void __end_copy_global_controller_data(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ nuGfxDisplayOff = 0x80089BC0;
|
|||
nuGfxDisplayOn = 0x80089C50;
|
||||
nuSiMgrInit = 0x80089C60;
|
||||
nuSiMgrThread = 0x80089D9C;
|
||||
nuSiSendMesg = 0x80089CF8;
|
||||
|
||||
|
||||
obCurrentTime = 0x800C47D0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void __copy_global_controller_data(OSContPad* arg0) {
|
||||
__start_copy_global_controller_data();
|
||||
bcopy(&__GLOBAL_CONTROLLER_DATA, arg0, 0x18);
|
||||
|
|
@ -7,7 +9,7 @@ void __copy_global_controller_data(OSContPad* arg0) {
|
|||
}
|
||||
|
||||
void func_8008A640(void) {
|
||||
func_80089CF8(0x103, 0);
|
||||
nuSiSendMesg(0x103, 0);
|
||||
}
|
||||
|
||||
void __set_fp_8008A660(void(*arg0)(s16)) {
|
||||
|
|
|
|||
|
|
@ -20,31 +20,24 @@ u8 nuSiMgrInit(void) {
|
|||
return pattern;
|
||||
}
|
||||
|
||||
s32 func_80089CF8(s16 arg0, s32 arg1) {
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x4 */ OSMesgQueue* msgQueue;
|
||||
/* 0x8 */ s32 unk8;
|
||||
/* 0xC */ s32 unkC;
|
||||
} Message; // size 0x10
|
||||
|
||||
OSMesgQueue sp10;
|
||||
Message msg;
|
||||
s32 nuSiSendMesg(NUScMsg mesg, void* dataPtr) {
|
||||
OSMesgQueue rtnMesgQ;
|
||||
NUSiCommonMesg siCommonMesg;
|
||||
OSMesg sp38; // maybe this is part of the struct?
|
||||
|
||||
msg.unk0 = arg0;
|
||||
msg.unkC = arg1;
|
||||
msg.msgQueue = &sp10;
|
||||
siCommonMesg.mesg = mesg;
|
||||
siCommonMesg.dataPtr = dataPtr;
|
||||
siCommonMesg.rtnMesgQ = &rtnMesgQ;
|
||||
|
||||
osCreateMesgQueue(&sp10, &sp38, 1);
|
||||
osSendMesg(&MQ_800E7988, &msg, OS_MESG_BLOCK);
|
||||
osRecvMesg(&sp10, NULL, OS_MESG_BLOCK);
|
||||
osCreateMesgQueue(&rtnMesgQ, &sp38, 1);
|
||||
osSendMesg(&MQ_800E7988, &siCommonMesg, OS_MESG_BLOCK);
|
||||
osRecvMesg(&rtnMesgQ, NULL, OS_MESG_BLOCK);
|
||||
|
||||
return msg.unk8;
|
||||
return siCommonMesg.error;
|
||||
}
|
||||
|
||||
void func_80089D5C(void) {
|
||||
func_80089CF8(0x7F00, 0);
|
||||
nuSiSendMesg(0x7F00, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue