Compare commits
2 Commits
agent/rea/
...
agent/w100
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32ae78223b | ||
|
|
546603c63f |
@@ -20,7 +20,7 @@ namespace gui {
|
||||
class Manager;
|
||||
class EventHandler;
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
class __declspec(novtable) Interface {
|
||||
#else
|
||||
class Interface {
|
||||
@@ -34,14 +34,14 @@ namespace gui {
|
||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||
virtual void draw() {} // 0x18 (0x06)
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
virtual ~Interface(); // 0x1C (0x07)
|
||||
#else
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
class __declspec(novtable) EventHandler {
|
||||
#else
|
||||
class EventHandler {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ipl {
|
||||
mbDisableCon(bDisableCon) {}
|
||||
#endif
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE) || defined(IPL_SETTING_NOVTABLE)
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
|
||||
@@ -616,6 +616,17 @@ int AOSS_Init_old(AOSSInitInput* input)
|
||||
s_accessPointList = 0;
|
||||
}
|
||||
resultCode = 0xffffffff;
|
||||
} else if (state != 0) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
AOSSi_Free(s_accessPointConfig);
|
||||
s_accessPointConfig = (int *)0x0;
|
||||
}
|
||||
if (s_accessPointList) {
|
||||
AOSSi_Free(s_accessPointList);
|
||||
s_accessPointList = 0;
|
||||
}
|
||||
resultCode = 0xffffffff;
|
||||
} else {
|
||||
s_accessPointConfig = (int *)AOSSi_Alloc(0x58);
|
||||
if (s_accessPointConfig == 0) {
|
||||
@@ -801,7 +812,7 @@ perform_request:
|
||||
if (s_socketStarted == 1) {
|
||||
s_socketStarted = 0;
|
||||
requestResult = SOCleanup();
|
||||
if (-1 < requestResult) goto request_socket_cleanup_complete;
|
||||
if (0 <= requestResult) goto request_socket_cleanup_complete;
|
||||
requestResult = -1;
|
||||
}
|
||||
else {
|
||||
@@ -874,7 +885,7 @@ request_socket_cleanup_complete:
|
||||
resultCode = 0xffffffff;
|
||||
goto finish_initialization;
|
||||
}
|
||||
if ((requestResult == 0) && (*s_accessPointConfig == 1)) break;
|
||||
if ((requestResult == 0) && ((u32)*s_accessPointConfig == 1u)) break;
|
||||
remainingWait = waitIntervals.limits.response;
|
||||
for (; remainingWait != 0; remainingWait -= initialSleep) {
|
||||
if (AOSSi_cancel_flag == 1) {
|
||||
@@ -1028,11 +1039,9 @@ request_socket_cleanup_complete:
|
||||
if (0 < requestResult) goto process_received_packet;
|
||||
receivedPackets = receivedPackets + 1;
|
||||
if (receivedPackets > attemptCount) {
|
||||
switch (protocolState) {
|
||||
case 0: s_errorCode = 0xf; break;
|
||||
case 1: s_errorCode = 0x10; break;
|
||||
default: s_errorCode = 0x11; break;
|
||||
}
|
||||
if (protocolState == 0) s_errorCode = 0xf;
|
||||
else if (protocolState == 1) s_errorCode = 0x10;
|
||||
else s_errorCode = 0x11;
|
||||
protocolResult = -1;
|
||||
goto close_protocol_socket;
|
||||
}
|
||||
@@ -1220,7 +1229,7 @@ wait_for_packet:
|
||||
resultCode = 0xffffffff;
|
||||
goto finish_initialization;
|
||||
}
|
||||
if ((state == 0) && (*s_accessPointConfig == 1)) break;
|
||||
if ((state == 0) && ((u32)*s_accessPointConfig == 1u)) break;
|
||||
remainingWait = waitIntervals.limits.response;
|
||||
for (; remainingWait != 0; remainingWait -= initialSleep) {
|
||||
if (AOSSi_cancel_flag == 1) {
|
||||
@@ -1299,11 +1308,9 @@ wait_for_packet:
|
||||
}
|
||||
protocolState = requestResult;
|
||||
if (receivedPackets > waitSettings.halfwords.high) {
|
||||
switch (requestResult) {
|
||||
case 0: s_errorCode = 0xf; break;
|
||||
case 1: s_errorCode = 0x10; break;
|
||||
default: s_errorCode = 0x11; break;
|
||||
}
|
||||
if (requestResult == 0) s_errorCode = 0xf;
|
||||
else if (requestResult == 1) s_errorCode = 0x10;
|
||||
else s_errorCode = 0x11;
|
||||
protocolResult = -1;
|
||||
goto close_protocol_socket;
|
||||
}
|
||||
@@ -1322,10 +1329,9 @@ wait_for_packet:
|
||||
resultCode = 0xffffffff;
|
||||
goto finish_initialization;
|
||||
}
|
||||
if (retryDelay > 100) AOSSi_Sleep(100);
|
||||
else AOSSi_Sleep(retryDelay);
|
||||
if (retryDelay > 100) delayStep = 100;
|
||||
else delayStep = retryDelay;
|
||||
AOSSi_Sleep(retryDelay > 100 ? 100 : retryDelay);
|
||||
if (retryDelay <= 100) delayStep = retryDelay;
|
||||
else delayStep = 100;
|
||||
}
|
||||
if (AOSSi_cancel_flag == 1) {
|
||||
input->status = 0xf;
|
||||
@@ -1350,7 +1356,7 @@ close_protocol_socket:
|
||||
if (s_socketStarted == 1) {
|
||||
s_socketStarted = 0;
|
||||
state = SOCleanup();
|
||||
if (-1 < state) goto protocol_socket_cleanup_complete;
|
||||
if (0 <= state) goto protocol_socket_cleanup_complete;
|
||||
state = -1;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1547,6 +1547,7 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
s32 messageLength;
|
||||
u8 optionIds[7] = {6, 0, 1, 2, 3, 4, 5};
|
||||
AtermRequestOption8* shortOption = (AtermRequestOption8*)gAtermRequestOptions;
|
||||
AtermRequestOption16* longOption;
|
||||
@@ -1589,13 +1590,14 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
longOption++;
|
||||
}
|
||||
optionEnd = (u8*)longOption;
|
||||
gAtermMessageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 2,
|
||||
messageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 2,
|
||||
(u16*)response->data, optionEnd - gAtermRequestOptions + 8, NULL);
|
||||
gAtermMessageLength = messageLength;
|
||||
sendAddress.length = 8;
|
||||
sendAddress.family = 2;
|
||||
sendAddress.address = 0xFFFFFFFF;
|
||||
sendAddress.port = SOHtoNs(0xE601);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, gAtermMessageLength, 0, &sendAddress);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, messageLength, 0, &sendAddress);
|
||||
lastSendTime = (u32)(OSGetTime() / (__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
gAtermProtocolState = 6;
|
||||
break;
|
||||
@@ -1656,6 +1658,10 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
(__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
u32 index;
|
||||
u32 digestBytes;
|
||||
u32 state0;
|
||||
u32 state1;
|
||||
u32 state2;
|
||||
u32 state3;
|
||||
memcpy(response->authentication.challenge,
|
||||
optionValue, 8);
|
||||
digestContext.bitCountHigh = 0;
|
||||
@@ -1677,22 +1683,26 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
ATERMMd5Update(&digestContext, gAtermDigestFill,
|
||||
digestBytes < 56 ? 56 - digestBytes : 120 - digestBytes);
|
||||
ATERMMd5Update(&digestContext, digestLength, sizeof(digestLength));
|
||||
response->authentication.digest[0] = digestContext.state[0];
|
||||
response->authentication.digest[1] = digestContext.state[0] >> 8;
|
||||
response->authentication.digest[2] = digestContext.state[0] >> 16;
|
||||
response->authentication.digest[3] = digestContext.state[0] >> 24;
|
||||
response->authentication.digest[4] = digestContext.state[1];
|
||||
response->authentication.digest[5] = digestContext.state[1] >> 8;
|
||||
response->authentication.digest[6] = digestContext.state[1] >> 16;
|
||||
response->authentication.digest[7] = digestContext.state[1] >> 24;
|
||||
response->authentication.digest[8] = digestContext.state[2];
|
||||
response->authentication.digest[9] = digestContext.state[2] >> 8;
|
||||
response->authentication.digest[10] = digestContext.state[2] >> 16;
|
||||
response->authentication.digest[11] = digestContext.state[2] >> 24;
|
||||
response->authentication.digest[12] = digestContext.state[3];
|
||||
response->authentication.digest[13] = digestContext.state[3] >> 8;
|
||||
response->authentication.digest[14] = digestContext.state[3] >> 16;
|
||||
response->authentication.digest[15] = digestContext.state[3] >> 24;
|
||||
state0 = digestContext.state[0];
|
||||
state1 = digestContext.state[1];
|
||||
state2 = digestContext.state[2];
|
||||
state3 = digestContext.state[3];
|
||||
response->authentication.digest[0] = state0;
|
||||
response->authentication.digest[1] = state0 >> 8;
|
||||
response->authentication.digest[2] = state0 >> 16;
|
||||
response->authentication.digest[3] = state0 >> 24;
|
||||
response->authentication.digest[4] = state1;
|
||||
response->authentication.digest[5] = state1 >> 8;
|
||||
response->authentication.digest[6] = state1 >> 16;
|
||||
response->authentication.digest[7] = state1 >> 24;
|
||||
response->authentication.digest[8] = state2;
|
||||
response->authentication.digest[9] = state2 >> 8;
|
||||
response->authentication.digest[10] = state2 >> 16;
|
||||
response->authentication.digest[11] = state2 >> 24;
|
||||
response->authentication.digest[12] = state3;
|
||||
response->authentication.digest[13] = state3 >> 8;
|
||||
response->authentication.digest[14] = state3 >> 16;
|
||||
response->authentication.digest[15] = state3 >> 24;
|
||||
{
|
||||
u8* contextByte = (u8*)&digestContext;
|
||||
for (index = 0; index < sizeof(digestContext); index++) {
|
||||
@@ -1720,6 +1730,7 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
{
|
||||
AtermRequestOption16* option = (AtermRequestOption16*)response->authentication.decoded.options;
|
||||
AtermSocketAddress sendAddress;
|
||||
s32 messageLength;
|
||||
memset(response->data, 0, 8);
|
||||
memset(option, 0, 4);
|
||||
option->type = SOHtoNs(0x102);
|
||||
@@ -1728,13 +1739,14 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
memcpy(option->value, response->authentication.digest, 8);
|
||||
gAtermReplyLength = (u8*)(option + 1) - response->data;
|
||||
response->authentication.decoded.length = gAtermReplyLength - 8;
|
||||
gAtermMessageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 4,
|
||||
messageLength = ATERMBuildEncryptedMessage((u16*)gAtermConfigurationResult.packetBuffer, 4,
|
||||
(u16*)response->data, gAtermReplyLength, gAtermConfigurationResult.connectionPrefix);
|
||||
gAtermMessageLength = messageLength;
|
||||
sendAddress.length = 8;
|
||||
sendAddress.family = 2;
|
||||
sendAddress.address = 0xFFFFFFFF;
|
||||
sendAddress.port = SOHtoNs(0xE601);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, gAtermMessageLength, 0, &sendAddress);
|
||||
SOSendTo(socket, gAtermConfigurationResult.packetBuffer, messageLength, 0, &sendAddress);
|
||||
lastSendTime = (u32)(OSGetTime() / (__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
memset(&gScanSettings, 0, 0x254);
|
||||
gAtermProtocolState = 8;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define IPL_SETTING_NOVTABLE
|
||||
#define IPL_SETTING_RECT_OUT_OF_LINE
|
||||
#define IPL_SETTING_IMPLEMENTATION
|
||||
#include "scene/setting/iplSetting.h"
|
||||
@@ -1509,7 +1510,8 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (mpWiiSettingFlag->smthMsgData >= 2 && mpWiiSettingFlag->smthMsgData <= 7) {
|
||||
GXRenderModeObj renderMode = *System::getRenderModeObj();
|
||||
GXRenderModeObj renderMode;
|
||||
renderMode = *System::getRenderModeObj();
|
||||
u32 left;
|
||||
u32 top;
|
||||
u32 width;
|
||||
|
||||
48
tools/decomp-assist/setting.attempts.md
Normal file
48
tools/decomp-assist/setting.attempts.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# setting leaf — attempt log
|
||||
|
||||
## Decode landed this wave
|
||||
|
||||
### iplSetting::draw — struct-copy emission split (91.53 → 97.69, unit 99.29 → 99.70)
|
||||
`GXRenderModeObj renderMode = *System::getRenderModeObj();` emitted a memcpy-style
|
||||
word-copy loop (lwzu/stwu, ~8 insns). Orig emits a memberwise copy (lhz/sth for u16
|
||||
fields, lwz/stw for u32, lbz/stb for the u8 arrays — ~30 insns).
|
||||
Fix: split declaration from assignment:
|
||||
```
|
||||
GXRenderModeObj renderMode;
|
||||
renderMode = *System::getRenderModeObj();
|
||||
```
|
||||
Copy-INITIALIZATION of a C++ POD goes through MWCC's aggregate/memcpy path;
|
||||
copy-ASSIGNMENT expands memberwise. draw now 629 vs orig 632 insns.
|
||||
|
||||
### AOSS_Init_old (prior session, committed this wave)
|
||||
dead-but-emitted else arm (`else if (state != 0)` chained-beq form), `0 <= x`
|
||||
bound form, `(u32)*ptr == 1u` cast, two switch→if/else decodes, ternary-arg Sleep.
|
||||
|
||||
## Walls verified (ties, not structure)
|
||||
|
||||
### scanAP — `subi+cntlzw` bool-materialization family (3 sites)
|
||||
`if (!mpMainLayout->getAnim(i)->isPlaying())` — orig materializes the callee's
|
||||
bool (`addi r0,r3,-1; cntlzw; rlwinm. r0,r0,27,5,31; bne`), mine fuses to
|
||||
`cmpwi 1; beq`. Tried: bool local, named Animator* local, `== true`, `== false`,
|
||||
`!= 0` on the inline's return, `AnimState`-typed and `u32`-typed mState —
|
||||
MWCC folds every form to the direct compare. No out-of-line isPlaying exists on
|
||||
either side. Residual also includes 2-3 insns of lwz/addi scheduling ties.
|
||||
|
||||
### convertRevIP (98.70)
|
||||
Normalized-identical instruction stream (73=73 insns); fuzzy residual is a
|
||||
word-level register binding — regname family.
|
||||
|
||||
### draw residual (97.69, -3 insns)
|
||||
Two clusters: a `bne`/`beq+lbz+b` 3-insn branch-layout diff around the
|
||||
browserWindow guard (O56-62), and an int→f32 divide/store scheduling window
|
||||
(`srawi/stw/lfd/fsubs/fmr`, O275-293). The `beq '#F'` diffs in the normalized
|
||||
log are normalization artifacts (branch-target immediates), not real diffs.
|
||||
|
||||
### AOSS/AOSSSendHelloRequest
|
||||
Identical unrolled CRC x8 structure verified; residual is table-base pinning.
|
||||
### ATERM Md5Update
|
||||
Index-form kept (fuzzy 91.26 > pointer-walk 84.21 — fuzzy is positional).
|
||||
|
||||
## Owner ruling (PR #973)
|
||||
Dead objects that only pad a section are forbidden; unreferenced .sbss/.data
|
||||
gaps stay unowned unless a target relocation references the address.
|
||||
Reference in New Issue
Block a user