Rename `MQ_CONTROLLER` to `nuSiMesgQ`
This commit is contained in:
parent
02e99d32be
commit
f16e493d79
|
|
@ -139,19 +139,16 @@ extern OSThread THREAD_CONTROLLER;
|
|||
|
||||
extern OSMesg D_800BBE60[8];
|
||||
|
||||
extern OSMesgQueue MQ_CONTROLLER;
|
||||
extern OSMesgQueue MQ_800E7988;
|
||||
extern OSThread THREAD_CONTROLLER;
|
||||
|
||||
extern OSPiHandle* PTR_CART_ROM_HANDLE;
|
||||
|
||||
extern s32 D_800C4B30;
|
||||
extern OSMesgQueue MQ_CONTROLLER;
|
||||
extern OSMesgQueue MQ_800E9BF0;
|
||||
extern u8 D_800A9FF8;
|
||||
|
||||
extern OSContStatus __GLOBAL_CONT_STATUS[MAXCONTROLLERS];
|
||||
extern OSMesgQueue MQ_CONTROLLER;
|
||||
extern void (*D_800A9FE0)(s16);
|
||||
extern OSMesgQueue MQ_800C4A00;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ gFrameBuf1 = 0x803B5000;
|
|||
gFrameBuf2 = 0x803DA800;
|
||||
rdpstateinit_dl = 0x800A9EF0; // rom:0x3A2F0
|
||||
nuGfxDisplay = 0x800C4BD8;
|
||||
nuSiMesgQ = 0x800E9B88;
|
||||
|
||||
nuBoot = 0x8007F880;
|
||||
nuScCreateScheduler = 0x80088C50; // rom:0x19050
|
||||
|
|
@ -896,7 +897,6 @@ __MUS_MEM_800B186C = 0x800B186C;
|
|||
__MUS_MEM_800B1870 = 0x800B1870;
|
||||
__MUS_MEM_800B1868 = 0x800B1868;
|
||||
|
||||
MQ_CONTROLLER = 0x800E9B88;
|
||||
MQ_SWAP_BUFFER = 0x800E9BA8;
|
||||
MQ_800E7988 = 0x800E7988;
|
||||
MQ_800C4A00 = 0x800C4A00;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
/* 1A060 80089C60 */
|
||||
u8 nuSiMgrInit(void) {
|
||||
u8 pattern;
|
||||
OSContStatus data[3];
|
||||
OSContStatus status[NU_CONT_MAXCONTROLLERS];
|
||||
|
||||
osCreateMesgQueue(&MQ_CONTROLLER, D_800BBE60, 8);
|
||||
osSetEventMesg(OS_EVENT_SI, &MQ_CONTROLLER, NULL);
|
||||
osCreateMesgQueue(&nuSiMesgQ, D_800BBE60, 8);
|
||||
osSetEventMesg(OS_EVENT_SI, &nuSiMesgQ, NULL);
|
||||
|
||||
osContInit(&MQ_CONTROLLER, &pattern, data);
|
||||
osContInit(&nuSiMesgQ, &pattern, status);
|
||||
|
||||
osCreateThread(&THREAD_CONTROLLER, 5, __controller_thread_80089D9C, NULL, &MQ_800BE030, 0x73);
|
||||
osStartThread(&THREAD_CONTROLLER);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void func_8008A5D0();
|
||||
void func_8008A640();
|
||||
|
||||
|
|
@ -54,11 +56,11 @@ void __end_copy_global_controller_data(void) {
|
|||
s32 __read_controller(OSContPad* data, u32 flags) {
|
||||
s32 res;
|
||||
|
||||
res = osContStartReadData(&MQ_CONTROLLER);
|
||||
res = osContStartReadData(&nuSiMesgQ);
|
||||
if(res != 0)
|
||||
return res;
|
||||
|
||||
osRecvMesg(&MQ_CONTROLLER, NULL, OS_MESG_BLOCK);
|
||||
osRecvMesg(&nuSiMesgQ, NULL, OS_MESG_BLOCK);
|
||||
if (!(flags & D_800C4B30)) {
|
||||
func_8008A354();
|
||||
osContGetReadData(data);
|
||||
|
|
@ -72,9 +74,9 @@ s32 __read_controller(OSContPad* data, u32 flags) {
|
|||
s32 __real_read_controller(void) {
|
||||
s32 var_v0;
|
||||
|
||||
var_v0 = osContStartQuery(&MQ_CONTROLLER);
|
||||
var_v0 = osContStartQuery(&nuSiMesgQ);
|
||||
if (var_v0 == 0) {
|
||||
osRecvMesg(&MQ_CONTROLLER, NULL, OS_MESG_BLOCK);
|
||||
osRecvMesg(&nuSiMesgQ, NULL, OS_MESG_BLOCK);
|
||||
osContGetQuery(__GLOBAL_CONT_STATUS);
|
||||
return 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue