Compare commits

...

2 Commits

Author SHA1 Message Date
coah
f8dca58c09 cleanup: rename AOSSThread SO alloc/free callbacks
Rename AOSSThread_813FCC8C/E4 to aossAlloc/aossFree. DOL sha1 unchanged.
2026-10-01 16:56:02 -05:00
coah
a348c9777a cleanup: rename HBMController alarm-created flag (#490)
Rename lbl_816989BC to sAlarmCreated. DOL sha1 unchanged.
2026-10-01 16:55:12 -05:00
4 changed files with 14 additions and 14 deletions

View File

@@ -5126,8 +5126,8 @@ __ct__Q33ipl5scene10AOSSThreadFPQ23EGG4Heap = .text:0x813FCA0C; // type:function
destroy__Q33ipl5scene10AOSSThreadFi = .text:0x813FCAA0; // type:function size:0x84
__dt__Q33ipl5scene10AOSSThreadFv = .text:0x813FCB24; // type:function size:0x70
start__Q33ipl5scene10AOSSThreadFv = .text:0x813FCB94; // type:function size:0xF8
AOSSThread_813FCC8C__Q33ipl5scene10AOSSThreadFv = .text:0x813FCC8C; // type:function size:0x58
AOSSThread_813FCCE4__Q33ipl5scene10AOSSThreadFv = .text:0x813FCCE4; // type:function size:0x50
aossAlloc__Q33ipl5scene10AOSSThreadFv = .text:0x813FCC8C; // type:function size:0x58
aossFree__Q33ipl5scene10AOSSThreadFv = .text:0x813FCCE4; // type:function size:0x50
Run__Q33ipl5scene10AOSSThreadFv = .text:0x813FCD34; // type:function size:0xEC
cancel__Q33ipl5scene10AOSSThreadFv = .text:0x813FCE20; // type:function size:0x50
finish__Q33ipl5scene10AOSSThreadFP13NCDAossConfigPi = .text:0x813FCE70; // type:function size:0x2FC
@@ -23331,7 +23331,7 @@ opera_callbacks__Q23www10wiisetting = .sbss:0x816989A0; // type:object size:0x4
sStatus__Q23www9arcreader = .sbss:0x816989A8; // type:object size:0x4 scope:local data:4byte
lbl_816989B0 = .sbss:0x816989B0; // type:object size:0x4 data:4byte
sBatteryFlag__Q210homebutton10Controller = .sbss:0x816989B8; // type:object size:0x4
lbl_816989BC__Q210homebutton10Controller = .sbss:0x816989BC; // type:object size:0x4
sAlarmCreated__Q210homebutton10Controller = .sbss:0x816989BC; // type:object size:0x4
suIDCounter__Q310homebutton3gui11PaneManager = .sbss:0x816989C0; // type:object size:0x4 data:4byte
spInstance__Q210homebutton9RemoteSpk = .sbss:0x816989C8; // type:object size:0x4 data:4byte
InvalidShutdown = .sbss:0x816989D0; // type:object size:0x4 data:4byte

View File

@@ -75,7 +75,7 @@ namespace homebutton {
private:
static bool sBatteryFlag[WPAD_MAX_CONTROLLERS];
static bool lbl_816989BC[WPAD_MAX_CONTROLLERS];
static bool sAlarmCreated[WPAD_MAX_CONTROLLERS];
static OSAlarm sAlarm[WPAD_MAX_CONTROLLERS];
static OSAlarm sAlarmSoundOff[WPAD_MAX_CONTROLLERS];

View File

@@ -17,7 +17,7 @@ extern "C" void __dt__Q34nw4r3snd11SoundHandleFv(nw4r::snd::SoundHandle*, int);
namespace homebutton {
bool Controller::sBatteryFlag[WPAD_MAX_CONTROLLERS];
bool Controller::lbl_816989BC[WPAD_MAX_CONTROLLERS];
bool Controller::sAlarmCreated[WPAD_MAX_CONTROLLERS];
OSAlarm Controller::sAlarm[WPAD_MAX_CONTROLLERS];
OSAlarm Controller::sAlarmSoundOff[WPAD_MAX_CONTROLLERS];
@@ -83,10 +83,10 @@ namespace homebutton {
if (chan < WPAD_MAX_CONTROLLERS) {
sBatteryFlag[chan] = false;
OSReport("Create %d\n", chan);
if (!lbl_816989BC[chan]) {
if (!sAlarmCreated[chan]) {
OSCreateAlarm(&sAlarm[chan]);
OSCreateAlarm(&sAlarmSoundOff[chan]);
lbl_816989BC[chan] = true;
sAlarmCreated[chan] = true;
}
sThis[chan] = this;
}

View File

@@ -78,8 +78,8 @@ namespace ipl {
int finish(NCDAossConfig* config, int* result);
void printInfo();
static void* AOSSThread_813FCC8C(u32 id, s32 size);
static void AOSSThread_813FCCE4(u32 id, void* ptr, s32 align);
static void* aossAlloc(u32 id, s32 size);
static void aossFree(u32 id, void* ptr, s32 align);
private:
s32 mState; // 0x32C
@@ -122,8 +122,8 @@ namespace ipl {
return 0;
}
config.alloc = AOSSThread_813FCC8C;
config.free = AOSSThread_813FCCE4;
config.alloc = aossAlloc;
config.free = aossFree;
BOOL level = OSDisableInterrupts();
@@ -144,7 +144,7 @@ namespace ipl {
return 1;
}
void* AOSSThread::AOSSThread_813FCC8C(u32 id, s32 size) {
void* AOSSThread::aossAlloc(u32 id, s32 size) {
void* buffer;
BOOL level = OSDisableInterrupts();
buffer = MEMAllocFromAllocator(&m_allocator, size);
@@ -152,7 +152,7 @@ namespace ipl {
return buffer;
}
void AOSSThread::AOSSThread_813FCCE4(u32 id, void* ptr, s32 align) {
void AOSSThread::aossFree(u32 id, void* ptr, s32 align) {
BOOL level = OSDisableInterrupts();
MEMFreeToAllocator(&m_allocator, ptr);
OSRestoreInterrupts(level);
@@ -162,7 +162,7 @@ namespace ipl {
mState = 0xF;
AOSS_SetCallback(USBAPThread::callback);
if (AOSSi_InitLocal(AOSSThread_813FCC8C, AOSSThread_813FCCE4) == -1) {
if (AOSSi_InitLocal(aossAlloc, aossFree) == -1) {
return this;
}