Compare commits
7 Commits
agent/read
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13482ce5c4 | ||
|
|
f055c43c22 | ||
|
|
985bae5d42 | ||
|
|
d4696caeaf | ||
|
|
2b4ed18122 | ||
|
|
02e50d2dc2 | ||
|
|
46d7abf8c0 |
62
.github/workflows/readme-progress.yml
vendored
Normal file
62
.github/workflows/readme-progress.yml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
name: README progress
|
||||
|
||||
# runs on the self-hosted runner on cole's server so it doesn't use hosted minutes.
|
||||
# only push/schedule/manual triggers, never pull_request, so fork PRs can't reach this machine.
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore: [README.md]
|
||||
schedule:
|
||||
- cron: "*/30 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: readme-progress
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
progress:
|
||||
runs-on: [self-hosted, wii-ipl-local]
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
ORIG_APP: /mnt/drive2/projects/wiichannels/wii-ipl/orig/43U/00000008.app
|
||||
TOOL_CACHE: /mnt/drive2/projects/wiichannels/wii-ipl/build
|
||||
NINJA: /home/cole/projects/tests/.venv/bin/ninja
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
mkdir -p build orig/43U
|
||||
cp "$ORIG_APP" orig/43U/00000008.app
|
||||
[ -d build/compilers ] || cp -a "$TOOL_CACHE/compilers" build/
|
||||
[ -d build/tools ] || cp -a "$TOOL_CACHE/tools" build/
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
python3 configure.py --version 43U
|
||||
"$NINJA"
|
||||
"$NINJA" build/43U/ok
|
||||
|
||||
- name: Report
|
||||
run: build/tools/objdiff-cli report generate -p . -o build/43U/report.json -f json
|
||||
|
||||
- name: Update README
|
||||
run: python3 tools/update_readme_progress.py build/43U/report.json README.md "$GITHUB_SHA"
|
||||
|
||||
- name: Commit
|
||||
run: |
|
||||
if git diff --quiet README.md; then exit 0; fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add README.md
|
||||
git commit -m "docs: update progress [skip ci]"
|
||||
git pull --rebase origin main || { git rebase --abort; echo "main moved, next run will update"; exit 0; }
|
||||
git push origin HEAD:main
|
||||
10
README.md
10
README.md
@@ -50,6 +50,16 @@ Supported versions:
|
||||
|
||||
Progress
|
||||
========
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 81.01% | 72.26% | 56.76% | 86.16% |
|
||||
|
||||
units 748/1027 complete, functions 10575/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 -->
|
||||
|
||||
| Version | Progress |
|
||||
|-----------------------|------------------------------------------------------------------------------|
|
||||
| [Wii Menu 4.3U][V43U] | [![FuncBadgeV43U]][V43U] [![DecompBadgeV43U]][V43U] [![LinkBadgeV43U]][V43U] |
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace textinput {
|
||||
};
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
virtual inline void init();
|
||||
virtual void updateFromReceiver(u32 command, void* data);
|
||||
virtual void onKey(u32 event, void* data);
|
||||
virtual int getType();
|
||||
@@ -159,46 +159,15 @@ namespace textinput {
|
||||
};
|
||||
|
||||
class LayoutByNW4R;
|
||||
class AnmPane : public nw4rmanager::AnmPane {
|
||||
class AnmPane;
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
AnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : nw4rmanager::AnmPane(pane, observer), mAnimation(0) {}
|
||||
virtual void init();
|
||||
virtual void changeAnimation(u32 animation);
|
||||
virtual ~AnmPane();
|
||||
virtual int getState() const { return mAnimation; }
|
||||
virtual int getKeyType() const { return mKeyType; }
|
||||
|
||||
protected:
|
||||
int mAnimation;
|
||||
int mKeyType;
|
||||
};
|
||||
class NormalButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
NormalButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) { mKeyType = 0; }
|
||||
virtual ~NormalButtonAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
};
|
||||
class ShiftCapsAnmPane : public AnmPane {
|
||||
public:
|
||||
ShiftCapsAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer), mbOn(false) { mKeyType = 1; }
|
||||
virtual ~ShiftCapsAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
bool isFocused() const;
|
||||
EventHandler(LayoutByNW4R* layout) : mpKeyboard(layout) {}
|
||||
virtual ~EventHandler();
|
||||
virtual void onTiEvent(gui::PaneComponent* component, u32 event, Input* input);
|
||||
|
||||
private:
|
||||
bool mbOn;
|
||||
};
|
||||
class ToggleButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
ToggleButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) { mKeyType = 2; }
|
||||
virtual ~ToggleButtonAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
};
|
||||
class OnOffButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
OnOffButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) { mKeyType = 3; }
|
||||
virtual ~OnOffButtonAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
LayoutByNW4R* mpKeyboard;
|
||||
};
|
||||
class UIObj : public gui::EventHandler {
|
||||
public:
|
||||
@@ -244,15 +213,6 @@ namespace textinput {
|
||||
GXTexObj mEnglishTexture;
|
||||
GXTexObj mHangulTexture;
|
||||
};
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
EventHandler(LayoutByNW4R* layout) : mpKeyboard(layout) {}
|
||||
virtual ~EventHandler();
|
||||
virtual void onTiEvent(gui::PaneComponent* component, u32 event, Input* input);
|
||||
|
||||
private:
|
||||
LayoutByNW4R* mpKeyboard;
|
||||
};
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public UIObj::Listener {
|
||||
public:
|
||||
virtual ~LayoutByNW4R();
|
||||
@@ -305,6 +265,48 @@ namespace textinput {
|
||||
UIModePanel mModePanel;
|
||||
};
|
||||
|
||||
class AnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
AnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : nw4rmanager::AnmPane(pane, observer), mAnimation(0) {}
|
||||
virtual void init();
|
||||
virtual void changeAnimation(u32 animation);
|
||||
virtual ~AnmPane();
|
||||
virtual int getState() const { return mAnimation; }
|
||||
virtual int getKeyType() const { return mKeyType; }
|
||||
|
||||
protected:
|
||||
int mAnimation;
|
||||
int mKeyType;
|
||||
};
|
||||
class NormalButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
NormalButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) { mKeyType = 0; }
|
||||
virtual ~NormalButtonAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
};
|
||||
class ShiftCapsAnmPane : public AnmPane {
|
||||
public:
|
||||
ShiftCapsAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer), mbOn(false) { mKeyType = 1; }
|
||||
virtual ~ShiftCapsAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
bool isFocused() const;
|
||||
|
||||
private:
|
||||
bool mbOn;
|
||||
};
|
||||
class ToggleButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
ToggleButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) { mKeyType = 2; }
|
||||
virtual ~ToggleButtonAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
};
|
||||
class OnOffButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
OnOffButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) { mKeyType = 3; }
|
||||
virtual ~OnOffButtonAnmPane();
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1533,8 +1533,8 @@ const char* vmErrorList[] = {
|
||||
"CHANS_VM_ERR_RESERVED_OPCODE", /* -923 */
|
||||
};
|
||||
|
||||
const char* vmNoError = "CHANS_VM_OK";
|
||||
const char* vmUnknownError = "(unknown)";
|
||||
char vmNoError[] = "CHANS_VM_OK";
|
||||
char vmUnknownError[] = "(unknown)";
|
||||
|
||||
CHANSVmNativeClass* CHANSVmFindNativeClass(CHANSVm* vm, const char* clsName) {
|
||||
CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;
|
||||
@@ -2631,10 +2631,8 @@ VmMethodDefine(Date, GetRTC) {
|
||||
u32 bias = SCGetCounterBias();
|
||||
s64 ticks = OSCalendarTimeToTicks(cal);
|
||||
u64 t = ticks / (__OSBusClock / 4 / 1000);
|
||||
u32 val;
|
||||
t = t / 1000;
|
||||
val = (u32)(t - (unsigned int)bias);
|
||||
return CHANSVmSetInteger(VmInst, VmReturnObj, val) == CHANS_VM_OK;
|
||||
return CHANSVmSetInteger(VmInst, VmReturnObj, (u64)(t - bias) & 0xFFFFFFFFULL) == CHANS_VM_OK;
|
||||
}
|
||||
|
||||
const CHANSVmMethodList VmDateMethodTbl[] = {
|
||||
@@ -3200,7 +3198,7 @@ VmMethodDefine(String, Splice) {
|
||||
length = tempLen;
|
||||
}
|
||||
|
||||
newLen = length - start & ~-(s32)(start >= length);
|
||||
newLen = start >= length ? 0 : length - start;
|
||||
|
||||
if (CHANSVmNewObject(VmInst, vmFalse, VmReturnObj, CHANS_VM_OBJ_TYPE_STRING, newLen) != vmNull) {
|
||||
if (newLen != 0) {
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
namespace textinput {
|
||||
namespace keyboard {
|
||||
namespace pctype {
|
||||
struct SelectorPosition {
|
||||
f32 coordinates[3];
|
||||
};
|
||||
extern SelectorPosition chinesePosition;
|
||||
extern SelectorPosition koreanPosition;
|
||||
|
||||
static const wchar_t* PREDICT_CAPTIONS[] = {L"", L"", L"Eng", L"Fra", L"Esp", L"EN", L"DE", L"FR", L"ES", L"IT", L"NL", L"CN", L"KR"};
|
||||
|
||||
static const GridKey csGridKeyboard[] = {
|
||||
@@ -1600,7 +1606,7 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void Base::setTranslateMode(TranslateMode mode) {
|
||||
u32 keyMode;
|
||||
u32 keyMode = mode;
|
||||
switch (mode) {
|
||||
case TM_Direct:
|
||||
keyMode = 0;
|
||||
@@ -1612,7 +1618,7 @@ namespace textinput {
|
||||
keyMode = 2;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (keyMode != (mKeyState.abcFlags & 15)) {
|
||||
if (getLanguage() == KR || getLanguage() == CN)
|
||||
@@ -1711,14 +1717,19 @@ namespace textinput {
|
||||
util::replaceChar(name, sizeof(name), data->ascii[i].szPaneName, 0, 'T');
|
||||
nw4r::lyt::TextBox* text = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(root->FindPaneByName(name, true));
|
||||
if (text != NULL) {
|
||||
wchar_t caption[2] = {getWCCode(i), 0};
|
||||
wchar_t caption[2];
|
||||
caption[0] = getWCCode(i);
|
||||
caption[1] = 0;
|
||||
if (language == KR && (abcFlags & 15) == 1) {
|
||||
if (owner->isCapsOn())
|
||||
caption[0] = util::reverseLetterCaseW(caption[0]);
|
||||
if (caption[0] >= L'a' && caption[0] <= L'z')
|
||||
caption[0] = KOREAN_LOWER[caption[0] - L'a'];
|
||||
else if (caption[0] >= L'A' && caption[0] <= L'Z')
|
||||
caption[0] = KOREAN_UPPER[caption[0] - L'A'];
|
||||
bool caps = owner->isCapsOn();
|
||||
u32 character = caption[0];
|
||||
if (caps)
|
||||
character = util::reverseLetterCaseW(character);
|
||||
if (character >= L'a' && character <= L'z')
|
||||
character = KOREAN_LOWER[static_cast<wchar_t>(character) - L'a'];
|
||||
else if (character >= L'A' && character <= L'Z')
|
||||
character = KOREAN_UPPER[static_cast<wchar_t>(character) - L'A'];
|
||||
caption[0] = character;
|
||||
}
|
||||
text->SetString(caption);
|
||||
}
|
||||
@@ -1728,7 +1739,9 @@ namespace textinput {
|
||||
util::replaceChar(name, sizeof(name), data->grid[i].paneName, 0, 'T');
|
||||
nw4r::lyt::TextBox* text = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(root->FindPaneByName(name, true));
|
||||
if (text != NULL) {
|
||||
wchar_t caption[2] = {data->grid[i].codes[3 - ((aiuFlags & 15) == 0)], 0};
|
||||
wchar_t caption[2];
|
||||
caption[0] = data->grid[i].codes[(aiuFlags & 15) == 0 ? 2 : 3];
|
||||
caption[1] = 0;
|
||||
text->SetString(caption);
|
||||
}
|
||||
}
|
||||
@@ -1936,16 +1949,16 @@ namespace textinput {
|
||||
setLineFeedButton(true);
|
||||
setPredictLanguageButton(true);
|
||||
setSignWindowButton(true);
|
||||
const nw4r::math::VEC3 chinesePosition(-219.0f, -130.0f, 0.0f);
|
||||
const nw4r::math::VEC3 koreanPosition(-209.0f, -90.0f, 0.0f);
|
||||
SelectorPosition chineseTranslation = chinesePosition;
|
||||
SelectorPosition koreanTranslation = koreanPosition;
|
||||
if (meLanguage == CN) {
|
||||
mModePanel.mpEnglishText->GetMaterial()->SetTexture(0, mModePanel.mDirectTexture);
|
||||
mModePanel.mpHangulText->GetMaterial()->SetTexture(0, mModePanel.mPinyinTexture);
|
||||
mModePanel.mpModeSelect->SetTranslate(chinesePosition);
|
||||
mModePanel.mpModeSelect->SetTranslate(nw4r::math::VEC3(chineseTranslation.coordinates));
|
||||
} else if (meLanguage == KR) {
|
||||
mModePanel.mpEnglishText->GetMaterial()->SetTexture(0, mModePanel.mEnglishTexture);
|
||||
mModePanel.mpHangulText->GetMaterial()->SetTexture(0, mModePanel.mHangulTexture);
|
||||
mModePanel.mpModeSelect->SetTranslate(koreanPosition);
|
||||
mModePanel.mpModeSelect->SetTranslate(nw4r::math::VEC3(koreanTranslation.coordinates));
|
||||
}
|
||||
searchAnmPane("P_key_SHIFT")->changeAnimation(0);
|
||||
searchAnmPane("P_key_CAPS")->changeAnimation(0);
|
||||
@@ -2020,12 +2033,17 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
if (getLanguage() == KR || getLanguage() == CN) {
|
||||
if ((mKeyState.abcFlags & 15) == 0) {
|
||||
searchAnmPane("P_Mode_kr_eng")->changeAnimation(5);
|
||||
searchAnmPane("P_Mode_kr_han")->changeAnimation(0);
|
||||
} else {
|
||||
searchAnmPane("P_Mode_kr_eng")->changeAnimation(0);
|
||||
searchAnmPane("P_Mode_kr_han")->changeAnimation(5);
|
||||
switch (mKeyState.abcFlags & 15) {
|
||||
case 0: {
|
||||
searchAnmPane("P_Mode_kr_eng")->changeAnimation(5);
|
||||
searchAnmPane("P_Mode_kr_han")->changeAnimation(0);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
searchAnmPane("P_Mode_kr_eng")->changeAnimation(0);
|
||||
searchAnmPane("P_Mode_kr_han")->changeAnimation(5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
mpLayout->Animate(0);
|
||||
@@ -2088,7 +2106,8 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::onReleasedShift() {
|
||||
mKeyState.setABCFlag(mKeyState.abcFlags & ~143);
|
||||
u32 flags = mKeyState.abcFlags & ~143;
|
||||
mKeyState.setABCFlag(flags);
|
||||
if (mShiftButton.mbOn) {
|
||||
mShiftButton.mbOn = false;
|
||||
mShiftButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(5));
|
||||
@@ -2099,13 +2118,33 @@ namespace textinput {
|
||||
getWCCode(static_cast<char*>(data));
|
||||
if (event == 4 && getWCCode(static_cast<char*>(data)) == 0) {
|
||||
switch (getControlKey(static_cast<char*>(data))) {
|
||||
case 0:
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(9));
|
||||
case 3: {
|
||||
LayoutGather& gather = LayoutGather::Singleton::getInstance();
|
||||
if (!gather.isHoldingShift()) {
|
||||
if (mKeyState.abcFlags & ~15) {
|
||||
mKeyState.abcFlags &= ~128;
|
||||
mKeyState.refresh_();
|
||||
}
|
||||
if (mShiftButton.mbOn) {
|
||||
mShiftButton.mbOn = false;
|
||||
mShiftButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(5));
|
||||
}
|
||||
}
|
||||
u8 caps = !gather.isCapsLock();
|
||||
gather.changeCapsLock(caps);
|
||||
mKeyState.abcFlags = ((mKeyState.abcFlags ^ 64) & 64) | (mKeyState.abcFlags & ~64);
|
||||
mKeyState.refresh_();
|
||||
mCapsButton.mbOn = (mKeyState.abcFlags >> 6) & 1;
|
||||
if (mCapsButton.mbOn)
|
||||
mCapsButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(10));
|
||||
else
|
||||
mCapsButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(11));
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
|
||||
break;
|
||||
case 3:
|
||||
onPressedCaps();
|
||||
break;
|
||||
case 4:
|
||||
}
|
||||
case 4: {
|
||||
LayoutGather& shiftGather = LayoutGather::Singleton::getInstance();
|
||||
if (mKeyState.abcFlags & ~15) {
|
||||
mKeyState.abcFlags &= ~64;
|
||||
mKeyState.refresh_();
|
||||
@@ -2114,17 +2153,21 @@ namespace textinput {
|
||||
mCapsButton.mbOn = false;
|
||||
mCapsButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(5));
|
||||
}
|
||||
if (!LayoutGather::Singleton::getInstance().isHoldingShift()) {
|
||||
if (!shiftGather.isHoldingShift()) {
|
||||
mKeyState.abcFlags = ((mKeyState.abcFlags ^ 128) & 128) | (mKeyState.abcFlags & ~128);
|
||||
mKeyState.refresh_();
|
||||
}
|
||||
mShiftButton.mbOn = (mKeyState.abcFlags >> 7) & 1;
|
||||
if (!mShiftButton.mbOn)
|
||||
mShiftButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(11));
|
||||
else
|
||||
if (mShiftButton.mbOn)
|
||||
mShiftButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(10));
|
||||
else
|
||||
mShiftButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(11));
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(9));
|
||||
break;
|
||||
case 11:
|
||||
if (!isABC()) {
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
@@ -2137,6 +2180,18 @@ namespace textinput {
|
||||
searchAnmPane("W_JP_Chng_ABC")->changeAnimation(6);
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
if ((mKeyState.aiuFlags & 15) == 1) {
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
searchAnmPane("P_katakana")->changeAnimation(6);
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
if ((mKeyState.aiuFlags & 15) == 0) {
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
searchAnmPane("P_hiragana")->changeAnimation(6);
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if ((mKeyState.abcFlags & 15) == 2)
|
||||
searchAnmPane("P_Mode_roma_kata")->changeAnimation(6);
|
||||
@@ -2159,18 +2214,6 @@ namespace textinput {
|
||||
if ((mKeyState.abcFlags & 15) == 1)
|
||||
searchAnmPane("P_Mode_roma_hira")->changeAnimation(6);
|
||||
break;
|
||||
case 18:
|
||||
if ((mKeyState.aiuFlags & 15) == 1) {
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
searchAnmPane("P_katakana")->changeAnimation(6);
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
if ((mKeyState.aiuFlags & 15) == 0) {
|
||||
mpEventObserver->onSE(static_cast<sound::SE>(13));
|
||||
searchAnmPane("P_hiragana")->changeAnimation(6);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
Base::onKey(event, data);
|
||||
@@ -2303,7 +2346,7 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::sendInputWChar(wchar_t code, bool repeat) {
|
||||
bool shift = (mKeyState.abcFlags & 128) != 0;
|
||||
u32 shift = mKeyState.abcFlags & 128;
|
||||
nw4r::lyt::Pane* last = NULL;
|
||||
if (shift)
|
||||
last = mAnmPaneFifo.getLast();
|
||||
@@ -2492,14 +2535,19 @@ namespace textinput {
|
||||
nw4rmanager::AnmPane* animation = NULL;
|
||||
u8 key = keys.GetKey();
|
||||
keys.GetWChar();
|
||||
if (key < 0x2c) {
|
||||
if (key == 0x2a && !(hkb.GetModifierState() & 4))
|
||||
switch (key) {
|
||||
case 0x2a:
|
||||
if (!(hkb.GetModifierState() & 4))
|
||||
animation = searchAnmPane("P_key_DELETE");
|
||||
break;
|
||||
case 0x2c:
|
||||
if (!(hkb.GetModifierState() & 8))
|
||||
animation = searchAnmPane("P_key_SPACE");
|
||||
break;
|
||||
case 0x4c:
|
||||
animation = searchAnmPane("P_key_DELETE");
|
||||
} else if (key == 0x2c) {
|
||||
if (!(hkb.GetModifierState() & 8))
|
||||
animation = searchAnmPane("P_key_SPACE");
|
||||
} else if (key == 0x4c)
|
||||
animation = searchAnmPane("P_key_DELETE");
|
||||
break;
|
||||
}
|
||||
if (animation != NULL)
|
||||
animation->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
keys = keys.GetNext();
|
||||
@@ -2559,8 +2607,7 @@ namespace textinput {
|
||||
mCapsButton.mbOn = false;
|
||||
mCapsButton.mpAnimation->onAnmEvent(static_cast<AnmPane::AnmPaneEvent>(5));
|
||||
}
|
||||
const u8 caps = 0;
|
||||
LayoutGather::Singleton::getInstance().changeCapsLock(caps);
|
||||
LayoutGather::Singleton::getInstance().changeCapsLock(0);
|
||||
}
|
||||
if (visible)
|
||||
initPaneLastDrawReceived();
|
||||
@@ -2611,7 +2658,7 @@ namespace textinput {
|
||||
util::strcmp("P_key_SPACE", animationName) || util::strcmp("P_Gkey_SPACE", animationName)) &&
|
||||
component->isDragging(input->field_0x00)) {
|
||||
u32 frames = mpKeyboard->getFlightDuration(input->field_0x00, name);
|
||||
if (frames > 29 && frames % 9 == 0) {
|
||||
if (frames >= 30 && frames % 9 == 0) {
|
||||
animation->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
mpKeyboard->onKey(4, animationName);
|
||||
}
|
||||
@@ -3084,6 +3131,9 @@ namespace textinput {
|
||||
void Base::setInputModeJP(bool, u32, u32) {
|
||||
}
|
||||
|
||||
SelectorPosition chinesePosition = {{-219.0f, -130.0f, 0.0f}};
|
||||
SelectorPosition koreanPosition = {{-209.0f, -90.0f, 0.0f}};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
235
tools/decomp-assist/CHANSVm.attempts.md
Normal file
235
tools/decomp-assist/CHANSVm.attempts.md
Normal file
@@ -0,0 +1,235 @@
|
||||
# CHANSVm attempt log
|
||||
|
||||
43U only. Baseline: 201/233 instruction-exact, 202/233 objdiff-matched, code 30984/53564 bytes, data 16/6904 bytes. The original string pool has 125 strings and matches the initial source pool.
|
||||
|
||||
Each experiment rebuilt only CHANSVm.o, regenerated objdiff, compared instruction counts and instruction operands, and checked previously matched functions in this unit. Unaccepted experiments were restored. No shared headers or other source units changed.
|
||||
|
||||
Accepted source changes: VmDateGetRTC preserves the 64-bit subtraction mask; VmStringSplice expresses the clipped result length with a conditional. vmNoError and vmUnknownError are character arrays, matching the original symbol sizes 12 and 10, rather than pointers. Their writable array definitions preserve the pool; const arrays moved their text into .rodata and regressed CHANSVmInit, so that variant was restored.
|
||||
|
||||
A CalcRangeMD5Digest experiment reached zero instruction differences by reusing an object pointer for byte data. It was discarded because that pointer reuse was less readable than the existing code. Its later exact variants were discarded with it.
|
||||
|
||||
VmBlobFill has 100% objdiff but two raw conditional-branch operand differences in the baseline. The same discrepancy remains; it is included below.
|
||||
|
||||
## CHANSVmGetSourceLine
|
||||
|
||||
- use lineData once for bounds and read: did not compile, C89 declaration placement; restored. A corrected compiling variant is recorded separately.
|
||||
- reverse entry and offset addition: 97.71739%; instructions 46/46, differing instruction positions 16; restored.
|
||||
- while loop with explicit increment: 97.71739%; instructions 46/46, differing instruction positions 16; restored.
|
||||
- hoist lineData declaration and common address: 97.71739%; instructions 46/46, differing instruction positions 16; restored.
|
||||
- source line offsets relative to line table base: 97.82609%; instructions 46/46, differing instruction positions 16; restored.
|
||||
- cache module and line table with base relative offsets: 97.391304%; instructions 46/46, differing instruction positions 17; restored.
|
||||
|
||||
## CHANSVmNewObjData
|
||||
|
||||
- allocation failure returns null immediately: 97.239586%; instructions 98/96, differing instruction positions 69; restored.
|
||||
- chunk scan for loop: 99.375%; instructions 96/96, differing instruction positions 11; restored.
|
||||
- inner entry scan for loop: 99.375%; instructions 96/96, differing instruction positions 11; restored.
|
||||
- all failure paths return directly: 92.135414%; instructions 102/96, differing instruction positions 90; restored.
|
||||
|
||||
## CHANSVmStrCpyToU16FromU8
|
||||
|
||||
- reassign source argument at end: did not compile, C89 declaration placement; restored. A corrected compiling variant is recorded separately.
|
||||
- assign length byte offset and use loop counter: 81.92308%; instructions 13/13, differing instruction positions 6; restored.
|
||||
- pointer destination reverse walk: 97.30769%; instructions 13/13, differing instruction positions 5; restored.
|
||||
- reuse input argument after declarations: 80.76923%; instructions 13/13, differing instruction positions 7; restored.
|
||||
- initialize byte offset before source pointer: 81.53846%; instructions 13/13, differing instruction positions 7; restored.
|
||||
- set output high byte before low byte: 67.69231%; instructions 13/13, differing instruction positions 6; restored.
|
||||
|
||||
## CHANSVmParseInt
|
||||
|
||||
- initialize end pointer in declaration: 94.69388%; instructions 49/49, differing instruction positions 3; restored.
|
||||
- initialize end pointer before type load: 83.67347%; instructions 49/49, differing instruction positions 5; restored.
|
||||
- direct object type comparison: 83.67347%; instructions 49/49, differing instruction positions 5; restored.
|
||||
- zero parsing end pointer with memset: 77.02041%; instructions 53/49, differing instruction positions 51; restored.
|
||||
- scope end pointer with parsing buffer: 87.755104%; instructions 49/49, differing instruction positions 6; restored.
|
||||
- split number and end pointer initialization in parsing call scope: 78.44898%; instructions 49/49, differing instruction positions 33; restored.
|
||||
|
||||
## CHANSVm_8144B4D4
|
||||
|
||||
- ordinary char end pointer for strtod: 96.92771%; instructions 83/83, differing instruction positions 13; restored.
|
||||
- initialize end pointer before object allocation: 94.518074%; instructions 83/83, differing instruction positions 20; restored.
|
||||
- direct object type test: 94.518074%; instructions 83/83, differing instruction positions 13; restored.
|
||||
|
||||
## VmArrayExpandCommon
|
||||
|
||||
- separate capacity and element byte offset: 98.70588%; instructions 85/85, differing instruction positions 17; restored.
|
||||
- declare chunk before capacity: 99.35294%; instructions 85/85, differing instruction positions 8; restored.
|
||||
- inline allocation size expression: 99.35294%; instructions 85/85, differing instruction positions 8; restored.
|
||||
|
||||
## VmArraySlice
|
||||
|
||||
- mutable signed start and end indexes: 95.75188%; instructions 133/133, differing instruction positions 65; restored.
|
||||
- initialize end beside length: 94.172935%; instructions 132/133, differing instruction positions 93; restored.
|
||||
- loop index while form: 96.2782%; instructions 133/133, differing instruction positions 56; restored.
|
||||
|
||||
## VmDateDtor
|
||||
|
||||
- load month name before snprintf: 94.96703%; instructions 91/91, differing instruction positions 7; restored.
|
||||
- load day then month into local names: 94.96703%; instructions 91/91, differing instruction positions 7; restored.
|
||||
- use date aggregate fields for formatting: 82.12088%; instructions 97/91, differing instruction positions 80; restored.
|
||||
|
||||
## VmDateGetRTC
|
||||
|
||||
- explicit unsigned integer result mask: 100.0%; instructions 38/38, differing instruction positions 0; retained during iteration.
|
||||
- cast seconds before subtracting bias: 100.0%; instructions 38/38, differing instruction positions 0; retained during iteration.
|
||||
- signed seconds temporary: 83.947365%; instructions 38/38, differing instruction positions 5; restored.
|
||||
- remove obsolete narrowed result local: 100.0%; instructions 38/38, differing instruction positions 0; retained during iteration.
|
||||
|
||||
## VmStringFromCharCode
|
||||
|
||||
- separate narrowed codepoint temporary: 94.32204%; instructions 57/59, differing instruction positions 45; restored.
|
||||
- reverse offset and index update order: 99.40678%; instructions 59/59, differing instruction positions 6; restored.
|
||||
- for loop with byte offset: 99.40678%; instructions 59/59, differing instruction positions 6; restored.
|
||||
|
||||
## VmStringReplace
|
||||
|
||||
- load search fields before parent fields: 97.257576%; instructions 132/132, differing instruction positions 52; restored.
|
||||
- load parent pointer before lengths: 97.106064%; instructions 132/132, differing instruction positions 53; restored.
|
||||
- cache parent and search value structures: 97.82576%; instructions 132/132, differing instruction positions 47; restored.
|
||||
|
||||
## VmStringSplice
|
||||
|
||||
- signed byte offsets update in place: 97.55372%; instructions 121/121, differing instruction positions 8; restored.
|
||||
- conditional result length: 100.0%; instructions 121/121, differing instruction positions 0; retained during iteration.
|
||||
- shift integer offsets to byte offsets: 100.0%; instructions 121/121, differing instruction positions 0; retained during iteration.
|
||||
- retain multiplication for signed byte offsets: 100.0%; instructions 121/121, differing instruction positions 0; retained during iteration.
|
||||
|
||||
## VmStringSplit
|
||||
|
||||
- read parent and delimiter lengths first: 95.936935%; instructions 222/222, differing instruction positions 92; restored.
|
||||
- read delimiter fields first: 95.96847%; instructions 222/222, differing instruction positions 90; restored.
|
||||
- initialize array count in declaration: 96.04955%; instructions 222/222, differing instruction positions 81; restored.
|
||||
|
||||
## CHANSVm_8145049C
|
||||
|
||||
- use real wide character buffer for character format: 98.53133%; instructions 431/431, differing instruction positions 62; restored.
|
||||
- load source and destination string data before memcpy: did not compile, C89 declaration placement; restored. A corrected compiling variant is recorded separately.
|
||||
- initialize literal length before char buffer pointer: 98.58237%; instructions 431/431, differing instruction positions 42; restored.
|
||||
- cache both string buffers within C89 block: 98.58237%; instructions 431/431, differing instruction positions 42; restored.
|
||||
|
||||
## CHANSVm_81450D14
|
||||
|
||||
- reverse bounds addition operands: 97.391304%; instructions 45/46, differing instruction positions 29; restored.
|
||||
- explicit valid range branch: 97.391304%; instructions 45/46, differing instruction positions 29; restored.
|
||||
- negative range validation early returns: 86.195656%; instructions 44/46, differing instruction positions 29; restored.
|
||||
|
||||
## VmBlobCopyRangeFrom
|
||||
|
||||
- correct both available range bounds from target: 91.52941%; instructions 139/136, differing instruction positions 71; restored.
|
||||
- combine target range bounds: 93.80882%; instructions 138/136, differing instruction positions 50; restored.
|
||||
- snapshot offsets for target bounds: 91.57353%; instructions 139/136, differing instruction positions 93; restored.
|
||||
|
||||
## VmBlobGetHexString
|
||||
|
||||
- load byte once per hexadecimal pair: 92.36585%; instructions 81/82, differing instruction positions 36; restored.
|
||||
- merge byte and destination counters: 90.060974%; instructions 83/82, differing instruction positions 38; restored.
|
||||
- direct pointer advancement for hex output: 88.53658%; instructions 77/82, differing instruction positions 40; restored.
|
||||
|
||||
## VmBlobCalcRangeSHA1Digest
|
||||
|
||||
- reuse argument header for digest object: 96.484535%; instructions 97/97, differing instruction positions 14; restored.
|
||||
- declare output header before data and digest: 96.484535%; instructions 97/97, differing instruction positions 14; restored.
|
||||
- form data pointer before creating digest object: 70.24742%; instructions 97/97, differing instruction positions 29; restored.
|
||||
- reuse argument pointer for data buffer: 96.69072%; instructions 97/97, differing instruction positions 10; restored.
|
||||
- cache range valid result in named boolean: 96.484535%; instructions 97/97, differing instruction positions 14; restored.
|
||||
|
||||
## VmBlobCalcRangeMD5Digest
|
||||
|
||||
- reuse argument header for digest object: 99.793816%; instructions 97/97, differing instruction positions 4; restored.
|
||||
- declare output header before data and digest: 99.793816%; instructions 97/97, differing instruction positions 4; restored.
|
||||
- form data pointer before creating digest object: 74.98969%; instructions 96/97, differing instruction positions 38; restored.
|
||||
- reuse argument pointer for data buffer: 100.0%; instructions 97/97, differing instruction positions 0; later discarded for readability.
|
||||
- cache range valid result in named boolean: 100.0%; instructions 97/97, differing instruction positions 0; later discarded for readability.
|
||||
- reuse converted argument as new digest object: 99.793816%; instructions 97/97, differing instruction positions 4; restored.
|
||||
- scope range data to digest block: 99.793816%; instructions 97/97, differing instruction positions 4; restored.
|
||||
- scope digest pointer to allocation and hash block: 99.793816%; instructions 97/97, differing instruction positions 4; restored.
|
||||
- use const byte pointer for hash input: 99.793816%; instructions 97/97, differing instruction positions 4; restored.
|
||||
|
||||
## VmBlobCalcHMAC
|
||||
|
||||
- reuse input argument for digest header: 99.90625%; instructions 64/64, differing instruction positions 6; restored.
|
||||
- capture blob data before creating digest: 93.34375%; instructions 64/64, differing instruction positions 22; restored.
|
||||
- declare key blob before initialized input header: 99.453125%; instructions 64/64, differing instruction positions 7; restored.
|
||||
|
||||
## VmBlobCalcRangeHMAC
|
||||
|
||||
- reuse argument header for output object: 99.890755%; instructions 119/119, differing instruction positions 5; restored.
|
||||
- scope digest context for entire function: 99.72269%; instructions 119/119, differing instruction positions 9; restored.
|
||||
- capture data pointer before digest creation: 75.56303%; instructions 118/119, differing instruction positions 75; restored.
|
||||
|
||||
## vmBlobParsePackFormatString
|
||||
|
||||
- accumulate decimal product before character add: 99.69827%; instructions 116/116, differing instruction positions 6; restored.
|
||||
- use separate parameter character: 98.01724%; instructions 117/116, differing instruction positions 41; restored.
|
||||
- unsigned digit temporary with explicit character truncation: 99.69827%; instructions 116/116, differing instruction positions 6; restored.
|
||||
|
||||
## VmBlobPackCommon
|
||||
|
||||
- initialize parser type before parser size: 92.61826%; instructions 679/668, differing instruction positions 668; restored.
|
||||
- move parser output scalars into parsing scope: 92.621254%; instructions 675/668, differing instruction positions 638; restored.
|
||||
- explicit source blob check before format scan: 92.603294%; instructions 675/668, differing instruction positions 642; restored.
|
||||
|
||||
## VmBlobUnpack
|
||||
|
||||
- initialize parser scalar outputs with constants: 92.083176%; instructions 531/517, differing instruction positions 496; restored.
|
||||
- read format length before format pointer: 91.32108%; instructions 531/517, differing instruction positions 496; restored.
|
||||
- validate source blob before converting format argument: 90.92263%; instructions 533/517, differing instruction positions 517; restored.
|
||||
|
||||
## VmImageCtor
|
||||
|
||||
- early true return for absent callback: 79.8%; instructions 25/25, differing instruction positions 15; restored.
|
||||
- declare image before result: 99.0%; instructions 25/25, differing instruction positions 4; restored.
|
||||
- return callback directly for valid image: 58.4%; instructions 17/25, differing instruction positions 25; restored.
|
||||
- save image data pointer before callback test: 86.6%; instructions 25/25, differing instruction positions 8; restored.
|
||||
- cache constructor callback before image lookup: 99.0%; instructions 25/25, differing instruction positions 4; restored.
|
||||
|
||||
## VmWinEmuWrite
|
||||
|
||||
- hoist input string value pointer: did not compile, incorrect guessed structure type; restored. A corrected compiling variant is recorded separately.
|
||||
- initialize input and output lengths in reverse order: 90.67164%; instructions 67/67, differing instruction positions 12; restored.
|
||||
- for loop over input chunks: 99.62687%; instructions 67/67, differing instruction positions 5; restored.
|
||||
- cache correctly typed wide string structure: 96.1194%; instructions 65/67, differing instruction positions 54; restored.
|
||||
|
||||
## CHANSVmAddExe
|
||||
|
||||
- read header size before assigning module variable: 99.1063%; instructions 254/254, differing instruction positions 35; restored.
|
||||
- split format magic and alignment validation: 99.1063%; instructions 254/254, differing instruction positions 35; restored.
|
||||
- integer aligned size check: 99.1063%; instructions 254/254, differing instruction positions 35; restored.
|
||||
|
||||
## CHANSVm_81455654
|
||||
|
||||
- direct module offset assignment: 94.0%; instructions 34/35, differing instruction positions 35; restored.
|
||||
- inline active context access: 94.0%; instructions 34/35, differing instruction positions 35; restored.
|
||||
- early null return on negative frame index: 76.57143%; instructions 36/35, differing instruction positions 36; restored.
|
||||
- separate result pointer from table pointer: 94.0%; instructions 34/35, differing instruction positions 35; restored.
|
||||
|
||||
## CHANSVmLinkModules
|
||||
|
||||
- for module traversal: 98.677246%; instructions 189/189, differing instruction positions 43; restored.
|
||||
- remove copied dispatch entry in global pass: 94.25926%; instructions 189/189, differing instruction positions 52; restored.
|
||||
- early return when linking blocked or no modules: 96.44974%; instructions 189/189, differing instruction positions 173; restored.
|
||||
|
||||
## VmCallMethod
|
||||
|
||||
- initialize dispatch state in declarations: 96.565834%; instructions 279/281, differing instruction positions 228; restored.
|
||||
- cache method reference table entry: did not compile, incorrect guessed structure type; restored. A corrected compiling variant is recorded separately.
|
||||
- reuse existing accumulator argument header pointer: 96.565834%; instructions 279/281, differing instruction positions 228; restored.
|
||||
- cache correctly typed name table entry: 96.565834%; instructions 279/281, differing instruction positions 228; restored.
|
||||
|
||||
## CHANSVmStep
|
||||
|
||||
- for step counter with decrement after body: 94.630486%; instructions 1249/1253, differing instruction positions 1173; restored.
|
||||
- inline initial comparison constants: 94.73823%; instructions 1249/1253, differing instruction positions 1173; restored.
|
||||
- initialize interpreter private pointer at declaration: 94.7901%; instructions 1249/1253, differing instruction positions 1173; restored.
|
||||
|
||||
## VmBlobFill
|
||||
|
||||
- remove redundant blob conditional after null check: 91.74603%; instructions 60/63, differing instruction positions 43; restored. Unit function regressions: VmBlobFill.
|
||||
- explicit separate input null checks: 96.666664%; instructions 65/63, differing instruction positions 39; restored. Unit function regressions: VmBlobFill.
|
||||
- snapshot data and offset before memset: 99.809525%; instructions 63/63, differing instruction positions 5; restored. Unit function regressions: VmBlobFill.
|
||||
|
||||
## Final validation
|
||||
|
||||
Full gate after a clean 43U rebuild: GATE PASS. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Pool identical. Regression count 0; forbidden patterns 0; readability warnings 0.
|
||||
|
||||
Instruction-exact functions 201 -> 203; objdiff-matched functions 202 -> 204; code bytes 30984 -> 31620 out of 53564; data bytes 16 -> 16 out of 6904. VmDateGetRTC has 38/38 instructions and diffs 0; VmStringSplice has 121/121 instructions and diffs 0. Every remaining function has at least three distinct compiling source-level attempts recorded above. The unit remains NonMatching. Data is still incomplete; the matching string pool alone does not establish matching data.
|
||||
249
tools/decomp-assist/tiPcKeyboard.round2.md
Normal file
249
tools/decomp-assist/tiPcKeyboard.round2.md
Normal file
@@ -0,0 +1,249 @@
|
||||
# PC keyboard second pass
|
||||
|
||||
Baseline: 120/141 instruction-exact functions, 16240 code bytes, 5964 data bytes. Existing string pool and .rodata match. This pass changes code and data only; configure.py remains unchanged.
|
||||
|
||||
## LayoutByNW4R::initLayout
|
||||
Start: (99.71429, (384, 385, 66, 0.9934980494148244)); .data=12552, .bss=12, .sdata2=29, .rodata=5816.
|
||||
1. use a signed switch for the second language query and a common matrix-update join: (99.42857, (385, 385, 6, 0.9896103896103896)); .data=12552, .bss=12, .sdata2=29, .rodata=5816; pool identical; reverted.
|
||||
2. hold language-mode visibility in a boolean and switch on the second query: (97.42857, (392, 385, 80, 0.9781209781209781)); .data=12552, .bss=12, .sdata2=29, .rodata=5816; pool identical; reverted.
|
||||
3. hold each language query result in a named enum before dispatch: (99.42857, (385, 385, 6, 0.9896103896103896)); .data=12552, .bss=12, .sdata2=29, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (75.89773, (280, 352, 336, 0.7563291139240507)); .data=12552, .bss=12, .sdata2=29, .rodata=5816.
|
||||
1. make the two immutable mode-selector positions function-static: (73.62784, (299, 352, 346, 0.7158218125960062)); .data=12552, .bss=36, .sdata2=29, .rodata=5816; pool identical; reverted.
|
||||
2. use function-static mutable mode-selector vectors: (73.62784, (299, 352, 346, 0.7158218125960062)); .data=12552, .bss=36, .sdata2=29, .rodata=5816; pool identical; reverted.
|
||||
3. initialize ordinary function-static VEC3 positions as aggregates: compiler rejected; reverted. at, float)' # 'nw4r::math::VEC3::VEC3(const nw4r::math::VEC3 &)' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (75.89773, (280, 352, 336, 0.7563291139240507)); .data=12552, .bss=12, .sdata2=29, .rodata=5816.
|
||||
1. initialize the two local positions as ordinary float arrays consumed by VEC3: (81.963066, (289, 352, 338, 0.7956318252730109)); .data=12552, .bss=12, .sdata2=9, .rodata=5840; pool identical; retained.
|
||||
2. initialize positions as aggregate _VEC3 and construct the pane translation from its fields: (81.79261, (289, 352, 338, 0.7831513260530422)); .data=12552, .bss=12, .sdata2=9, .rodata=5840; pool identical; reverted.
|
||||
3. construct both local VEC3 positions from ordinary coordinate arrays before language dispatch: (75.03409, (295, 352, 341, 0.7666151468315301)); .data=12552, .bss=12, .sdata2=9, .rodata=5840; pool identical; reverted.
|
||||
|
||||
|
||||
## Vtable declaration order
|
||||
Reordered class declarations to Base, EventHandler, UIObj, modifier, mode panel, layout, animation base, normal, shift, toggle, on/off. Ordinary compiler vtables are emitted in reverse declaration order, matching the target. No code-exact functions lost. {'fuzzy_match_percent': 95.17947, 'total_code': '28484', 'matched_code': '16240', 'matched_code_percent': 57.014465, 'total_data': '18564', 'matched_data': '148', 'matched_data_percent': 0.79724205, 'total_functions': 141, 'matched_functions': 120, 'matched_functions_percent': 85.106384, 'total_units': 1}
|
||||
## LayoutByNW4R::initLayout
|
||||
Start: (99.42857, (385, 385, 6, 0.9896103896103896)); .data=12576, .bss=12, .sdata2=9, .rodata=5816.
|
||||
1. switch on mode flag with explicit default join: (100.0, (385, 385, 0, 1.0)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; retained.
|
||||
2. unsigned mode temporary before test: (99.71429, (384, 385, 66, 0.9934980494148244)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
3. explicit early join for nonzero mode: (99.71429, (384, 385, 66, 0.9934980494148244)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::createAnmPane_
|
||||
Start: (98.515625, (192, 192, 55, 0.7135416666666666)); .data=12576, .bss=12, .sdata2=9, .rodata=5816.
|
||||
1. declare the new pane before the animation table reference: (98.515625, (192, 192, 55, 0.7135416666666666)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
2. cache the shared pane before allocating the animation pane: (98.5625, (192, 192, 118, 0.9270833333333334)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; retained.
|
||||
3. use a full-width table index: (95.41146, (191, 192, 180, 0.6161879895561357)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::sendInputWChar
|
||||
Start: (98.24074, (107, 108, 104, 0.9488372093023256)); .data=12576, .bss=12, .sdata2=9, .rodata=5816.
|
||||
1. assign input fields separately after the modifier calculation: (91.07407, (103, 108, 102, 0.8341232227488151)); .data=12576, .bss=12, .sdata2=9, .rodata=5800; pool identical; reverted.
|
||||
2. compute conversion bits from named booleans: (93.05556, (110, 108, 106, 0.908256880733945)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
3. initialize the input structure before testing keyboard modifiers: (76.31481, (107, 108, 101, 0.8186046511627907)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::setTranslateMode
|
||||
Start: (98.0, (107, 105, 89, 0.9528301886792453)); .data=12576, .bss=12, .sdata2=9, .rodata=5816.
|
||||
1. initialize mode from its enum and preserve the named valid cases: (99.04762, (106, 105, 99, 0.995260663507109)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; retained.
|
||||
2. use the existing mode as the fallback for an unknown translation mode: (95.2381, (106, 105, 97, 0.976303317535545)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
3. convert valid translation modes directly after an unsigned range guard: (84.03809, (90, 105, 95, 0.6871794871794872)); .data=12576, .bss=12, .sdata2=9, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::getWCCode u32
|
||||
Start: (98.8, (124, 125, 109, 0.9236947791164659)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. compute modifier bits with conditional expressions: (80.024, (121, 125, 113, 0.8780487804878049)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. refer to the selected ASCII key before choosing its modifier: compiler rejected; reverted. ^ # (10224) 'const' or '&' variable needs initializer # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
|
||||
3. use a named low mode for the Japanese punctuation condition: (97.56, (125, 125, 14, 0.92)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::refresh_
|
||||
Start: (98.77095, (177, 179, 152, 0.9606741573033708)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. use the mode setter for the Chinese and Korean normalization: (98.77095, (177, 179, 152, 0.9606741573033708)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. switch on the language for mode normalization: (96.899445, (179, 179, 12, 0.9385474860335196)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. give the nested normalized-mode test a named value: (98.77095, (177, 179, 152, 0.9606741573033708)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::getWCCode char*
|
||||
Start: (96.14035, (56, 57, 18, 0.9203539823008849)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. use full-width indices in both name lookup loops: (83.68421, (56, 57, 52, 0.4424778761061947)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. write the ASCII lookup as a do-while loop: (94.29825, (57, 57, 21, 0.8771929824561403)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. cache the grid key before comparing its pane name: (86.82456, (54, 57, 37, 0.5045045045045045)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::getControlKey
|
||||
Start: (93.333336, (36, 36, 8, 0.8055555555555556)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. write the control lookup with a do-while loop: (90.55556, (37, 36, 20, 0.7397260273972602)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. cache the control table before the loop: (75.833336, (33, 36, 32, 0.5797101449275363)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. use a full-width control index: (85.138885, (37, 36, 29, 0.7397260273972602)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::getWCCode
|
||||
Start: (None, (56, 2, 56, 0.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. take a named reference to the key state before forwarding: (None, (56, 2, 56, 0.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. name the character returned by the key state: (None, (56, 2, 56, 0.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. forward through a named key-state pointer: (None, (56, 2, 56, 0.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::onPressedShift
|
||||
Start: (90.81633, (45, 49, 42, 0.7872340425531915)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. hold the requested shift flags in a named local: (90.71429, (45, 49, 42, 0.8085106382978723)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. update the modifier state explicitly before refreshing: (89.591835, (45, 49, 41, 0.7872340425531915)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. isolate the key-state reference before setting shift: (90.81633, (45, 49, 42, 0.7872340425531915)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::onReleasedShift
|
||||
Start: (89.871796, (38, 39, 36, 0.7532467532467533)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. name the cleared modifier bits before the setter: (90.0, (38, 39, 35, 0.7792207792207793)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. clear shift and mode bits in separate expressions: (89.871796, (38, 39, 36, 0.7532467532467533)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. update the key-state modifier explicitly before refreshing: (88.07692, (38, 39, 36, 0.7012987012987013)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::sendInputWChar
|
||||
Start: (93.97727, (42, 44, 35, 0.9302325581395349)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. keep the shift bit in an unsigned local: (95.22727, (42, 44, 35, 0.9302325581395349)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. extract shift through the state accessor: (81.09091, (47, 44, 39, 0.8571428571428571)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. select the last animation pane with a conditional expression: (91.34091, (43, 44, 35, 0.8275862068965517)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::setInputModeJP
|
||||
Start: (86.92208, (69, 77, 36, 0.8493150684931506)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. dispatch input mode using its unsigned type: (86.92208, (69, 77, 36, 0.8493150684931506)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. cache the key-state reference for both mode setters: (79.97403, (72, 77, 73, 0.5100671140939598)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. express the language-data selection with named mode tests: (83.68831, (69, 77, 36, 0.8356164383561644)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::updateInput int chan
|
||||
Start: (95.25, (135, 140, 92, 0.88)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. name the held-shift condition before dispatch: (95.25, (135, 140, 92, 0.88)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. query shift through a pointer to the gather singleton: (95.25, (135, 140, 92, 0.88)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. test release state in two nested conditions: (95.25, (135, 140, 92, 0.88)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::refreshText
|
||||
Start: (90.46154, (170, 169, 107, 0.8141592920353983)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. initialize captions through separate character assignments: (95.6213, (170, 169, 103, 0.8436578171091446)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. use full-width text table indices: (80.79881, (170, 169, 154, 0.5427728613569321)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. resolve each text pane before its dynamic cast: (89.27811, (170, 169, 123, 0.6194690265486725)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::create
|
||||
Start: (87.49367, (151, 158, 106, 0.7637540453074434)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. keep the event handler in a typed local before assigning its owner: (87.49367, (151, 158, 106, 0.7637540453074434)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. resolve each modifier animation before its pane components: (80.82912, (151, 158, 114, 0.7443365695792881)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. use the direct layout member for modifier pane searches: (86.75949, (151, 158, 107, 0.7637540453074434)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::onKey
|
||||
Start: (66.72967, (341, 418, 373, 0.6824769433465085)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. hold the control code before dispatching its cases: (66.72967, (341, 418, 373, 0.6824769433465085)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. dispatch the control code as a signed enum-sized value: (66.72967, (341, 418, 373, 0.6824769433465085)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. separate the key-release event and character checks: (66.72967, (341, 418, 373, 0.6824769433465085)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::updateInput HKBManager
|
||||
Start: (84.687225, (237, 227, 219, 0.6724137931034483)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. declare the repeated key set separately from triggered keys: (81.92951, (233, 227, 220, 0.6565217391304348)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. declare triggered character and key before its animation pointer: (84.4141, (237, 227, 217, 0.646551724137931)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. use a switch for repeated hardware control keys: (89.07929, (239, 227, 230, 0.6952789699570815)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
|
||||
## EventHandler::onTiEvent
|
||||
Start: (88.83249, (196, 197, 176, 0.8600508905852418)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. dispatch the event with its unsigned parameter type: (88.83249, (196, 197, 176, 0.8600508905852418)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. write the repetition threshold with inclusive bounds: (88.862946, (196, 197, 176, 0.8702290076335878)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
3. split the initial modifier exclusions into early returns: (88.83249, (196, 197, 176, 0.8600508905852418)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::onEvent
|
||||
Start: (None, (0, 0, 100000, 0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. return early for non-sound listener events: (None, (0, 0, 100000, 0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. dispatch the sound listener event with a switch: (None, (0, 0, 100000, 0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. hold the listener sound value in its enum type: (None, (0, 0, 100000, 0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::refreshText
|
||||
Start: (95.6213, (170, 169, 103, 0.8436578171091446)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. keep the converted ASCII character in a scalar until the text call: (94.30769, (170, 169, 105, 0.855457227138643)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. use a scalar caption and choose grid variants with a conditional index: (95.60947, (171, 169, 106, 0.8823529411764706)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
3. use a scalar caption and an explicit signed grid variant: (95.01183, (170, 169, 105, 0.8613569321533924)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::getControlKey
|
||||
Start: (93.333336, (36, 36, 8, 0.8055555555555556)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. declare the control entry reference before the loop index: (81.77778, (34, 36, 26, 0.6571428571428571)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. use a signed index with a 16-bit table-index conversion: (91.80556, (36, 36, 8, 0.8055555555555556)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. declare the index before a while loop and increment explicitly: (93.333336, (36, 36, 8, 0.8055555555555556)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::refreshText
|
||||
Start: (95.60947, (171, 169, 106, 0.8823529411764706)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. load the scalar caption after the caps query and store it after conversion: (99.23077, (170, 169, 97, 0.9321533923303835)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. load the scalar caption after caps and use an explicit negated grid-mode integer: (98.15976, (169, 169, 80, 0.8816568047337278)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. load the scalar caption after caps and cast the computed grid selector to signed int: (97.92899, (169, 169, 78, 0.9053254437869822)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (74.650566, (279, 352, 339, 0.7385103011093502)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. declare the virtual base initializer inline in the owned implementation header: (92.639206, (342, 352, 261, 0.8645533141210374)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. declare the base initializer inline at its definition: (92.639206, (342, 352, 261, 0.8645533141210374)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. construct both local selector translations before selecting the language: (75.9375, (285, 352, 337, 0.750392464678179)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (92.639206, (342, 352, 261, 0.8645533141210374)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. construct both selector translations after the base initializer is declared inline: (93.09375, (348, 352, 265, 0.8742857142857143)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. copy selector positions into aggregate vectors before language dispatch: compiler rejected; reverted. at, float)' # 'nw4r::math::VEC3::VEC3(const nw4r::math::VEC3 &)' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
|
||||
3. name both translations before the visibility setters: (89.161934, (348, 352, 282, 0.8742857142857143)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::refreshText
|
||||
Start: (99.23077, (170, 169, 97, 0.9321533923303835)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. use a full-width temporary for the converted caption: (99.28994, (169, 169, 2, 0.9881656804733728)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. use a signed full-width temporary for caption comparisons: (97.86982, (169, 169, 6, 0.9644970414201184)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. normalize the caption temporary once after the case conversion: (98.69823, (170, 169, 100, 0.9616519174041298)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (93.09375, (348, 352, 265, 0.8742857142857143)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. copy ordinary aggregate positions into the base of each VEC3 translation: (93.09375, (348, 352, 265, 0.8742857142857143)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. copy each vector position as an ordinary 12-byte record: (93.610794, (342, 352, 261, 0.8760806916426513)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
3. copy aggregate positions with both vectors declared together: (93.09375, (348, 352, 265, 0.8742857142857143)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## Base::KeyState::refreshText
|
||||
Start: (99.28994, (169, 169, 2, 0.9881656804733728)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. convert the scalar character back to wchar_t when indexing Korean maps: (100.0, (169, 169, 0, 1.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. convert the Korean map index to a 16-bit character difference: (96.86391, (169, 169, 6, 0.9644970414201184)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. use a named 16-bit character for each Korean lookup: (100.0, (169, 169, 0, 1.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (93.610794, (342, 352, 261, 0.8760806916426513)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. copy coordinate records and construct the pane translation at the point of use: (99.94886, (352, 352, 18, 0.9488636363636364)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. copy coordinate records with const local positions: compiler rejected; reverted. ::keyboard::pctype::Base::getTranslateMode() # const' redefined # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
|
||||
3. copy coordinate records before visibility setters: compiler rejected; reverted. ::keyboard::pctype::Base::getTranslateMode() # const' redefined # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
|
||||
|
||||
## LayoutByNW4R::init
|
||||
Start: (99.94886, (352, 352, 18, 0.9488636363636364)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. make both local selector records immutable: (99.94886, (352, 352, 18, 0.9488636363636364)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
2. declare the pane vectors before copying the selector records: (98.14773, (358, 352, 224, 0.8985915492957747)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. declare selector records at function entry and assign them before language dispatch: (99.94886, (352, 352, 18, 0.9488636363636364)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
## LayoutByNW4R::onKey
|
||||
Start: (66.72967, (341, 418, 373, 0.6824769433465085)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. restore control case order from target jump-table destinations: (80.52631, (341, 418, 374, 0.8221343873517787)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. declare the caps-press handler inline while retaining target case order: (92.710526, (419, 418, 301, 0.9342891278375149)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
3. inline the caps-press body at its call site with target case order: (92.710526, (419, 418, 301, 0.9342891278375149)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
|
||||
## LayoutByNW4R::onKey
|
||||
Start: (92.710526, (419, 418, 301, 0.9342891278375149)); .data=12576, .bss=12, .sdata2=8, .rodata=5816.
|
||||
1. cache the shift gather at entry to the shift-control case: (99.98325, (418, 418, 3, 0.992822966507177)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
2. cache the shift gather and order active-button animation first: (100.0, (418, 418, 0, 1.0)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; retained.
|
||||
3. cache the shift gather and split modifier-state condition: (99.98325, (418, 418, 3, 0.992822966507177)); .data=12576, .bss=12, .sdata2=8, .rodata=5816; pool identical; reverted.
|
||||
|
||||
|
||||
## Final source selection
|
||||
Reverted the early shared-pane load in createAnmPane_: its sequence-alignment score improved by shifting instructions, but the original candidate has the correct instruction order and only register differences. Reverted the named flags temporary in onPressedShift because it lowered the fuzzy score. All attempts above remain recorded.
|
||||
The second aggregate-position copy in the typed-copy batch repeated the first aggregate trial; it was not a distinct attempt. The next two full-source position transforms were inserted incorrectly by the trial harness and rejected; neither was retained. The following stack batch contains the actual distinct local-lifetime attempts.
|
||||
The inline onPressedCaps declaration trial was rejected because it removed the separately emitted real function. The explicit caps-control case retains that function and matches onKey. The case has its own scope.
|
||||
|
||||
## Final verification
|
||||
Full gate: GATE PASS; regressions 0, forbidden additions 0, readability warnings 0. Instruction-exact functions 120 -> 123/141. Objdiff code 16240 -> 20128/28484; data 5964 -> 5972/18564. New exact functions: initLayout (385 instructions), refreshText (169), onKey (418). Every remaining function has at least three distinct source-level attempts above.
|
||||
|
||||
Pool: 204/204 identical. .rodata, .sdata, .sdata2, .sbss, .ctors: 100%. Ordinary coordinate records now occupy the missing 24 bytes at the end of the string-bearing data. Owned vtables have identical target offsets after declaration reordering. Raw .data is byte-identical, 12576 bytes; all 1303 relocation sites coincide, and 1302 resolve to the same named function or section offset. The sole remaining normalized relocation-name difference is the truncated target onEvent thunk. The .data objdiff score remains 74.95624; why its anonymous-symbol alignment gives so little credit remains uncertain. .bss has 12 source bytes versus 16 target bytes, both zero; likely extraction alignment, not proven. No padding or dummy data was added.
|
||||
|
||||
The invalid TranslateMode fallback uses its supplied enum value; the target default appears to use an unset temporary, whose intended behavior is unknown. configure.py stays NonMatching, as requested.
|
||||
|
||||
Remaining functions:
|
||||
getWCCode__Q49textinput8keyboard6pctype4BaseFPc: None; Compiler inlines the key-state lookup into the forwarding wrapper; 56 versus 2 instructions.
|
||||
getControlKey__Q49textinput8keyboard6pctype4BaseFPc: 93.333336; Only loop-index and table-offset register allocation differs; 36/36 instructions, 8 differences.
|
||||
sendInputWChar__Q49textinput8keyboard6pctype4BaseFwb: 98.24074; Missing zero initialization instruction and cached flag loads; 107/108 instructions.
|
||||
setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: 99.04762; One extra mode-register move, caused by defined fallback initialization; 106/105 instructions.
|
||||
refresh___Q59textinput8keyboard6pctype4Base8KeyStateFv: 98.77095; Compiler eliminates two mode reloads in normalization; 177/179 instructions.
|
||||
getWCCode__Q59textinput8keyboard6pctype4Base8KeyStateFUl: 98.8; Cached modifier load and register allocation; 124/125 instructions.
|
||||
getWCCode__Q59textinput8keyboard6pctype4Base8KeyStateFPc: 96.14035; Grid-mode expression loses one instruction; 56/57 instructions.
|
||||
create__Q49textinput8keyboard6pctype12LayoutByNW4RFP12MEMAllocator: 87.49367; Compiler removes nullable multiple-inheritance pointer adjustments; 151/158 instructions.
|
||||
createAnmPane___Q49textinput8keyboard6pctype12LayoutByNW4RFP12MEMAllocator: 98.515625; Only register allocation differs; 192/192 instructions, 55 differences.
|
||||
init__Q49textinput8keyboard6pctype12LayoutByNW4RFv: 99.94886; Only selector-record and VEC3 temporary stack offsets differ; 352/352 instructions, 18 differences.
|
||||
onPressedShift__Q49textinput8keyboard6pctype12LayoutByNW4RFb: 90.81633; Inlined setter removes repeated flag loads; 45/49 instructions.
|
||||
onReleasedShift__Q49textinput8keyboard6pctype12LayoutByNW4RFv: 90.0; Merged mask expression and eliminated flag reload; 38/39 instructions.
|
||||
sendInputWChar__Q49textinput8keyboard6pctype12LayoutByNW4RFwb: 95.22727; Shift-bit test and FIFO pointer handling; 42/44 instructions.
|
||||
setInputModeJP__Q49textinput8keyboard6pctype12LayoutByNW4RFbUlUl: 86.92208; Mode setters share conditions and remove repeated dispatch; 69/77 instructions.
|
||||
updateInput__Q49textinput8keyboard6pctype12LayoutByNW4RFiffUlUlUlPv: 95.25; Inlined shift setters remove repeated flag loads; 135/140 instructions.
|
||||
updateInput__Q49textinput8keyboard6pctype12LayoutByNW4RFRQ39textinput5input10HKBManager: 89.07929; KeySet aggregate stack allocation and control dispatch; 239/227 instructions.
|
||||
onTiEvent__Q49textinput8keyboard6pctype12EventHandlerFPQ39textinput3gui13PaneComponentUlPQ49textinput11nw4rmanager14TiEventHandler5Input: 88.862946; Event branching, one missing instruction, and register allocation; 196/197 instructions.
|
||||
@236@onEvent__Q49textinput8keyboard6pctype12LayoutByNW4RFPQ49textinput8keyboard6pctype5: None; Original symbol name is truncated; canonical compiler thunk has the same two instructions under its full signature.
|
||||
58
tools/update_readme_progress.py
Normal file
58
tools/update_readme_progress.py
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Rewrite the progress block in README.md from an objdiff report.
|
||||
|
||||
usage: update_readme_progress.py <report.json> <README.md> [commit]
|
||||
"""
|
||||
import datetime
|
||||
import json
|
||||
import sys
|
||||
|
||||
START = "<!-- progress:start -->"
|
||||
END = "<!-- progress:end -->"
|
||||
|
||||
|
||||
def pct(measures, key):
|
||||
return float(measures.get(key) or 0.0)
|
||||
|
||||
|
||||
def main():
|
||||
report_path, readme_path = sys.argv[1], sys.argv[2]
|
||||
commit = sys.argv[3][:8] if len(sys.argv) > 3 else ""
|
||||
m = json.load(open(report_path))["measures"]
|
||||
|
||||
stamp = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
|
||||
block = "\n".join([
|
||||
START,
|
||||
"| Decompiled | Matched | Linked | Data |",
|
||||
"|:---:|:---:|:---:|:---:|",
|
||||
f"| {pct(m, 'fuzzy_match_percent'):.2f}% | {pct(m, 'matched_code_percent'):.2f}% "
|
||||
f"| {pct(m, 'complete_code_percent'):.2f}% | {pct(m, 'matched_data_percent'):.2f}% |",
|
||||
"",
|
||||
f"units {m.get('complete_units')}/{m.get('total_units')} complete, "
|
||||
f"functions {m.get('matched_functions')}/{m.get('total_functions')} 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",
|
||||
END,
|
||||
])
|
||||
|
||||
text = open(readme_path, encoding="utf-8").read()
|
||||
if START in text and END in text:
|
||||
head, rest = text.split(START, 1)
|
||||
_, tail = rest.split(END, 1)
|
||||
new = head + block + tail
|
||||
else:
|
||||
anchor = "Progress\n========\n"
|
||||
if anchor not in text:
|
||||
raise SystemExit("no progress anchor in README")
|
||||
new = text.replace(anchor, anchor + block + "\n\n", 1)
|
||||
|
||||
if new != text:
|
||||
open(readme_path, "w", encoding="utf-8").write(new)
|
||||
print("README progress updated")
|
||||
else:
|
||||
print("README progress unchanged")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user