Compare commits
3 Commits
agent/bitt
...
mslmisc-cl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
449fb9a66e | ||
|
|
b6687e9ff9 | ||
|
|
ff52d5235d |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.54% | 89.91% | 68.63% | 99.37% |
|
||||
| 99.54% | 89.91% | 69.31% | 99.37% |
|
||||
|
||||
units 948/1027 complete, functions 12326/12563 matched.
|
||||
units 949/1027 complete, functions 12326/12563 matched.
|
||||
|
||||
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
|
||||
<!-- progress:end -->
|
||||
|
||||
@@ -4814,7 +4814,7 @@ reset_gui__Q33ipl5scene8SDButtonFv = .text:0x813E9BC0; // type:function size:0x1
|
||||
startPointEvent__Q33ipl5scene8SDButtonFPCcPQ33ipl10controller9Interface = .text:0x813E9D08; // type:function size:0x258
|
||||
startLeftEvent__Q33ipl5scene8SDButtonFPCc = .text:0x813E9F60; // type:function size:0x220
|
||||
isActive__Q33ipl5scene8SDButtonCFv = .text:0x813EA180; // type:function size:0xC
|
||||
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
|
||||
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
|
||||
setText__Q33ipl5scene8SDButtonFPCcPCw = .text:0x813EA1A0; // type:function size:0xB4
|
||||
animation__Q33ipl5scene8SDButtonFi = .text:0x813EA254; // type:function size:0x1C4
|
||||
initArrowAppearance__Q33ipl5scene8SDButtonFib = .text:0x813EA418; // type:function size:0xD0
|
||||
|
||||
@@ -742,7 +742,7 @@ config.libs = [
|
||||
Object(Matching, "scene/board/iplBoardObject.cpp"),
|
||||
Object(Matching, "scene/board/iplBoardSD.cpp"),
|
||||
Object(Matching, "scene/board/iplUrlProcessor.cpp"),
|
||||
Object(Equivalent, "scene/board/iplFocusObject.cpp"),
|
||||
Object(Matching, "scene/board/iplFocusObject.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("button", [
|
||||
|
||||
@@ -143,7 +143,11 @@ namespace ipl {
|
||||
#else
|
||||
VEC3 operator-(const VEC3& rhs) const { return VEC3(x - rhs.x, y - rhs.y, z - rhs.z); }
|
||||
#endif
|
||||
#ifdef IPL_FOCUS_OBJECT_CPP
|
||||
VEC3 operator*(f32 val) const;
|
||||
#else
|
||||
VEC3 operator*(f32 val) const { return VEC3(x * val, y * val, z * val); }
|
||||
#endif
|
||||
VEC3 operator*(f64 val) const {
|
||||
nw4r::math::VEC3 vecOut;
|
||||
VEC3Scale(&vecOut, this, (f32)val);
|
||||
|
||||
@@ -53,24 +53,7 @@ namespace ipl {
|
||||
mBScroller.init();
|
||||
}
|
||||
|
||||
BOOL calc(bool canScroll) __attribute__((never_inline)) /*for now*/ {
|
||||
BOOL result = FALSE;
|
||||
|
||||
if (canScroll) {
|
||||
if (mBScroller.calc()) {
|
||||
result = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
mScroller.calc();
|
||||
|
||||
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
|
||||
|
||||
mScroller.addScroll(movable);
|
||||
mBScroller.addSoundFreq(movable);
|
||||
|
||||
return result;
|
||||
}
|
||||
BOOL calc(bool canScroll);
|
||||
|
||||
BOOL is_busy() const {
|
||||
BOOL result = TRUE;
|
||||
|
||||
@@ -102,12 +102,7 @@ namespace ipl {
|
||||
static const char* getButtonName(int button) { return smButtonName[button]; }
|
||||
#endif
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
void setEventHandler(::gui::EventHandler * event,
|
||||
::gui::EventHandler * optOutEvent = NULL);
|
||||
#else
|
||||
void setEventHandler(::gui::EventHandler * event, ::gui::EventHandler * optOutEvent);
|
||||
#endif
|
||||
void setEventHandler(::gui::EventHandler * event);
|
||||
|
||||
void setText(const char* paneName, u32 msgId);
|
||||
void setText(const char* paneName, const wchar_t* text);
|
||||
|
||||
@@ -368,20 +368,20 @@ namespace nw4r {
|
||||
|
||||
u32 sheetOffsetsScratchSize;
|
||||
|
||||
dataBlockCount = font->hdr.dataBlocks; // 0x0E
|
||||
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
|
||||
dataBlockCount = font->hdr.dataBlocks; // 0x0E
|
||||
// countName = font->glgr.inner.nameCount;
|
||||
countSheet = font->glgr.inner.sheetCount;
|
||||
// count0A = font->glgr.inner.smthCount_0x0a;
|
||||
// count0C = font->glgr.inner.smthCount_0x0c;
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
|
||||
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
|
||||
font->glgr.inner.smthCount_0x0c);
|
||||
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
|
||||
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
pGlgr = &font->glgr;
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
|
||||
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define IPL_FOCUS_OBJECT_CPP
|
||||
#include "scene/board/iplFocusObject.h"
|
||||
#include "scene/parentalDialog/iplParentalDialog.h"
|
||||
|
||||
@@ -11,6 +12,8 @@
|
||||
#include <revolution/cx.h>
|
||||
#include <revolution/enc.h>
|
||||
|
||||
extern char scPaneName_B_Stop[];
|
||||
|
||||
namespace ipl {
|
||||
namespace math {
|
||||
static inline VEC3 addWeightedVectors(const VEC3& start, const VEC3& end) {
|
||||
@@ -357,6 +360,13 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
namespace math {
|
||||
inline VEC3 VEC3::operator*(f32 val) const {
|
||||
return VEC3(x * val, y * val, z * val);
|
||||
}
|
||||
}
|
||||
namespace scene {
|
||||
void focus_object::stt_normal() {
|
||||
Button* button = get_button();
|
||||
|
||||
@@ -2111,7 +2121,7 @@ namespace ipl {
|
||||
|
||||
if (event == ::gui::EventHandler::ON_TRIG) {
|
||||
if (con->downTrg(controller::BTN_INTERACT)) {
|
||||
if (strcmp(paneName, "B_Stop") == 0) {
|
||||
if (strcmp(paneName, scPaneName_B_Stop) == 0) {
|
||||
if (mpInstance->mState == focus_object::STATE_NORMAL) {
|
||||
focus_object::get_button()->animation(Button::IDANIM_OPTOUT_SELECT);
|
||||
|
||||
@@ -2132,3 +2142,24 @@ namespace ipl {
|
||||
}
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
char scPaneName_B_Stop[] = "B_Stop";
|
||||
|
||||
BOOL ipl::scene::scroller::calc(bool canScroll) {
|
||||
BOOL result = FALSE;
|
||||
|
||||
if (canScroll) {
|
||||
if (mBScroller.calc()) {
|
||||
result = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
mScroller.calc();
|
||||
|
||||
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
|
||||
|
||||
mScroller.addScroll(movable);
|
||||
mBScroller.addSoundFreq(movable);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ namespace ipl {
|
||||
return isSceneCreated();
|
||||
}
|
||||
|
||||
void SDButton::setEventHandler(::gui::EventHandler* event, ::gui::EventHandler* optOutEvent) {
|
||||
void SDButton::setEventHandler(::gui::EventHandler* event) {
|
||||
mpGui->setEventHandler(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ FaderSceneCommand SDChannelTitle::calcFadein() {
|
||||
if (!mpFade->isPlaying()) {
|
||||
iplSDChannelTitle_playBannerIntro(this);
|
||||
SDButton* button = static_cast<SDButton*>(System::getScene(0x24));
|
||||
button->setEventHandler(mpButtonEventHandler, NULL);
|
||||
button->setEventHandler(mpButtonEventHandler);
|
||||
button->animation(13);
|
||||
button->animation(14);
|
||||
mState = 1;
|
||||
@@ -344,7 +344,7 @@ void SDChannelTitle::initCalcFadeout() {
|
||||
button->animation(15);
|
||||
button->animation(16);
|
||||
}
|
||||
button->setEventHandler(NULL, NULL);
|
||||
button->setEventHandler(NULL);
|
||||
}
|
||||
|
||||
FaderSceneCommand SDChannelTitle::calcFadeout() {
|
||||
|
||||
57
tools/decomp-assist/mslmisc.attempts.md
Normal file
57
tools/decomp-assist/mslmisc.attempts.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# mslmisc leaf attempts
|
||||
|
||||
Owned units: `src/scene/sdChannelTitle/iplSDChannelTitle.cpp`, `libs/NW4R/src/ut/ut_ArchiveFontBase.cpp`.
|
||||
MSL checked via live report: only `MSL_Common/wprintf` incomplete — stays in misc1b's notes.
|
||||
|
||||
## DECODE: SDButton::setEventHandler retail dead-param (SOLVED)
|
||||
|
||||
orig's real decl was **1-arg** `setEventHandler(EventHandler*)`. Evidence:
|
||||
- Every orig call site (title ×2, select ×4) emits a bare `bl` with only r3/r4 — never `li r5,0`.
|
||||
- The 5-insn DEF (`lwz r3,0x60; lwz r12,0; lwz r12,0x38; mtctr; bctr`) forwards to `Manager::setEventHandler`, a 1-arg weak virtual — `optOut` was never consumed.
|
||||
- `Button::setEventHandler` (a DIFFERENT class, genuine 2-arg impl at 0x8139C93C) DOES emit `li r5,0` in iplFocusObject — MWCC materializes default args, so SDButton's missing r5 means the decl never had it.
|
||||
- The 2-arg mangle in symbols.txt was an author mislabel inherited from `Button`'s real 2-arg.
|
||||
|
||||
Fix (all kept): `iplSDButton.h` decl → `void setEventHandler(::gui::EventHandler* event);`; `iplSDButton.cpp` def → 1-arg; call sites in sdChannelTitle/sdChannelSelect → 1-arg; `config/43U/symbols.txt` line 4817 renamed `...8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler` → `...8SDButtonFPQ23gui12EventHandler`. Flipped 5 fns to instruction-identical + all sdChannelTitle data sections to 100%.
|
||||
|
||||
Mechanism note: renaming a `.text` address in symbols.txt propagates through the splitter into orig's DEF name AND every caller's UND reloc name — the legit rename lever.
|
||||
|
||||
## UNSOLVED: enqueue*Notice leading dead-arg (r4)
|
||||
|
||||
`SDChannelSelect::enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value)` and
|
||||
`enqueueStateNotice(u32 controller, u32 state, u32 type, u32)` (4×u32 each; defs build
|
||||
`command.titleId = ((u64)page << 32) | index` — proven 4×u32, not u64).
|
||||
|
||||
orig call sites marshal r5/r6/r7 but **never write r4** (arg1 `controller` — dead param the
|
||||
def bodies ignore; iplSDMemory callers DO materialize it). Same dead-arg family as
|
||||
setEventHandler but on a LEADING arg — no decl form reproduces it:
|
||||
- arg-count reduction shifts the marshal left (breaks r5/r6/r7 positions)
|
||||
- defaulted params must be trailing
|
||||
- `(u32,u64,u32)` still needs `li r4,0` for arg1
|
||||
- `scene->mPage`/`mIndex`/`channel` as arg1 all emit real loads (`lwz`/`mr`) — orig has none
|
||||
- r4 is call-clobbered at both sites (`bl findChannelObject`, `bl isReceiveScheduleStopped`)
|
||||
so no "value already in r4" source expr exists
|
||||
|
||||
Residual = `+li r4,0` plus marshal-order (orig emits r6-before-r5 / addi-first) — scheduler family.
|
||||
|
||||
## TIE: flushSaveBeforeExit eval-order (98.59)
|
||||
|
||||
Insn+reloc-identical except a 6-word window: orig `lis r3` (smArg base→r3), `lwz r4,0x94` (stw-mgr),
|
||||
`stw`, `lwz r4,0x28` (heap), `lwz r3,0x94` (flush receiver — reloaded LAST). Mine: base→r4,
|
||||
receiver-load before heap-load. Orig evaluated the `flushAsync` ARG before the receiver reload.
|
||||
Tried: `saveHeap` local (before/after stw, decl-init, separate assign — emits at-birth or at-use,
|
||||
never between), `saveData`/`mgr` local (caches receiver → 5-insn form, wrong), nested
|
||||
`flushAsync(System::getMem2App())` (same as original). All ~6-word identical or regression.
|
||||
|
||||
## TIE: ConstructOpAnalyzeGLGR 20-diff window (91.79)
|
||||
|
||||
239/239 insns — orig interleaves `lhz r31,0x1c` (sheetGlyphCount) + `lhz r23,0xe` (dataBlockCount)
|
||||
mid-flag-chain (issued at birth, deep-callee homes); mine emits both at-use (`lhz r26/r25`,
|
||||
~8 insns later). Same callee-web rotation family. Kept: flags-first reorder (24→20 diffs) +
|
||||
the second `pGlgr = &font->glgr` assignment (removing it = 113 diffs). Decl-init variant no-op.
|
||||
|
||||
## Status
|
||||
|
||||
- iplSDChannelTitle: .text 99.9, all data sections 100% (baseline was data 12.1%). Three
|
||||
sub-100 fns — all at the anomalies/ties above.
|
||||
- ut_ArchiveFontBase: .text 98.5 — the 20-diff window.
|
||||
- DOL sha1 `26116613f624061ba99c8d1a299aaa6efa85670d` verified. No shims; both units stay NonMatching.
|
||||
Reference in New Issue
Block a user