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