Changed `obStackMain` to be used differently in different functions as I think it's an alias

This commit is contained in:
gijs 2023-10-18 17:33:01 +02:00
parent 129cce1e39
commit 97b0b10970
3 changed files with 40 additions and 2 deletions

View File

@ -363,7 +363,7 @@ extern void obIdle(void*);
extern void obMain(void*); extern void obMain(void*);
extern OSThread obThreadMain; extern OSThread obThreadMain;
extern u8 obStackMain[]; // extern u8 obStackMain[];
extern OSThread obThreadIdle; extern OSThread obThreadIdle;
extern u8 obStackIdle[]; extern u8 obStackIdle[];

View File

@ -1,7 +1,43 @@
#include "common.h" #include "common.h"
void func_8008A5D0();
void func_8008A640();
extern OSMesg OSMESG_800BE190;
extern OSMesg OSMESG_800BE194;
extern u32 obStackMain;
/* 1A660 8008A260 */
u8 func_8008A260(void) {
s32 var_a0;
s32 var_a1;
s32 var_v1;
func_8008A5D0();
osCreateMesgQueue(&MQ_800C4A00, &OSMESG_800BE190, 1);
osCreateMesgQueue(&MQ_800E9BF0, &OSMESG_800BE194, 1);
func_8008B130(&D_800A9FF8);
func_8008A640();
var_a0 = 1;
var_a1 = 0;
var_v1 = 0;
obStackMain = 0;
for(; var_v1 < MAXCONTROLLERS; var_v1++) {
if (__GLOBAL_CONT_STATUS[var_v1].errno == 0) {
if ((__GLOBAL_CONT_STATUS[var_v1].type & CONT_TYPE_MASK) == CONT_TYPE_NORMAL) {
var_a1 |= var_a0;
obStackMain += 1;
}
var_a0 *= 2;
}
}
return var_a1;
}
INCLUDE_ASM(const s32, "_ob_prized_reading", func_8008A260);
void func_8008A334(void) { void func_8008A334(void) {
func_8008B1D0(&D_800A9FF8); func_8008B1D0(&D_800A9FF8);

View File

@ -1,5 +1,7 @@
#include "common.h" #include "common.h"
extern u8 obStackMain[];
void boot(void) { void boot(void) {
osInitialize(); osInitialize();
osCreateThread(&obThreadIdle, 1, obIdle, NULL, obStackIdle, 0xA); osCreateThread(&obThreadIdle, 1, obIdle, NULL, obStackIdle, 0xA);