Compare commits
1 Commits
main
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67ebf6ae2e |
@@ -242,61 +242,25 @@ L_2b0:
|
||||
blr
|
||||
}
|
||||
|
||||
asm void _CNTCACHEDeleteTitle() {
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r3, 0
|
||||
la r4, scCntCacheSpaceNl
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
stw r28, 0x10(r1)
|
||||
bl strtok
|
||||
li r30, 0
|
||||
li r31, -1
|
||||
b L_370
|
||||
L_304:
|
||||
stw r30, errno(r0)
|
||||
li r4, 0
|
||||
li r5, 0x10
|
||||
bl strtoull
|
||||
lwz r0, errno(r0)
|
||||
mr r28, r4
|
||||
mr r29, r3
|
||||
cmpwi r0, 0
|
||||
bne L_364
|
||||
and r0, r3, r31
|
||||
cmplwi r0, 1
|
||||
beq L_364
|
||||
bl _CNTCACHEIsTitleRemovable
|
||||
cmpwi r3, 1
|
||||
bne L_350
|
||||
mr r4, r28
|
||||
mr r3, r29
|
||||
bl ES_DeleteTitle
|
||||
b L_364
|
||||
L_350:
|
||||
cmpwi r3, 0
|
||||
bne L_364
|
||||
mr r4, r28
|
||||
mr r3, r29
|
||||
bl ES_DeleteTitleContent
|
||||
L_364:
|
||||
li r3, 0
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
L_370:
|
||||
cmpwi r3, 0
|
||||
bne L_304
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
lwz r28, 0x10(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
void _CNTCACHEDeleteTitle() {
|
||||
char* token = strtok(NULL, scCntCacheSpaceNl);
|
||||
|
||||
while (token != NULL) {
|
||||
ESTitleId titleId;
|
||||
int removable;
|
||||
|
||||
errno = 0;
|
||||
titleId = strtoull(token, NULL, 16);
|
||||
if (errno == 0 && (u32)ES_TITLE_TYPE(titleId) != 1) {
|
||||
removable = _CNTCACHEIsTitleRemovable(titleId);
|
||||
if (removable == 1) {
|
||||
ES_DeleteTitle(titleId);
|
||||
} else if (removable == 0) {
|
||||
ES_DeleteTitleContent(titleId);
|
||||
}
|
||||
}
|
||||
token = strtok(NULL, scCntCacheSpaceNl);
|
||||
}
|
||||
}
|
||||
|
||||
asm int _CNTCACHEIsTitleRemovable(ESTitleId titleId) {
|
||||
|
||||
@@ -563,6 +563,17 @@ static void WPADiGetScSettings() {
|
||||
_scSetting = FALSE;
|
||||
}
|
||||
|
||||
static void __reconnect(BOOL exec) {
|
||||
DEBUGPrint("Reconnect Start!!\n");
|
||||
|
||||
BTA_DmSendHciReset();
|
||||
|
||||
OSCancelAlarm(&_managerAlarm);
|
||||
|
||||
WUDSetHidRecvCallback(NULL);
|
||||
WUDShutdown(exec);
|
||||
}
|
||||
|
||||
static void WPADiAfh() {
|
||||
BOOL enabled;
|
||||
u8* pWifiChannel;
|
||||
@@ -606,550 +617,6 @@ static void WPADiRumbleMotor(s32 chan, BOOL prevSuccess) {
|
||||
_rumbleCnt[chan] = _wpdcb[chan]->motorBusy ? _rumbleCnt[chan] + 1 : 0;
|
||||
}
|
||||
|
||||
static void __reconnect(BOOL exec) {
|
||||
DEBUGPrint("Reconnect Start!!\n");
|
||||
|
||||
BTA_DmSendHciReset();
|
||||
|
||||
OSCancelAlarm(&_managerAlarm);
|
||||
|
||||
WUDSetHidRecvCallback(NULL);
|
||||
WUDShutdown(exec);
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
char scWpadManageStrs[0x58] = "Reconnect Start!!\n\0\0\0\0\0\0"
|
||||
"Check the update of WiFi using channel\n\0"
|
||||
"WiFi uses channel = %d\n";
|
||||
extern void _savegpr_19();
|
||||
extern void _restgpr_19();
|
||||
static asm void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
nofralloc
|
||||
stwu r1, -0x160(r1)
|
||||
mflr r0
|
||||
stw r0, 0x164(r1)
|
||||
addi r11, r1, 0x160
|
||||
bl _savegpr_19
|
||||
lis r28, scWpadVersionStr@ha
|
||||
addi r28, r28, scWpadVersionStr@l
|
||||
bl WUDGetStatus
|
||||
cmpwi r3, 0x3
|
||||
beq WPADiManageHandler_8AC8
|
||||
cmpwi r3, 0x2
|
||||
bne WPADiManageHandler_91D8
|
||||
lwz r0, _initialized(r0)
|
||||
cmpwi r0, 0x0
|
||||
bne WPADiManageHandler_91D8
|
||||
li r0, 0x1
|
||||
lis r3, WPADiConnCallback@ha
|
||||
stw r0, _initialized(r0)
|
||||
addi r3, r3, WPADiConnCallback@l
|
||||
bl WUDSetHidConnCallback
|
||||
lis r3, WPADiRecvCallback@ha
|
||||
addi r3, r3, WPADiRecvCallback@l
|
||||
bl WUDSetHidRecvCallback
|
||||
li r0, 0x32
|
||||
stw r0, _recCnt(r0)
|
||||
b WPADiManageHandler_91D8
|
||||
WPADiManageHandler_8AC8:
|
||||
lwz r4, _recCnt(r0)
|
||||
lwz r19, _recFlag(r0)
|
||||
cntlzw r3, r4
|
||||
subi r0, r4, 0x1
|
||||
extrwi r3, r3, 1, 26
|
||||
cmpwi r19, 0x0
|
||||
neg r3, r3
|
||||
andc r0, r0, r3
|
||||
stw r0, _recCnt(r0)
|
||||
blt WPADiManageHandler_8B28
|
||||
cmpwi r0, 0x0
|
||||
bne WPADiManageHandler_91D8
|
||||
addi r3, r28, 0xf0
|
||||
crclr 4*cr1+eq
|
||||
bl DEBUGPrint
|
||||
bl BTA_DmSendHciReset
|
||||
lis r3, _managerAlarm@ha
|
||||
addi r3, r3, _managerAlarm@l
|
||||
bl OSCancelAlarm
|
||||
li r3, 0x0
|
||||
bl WUDSetHidRecvCallback
|
||||
mr r3, r19
|
||||
bl WUDShutdown
|
||||
b WPADiManageHandler_91D8
|
||||
WPADiManageHandler_8B28:
|
||||
lis r24, _wpdcb@ha
|
||||
li r22, 0x0
|
||||
addi r24, r24, _wpdcb@l
|
||||
la r25, _extCnt
|
||||
la r23, _rumbleCnt
|
||||
li r29, 0x0
|
||||
li r30, 0x10
|
||||
li r31, 0x1
|
||||
WPADiManageHandler_8B48:
|
||||
lbz r0, 0x0(r25)
|
||||
li r21, 0x0
|
||||
cmplwi r0, 0x5
|
||||
bne WPADiManageHandler_8D20
|
||||
lwz r26, 0x0(r24)
|
||||
lwz r0, 0x8d8(r26)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8D10
|
||||
bl OSDisableInterrupts
|
||||
mr r27, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x5ec(r26)
|
||||
lbz r0, 0x5ed(r26)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8B94
|
||||
lwz r0, 0x5f4(r26)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8B94:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8BB0
|
||||
mr r3, r27
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x0
|
||||
b WPADiManageHandler_8BDC
|
||||
WPADiManageHandler_8BB0:
|
||||
lbz r0, 0x5ec(r26)
|
||||
addi r3, r1, 0xc8
|
||||
lwz r4, 0x5f0(r26)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r4, r4, r0
|
||||
bl memcpy
|
||||
mr r3, r27
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x1
|
||||
WPADiManageHandler_8BDC:
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8D10
|
||||
lwz r0, 0xc8(r1)
|
||||
cmplwi r0, 0x12
|
||||
beq WPADiManageHandler_8BFC
|
||||
lwz r0, 0x840(r26)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8D10
|
||||
WPADiManageHandler_8BFC:
|
||||
lwz r21, 0xc8(r1)
|
||||
mr r3, r22
|
||||
lwz r20, 0xcc(r1)
|
||||
addi r4, r1, 0xf8
|
||||
lwz r19, 0xd0(r1)
|
||||
lwz r12, 0xd4(r1)
|
||||
lwz r11, 0xd8(r1)
|
||||
lwz r10, 0xdc(r1)
|
||||
lwz r9, 0xe0(r1)
|
||||
lwz r8, 0xe4(r1)
|
||||
lwz r7, 0xe8(r1)
|
||||
lwz r6, 0xec(r1)
|
||||
lwz r5, 0xf0(r1)
|
||||
lwz r0, 0xf4(r1)
|
||||
stw r21, 0xf8(r1)
|
||||
stw r20, 0xfc(r1)
|
||||
stw r19, 0x100(r1)
|
||||
stw r12, 0x104(r1)
|
||||
stw r11, 0x108(r1)
|
||||
stw r10, 0x10c(r1)
|
||||
stw r9, 0x110(r1)
|
||||
stw r8, 0x114(r1)
|
||||
stw r7, 0x118(r1)
|
||||
stw r6, 0x11c(r1)
|
||||
stw r5, 0x120(r1)
|
||||
stw r0, 0x124(r1)
|
||||
bl WPADiSendData
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_8D10
|
||||
bl OSDisableInterrupts
|
||||
mr r27, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x5ec(r26)
|
||||
lbz r0, 0x5ed(r26)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8C9C
|
||||
lwz r0, 0x5f4(r26)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8C9C:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8CB4
|
||||
mr r3, r27
|
||||
bl OSRestoreInterrupts
|
||||
b WPADiManageHandler_8D08
|
||||
WPADiManageHandler_8CB4:
|
||||
lbz r0, 0x5ec(r26)
|
||||
li r4, 0x0
|
||||
lwz r3, 0x5f0(r26)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r3, r3, r0
|
||||
bl memset
|
||||
lbz r0, 0x5ec(r26)
|
||||
mr r3, r27
|
||||
lwz r4, 0x5f4(r26)
|
||||
extsb r6, r0
|
||||
subi r4, r4, 0x1
|
||||
subf r5, r4, r6
|
||||
addi r0, r6, 0x1
|
||||
subf r4, r6, r4
|
||||
nor r4, r5, r4
|
||||
srawi r4, r4, 31
|
||||
andc r0, r0, r4
|
||||
stb r0, 0x5ec(r26)
|
||||
bl OSRestoreInterrupts
|
||||
WPADiManageHandler_8D08:
|
||||
li r21, 0x1
|
||||
b WPADiManageHandler_8D14
|
||||
WPADiManageHandler_8D10:
|
||||
li r21, 0x0
|
||||
WPADiManageHandler_8D14:
|
||||
cmpwi r21, 0x0
|
||||
beq WPADiManageHandler_8D20
|
||||
stb r29, 0x0(r25)
|
||||
WPADiManageHandler_8D20:
|
||||
cmpwi r21, 0x0
|
||||
bne WPADiManageHandler_8ED0
|
||||
lwz r27, 0x0(r24)
|
||||
lwz r0, 0x8d8(r27)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8EC8
|
||||
bl OSDisableInterrupts
|
||||
mr r26, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x160(r27)
|
||||
lbz r0, 0x161(r27)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8D64
|
||||
lwz r0, 0x168(r27)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8D64:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8D80
|
||||
mr r3, r26
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x0
|
||||
b WPADiManageHandler_8DAC
|
||||
WPADiManageHandler_8D80:
|
||||
lbz r0, 0x160(r27)
|
||||
addi r3, r1, 0x68
|
||||
lwz r4, 0x164(r27)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r4, r4, r0
|
||||
bl memcpy
|
||||
mr r3, r26
|
||||
bl OSRestoreInterrupts
|
||||
li r0, 0x1
|
||||
WPADiManageHandler_8DAC:
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8EC8
|
||||
lwz r19, 0x68(r1)
|
||||
mr r3, r22
|
||||
lwz r20, 0x6c(r1)
|
||||
addi r4, r1, 0x98
|
||||
lwz r26, 0x70(r1)
|
||||
lwz r12, 0x74(r1)
|
||||
lwz r11, 0x78(r1)
|
||||
lwz r10, 0x7c(r1)
|
||||
lwz r9, 0x80(r1)
|
||||
lwz r8, 0x84(r1)
|
||||
lwz r7, 0x88(r1)
|
||||
lwz r6, 0x8c(r1)
|
||||
lwz r5, 0x90(r1)
|
||||
lwz r0, 0x94(r1)
|
||||
stw r19, 0x98(r1)
|
||||
stw r20, 0x9c(r1)
|
||||
stw r26, 0xa0(r1)
|
||||
stw r12, 0xa4(r1)
|
||||
stw r11, 0xa8(r1)
|
||||
stw r10, 0xac(r1)
|
||||
stw r9, 0xb0(r1)
|
||||
stw r8, 0xb4(r1)
|
||||
stw r7, 0xb8(r1)
|
||||
stw r6, 0xbc(r1)
|
||||
stw r5, 0xc0(r1)
|
||||
stw r0, 0xc4(r1)
|
||||
bl WPADiSendData
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_8EC8
|
||||
bl OSDisableInterrupts
|
||||
mr r26, r3
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x160(r27)
|
||||
lbz r0, 0x161(r27)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8E54
|
||||
lwz r0, 0x168(r27)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8E54:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
bne WPADiManageHandler_8E6C
|
||||
mr r3, r26
|
||||
bl OSRestoreInterrupts
|
||||
b WPADiManageHandler_8EC0
|
||||
WPADiManageHandler_8E6C:
|
||||
lbz r0, 0x160(r27)
|
||||
li r4, 0x0
|
||||
lwz r3, 0x164(r27)
|
||||
li r5, 0x30
|
||||
extsb r0, r0
|
||||
mulli r0, r0, 0x30
|
||||
add r3, r3, r0
|
||||
bl memset
|
||||
lbz r0, 0x160(r27)
|
||||
mr r3, r26
|
||||
lwz r4, 0x168(r27)
|
||||
extsb r6, r0
|
||||
subi r4, r4, 0x1
|
||||
subf r5, r4, r6
|
||||
addi r0, r6, 0x1
|
||||
subf r4, r6, r4
|
||||
nor r4, r5, r4
|
||||
srawi r4, r4, 31
|
||||
andc r0, r0, r4
|
||||
stb r0, 0x160(r27)
|
||||
bl OSRestoreInterrupts
|
||||
WPADiManageHandler_8EC0:
|
||||
li r0, 0x1
|
||||
b WPADiManageHandler_8ECC
|
||||
WPADiManageHandler_8EC8:
|
||||
li r0, 0x0
|
||||
WPADiManageHandler_8ECC:
|
||||
or r21, r21, r0
|
||||
WPADiManageHandler_8ED0:
|
||||
lwz r20, 0x0(r24)
|
||||
lwz r0, 0x8bc(r20)
|
||||
cmpwi r0, -0x1
|
||||
beq WPADiManageHandler_8FD0
|
||||
cmpwi r21, 0x1
|
||||
beq WPADiManageHandler_8F18
|
||||
bl OSDisableInterrupts
|
||||
lbz r4, 0x160(r20)
|
||||
lbz r0, 0x161(r20)
|
||||
subf r0, r4, r0
|
||||
extsb. r19, r0
|
||||
bge WPADiManageHandler_8F0C
|
||||
lwz r0, 0x168(r20)
|
||||
add r0, r19, r0
|
||||
extsb r19, r0
|
||||
WPADiManageHandler_8F0C:
|
||||
bl OSRestoreInterrupts
|
||||
cmpwi r19, 0x0
|
||||
ble WPADiManageHandler_8F24
|
||||
WPADiManageHandler_8F18:
|
||||
lwz r3, 0x0(r24)
|
||||
stw r29, 0x8d0(r3)
|
||||
b WPADiManageHandler_8FAC
|
||||
WPADiManageHandler_8F24:
|
||||
lbz r0, 0x0(r23)
|
||||
cmplwi r0, 0x5
|
||||
bne WPADiManageHandler_8FAC
|
||||
sth r31, 0x22(r1)
|
||||
mr r3, r22
|
||||
lwz r5, 0x0(r24)
|
||||
addi r4, r1, 0x38
|
||||
stb r29, 0xc(r1)
|
||||
lwz r12, 0x10(r1)
|
||||
stw r29, 0x8d0(r5)
|
||||
lwz r21, 0xc(r1)
|
||||
lwz r11, 0x14(r1)
|
||||
lwz r10, 0x18(r1)
|
||||
lwz r9, 0x1c(r1)
|
||||
lwz r8, 0x20(r1)
|
||||
lwz r7, 0x24(r1)
|
||||
lwz r6, 0x28(r1)
|
||||
lwz r5, 0x2c(r1)
|
||||
lwz r0, 0x30(r1)
|
||||
stw r30, 0x8(r1)
|
||||
stw r29, 0x34(r1)
|
||||
stw r30, 0x38(r1)
|
||||
stw r21, 0x3c(r1)
|
||||
stw r12, 0x40(r1)
|
||||
stw r11, 0x44(r1)
|
||||
stw r10, 0x48(r1)
|
||||
stw r9, 0x4c(r1)
|
||||
stw r8, 0x50(r1)
|
||||
stw r7, 0x54(r1)
|
||||
stw r6, 0x58(r1)
|
||||
stw r5, 0x5c(r1)
|
||||
stw r0, 0x60(r1)
|
||||
stw r29, 0x64(r1)
|
||||
bl __SendData
|
||||
WPADiManageHandler_8FAC:
|
||||
lwz r3, 0x0(r24)
|
||||
lwz r0, 0x8d0(r3)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_8FC8
|
||||
lbz r3, 0x0(r23)
|
||||
addi r0, r3, 0x1
|
||||
b WPADiManageHandler_8FCC
|
||||
WPADiManageHandler_8FC8:
|
||||
li r0, 0x0
|
||||
WPADiManageHandler_8FCC:
|
||||
stb r0, 0x0(r23)
|
||||
WPADiManageHandler_8FD0:
|
||||
lbz r0, _checkCnt(r0)
|
||||
cmplwi r0, 0x5
|
||||
bne WPADiManageHandler_8FE4
|
||||
mr r3, r22
|
||||
bl WPADiCheckContInputs
|
||||
WPADiManageHandler_8FE4:
|
||||
lhz r0, _senseCnt(r0)
|
||||
cmplwi r0, 0xa
|
||||
bne WPADiManageHandler_8FF8
|
||||
mr r3, r22
|
||||
bl WPADiRadioSensitivity
|
||||
WPADiManageHandler_8FF8:
|
||||
lbz r3, 0x0(r25)
|
||||
cmplwi r3, 0x5
|
||||
addi r0, r3, 0x1
|
||||
bne WPADiManageHandler_900C
|
||||
mr r0, r3
|
||||
WPADiManageHandler_900C:
|
||||
addi r22, r22, 0x1
|
||||
stb r0, 0x0(r25)
|
||||
cmpwi r22, 0x4
|
||||
addi r25, r25, 0x1
|
||||
addi r24, r24, 0x4
|
||||
addi r23, r23, 0x1
|
||||
blt WPADiManageHandler_8B48
|
||||
lhz r0, _afhCnt(r0)
|
||||
cmplwi r0, 0xea60
|
||||
bne WPADiManageHandler_9090
|
||||
lis r21, 0x8000
|
||||
li r4, 0x1
|
||||
addi r3, r21, 0x31a2
|
||||
bl DCInvalidateRange
|
||||
addi r3, r28, 0x108
|
||||
crclr 4*cr1+eq
|
||||
bl DEBUGPrint
|
||||
lbz r3, _afhChannel(r0)
|
||||
lbz r0, 0x31a2(r21)
|
||||
extsb r3, r3
|
||||
cmpw r3, r0
|
||||
beq WPADiManageHandler_9090
|
||||
bl OSDisableInterrupts
|
||||
lbz r0, 0x31a2(r21)
|
||||
stb r0, _afhChannel(r0)
|
||||
bl OSRestoreInterrupts
|
||||
lbz r4, 0x31a2(r21)
|
||||
addi r3, r28, 0x130
|
||||
crclr 4*cr1+eq
|
||||
bl DEBUGPrint
|
||||
lbz r0, _afhChannel(r0)
|
||||
extsb r3, r0
|
||||
bl WUDSetDisableChannel
|
||||
WPADiManageHandler_9090:
|
||||
lhz r6, _senseCnt(r0)
|
||||
lis r3, 0x1
|
||||
subi r0, r3, 0x15a0
|
||||
lbz r9, _checkCnt(r0)
|
||||
subi r4, r6, 0xa
|
||||
subfic r3, r6, 0xa
|
||||
nor r3, r4, r3
|
||||
lhz r10, _afhCnt(r0)
|
||||
srawi r8, r3, 31
|
||||
addi r7, r6, 0x1
|
||||
clrlwi r0, r0, 16
|
||||
subi r4, r9, 0x5
|
||||
subfic r3, r9, 0x5
|
||||
andc r7, r7, r8
|
||||
nor r5, r4, r3
|
||||
subf r4, r0, r10
|
||||
subf r3, r10, r0
|
||||
lbz r0, _scFlush(r0)
|
||||
srawi r6, r5, 31
|
||||
addi r5, r9, 0x1
|
||||
nor r4, r4, r3
|
||||
addi r3, r10, 0x1
|
||||
srawi r4, r4, 31
|
||||
andc r5, r5, r6
|
||||
andc r3, r3, r4
|
||||
cmpwi r0, 0x0
|
||||
sth r7, _senseCnt(r0)
|
||||
stb r5, _checkCnt(r0)
|
||||
sth r3, _afhCnt(r0)
|
||||
beq WPADiManageHandler_9138
|
||||
bl SCCheckStatus
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_9138
|
||||
lis r3, _scArray@ha
|
||||
addi r3, r3, _scArray@l
|
||||
bl SCSetBtDeviceInfoArray
|
||||
cmpwi r3, 0x1
|
||||
bne WPADiManageHandler_9138
|
||||
li r3, 0x0
|
||||
bl SCFlushAsync
|
||||
li r0, 0x0
|
||||
stb r0, _scFlush(r0)
|
||||
WPADiManageHandler_9138:
|
||||
lbz r0, _scSetting(r0)
|
||||
cmpwi r0, 0x0
|
||||
beq WPADiManageHandler_91D4
|
||||
bl SCCheckStatus
|
||||
cmpwi r3, 0x0
|
||||
bne WPADiManageHandler_91D4
|
||||
bl SCGetBtDpdSensibility
|
||||
clrlwi r0, r3, 24
|
||||
cmplwi r0, 0x1
|
||||
bge WPADiManageHandler_9164
|
||||
li r0, 0x1
|
||||
WPADiManageHandler_9164:
|
||||
cmplwi r0, 0x5
|
||||
ble WPADiManageHandler_9170
|
||||
li r0, 0x5
|
||||
WPADiManageHandler_9170:
|
||||
stb r0, _dpdSensitivity(r0)
|
||||
bl SCGetWpadSensorBarPosition
|
||||
clrlwi r3, r3, 24
|
||||
subi r0, r3, 0x1
|
||||
cntlzw r0, r0
|
||||
extrwi r0, r0, 8, 19
|
||||
stb r0, _sensorBarPos(r0)
|
||||
bl SCGetWpadMotorMode
|
||||
clrlwi r3, r3, 24
|
||||
subi r0, r3, 0x1
|
||||
cntlzw r0, r0
|
||||
srwi r0, r0, 5
|
||||
stw r0, _rumble(r0)
|
||||
bl SCGetWpadSpeakerVolume
|
||||
clrlwi. r0, r3, 24
|
||||
mr r4, r3
|
||||
bne WPADiManageHandler_91B8
|
||||
li r4, 0x0
|
||||
WPADiManageHandler_91B8:
|
||||
clrlwi r0, r3, 24
|
||||
cmplwi r0, 0x7f
|
||||
blt WPADiManageHandler_91C8
|
||||
li r4, 0x7f
|
||||
WPADiManageHandler_91C8:
|
||||
li r0, 0x0
|
||||
stb r4, _speakerVolume(r0)
|
||||
stb r0, _scSetting(r0)
|
||||
WPADiManageHandler_91D4:
|
||||
bl BTA_HhGetAclQueueInfo
|
||||
WPADiManageHandler_91D8:
|
||||
addi r11, r1, 0x160
|
||||
bl _restgpr_19
|
||||
lwz r0, 0x164(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x160
|
||||
blr
|
||||
}
|
||||
#else
|
||||
static void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
s32 status = WPADGetStatus();
|
||||
s32 chan;
|
||||
@@ -1168,8 +635,10 @@ static void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
_recCnt = _recCnt == 0 ? 0 : _recCnt - 1;
|
||||
|
||||
if (_recFlag >= 0) {
|
||||
if (--_recCnt <= 0) {
|
||||
if (_recCnt == 0) {
|
||||
__reconnect(_recFlag);
|
||||
}
|
||||
return;
|
||||
@@ -1216,9 +685,6 @@ static void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
|
||||
BTA_HhGetAclQueueInfo();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
static void WPADiManageHandler0(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
OSSwitchFiberEx((u32)pAlarm, (u32)pContext, 0, 0, WPADiManageHandler, __WPADiManageHandlerStack + sizeof(__WPADiManageHandlerStack));
|
||||
}
|
||||
|
||||
225
tools/decomp-assist/asm-inventory.md
Normal file
225
tools/decomp-assist/asm-inventory.md
Normal file
@@ -0,0 +1,225 @@
|
||||
# Assembly inventory
|
||||
|
||||
Snapshot: `agent/w1005/da5` after the WPADiManageHandler and _CNTCACHEDeleteTitle C conversions, based on `7aa71d29`.
|
||||
|
||||
Scope: every `asm` function body, `asm` block, and `__asm` block in C/C++ sources and headers under `src/` and `libs/`, including inactive platform branches. Each block gets its own row. Declarations, comments, and standalone assembly files are outside this scan.
|
||||
|
||||
Count: 209 bodies/blocks, 160 ORIGINAL-ASM and 49 PLACEHOLDER. The scan also excluded 65 asm declarations.
|
||||
|
||||
ORIGINAL-ASM requires a matching asm function in the ogws reference or a concrete hardware/runtime register convention. An ordinary prologue, `nofralloc`, or a call to `_savegpr_*` does not establish that a function was originally assembly. PLACEHOLDER means the logic belongs in C/C++, even when the current assembly matches exactly.
|
||||
|
||||
`ogws_sdk/` references resolve under `/mnt/drive2/projects/wii-ipl-workers/_refs/prior/ogws_sdk/`. Linked ogws files supplement those copies for runtime and NW4R routines. The remote files were read on 2026-10-05. The local reference versions can differ from the 2010 target.
|
||||
|
||||
This inventory classifies the other workers' files without modifying them. It records this branch's contents, including placeholders another worker may have already converted elsewhere.
|
||||
|
||||
| File and line | Function | Form | Verdict | Evidence |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `src/BS2/BS2Init.c:22` | `ClearOtherBATs` | body | ORIGINAL-ASM | isync and direct IBAT/DBAT register writes. |
|
||||
| `src/BS2/BS2Mach.c:246` | `Run` | body | ORIGINAL-ASM | Clears ABI registers, replaces r1, uses dcbz/dcbf, and jumps via LR. |
|
||||
| `src/BS2/BS2Start.c:22` | `__start` | body | ORIGINAL-ASM | Runs before the C stack and ABI registers exist; constructs the initial stack. |
|
||||
| `src/BS2/BS2Start.c:97` | `__init_registers` | body | ORIGINAL-ASM | Initializes GPRs, r1, r2, and r13 for the C runtime. |
|
||||
| `src/channelScript/CHANSVm.c:6512` | `VmPushFuncReturnInfo` | body | PLACEHOLDER | VM frame bookkeeping with ordinary loads, stores, and calls. |
|
||||
| `src/keyboard/tiGUIManager.cpp:359` | `draw__Q39textinput3gui13PaneComponentFv` | body | PLACEHOLDER | GUI pane traversal and drawing calls. |
|
||||
| `src/keyboard/tiInputForm.cpp:1600` | `create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer` | body | PLACEHOLDER | Input-form allocation and initialization. |
|
||||
| `src/scene/button/iplButton.cpp:971` | `push_button_queue` | body | PLACEHOLDER | Button queue traversal and updates. |
|
||||
| `src/scene/channelSelect/iplChannelSelect.cpp:1336` | `updateDiskState__Q33ipl5scene13ChannelSelectFv` | body | PLACEHOLDER | Disc-state updates and scene calls. |
|
||||
| `src/scene/nakamuraTest/gamespy/common/gsPlatformUtil.c:474` | `GetTicks` | block 1 | ORIGINAL-ASM | Inactive PS2 branch reads the CP0 Count register with mfc0 $9. |
|
||||
| `src/sound/iplSound.cpp:341` | `resetAllSound__Q33ipl3snd6SystemFv` | body | PLACEHOLDER | Sound-system reset calls and state writes. |
|
||||
| `src/system/TVRC.cpp:224` | `TVRCSendStartAsync` | body | PLACEHOLDER | IR send setup and ordinary SDK calls. |
|
||||
| `src/system/TVRC.cpp:436` | `__FTVRCLoop0Handler__7LibTVRCFP7OSAlarmP9OSContext` | body | PLACEHOLDER | Timer callback logic and SDK calls. |
|
||||
| `src/system/iplCdbBackup.cpp:394` | `cdb_backup_delete_task_` | body | PLACEHOLDER | Database deletion task control flow. |
|
||||
| `src/system/iplCdbBackup.cpp:502` | `cdb_backup_move_task_` | body | PLACEHOLDER | Database move task control flow. |
|
||||
| `src/system/iplChannelManager.cpp:472` | `getTitleName__Q33ipl7channel7ManagerCFiii` | body | PLACEHOLDER | Channel-title selection and string copying. |
|
||||
| `src/system/iplException.cpp:95` | `Exception::exception_callback` | body | PLACEHOLDER | Console drawing, key polling, and scrolling logic. |
|
||||
| `src/system/iplSaveDataManager.cpp:149` | `Manager::hasChannel` | body | PLACEHOLDER | Title-ID comparisons and channel-slot search. |
|
||||
| `src/system/iplSaveDataManager.cpp:599` | `Manager::makePriorTitleIDList` | body | PLACEHOLDER | Title-ID filtering and ordering. |
|
||||
| `src/system/iplSaveDataManager.cpp:807` | `Manager::doUpdateChanInfos` | body | PLACEHOLDER | Channel metadata validation and updates. |
|
||||
| `src/system/iplSystem.cpp:1089` | `System::warning_run` | body | PLACEHOLDER | Warning-scene control flow and calls. |
|
||||
| `src/system/rvl_dec.c:17` | `Rvl_decode` | block 1 | PLACEHOLDER | Compression signature dispatch, expressible as C branches. |
|
||||
| `src/system/rvl_dec.c:72` | `Rvl_decode_szs` | body | PLACEHOLDER | Yaz/SZS byte-copy decompression loops. |
|
||||
| `src/system/rvl_dec.c:233` | `Rvl_decode_ash` | body | PLACEHOLDER | ASH bitstream and Huffman decoding. |
|
||||
| `src/system/rvl_dec.c:717` | `Rvl_decode_asr` | body | PLACEHOLDER | ASR decompression control flow and buffer writes. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:12` | `TRKAccessFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:22` | `TRKOpenFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:30` | `TRKCloseFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/MetroTRK/src/Export/targsupp.c:38` | `TRKPositionFile` | body | ORIGINAL-ASM | twi 31,r0,0 is the debugger file-service trap, with debugger-controlled return registers. |
|
||||
| `libs/NW4R/include/nw4r/math/arithmetic.h:30` | `FSelect` | block 1 | ORIGINAL-ASM | Same function contains ASM in [ogws math_arithmetic.h](https://github.com/doldecomp/ogws/blob/master/include/nw4r/math/math_arithmetic.h#L91). |
|
||||
| `libs/NW4R/include/nw4r/math/arithmetic.h:38` | `FAbs` | block 1 | ORIGINAL-ASM | Same function contains ASM in [ogws math_arithmetic.h](https://github.com/doldecomp/ogws/blob/master/include/nw4r/math/math_arithmetic.h#L30). |
|
||||
| `libs/NW4R/include/nw4r/math/types.h:230` | `VEC3Add` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/NW4R/include/nw4r/math/types.h:258` | `VEC3Sub` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/NW4R/include/nw4r/math/types.h:287` | `VEC3Scale` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/NW4R/src/math/math_arithmetic.cpp:11` | `FrSqrt` | block 1 | ORIGINAL-ASM | frsqrte and fixed floating-point refinement; same function uses ASM in [ogws math_arithmetic.cpp](https://github.com/doldecomp/ogws/blob/master/src/nw4r/math/math_arithmetic.cpp#L65). |
|
||||
| `libs/NW4R/src/math/math_types.cpp:11` | `MTX44Identity` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st and ps_* vector or matrix operations. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/buffer/getcode.c:4` | `TMCJPEGDEC_init_buff_thumbnail` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/buffer/mkhdec3.c:7` | `TMCJPEGDEC_make_huffdec` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:110` | `TMCJPEGDEC_imagestart` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:366` | `TMCJPEGDEC_scan_varinit` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:594` | `TMCJPEGDEC_restart_interval` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:787` | `TMCJPEGDEC_parse_para` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:1173` | `TMCJPEGDEC_parse_dht` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:1484` | `TMCJPEGDEC_parse_sof` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:1963` | `TMCJPEGDEC_parse_sos` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c:2208` | `TMCJPEGDEC_err_restart` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVLMiddleware/TMC_JPEG/src/reschange/iqdec_resolution_change_a3.c:8` | `TMCJPEGDEC_decode_iquant_rc` | body | PLACEHOLDER | JPEG parsing, table construction, or decode arithmetic using ordinary integer operations and calls. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:13` | `OSInitFastCast` | block 1 | ORIGINAL-ASM | mtspr programs the GQR quantization registers. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:40` | `__OSu16tof32` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:58` | `__OSf32tou8` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:77` | `__OSf32tou16` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:92` | `__OSs16tof32` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/include/revolution/os/OSFastCast.h:108` | `__OSf32tos16` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/ai/ai.c:154` | `__AICallbackStackSwitch` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/AI_ai.c:146. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:6` | `PPCMfmsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:14` | `PPCMtmsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtmsr newMSR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:22` | `PPCOrMsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:31` | `PPCAndMsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:40` | `PPCAndCMsr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:49` | `PPCMfhid0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, HID0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:57` | `PPCMthid0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID0, newHID0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:65` | `PPCMfhid1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, HID1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:73` | `PPCMfl2cr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, L2CR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:81` | `PPCMtl2cr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr L2CR, newL2cr`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:89` | `PPCMtdec` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtdec newDec`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:97` | `PPCMfdec` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfdec r3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:105` | `PPCSync` | body | ORIGINAL-ASM | Special-register or synchronization operation: `sc`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:113` | `PPCEieio` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfmsr r5`, `mtmsr r6`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:133` | `PPCHalt` | body | ORIGINAL-ASM | Special-register or synchronization operation: `sync`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:145` | `PPCMfmmcr0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, MMCR0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:153` | `PPCMtmmcr0` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr MMCR0, newMmcr0`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:161` | `PPCMfmmcr1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, MMCR1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:169` | `PPCMtmmcr1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr MMCR1, newMmcr1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:177` | `PPCMfpmc1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:185` | `PPCMtpmc1` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC1, newPmc1`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:193` | `PPCMfpmc2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:201` | `PPCMtpmc2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC2, newPmc2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:209` | `PPCMfpmc3` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:217` | `PPCMtpmc3` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC3, newPmc3`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:225` | `PPCMfpmc4` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PMC4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:233` | `PPCMtpmc4` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr PMC4, newPmc4`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:244` | `PPCMffpscr` | block 1 | ORIGINAL-ASM | Special-register or synchronization operation: `mffs fp31`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:252` | `PPCMfsia` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, SIA`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:260` | `PPCMtsia` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr SIA, newSia`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:272` | `PPCMtfpscr` | block 1 | ORIGINAL-ASM | Special-register or synchronization operation: `mtfsf 0xff, fp31`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:282` | `PPCMfhid2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, HID2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:290` | `PPCMthid2` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID2, newhid2`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:298` | `PPCMfwpar` | body | ORIGINAL-ASM | Special-register or synchronization operation: `sync`, `mfspr r3, WPAR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:307` | `PPCMtwpar` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr WPAR, newwpar`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:315` | `PPCMfdmaU` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, DMA_U`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:323` | `PPCMfdmaL` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, DMA_L`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:331` | `PPCMtdmaU` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr DMA_U, newdmau`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:339` | `PPCMtdmaL` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr DMA_L, newdmal`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:347` | `PPCMfpvr` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mfspr r3, PVR`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:363` | `PPCSetFpIEEEMode` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtfsb0 FPSCR_NI_BIT`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:371` | `PPCSetFpNonIEEEMode` | body | ORIGINAL-ASM | Special-register or synchronization operation: `mtfsb1 FPSCR_NI_BIT`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:382` | `PPCMthid4` | block 1 | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID4, val`. |
|
||||
| `libs/RVL_SDK/src/base/PPCArch.c:389` | `PPCMthid4` | block 2 | ORIGINAL-ASM | Special-register or synchronization operation: `mtspr HID4, val`. |
|
||||
| `libs/RVL_SDK/src/cntcache/cntcache.c:66` | `CNTCACHEClear` | body | PLACEHOLDER | NAND reads and token dispatch; live-literal reconstruction still lacks four retained pool entries. |
|
||||
| `libs/RVL_SDK/src/cntcache/cntcache.c:266` | `_CNTCACHEIsTitleRemovable` | body | PLACEHOLDER | NAND usage and typed TMD checks; C trials still differ in return copies and scheduling. |
|
||||
| `libs/RVL_SDK/src/cntcache/cntcache.c:360` | `_CNTCACHEDeleteContent` | body | PLACEHOLDER | Token parsing, typed content traversal, and ES deletion calls. |
|
||||
| `libs/RVL_SDK/src/db/db.c:27` | `__DBExceptionDestination` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/DB_db.c:23. |
|
||||
| `libs/RVL_SDK/src/gx/GXLight.c:20` | `PushLight` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:19` | `WriteProjPS` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:36` | `Copy6Floats` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:58` | `WriteMTXPS4x3` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:86` | `WriteMTXPS3x3from3x4` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/gx/GXTransform.c:112` | `WriteMTXPS4x2` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:36` | `PSMTXIdentity` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:65` | `PSMTXCopy` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:111` | `PSMTXConcat` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:209` | `PSMTXInverse` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:317` | `PSMTXInvXpose` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:449` | `PSMTXRotTrig` | block 1 | ORIGINAL-ASM | frsp prepares the operands for the paired-single rotation block in this same SDK function. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:457` | `PSMTXRotTrig` | block 2 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:527` | `PSMTXTrans` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:560` | `PSMTXTransApply` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:601` | `PSMTXScale` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtx.c:629` | `PSMTXScaleApply` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/mtxvec.c:16` | `PSMTXMultVec` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/vec.c:29` | `PSVECNormalize` | block 1 | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/mtx/vec.c:58` | `PSVECCrossProduct` | body | ORIGINAL-ASM | Paired-single psq_l/psq_st or ps_* operations; fast-cast variants also use GQR conversion formats. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:86` | `__OSFPRInit` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:52. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:582` | `OSInit` | block 1 | PLACEHOLDER | This block only pins __ArenaLo with lis/addi; ogws OS_OS.c uses the C linker-symbol pointer. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:617` | `OSInit` | block 2 | PLACEHOLDER | This block only pins __ArenaLo with lis/addi; ogws OS_OS.c uses the C linker-symbol pointer. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:771` | `__OSDBIntegrator` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:699. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:794` | `__OSDBJump` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:729. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:816` | `OSExceptionVector` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:752. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:876` | `OSDefaultExceptionHandler` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OS.c:817. |
|
||||
| `libs/RVL_SDK/src/os/OS.c:917` | `__OSPSInit` | block 1 | ORIGINAL-ASM | mtspr resets GQR0 through GQR7 for paired-single operations. |
|
||||
| `libs/RVL_SDK/src/os/OSAlarm.c:195` | `DecrementerExceptionHandler` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSAlarm.c:193. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:13` | `DCEnable` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:5. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:28` | `DCInvalidateRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:18. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:50` | `DCFlushRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:40. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:73` | `DCStoreRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:63. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:96` | `DCFlushRangeNoSync` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:86. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:118` | `DCZeroRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:130. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:140` | `ICInvalidateRange` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:152. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:165` | `ICFlashInvalidate` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:177. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:177` | `ICEnable` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:189. |
|
||||
| `libs/RVL_SDK/src/os/OSCache.c:192` | `LCDisable` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSCache.c:275. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:11` | `__OSLoadFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:5. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:97` | `__OSSaveFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:91. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:184` | `OSLoadFPUContext` | body | ORIGINAL-ASM | Transfers control directly into the FPU context loader, which restores caller-visible FPRs. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:192` | `OSSaveFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:178. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:200` | `OSSetCurrentContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:187. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:240` | `OSSaveContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:227. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:280` | `OSLoadContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:275. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:353` | `OSGetStackPointer` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:351. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:361` | `OSSwitchStack` | body | ORIGINAL-ASM | Returns the old r1 and installs the supplied stack pointer directly. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:371` | `OSSwitchFiber` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:360. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:389` | `OSSwitchFiberEx` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:384. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:421` | `OSInitContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:418. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:534` | `OSSwitchFPUContext` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSContext.c:537. |
|
||||
| `libs/RVL_SDK/src/os/OSContext.c:583` | `OSFillFPUContext` | body | ORIGINAL-ASM | mfmsr/mtmsr/isync enable the FPU before saving all floating-point registers. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:40` | `OSDisableInterrupts` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:21. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:55` | `OSEnableInterrupts` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:40. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:69` | `OSRestoreInterrupts` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:55. |
|
||||
| `libs/RVL_SDK/src/os/OSInterrupt.c:479` | `ExternalInterruptHandler` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSInterrupt.c:534. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:89` | `ConfigMEM1_24MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:50. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:136` | `ConfigMEM1_48MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:89. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:184` | `ConfigMEM2_52MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:128. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:266` | `ConfigMEM2_56MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:191. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:348` | `ConfigMEM2_64MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:254. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:412` | `ConfigMEM2_112MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:304. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:493` | `ConfigMEM2_128MB` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:367. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:557` | `ConfigMEM_ES1_0` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:417. |
|
||||
| `libs/RVL_SDK/src/os/OSMemory.c:590` | `RealMode` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSMemory.c:444. |
|
||||
| `libs/RVL_SDK/src/os/OSSync.c:6` | `SystemCallVector` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSSync.c:11. |
|
||||
| `libs/RVL_SDK/src/os/OSTime.c:22` | `OSGetTime` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSTime.c:23. |
|
||||
| `libs/RVL_SDK/src/os/OSTime.c:38` | `OSGetTick` | body | ORIGINAL-ASM | Same function is asm in ogws_sdk/OS_OSTime.c:39. |
|
||||
| `libs/RVL_SDK/src/os/OSTime.c:48` | `__SetTime` | body | ORIGINAL-ASM | mttbl/mttbu/mttbl update the hardware time base in a fixed sequence. |
|
||||
| `libs/RVL_SDK/src/os/__ppc_eabi_init.cpp:33` | `__init_hardware` | body | ORIGINAL-ASM | Same function is asm in [ogws __ppc_eabi_init.c](https://github.com/doldecomp/ogws/blob/master/src/revolution/OS/__ppc_eabi_init.c#L9). |
|
||||
| `libs/RVL_SDK/src/os/__ppc_eabi_init.cpp:55` | `__flush_cache` | body | ORIGINAL-ASM | Same function is asm in [ogws __ppc_eabi_init.c](https://github.com/doldecomp/ogws/blob/master/src/revolution/OS/__ppc_eabi_init.c#L31). |
|
||||
| `libs/RVL_SDK/src/os/__ppc_eabi_init.cpp:85` | `__init_user` | body | ORIGINAL-ASM | Same function is asm in [ogws __ppc_eabi_init.c](https://github.com/doldecomp/ogws/blob/master/src/revolution/OS/__ppc_eabi_init.c#L55). |
|
||||
| `libs/RVL_SDK/src/sdi/sdi_api.c:785` | `ISD_GetCardSize` | body | PLACEHOLDER | CSD bitfield decoding and arithmetic; no special-register operation. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:399` | `CDBDatabaseSearchRecordLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:892` | `CDBDatabaseSearchMinuteLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1154` | `CDBDatabaseSearchHourLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1411` | `CDBDatabaseSearchDayLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1693` | `CDBDatabaseSearchMonthLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBDatabase.c:1963` | `CDBDatabaseSearchYearLayer` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/cdb/CDBFileSystemUtils.c:112` | `CDBFSIsCDBFileOnSD` | body | PLACEHOLDER | Database traversal or filename checks with ordinary data access and calls. |
|
||||
| `libs/RevoEX/src/nwc24/NWC24Manage.c:305` | `NWC24Check` | body | PLACEHOLDER | Account validation and integer bit operations, expressible in C. |
|
||||
| `libs/RevoEX/src/nwc24/NWC24UserId.c:11` | `NWC24CheckUserId` | body | PLACEHOLDER | Account validation and integer bit operations, expressible in C. |
|
||||
| `libs/RevoEX/src/nwc24/NWC24UserId.c:95` | `getUnScrambleId` | body | PLACEHOLDER | Account validation and integer bit operations, expressible in C. |
|
||||
| `libs/RevoEX/src/vf/develop/nand_drv.c:420` | `_MountPrfFile` | body | PLACEHOLDER | Profile-file mounting and error-handling control flow. |
|
||||
| `libs/RevoEX/src/wd/WDScan.c:313` | `WDiFindVendorSpecificIE` | body | PLACEHOLDER | Vendor information-element search and byte comparisons. |
|
||||
| `libs/Runtime/src/Gecko_setjmp.c:30` | `__setjmp` | body | ORIGINAL-ASM | Saves or restores caller GPRs/FPRs, LR, CR, and stack state across nonlocal returns. |
|
||||
| `libs/Runtime/src/Gecko_setjmp.c:79` | `longjmp` | body | ORIGINAL-ASM | Saves or restores caller GPRs/FPRs, LR, CR, and stack state across nonlocal returns. |
|
||||
| `libs/Runtime/src/__init_cpp_exceptions.cpp:23` | `__exception_info_constants` | block 1 | ORIGINAL-ASM | Reads the caller ABI TOC register r2 directly for exception registration. |
|
||||
| `libs/Runtime/src/ptmf.c:13` | `__ptmf_scall` | body | ORIGINAL-ASM | Same function is asm in [ogws ptmf.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/ptmf.c#L37). |
|
||||
| `libs/Runtime/src/runtime.c:101` | `__cvt_fp2unsigned` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L9). |
|
||||
| `libs/Runtime/src/runtime.c:138` | `__save_fpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L82). |
|
||||
| `libs/Runtime/src/runtime.c:182` | `__restore_fpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L95). |
|
||||
| `libs/Runtime/src/runtime.c:225` | `__save_gpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L108). |
|
||||
| `libs/Runtime/src/runtime.c:268` | `__restore_gpr` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L121). |
|
||||
| `libs/Runtime/src/runtime.c:311` | `__div2u` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L130). |
|
||||
| `libs/Runtime/src/runtime.c:384` | `__div2i` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L214). |
|
||||
| `libs/Runtime/src/runtime.c:480` | `__mod2u` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L325). |
|
||||
| `libs/Runtime/src/runtime.c:551` | `__mod2i` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L407). |
|
||||
| `libs/Runtime/src/runtime.c:635` | `__shl2i` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L505). |
|
||||
| `libs/Runtime/src/runtime.c:649` | `__shr2u` | body | ORIGINAL-ASM | Compiler shift-helper register convention: r3:r4 is the 64-bit operand/result and r5 is the shift count. |
|
||||
| `libs/Runtime/src/runtime.c:663` | `__shr2i` | body | ORIGINAL-ASM | Compiler shift-helper register convention: r3:r4 is the 64-bit operand/result and r5 is the shift count. |
|
||||
| `libs/Runtime/src/runtime.c:679` | `__cvt_sll_dbl` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: r3:r4 input, f1 result, and explicit carry/rounding operations. |
|
||||
| `libs/Runtime/src/runtime.c:732` | `__cvt_ull_dbl` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: r3:r4 input, f1 result, and explicit carry/rounding operations. |
|
||||
| `libs/Runtime/src/runtime.c:779` | `__cvt_ull_flt` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: r3:r4 input, f1 result, and explicit carry/rounding operations. |
|
||||
| `libs/Runtime/src/runtime.c:827` | `__cvt_dbl_usll` | body | ORIGINAL-ASM | Compiler conversion-helper register convention: f1 input and r3:r4 integer result without a recursive compiler conversion call. |
|
||||
| `libs/Runtime/src/runtime.c:889` | `__cvt_dbl_ull` | body | ORIGINAL-ASM | Same function is asm in [ogws runtime.c](https://github.com/doldecomp/ogws/blob/master/src/runtime/runtime.c#L523). |
|
||||
92
tools/decomp-assist/da5.attempts.md
Normal file
92
tools/decomp-assist/da5.attempts.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# da5 de-asm attempts
|
||||
|
||||
Worktree `w0929-fix-board`, branch `agent/w1005/da5`, starting commit `7aa71d29`.
|
||||
Read deasm-round.md, common.md, levers.md, and the original-object Ghidra exports.
|
||||
Baseline full build and quick gate pass. DOL SHA1 `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
WPAD: 67/67 exact, code 31040/31040, data 15096/15096.
|
||||
cntcache: 5/5 exact, code 1828/1828, data 280/280.
|
||||
sdi_api: 22/22 exact, code 5948/5948, data 248/248.
|
||||
|
||||
## ISD_GetCardSize
|
||||
|
||||
1. Activate the existing C fallback, name the card geometry values, and correct the high-capacity sector multiplier from 512 to 1024 to match the target shift by 10. Pool 4/4 identical; 84/84 instructions, 33 differences.
|
||||
2. Decode the CSD fields into named locals before clamping the read block length. 84/84 instructions, 26 differences.
|
||||
3. Reverse the two bitwise-OR expressions so MWCC emits the target rotate-insert direction. 84/84 instructions, 23 differences.
|
||||
4. Split the block-length subtraction and capacity product into assignments. 84/84 instructions, 26 differences. Rejected.
|
||||
5. Compile all 36 declaration/field-extraction orders from attempt 3. Best 84/84, 20 differences. No exact result yet. Results in build/da5/sdi-search.json.
|
||||
|
||||
6. Run the provided srcsearch tool. Its relative --out path failed to resolve the mini report; a worktree-local copy used an absolute output path and matched the function definition instead of the earlier prototype. One legal mutation produced no score gain from 98.39286%.
|
||||
7. Compile 180 combinations of declaration order, normalized block length, capacity reuse, and an inline clamp helper. Best remained 84/84 with 20 differences.
|
||||
8. Compile 96 combinations of hoisted fields, separate declarations, unsigned-int versus u32 locals, and output-local order. Same best.
|
||||
9. Compile 24 product/scale/sector inline-helper and geometry-struct variants. Same best.
|
||||
10. Compile all 24 orders including the status local and three output locals. Same best.
|
||||
11. Compile all 24 factor order/grouping combinations from the two best declaration layouts. Best remained 84/84 with 20 register differences. The unchanged asm was retained.
|
||||
|
||||
## WPADiManageHandler
|
||||
|
||||
1. Restore the C handler using the existing queue/rumble/settings helpers, as in the ogws WPAD_WPAD.c reference. The 2010 target also needs the reconnect countdown: decrement with saturation on every running handler call, then reconnect only at zero. Move __reconnect before WPADiAfh to restore literal order and remove the assembly-only packed string block.
|
||||
Pool 22/22 identical; ctxdiff 484/484 instructions, diffs 0.
|
||||
Clean full gate: GATE PASS, 67/67 exact, code 31040/31040, data 15096/15096, no regressions or forbidden/readability findings. DOL SHA1 unchanged.
|
||||
|
||||
## _CNTCACHEDeleteTitle
|
||||
|
||||
1. Reconstruct the token loop and deletion dispatch. Pool 9/9 identical; 51/50 instructions. ES_TITLE_TYPE returns u64, so comparison emits xor plus compare.
|
||||
2. Cast the extracted title type to u32, matching the target's word comparison. Pool unchanged; 50/50 instructions, diffs 0.
|
||||
Clean full gate: GATE PASS, 5/5 exact, code 1828/1828, data 280/280; zero regressions. DOL SHA1 unchanged.
|
||||
|
||||
## _CNTCACHEIsTitleRemovable
|
||||
|
||||
1. Inline NAND usage helper, aligned TMD buffer, typed ESTmdView access. Pool 9/9 identical; 81/82 instructions, path stack offset and return-register differences.
|
||||
2. Align the path buffer, use a single-exit helper, and unsigned version extraction. 80/82; correct frame and path positions, but two missing return copies.
|
||||
3. Separate NAND status from the helper's result and mask the high version byte. 80/82; version test now exact. Missing copies and initializer scheduling remain.
|
||||
4. Shared goto exit in the outer function. 78/82; collapses the target's two early-return branches. Rejected.
|
||||
5. Separate inline TMD eligibility helper. 80/82, shifts scalar stack slots and retains the missing copies. Rejected.
|
||||
6. Use s32 for statuses and the public return value. Same 80/82; DeleteTitle remains exact. Rejected.
|
||||
7. Put the usage check directly into the outer function and reuse the ES result local. Still 80/82; scalar stack positions worsen. Rejected.
|
||||
8. Unsigned removable flag. Still 80/82 and changes cmpwi to cmplwi. Rejected.
|
||||
9. Hoist the ES result declaration without changing early returns. Still 80/82.
|
||||
10. Separate helper result initialization and the negative-error arm. 81/82; adds a branch rather than the target return copies. Rejected.
|
||||
|
||||
11. Group NAND usage counts into a local struct. Still 80/82; moves the scalar slots. Rejected.
|
||||
12. Name the high/low title-ID arguments before snprintf. Still 80/82; changes argument scheduling. Rejected.
|
||||
13. Use automatic inlining instead of an explicit inline keyword on the usage helper. Still 80/82.
|
||||
14. Add a nested path-and-usage helper. Still 80/82.
|
||||
Diagnostic-only opt_propagation, opt_common_subs, scheduling, and opt_dead_assignments pragmas did not change the 80-instruction result. All pragmas removed.
|
||||
|
||||
15. Source search over the usage helper completed 185 trials, with no improvement from the 80/82-instruction, 89.60976% candidate. It waited for a shared CPU slot before starting. The unchanged asm was retained.
|
||||
|
||||
## _CNTCACHEDeleteContent
|
||||
|
||||
1. Reconstruct the typed TMD content loop with an inline NAND usage helper. Pool 9/9 identical; 144/145 instructions. Buffer pointer is formed early; scalar slots reversed; extra constant kept across the loop.
|
||||
2. Move buffer binding after title validation, swap scalar declarations, and use explicit cleanup branches. 143/145. Frame, buffer binding, and scalar slots now match; missing constant reload and helper-result copy remain.
|
||||
3. Use NANDTitleIdHi/Lo in the path helper. Same 143/145.
|
||||
4. Make the inline helper title-ID parameter const. Same 143/145.
|
||||
5. Source search over DeleteContent completed 145 trials with no improvement from the 143/145-instruction, 95.793106% candidate. The unchanged asm was retained.
|
||||
|
||||
## CNTCACHEClear
|
||||
|
||||
1. Implement the NAND read/line-tokenization/delete/seek/cleanup flow with ordinary literals. Pool has 13 strings versus 9: the existing byte pool duplicates all four live literals. Rejected before register tuning.
|
||||
2. Remove the packed byte pool and use a normal version literal. Place the title-data format after the clear routine. Pool has 5 strings versus 9, first divergence at index 1: `DeleteTitle` versus target `DeleteTitle `. The target also retains `%016llx `, `/shared2`, and `DeleteContent `, none referenced by the five surviving functions.
|
||||
3. Reverse the command-dispatch source order. Pool still 5 versus 9, now index 1 is `DeleteContent`. Branch polarity cannot supply the four absent literal entries. Rejected.
|
||||
Kept the original placeholder. No offset references into the byte blob, dummy string objects, or invented dead functions were added to force data offsets. These strings are consistent with removed cache-writing routines. Their original declarations and references remain unknown.
|
||||
|
||||
## Final validation
|
||||
|
||||
Two of six requested bodies converted: WPADiManageHandler and _CNTCACHEDeleteTitle. Four placeholders remain, with the compiled trials recorded above. No remaining assigned body was classified as original assembly.
|
||||
|
||||
The final full, non-quick gate rebuilt all 43U objects and passed for all three assigned units. Pools are identical, every function and owned section is 100.0%, and regressions, forbidden patterns, and readability warnings are all zero. Fresh ctxdiff after the clean build reports 484/484 instructions with zero differences for WPADiManageHandler and 50/50 with zero differences for _CNTCACHEDeleteTitle. Exact-name objdiff reports 100.0% for both.
|
||||
|
||||
| Unit | Instruction-exact before -> after | Code before -> after | Data before -> after |
|
||||
| --- | --- | --- | --- |
|
||||
| WPAD | 67/67 -> 67/67 | 31040/31040 -> 31040/31040 | 15096/15096 -> 15096/15096 |
|
||||
| cntcache | 5/5 -> 5/5 | 1828/1828 -> 1828/1828 | 280/280 -> 280/280 |
|
||||
| sdi_api | 22/22 -> 22/22 | 5948/5948 -> 5948/5948 | 248/248 -> 248/248 |
|
||||
|
||||
GATE PASS
|
||||
|
||||
DOL SHA1: `26116613f624061ba99c8d1a299aaa6efa85670d`.
|
||||
The unit counts remain unchanged because the previous assembly bodies already counted as exact.
|
||||
|
||||
Inventory audit: 209/209 remaining asm bodies and blocks have distinct file/line entries, verified against current source lines. Verdicts: 160 ORIGINAL-ASM, 49 PLACEHOLDER. Excluded 65 declarations and comment text. Other workers' files were classified without edits.
|
||||
|
||||
Scratch candidates and experiment results remain in this worktree's ignored `build/da5/` directory. `build/da5/final-gate.log` contains the full gate output. No source changes remain outside the two accepted conversions.
|
||||
Reference in New Issue
Block a user