Add proper symbol for `obStackMain`

This commit is contained in:
gijs 2023-10-21 22:05:37 +02:00
parent 1a1dd9503f
commit ac627304f0
4 changed files with 7 additions and 8 deletions

View File

@ -292,8 +292,6 @@ extern void nuBoot(void);
extern void obMain(void*); extern void obMain(void*);
extern OSThread obThreadMain;
extern OverlaySomething __OVERLAY_INFO_resets_menu_timer; extern OverlaySomething __OVERLAY_INFO_resets_menu_timer;
extern void* D_8018FB0C[]; extern void* D_8018FB0C[];
extern OverlaySomething __OVERLAY_INFO_8018FAF8; extern OverlaySomething __OVERLAY_INFO_8018FAF8;

View File

@ -62,7 +62,7 @@ extern "C" {
/*--------------------------------------*/ /*--------------------------------------*/
//#define NU_IDLE_STACK_SIZE 0x2000 /* Idle thread */ //#define NU_IDLE_STACK_SIZE 0x2000 /* Idle thread */
#define NU_RMON_STACK_SIZE 0x2000 /* Rmon thread */ #define NU_RMON_STACK_SIZE 0x2000 /* Rmon thread */
#define NU_MAIN_STACK_SIZE NU_SPEC_BOOT_STACK_SIZE /* Main thread */ //#define NU_MAIN_STACK_SIZE NU_SPEC_BOOT_STACK_SIZE /* Main thread */

View File

@ -1027,12 +1027,9 @@ __ERROR_BAD_TABLE = 0x800AE338;
__VIRTUAL_MEMORY_EXHAUSTED = 0x800AE35C; __VIRTUAL_MEMORY_EXHAUSTED = 0x800AE35C;
__virtual_mem_alloc = 0x80070F30; __virtual_mem_alloc = 0x80070F30;
obMain = 0x80071EB0; obMain = 0x80071EB0;
obThreadMain = 0x800AF5F0; obThreadMain = 0x800AF5F0;
obStackMain = 0x800C4CF0;
entry = 0x80070C00; entry = 0x80070C00;

View File

@ -3,10 +3,14 @@
#include "nu/nusys.h" #include "nu/nusys.h"
#define NU_IDLE_STACK_SIZE 0x1790 #define NU_IDLE_STACK_SIZE 0x1790
#define OB_MAIN_STACK_SIZE 0x2070
extern OSThread nuThreadIdle; extern OSThread nuThreadIdle;
extern u64 nuStackIdle[NU_IDLE_STACK_SIZE / sizeof(u64)]; extern u64 nuStackIdle[NU_IDLE_STACK_SIZE / sizeof(u64)];
extern OSThread obThreadMain;
extern u64 obStackMain[OB_MAIN_STACK_SIZE / sizeof(u64)];
void nuIdle(void* arg); void nuIdle(void* arg);
void nuBoot(void) { void nuBoot(void) {
@ -23,7 +27,7 @@ void nuIdle(void* arg) {
osViSetSpecialFeatures(OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF); osViSetSpecialFeatures(OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON | OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF);
osCreateThread(&obThreadMain, NU_MAIN_THREAD_ID, obMain, NULL, &nuContNum, NU_MAIN_THREAD_PRI); osCreateThread(&obThreadMain, NU_MAIN_THREAD_ID, obMain, NULL, obStackMain + OB_MAIN_STACK_SIZE / sizeof(u64), NU_MAIN_THREAD_PRI);
osStartThread(&obThreadMain); osStartThread(&obThreadMain);
osSetThreadPri(&nuThreadIdle, NU_IDLE_THREAD_PRI); osSetThreadPri(&nuThreadIdle, NU_IDLE_THREAD_PRI);