Skip to content

Commit

Permalink
get rid of undefined syms
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoSucks committed Aug 19, 2024
1 parent 796f597 commit 5c8c7f4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
14 changes: 0 additions & 14 deletions linker_scripts/us/undefined_syms.ld
Original file line number Diff line number Diff line change
@@ -1,14 +0,0 @@
D_80078580 = 0x80078580;
D_80078584 = 0x80078584;
D_8007A860 = 0x8007A860;
D_8007A868 = 0x8007A868;
__osRunningThread = 0x80079630;
D_80080001 = 0x80080001;
D_80083ACC = 0x80083ACC;
__osGlobalIntMask = 0x800796B0;
piThreadStack = 0x801026D0;
LEOZONE_OUTERCYL_TBL = 0x8007DD08;
LEOinterruptThreadStack = 0x80100638;
.L8120A860 = 0x8120A860;
gShowCPUProfiler = 0x80068BC0;
gShowMEMProfiler = 0x80068BC4;
2 changes: 1 addition & 1 deletion src/libleo/leofunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void leoInitialize(OSPri compri, OSPri intpri, OSMesg* command_que_buf, u32 cmd_
osCreateMesgQueue(&LEOpost_que, LEOpost_que_buf, ARRAY_COUNT(LEOpost_que_buf));
osCreateThread(&LEOcommandThread, 1, leomain, NULL, LEOcommandThreadStack, compri);
osStartThread(&LEOcommandThread);
osCreateThread(&LEOinterruptThread, 1, leointerrupt, NULL, LEOinterruptThreadStack, intpri);
osCreateThread(&LEOinterruptThread, 1, leointerrupt, NULL, (u32)&LEOcommand_que, intpri); // this is not a stack. TODO: what is this call doing?
osStartThread(&LEOinterruptThread);
osSetEventMesg(OS_EVENT_CART, &LEOevent_que, (OSMesg)0x30000);
osSendMesg(&LEOblock_que, NULL, 0);
Expand Down
12 changes: 6 additions & 6 deletions src/libleo/leointerrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
extern OSThread* __osRunQueue;
extern OSThread* __osPopThread(OSThread**);
extern void __osEnqueueThread(OSThread**, OSThread*);
extern OSIntMask __osGlobalIntMask;
extern OSIntMask __OSGlobalIntMask;
void __osLeoAbnormalResume(void);
void __osLeoResume(void);
extern s32 osEPiRawStartDma(OSPiHandle*, s32, u32, void*, u32);
Expand All @@ -20,7 +20,7 @@ s32 __osLeoInterrupt(void) {

pi_stat = HW_REG(PI_STATUS_REG, u32);
if (pi_stat & PI_STATUS_DMA_BUSY) {
__osGlobalIntMask &= ~0x800;
__OSGlobalIntMask &= ~0x800;
blockInfo->errStatus = 0x1D;
__osLeoResume();
return 1;
Expand Down Expand Up @@ -55,7 +55,7 @@ s32 __osLeoInterrupt(void) {
blockInfo->errStatus = 0x16;
__osLeoResume();
HW_REG(PI_STATUS_REG, u32) = 2;
__osGlobalIntMask |= 0x100401;
__OSGlobalIntMask |= 0x100401;
return 1;
}
if (info->cmdType == 1) {
Expand All @@ -66,7 +66,7 @@ s32 __osLeoInterrupt(void) {
return 1;
}
HW_REG(PI_STATUS_REG, u32) = 2;
__osGlobalIntMask |= 0x100401;
__OSGlobalIntMask |= 0x100401;
blockInfo->errStatus = 0;
__osLeoResume();
return 1;
Expand Down Expand Up @@ -121,7 +121,7 @@ s32 __osLeoInterrupt(void) {
blockInfo->errStatus = 0x16;
} else {
HW_REG(PI_STATUS_REG, u32) = 2;
__osGlobalIntMask |= 0x100401;
__OSGlobalIntMask |= 0x100401;
info->cmdType = 2;
blockInfo->errStatus = 0;
}
Expand Down Expand Up @@ -184,7 +184,7 @@ void __osLeoAbnormalResume(void) {
HW_REG(0x5000510, u32) = info->bmCtlShadow;
__osLeoResume();
HW_REG(PI_STATUS_REG, u32) = 2;
__osGlobalIntMask |= 0x100401;
__OSGlobalIntMask |= 0x100401;
}

void __osLeoResume(void) {
Expand Down
3 changes: 2 additions & 1 deletion src/stage_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ typedef struct unk_D_80068CA0 {
/* 0x08 */ s8 unk_08[4];
} unk_D_80068CA0; // size = 0xC

static s32 D_80068BC0_Pad[2] = { 0, 0 };
s32 gShowCPUProfiler = 0;
s32 gShowMEMProfiler = 0;

static Mtx D_80068BC8 = { {
{
Expand Down

0 comments on commit 5c8c7f4

Please sign in to comment.