1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-16 21:05:12 +00:00

Match retail BSS ordering (#1927)

* Match retail BSS ordering

* Revert moving some global variables to headers

* Adjust block numbers after header changes

* Fix debug build

* Overlay bss ordering

* Fix BSS ordering after header changes

* gc-eu-mq OK

* Implement preprocessor for #pragma increment_block_number

* Transfer usage comment from reencode.sh

* Use temporary directory instead of temporary file

* Move ColChkMassType back
This commit is contained in:
cadmic 2024-04-14 14:51:32 -07:00 committed by GitHub
parent a94661054e
commit f643499462
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 224 additions and 165 deletions

View file

@ -1,7 +1,12 @@
#include "global.h"
#include "terminal.h"
OSThread gMainThread;
// For retail BSS ordering, the block number of sMainThread must be 0 or
// just above (the exact upper bound depends on the block numbers assigned to
// extern variables declared in headers).
#pragma increment_block_number 60
OSThread sMainThread;
STACK(sMainStack, 0x900);
StackEntry sMainStackInfo;
OSMesg sPiMgrCmdBuff[50];
@ -86,8 +91,8 @@ void Idle_ThreadEntry(void* arg) {
osViSwapBuffer((void*)0x803DA80); //! @bug Invalid vram address (probably intended to be 0x803DA800)
osCreatePiManager(OS_PRIORITY_PIMGR, &gPiMgrCmdQueue, sPiMgrCmdBuff, ARRAY_COUNT(sPiMgrCmdBuff));
StackCheck_Init(&sMainStackInfo, sMainStack, STACK_TOP(sMainStack), 0, 0x400, "main");
osCreateThread(&gMainThread, THREAD_ID_MAIN, Main_ThreadEntry, arg, STACK_TOP(sMainStack), THREAD_PRI_MAIN_INIT);
osStartThread(&gMainThread);
osCreateThread(&sMainThread, THREAD_ID_MAIN, Main_ThreadEntry, arg, STACK_TOP(sMainStack), THREAD_PRI_MAIN_INIT);
osStartThread(&sMainThread);
osSetThreadPri(NULL, OS_PRIORITY_IDLE);
for (;;) {}