From 731bb93a36dc09bbb1072508632e9d649a74e018 Mon Sep 17 00:00:00 2001 From: coah Date: Thu, 1 Oct 2026 18:37:06 -0500 Subject: [PATCH 1/2] cleanup(iplAOSSThread): name stack sentinel like RakuStack Replace *(u32*)(mpStackBuffer + 0x3FC0) with AOSSStack::sentinel. --- src/scene/setting/iplAOSSThread.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/scene/setting/iplAOSSThread.cpp b/src/scene/setting/iplAOSSThread.cpp index 66175428..e2b02b55 100644 --- a/src/scene/setting/iplAOSSThread.cpp +++ b/src/scene/setting/iplAOSSThread.cpp @@ -64,6 +64,11 @@ namespace ipl { static s32 sAOSSState; static s32 sAOSSUnk; + struct AOSSStack { + u32 storage[4080]; + u32 sentinel; + }; + class AOSSThread : public utility::ut_thread { public: AOSSThread(EGG::Heap* heap); @@ -84,7 +89,7 @@ namespace ipl { private: s32 mState; // 0x32C s32 mThreadPriority; // 0x330 - u8* mpStackBuffer; // 0x334 + AOSSStack* mpStack; // 0x334 u8* mpHeapBuffer; // 0x338 MEMHeapHandle mpExpHeap; // 0x33C AOSSConfig mAoss; // 0x340 @@ -94,7 +99,7 @@ namespace ipl { mpExpHeap = NULL; sAOSSState = 0; mpHeapBuffer = (u8*)heap->alloc(0x40000, 0x20); - mpStackBuffer = (u8*)heap->alloc(0x1000, 0x20); + mpStack = (AOSSStack*)heap->alloc(0x1000, 0x20); } void AOSSThread::destroy(int flag) { @@ -137,8 +142,8 @@ namespace ipl { mThreadPriority = OSGetThreadPriority(OSGetCurrentThread()) - 2; sAOSSState = 1; SOInit(&config); - memset(mpStackBuffer, 0, 4); - Create(mpStackBuffer, 0x1000, mThreadPriority, TRUE); + memset(mpStack, 0, 4); + Create(mpStack, 0x1000, mThreadPriority, TRUE); OSRestoreInterrupts(level); return 1; @@ -178,7 +183,7 @@ namespace ipl { mAoss.unk_0x04 = 4; NETGetWirelessMacAddress(mAoss.mac); - *(u32*)(mpStackBuffer + 0x3FC0) = 0x97654321; + mpStack->sentinel = 0x97654321; mState = AOSSi_Init(&mAoss); AOSSi_EndLocal(); -- 2.49.1 From c1b00d8a140f06ef757217d2a8e0e5556265e5bb Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 18:37:29 -0500 Subject: [PATCH 2/2] cleanup(Date): drop unused lbl_816948F0 sdata2 decl (#649) Bare extern was never referenced; scDateZeroF remains. Verified ok + sha1 26116613f624061ba99c8d1a299aaa6efa85670d. --- src/scene/calendar/iplDate.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/scene/calendar/iplDate.cpp b/src/scene/calendar/iplDate.cpp index 46af79ce..a0a9b62a 100644 --- a/src/scene/calendar/iplDate.cpp +++ b/src/scene/calendar/iplDate.cpp @@ -313,7 +313,6 @@ namespace ipl { #pragma push #pragma section sconst_type ".sdata2" extern "C" const f32 scDateZeroF = 0.0f; - extern "C" const f32 lbl_816948F0; #pragma pop } // namespace scene } // namespace ipl -- 2.49.1