mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Bit of renaming, bit of cleanup, bit of matching it has it all (#350)
* Update racer.c * name two stack vars * name few func * match func_8002AD08 * bit of cleanup * m * stack related cleanup * Update game.c * changed my mind * simplification * more * Update osCreatePiManager.c
This commit is contained in:
@@ -12,7 +12,7 @@ extern OSDevMgr __osPiDevMgr;
|
||||
|
||||
// bss variables
|
||||
OSThread piThread;
|
||||
u8 piThreadStack_2[256]; // piThreadStack[OS_PIM_STACKSIZE]; Shouldn't this be piThreadStack?
|
||||
u64 gPIMgrStack[0x20];
|
||||
OSMesgQueue piEventQueue;
|
||||
OSMesg piEventBuf[2];
|
||||
|
||||
@@ -41,7 +41,7 @@ void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgC
|
||||
__osPiDevMgr.dma = osPiRawStartDma;
|
||||
__osPiDevMgr.edma = osEPiRawStartDma;
|
||||
|
||||
osCreateThread(&piThread, 0, __osDevMgrMain, &__osPiDevMgr, &piThreadStack[OS_PIM_STACKSIZE], pri);
|
||||
osCreateThread(&piThread, 0, __osDevMgrMain, &__osPiDevMgr, &gPIMgrStack[0x20], pri);
|
||||
osStartThread(&piThread);
|
||||
__osRestoreInt(savedMask);
|
||||
if (oldPri != -1) {
|
||||
|
||||
@@ -21,7 +21,7 @@ s32 gLeoFound = FALSE;
|
||||
s32 __osLeoInterrupt(void);
|
||||
|
||||
extern s32 osViClock; //This is defined in another file somehow
|
||||
extern s32 gThread30Stack; //TODO: This should be __osFinalrom. Is this reused?
|
||||
extern u64 *gThread30StackPointer; //TODO: This should be __osFinalrom. Is this reused?
|
||||
//u32 __osFinalrom;
|
||||
void osInitialize() {
|
||||
u32 pifdata;
|
||||
@@ -29,7 +29,7 @@ void osInitialize() {
|
||||
u32 leostatus;
|
||||
u32 pistatus;
|
||||
//__osFinalrom = TRUE;
|
||||
gThread30Stack = TRUE; //TODO: This should be __osFinalrom. Is this reused?
|
||||
gThread30StackPointer = (u64 *) TRUE; //TODO: This should be __osFinalrom. Is this reused?
|
||||
__osSetSR(__osGetSR() | SR_CU1); //enable fpu
|
||||
__osSetFpcCsr(FPCSR_FS | FPCSR_EV); //flush denorm to zero, enable invalid operation
|
||||
|
||||
|
||||
@@ -12,17 +12,15 @@ extern u32 __osBaseCounter;
|
||||
extern u32 __osViIntrCount;
|
||||
|
||||
OSDevMgr __osViDevMgr = {0};
|
||||
|
||||
#define OS_VIM_STACKSIZE 4096
|
||||
u8 viThreadStack[2960]; // Should be OS_VIM_STACKSIZE?
|
||||
|
||||
s32 gThread30Stack;
|
||||
u64 gThread30Stack[0x400];
|
||||
u64 *gThread30StackPointer;
|
||||
|
||||
extern OSThread viThread;
|
||||
extern OSMesgQueue viEventQueue;
|
||||
extern OSMesg viEventBuf[5];
|
||||
extern OSIoMesg viRetraceMsg;
|
||||
extern OSIoMesg viCounterMsg;
|
||||
extern u64 gViMgrStack[0x20];
|
||||
|
||||
void viMgrMain(void *arg);
|
||||
|
||||
@@ -55,7 +53,7 @@ void osCreateViManager(OSPri pri) {
|
||||
__osViDevMgr.acsQueue = NULL;
|
||||
__osViDevMgr.dma = NULL;
|
||||
__osViDevMgr.edma = NULL;
|
||||
osCreateThread(&viThread, 0, viMgrMain, &__osViDevMgr, &viThreadStack[OS_VIM_STACKSIZE], pri);
|
||||
osCreateThread(&viThread, 0, viMgrMain, &__osViDevMgr, &gViMgrStack[0x20], pri);
|
||||
__osViInit();
|
||||
osStartThread(&viThread);
|
||||
__osRestoreInt(savedMask);
|
||||
|
||||
+2
-1
@@ -14,7 +14,8 @@ u32 __osSiAccessQueueEnabled = 0;
|
||||
static OSMesg siAccessBuf[SI_Q_BUF_LEN];
|
||||
OSMesgQueue __osSiAccessQueue;
|
||||
OSPifRam __osEepPifRam;
|
||||
s32 viThread[172];
|
||||
OSThread viThread;
|
||||
u64 gViMgrStack[0x20];
|
||||
s32 viEventQueue[6];
|
||||
s32 viEventBuf[6];
|
||||
s32 viRetraceMsg[6];
|
||||
|
||||
Reference in New Issue
Block a user