Compare commits
39 Commits
agent/w100
...
cleanup/se
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c403d9edcc | ||
|
|
2d9e3ee14a | ||
|
|
23db5e05e1 | ||
|
|
741c9263e3 | ||
|
|
29fe1efaf2 | ||
|
|
45aaeb16b2 | ||
|
|
e9114959c9 | ||
|
|
1f0eb50f01 | ||
|
|
d93fb2d5f8 | ||
|
|
27abfe81d9 | ||
|
|
bf6bc87fbd | ||
|
|
786a2dd3e8 | ||
|
|
bdd15186a7 | ||
|
|
40a2ea7e91 | ||
|
|
0b10215388 | ||
|
|
4e293a4223 | ||
|
|
d94df60412 | ||
|
|
daf04f1f26 | ||
|
|
1994d24f06 | ||
|
|
0d9b038782 | ||
|
|
ff90063ef9 | ||
|
|
c1183780c2 | ||
|
|
2050ad7616 | ||
|
|
9077ef8c7a | ||
|
|
bc303bc36e | ||
|
|
5518cb16fd | ||
|
|
0c06b01c8d | ||
|
|
adc15fdf6f | ||
|
|
dea64a8c9c | ||
|
|
3cde45682d | ||
|
|
ae7cf34cab | ||
|
|
91cc177cb7 | ||
|
|
ecee6f01e4 | ||
|
|
28d3333887 | ||
|
|
2119935c1d | ||
|
|
c7896c3802 | ||
|
|
68c4c9aeac | ||
|
|
1b942565f7 | ||
|
|
a9705fa1a3 |
19
.github/workflows/readme-progress.yml
vendored
19
.github/workflows/readme-progress.yml
vendored
@@ -2,6 +2,8 @@ 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.
|
||||
# README progress is written inside each landing commit by the orchestrator, so this job never commits;
|
||||
# it only rebuilds and publishes the current numbers to the job summary.
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -15,7 +17,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
progress:
|
||||
@@ -48,15 +50,8 @@ jobs:
|
||||
- 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
|
||||
- name: Summary
|
||||
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
|
||||
python3 tools/update_readme_progress.py build/43U/report.json README.md "$GITHUB_SHA"
|
||||
sed -n '/progress:start/,/progress:end/p' README.md >> "$GITHUB_STEP_SUMMARY"
|
||||
git checkout -- README.md
|
||||
|
||||
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.54% | 90.02% | 69.31% | 99.37% |
|
||||
| 99.59% | 90.81% | 71.43% | 99.37% |
|
||||
|
||||
units 949/1027 complete, functions 12336/12563 matched.
|
||||
units 956/1027 complete, functions 12365/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 -->
|
||||
|
||||
@@ -11,6 +11,8 @@ splits: 'config/43U/splits.txt'
|
||||
ldscript_template: 'config/ldscript_ipl2.lcf'
|
||||
|
||||
force_active:
|
||||
- SOGetSockOpt
|
||||
- SOSetInterfaceOpt
|
||||
- fprintf
|
||||
- leap_days
|
||||
- __msl_time2tm
|
||||
|
||||
@@ -87,7 +87,8 @@ m_allocator__Q23ipl5scene = .bss:0x810BD498; // type:object size:0x10
|
||||
AOSSi_NcdIfConfig = .bss:0x810BD4A8; // type:object size:0x15E data:byte
|
||||
AOSSi_NcdIpConfig = .bss:0x810BD608; // type:object size:0x7C4 data:4byte
|
||||
sRakuAllocator = .bss:0x810BDDD0; // type:object size:0x10
|
||||
sRakuStatus = .bss:0x810BDDE0; // type:object size:0xF4 data:4byte
|
||||
sRakuStatus = .bss:0x810BDDE0; // type:object size:0xC data:4byte
|
||||
sRakuConfiguration = .bss:0x810BDDEC; // type:object size:0xE8
|
||||
sRakuMsgQueue = .bss:0x810BDED4; // type:object size:0x20
|
||||
AOSS_810BDEF8 = .bss:0x810BDEF8; // type:object size:0x20 data:4byte
|
||||
AOSS_810BDF18 = .bss:0x810BDF18; // type:object size:0x6A0
|
||||
@@ -103,7 +104,7 @@ AtermThread = .bss:0x810C0958; // type:object size:0x318 scope:local align:32
|
||||
Voices = .bss:0x810C0C80; // type:object size:0x1800 data:4byte
|
||||
sZeroMem = .bss:0x810C2480; // type:object size:0x100 data:byte
|
||||
s_player_thread_stack = .bss:0x810C2580; // type:object size:0x4000 scope:local
|
||||
lbl_810C6580 = .bss:0x810C6580; // type:object size:0x10
|
||||
lbl_810C6580 = .bss:0x810C6580; // type:object size:0xC
|
||||
layoutGatherDestructorRecord = .bss:0x810C6590; // type:object size:0xC data:4byte
|
||||
unInputedWCharColorDestructorRecord = .bss:0x810C659C; // type:object size:0xC data:4byte
|
||||
charColorDestructorRecord = .bss:0x810C65A8; // type:object size:0xC data:4byte
|
||||
@@ -5158,7 +5159,7 @@ AOSSi_WLANConnect = .text:0x813FD72C; // type:function size:0x26C
|
||||
AOSSi_Sleep = .text:0x813FD998; // type:function size:0x4
|
||||
AOSSi_Status = .text:0x813FD99C; // type:function size:0x34
|
||||
AOSS_SetCallback = .text:0x813FD9D0; // type:function size:0x34
|
||||
syncRakuProgress__Q33ipl5scene14RakuRakuThreadFv = .text:0x813FDA04; // type:function size:0x6C scope:local
|
||||
syncRakuProgress__Q33ipl5scene14RakuRakuThreadFP12RakuProgress = .text:0x813FDA04; // type:function size:0x6C scope:local
|
||||
__ct__Q33ipl5scene14RakuRakuThreadFPQ23EGG4Heap = .text:0x813FDA70; // type:function size:0xD8
|
||||
__dt__Q33ipl5scene14RakuRakuThreadFv = .text:0x813FDB48; // type:function size:0xA4
|
||||
destroy__Q33ipl5scene14RakuRakuThreadFv = .text:0x813FDBEC; // type:function size:0xD8
|
||||
@@ -16149,6 +16150,11 @@ lbl_8164EF14 = .data:0x8164EF14; // type:object size:0x34
|
||||
__vt__Q33ipl5scene27CsChanTtlButtonEventHandler = .data:0x8164EF48; // type:object size:0x1C
|
||||
__vt__Q33ipl5scene24ChannelTitleEventHandler = .data:0x8164EF64; // type:object size:0x18
|
||||
__vt__Q33ipl5scene12ChannelTitle = .data:0x8164EF7C; // type:object size:0x68
|
||||
lbl_8164EFE4 = .data:0x8164EFE4; // type:object size:0x5C
|
||||
lbl_8164F040 = .data:0x8164F040; // type:object size:0x18
|
||||
lbl_8164F058 = .data:0x8164F058; // type:object size:0x20
|
||||
lbl_8164F078 = .data:0x8164F078; // type:object size:0x20
|
||||
lbl_8164F098 = .data:0x8164F098; // type:object size:0x20
|
||||
@10125 = .data:0x8164F0B8; // type:object size:0xD scope:local data:string
|
||||
...data.0 = .data:0x8164F0B8; // type:label scope:local
|
||||
@10126 = .data:0x8164F0C5; // type:object size:0xD scope:local data:string
|
||||
@@ -23829,7 +23835,7 @@ result$1126 = .sbss:0x81698E48; // type:object size:0x4 data:4byte
|
||||
soState = .sbss:0x81698E50; // type:object size:0x1 scope:local data:byte
|
||||
soError = .sbss:0x81698E54; // type:object size:0x4 scope:local data:4byte
|
||||
soRegistered = .sbss:0x81698E58; // type:object size:0x4 scope:local data:4byte
|
||||
soSocketRegistered = .sbss:0x81698E60; // type:object size:0x8 scope:local data:4byte
|
||||
soSocketRegistered = .sbss:0x81698E60; // type:object size:0x4 scope:local data:4byte
|
||||
sslRegistered = .sbss:0x81698E68; // type:object size:0x4 scope:local data:4byte
|
||||
l_initialized = .sbss:0x81698E6C; // type:object size:0x4 scope:local data:4byte
|
||||
VFipf_sys_set = .sbss:0x81698E70; // type:object size:0x4 scope:global data:4byte
|
||||
|
||||
20
configure.py
20
configure.py
@@ -772,7 +772,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("channelTitle", [
|
||||
Object(Equivalent, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||
Object(Matching, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("faceSelect", [
|
||||
@@ -877,7 +877,7 @@ config.libs = [
|
||||
Object(Matching, "scene/setting/iplUSBAPThread.cpp"),
|
||||
Object(Matching, "scene/setting/iplAOSSThread.cpp"),
|
||||
Object(NonMatching, "scene/setting/AOSSLink.c"),
|
||||
Object(NonMatching, "scene/setting/iplRakuRakuThread.cpp"),
|
||||
Object(Matching, "scene/setting/iplRakuRakuThread.cpp"),
|
||||
Object(NonMatching, "scene/setting/AOSS.c", extra_cflags=["-O4,p", "-inline off"]),
|
||||
Object(NonMatching, "scene/setting/ATERM.c", extra_cflags=["-O4,p", "-inline off"]),
|
||||
]
|
||||
@@ -927,7 +927,7 @@ config.libs = [
|
||||
Object(Matching, "keyboard/tiPkData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
|
||||
Object(Matching, "keyboard/tiLanguageIndependentData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
|
||||
Object(Matching, "keyboard/tiTextInputBase.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/MyTiManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiInputForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiLetterForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiBg.cpp", extra_cflags=["-O4,p"]),
|
||||
@@ -1005,7 +1005,7 @@ config.libs = [
|
||||
Object(Matching, "clib/zi8ZHuwd.c"),
|
||||
Object(NonMatching, "clib/zidawg1.c"),
|
||||
Object(Matching, "clib/zikorean.c"),
|
||||
Object(NonMatching, "clib/ziswordw.c"),
|
||||
Object(Matching, "clib/ziswordw.c"),
|
||||
Object(NonMatching, "clib/zkokeyp.c"),
|
||||
Object(Matching, "clib/zierror.c"),
|
||||
Object(NonMatching, "clib/zmtkey.c"),
|
||||
@@ -1075,11 +1075,11 @@ config.libs = [
|
||||
Object(Matching, "nwc24/NWC24Utils.c"),
|
||||
Object(Matching, "nwc24/NWC24Manage.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgObj.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MBoxCtrl.c"),
|
||||
Object(Matching, "nwc24/NWC24MBoxCtrl.c"),
|
||||
Object(Matching, "nwc24/NWC24Mime.c"),
|
||||
Object(Matching, "nwc24/NWC24Stream.c"),
|
||||
Object(Matching, "nwc24/NWC24Parser.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MsgCommit.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgCommit.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgRead.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
|
||||
Object(Matching, "nwc24/NWC24Schedule.c"),
|
||||
@@ -1098,7 +1098,7 @@ config.libs = [
|
||||
Object(Matching, "so/SOCommon.c"),
|
||||
Object(NonMatching, "so/SOBasic.c"),
|
||||
Object(Matching, "so/SOInformation.c"),
|
||||
Object(NonMatching, "so/SOOption.c"),
|
||||
Object(Matching, "so/SOOption.c"),
|
||||
]
|
||||
),
|
||||
RevoEXLib("ssl", [
|
||||
@@ -1212,7 +1212,7 @@ config.libs = [
|
||||
Object(NonMatching, "exif/exif_parse.c"),
|
||||
|
||||
Object(Matching, "reschange/iqdec_resolution_change_a3.c"),
|
||||
Object(NonMatching, "reschange/idct_resolution_change_var.c"),
|
||||
Object(Matching, "reschange/idct_resolution_change_var.c"),
|
||||
|
||||
Object(NonMatching, "texturecvtr/Texture_MCUtoY8U8V8.c"),
|
||||
Object(NonMatching, "texturecvtr/Texture_MCUtoRGB565.c"),
|
||||
@@ -1695,8 +1695,8 @@ config.libs = [
|
||||
Object(Matching, "fa/pf_cluster.c"),
|
||||
Object(Matching, "fa/pf_dir.c"),
|
||||
Object(Matching, "fa/pf_entry.c"),
|
||||
Object(NonMatching, "fa/pf_entry_iterator.c"),
|
||||
Object(NonMatching, "fa/pf_fat.c"),
|
||||
Object(Matching, "fa/pf_entry_iterator.c"),
|
||||
Object(Matching, "fa/pf_fat.c"),
|
||||
Object(Matching, "fa/pf_fat12.c"),
|
||||
Object(Matching, "fa/pf_fat16.c"),
|
||||
Object(Matching, "fa/pf_fat32.c"),
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace textinput {
|
||||
public:
|
||||
Animation() : mfAnimationTime(0.0f), mbInAnimation(false), mbSE(false), mpAnimObserver(NULL) {}
|
||||
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(MYTIMANAGER_IMPLEMENTATION)
|
||||
virtual void startAnm(f32 start, f32 end, f32 duration, AnimObserver* observer, void* data);
|
||||
#else
|
||||
virtual void startAnm(AnimObserver*, f32, f32, f32, void*);
|
||||
|
||||
@@ -34,14 +34,14 @@ namespace gui {
|
||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||
virtual void draw() {} // 0x18 (0x06)
|
||||
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~Interface(); // 0x1C (0x07)
|
||||
#else
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || 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)
|
||||
class __declspec(novtable) EventHandler {
|
||||
#else
|
||||
class EventHandler {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ipl {
|
||||
mbDisableCon(bDisableCon) {}
|
||||
#endif
|
||||
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace ipl {
|
||||
ANIM_MAX,
|
||||
};
|
||||
|
||||
int unk_0x54;
|
||||
int mAnimWait;
|
||||
|
||||
layout::Object* mpLayout; // 0x58
|
||||
nand::LayoutFile* mpLayoutFile; // 0x5C
|
||||
|
||||
@@ -62,17 +62,17 @@ namespace ipl {
|
||||
void start_left_event(const char* paneName);
|
||||
void start_trig_event(const char* paneName);
|
||||
|
||||
typedef struct Unk {
|
||||
typedef struct CmdEntry {
|
||||
int command; // 0x00
|
||||
u32 msgID; // 0x04
|
||||
} Unk;
|
||||
} CmdEntry;
|
||||
|
||||
Unk unk_0x64[64];
|
||||
CmdEntry mCmdQueue[64];
|
||||
|
||||
int unk_0x264;
|
||||
int unk_0x268;
|
||||
int unk_0x26C;
|
||||
int unk_0x270;
|
||||
int mCmdCapacity;
|
||||
int mCmdCount;
|
||||
int mCmdReadIdx;
|
||||
int mCmdWriteIdx;
|
||||
|
||||
int mSettingArg; // 0x274
|
||||
|
||||
|
||||
@@ -145,6 +145,13 @@ namespace ipl {
|
||||
mpCommonFile = commonFile;
|
||||
mpLangFile = langFile;
|
||||
}
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~LangFile() {}
|
||||
virtual void read() {}
|
||||
virtual bool isFinished() { return false; }
|
||||
virtual int checkData() { return 0; }
|
||||
virtual bool isFatalError() { return false; }
|
||||
#else
|
||||
virtual ~LangFile(); // 0x08
|
||||
|
||||
virtual void read(); // 0x0C
|
||||
@@ -152,6 +159,7 @@ namespace ipl {
|
||||
virtual bool isFinished(); // 0x14
|
||||
virtual int checkData(); // 0x18
|
||||
virtual bool isFatalError(); // 0x1C
|
||||
#endif
|
||||
|
||||
File* getCmnFile() const { return mpCommonFile; }
|
||||
File* getLangFile() const { return mpLangFile; }
|
||||
@@ -165,7 +173,11 @@ namespace ipl {
|
||||
public:
|
||||
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool bIsNandFile);
|
||||
LayoutFile(File* commonFile, File* langFile = NULL) : LangFile(commonFile, langFile) {}
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~LayoutFile() {} // 0x08
|
||||
#else
|
||||
virtual ~LayoutFile(); // 0x08
|
||||
#endif
|
||||
};
|
||||
} // namespace nand
|
||||
} // namespace ipl
|
||||
|
||||
@@ -38,6 +38,19 @@ namespace EGG {
|
||||
|
||||
virtual void calc(); // 0x30
|
||||
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x34
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x38
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x3C
|
||||
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x48
|
||||
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x50
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x50
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x58
|
||||
#else
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x34
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x38
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName) NO_INLINE {
|
||||
@@ -66,6 +79,7 @@ namespace EGG {
|
||||
u32 id = changeNameToId(pName);
|
||||
return mSoundArchivePlayer.HoldSound(pHandle, id);
|
||||
} // 0x58
|
||||
#endif
|
||||
|
||||
u32 changeNameToId(const char* pName) { return mpArchive->ConvertLabelStringToSoundId(pName); }
|
||||
const char* changeIdToName(u32 id) { return mpArchive->GetSoundLabelString(id); }
|
||||
|
||||
@@ -19,6 +19,10 @@ namespace EGG {
|
||||
|
||||
~SoundHeapMgr() { destroySoundHeap(); }
|
||||
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
virtual bool loadState(s32 id); // 0x08
|
||||
virtual s32 getCurrentLevel(); // 0x0C
|
||||
#else
|
||||
virtual bool loadState(s32 id) {
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
if (id > 0 && mHeap.GetCurrentLevel() >= id) {
|
||||
@@ -35,6 +39,7 @@ namespace EGG {
|
||||
} // 0x08
|
||||
|
||||
virtual s32 getCurrentLevel() { return mHeap.GetCurrentLevel(); } // 0x0C
|
||||
#endif
|
||||
|
||||
s32 saveState() { return mHeap.SaveState(); }
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
|
||||
#include <egg/core.h>
|
||||
|
||||
namespace EGG {
|
||||
|
||||
@@ -1120,6 +1120,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
case 's':
|
||||
if (format.argument_options == wchar_argument) {
|
||||
wchar_t* wcs_ptr = va_arg(args, wchar_t*);
|
||||
int wideLength;
|
||||
|
||||
if (wcs_ptr == NULL) {
|
||||
wcs_ptr = L"";
|
||||
@@ -1127,22 +1128,24 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
|
||||
if (format.alternate_form) {
|
||||
wchar_t first = *wcs_ptr++;
|
||||
num_chars = (unsigned char)first;
|
||||
wideLength = (unsigned char)first;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
if (format.precision_specified && wideLength > format.precision) {
|
||||
wideLength = format.precision;
|
||||
}
|
||||
} else if (format.precision_specified) {
|
||||
num_chars = format.precision;
|
||||
wideLength = format.precision;
|
||||
|
||||
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, num_chars)) != 0) {
|
||||
num_chars = string_end - wcs_ptr;
|
||||
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, wideLength)) != 0) {
|
||||
wideLength = string_end - wcs_ptr;
|
||||
}
|
||||
|
||||
} else {
|
||||
num_chars = wcslen(wcs_ptr);
|
||||
wideLength = wcslen(wcs_ptr);
|
||||
}
|
||||
|
||||
num_chars = wideLength;
|
||||
|
||||
buff_ptr = wcs_ptr;
|
||||
break;
|
||||
} else {
|
||||
|
||||
@@ -19,8 +19,13 @@ namespace nw4r {
|
||||
template <typename T>
|
||||
class AutoLock : private NonCopyable {
|
||||
public:
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
explicit AutoLock(T& rLockObj);
|
||||
~AutoLock();
|
||||
#else
|
||||
explicit AutoLock(T& rLockObj) : mLockObj(rLockObj) { Lock(rLockObj); }
|
||||
~AutoLock() { Unlock(mLockObj); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
T& mLockObj; // 0x00
|
||||
|
||||
@@ -314,7 +314,7 @@ namespace nw4r {
|
||||
ArchiveFontBase::ConstructState ArchiveFontBase::ConstructOpAnalyzeGLGR(ConstructContext* ctx, CachedStreamReader* reader) {
|
||||
u32 glgrInnerLen;
|
||||
HeaderedGlyphGroups* pGlgr;
|
||||
ArchiveFontBinaryLayout* font;
|
||||
const ArchiveFontBinaryLayout* font;
|
||||
u8* glgrEnd;
|
||||
|
||||
u32 expectedMaxSize;
|
||||
@@ -337,7 +337,7 @@ namespace nw4r {
|
||||
|
||||
// Copy the glgr to work
|
||||
{
|
||||
pGlgr = &font->glgr;
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
glgrEnd = (u8*)pGlgr + (u32)ctx->mNextBlockHdr.size;
|
||||
|
||||
memcpy(pGlgr, &ctx->mNextBlockHdr, sizeof(BinaryBlockHeader));
|
||||
@@ -382,7 +382,7 @@ namespace nw4r {
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
pGlgr = &font->glgr;
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
|
||||
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {
|
||||
// return CONSTRUCT_STATE_FATAL_ERR;
|
||||
|
||||
@@ -10,14 +10,12 @@ static TMCHuffmanEntry readHuffmanEntry(const TMCHuffmanEntry* entries, u32 inde
|
||||
return entries[index];
|
||||
}
|
||||
|
||||
static TMCHuffmanEntry readHuffmanLimit(const TMCHuffmanEntry* entries) {
|
||||
TMCHuffmanEntry limit;
|
||||
limit.bitLength = entries->bitLength;
|
||||
limit.symbol = entries->symbol;
|
||||
return limit;
|
||||
static void readHuffmanLimit(const TMCHuffmanEntry* entries, TMCHuffmanEntry* limit) {
|
||||
limit->bitLength = entries->bitLength;
|
||||
limit->symbol = entries->symbol;
|
||||
}
|
||||
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, const TMCHuffmanEntry* table, const u8* symbols, TMCCJPEGDecWork* work) {
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, const TMCHuffmanEntry* table, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
@@ -51,17 +49,21 @@ static inline s32 decodeLongHuffman(s32 bitCount, const TMCHuffmanEntry* table,
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
TMCHuffmanEntry decoded = readHuffmanLimit(entry);
|
||||
if (code > (u32)decoded.bitLength) {
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
code = code - entry->bitLength + entry->symbol;
|
||||
return symbols[code & 0xFF];
|
||||
{
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, const u8* symbols, TMCCJPEGDecWork* work) {
|
||||
static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
@@ -94,18 +96,26 @@ static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, co
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
TMCHuffmanEntry decoded = readHuffmanLimit(entry);
|
||||
if (code > (u32)decoded.bitLength) {
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
code = code - entry->bitLength + entry->symbol;
|
||||
return symbols[code & 0xFF];
|
||||
{
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_ptr, TMCCJPEGDecWork* work) {
|
||||
TMCHuffmanEntry dcEntry;
|
||||
TMCHuffmanEntry dcDecoded;
|
||||
TMCHuffmanEntry dcLimit;
|
||||
TMCHuffmanEntry acDecoded;
|
||||
TMCHuffmanEntry acLimit;
|
||||
u8* huff_sym;
|
||||
const TMCHuffmanEntry* ac_fast;
|
||||
s32 idx;
|
||||
@@ -147,7 +157,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
} else {
|
||||
huff_sym = work->pDCHuffSym;
|
||||
huff_tbl = work->pDCHuffTbl;
|
||||
r = decodeLongHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work);
|
||||
r = decodeLongHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &dcLimit, &dcDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -207,7 +217,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
r = acEntry.symbol;
|
||||
} else {
|
||||
bit_pos = work->bitCount;
|
||||
r = decodeACHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work);
|
||||
r = decodeACHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &acLimit, &acDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ static u16 readU16(const u8* p, u16 byteOrder) {
|
||||
}
|
||||
|
||||
static u16 readExifU16(const u8* data, u16 byteOrder) {
|
||||
u32 value = data[0] | data[1] << 8;
|
||||
u16 value = data[0] | data[1] << 8;
|
||||
if (byteOrder == 0x4949) {
|
||||
return (u16)value;
|
||||
}
|
||||
@@ -246,9 +246,9 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
|
||||
u32 ifdOffset;
|
||||
const u8* entries;
|
||||
u16 remaining;
|
||||
u16 count;
|
||||
s32 entriesSize;
|
||||
u16 index;
|
||||
s32 entriesSize;
|
||||
u16 count;
|
||||
pInfo->thumbnailData = (u8*)data;
|
||||
pInfo->dataEnd = (u8*)data + size;
|
||||
pInfo->nextIfdOffset = 0;
|
||||
@@ -339,7 +339,7 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
|
||||
}
|
||||
|
||||
static void TMCJPEGDEC_IFD0_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder, const u8* entry) {
|
||||
u16 tag;
|
||||
s32 tag;
|
||||
u16 type;
|
||||
|
||||
tag = readU16(entry, byteOrder);
|
||||
|
||||
@@ -166,23 +166,23 @@ s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) {
|
||||
}
|
||||
|
||||
static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s8 crValue;
|
||||
s32 red;
|
||||
u8* luminance;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
TMCCJPEGDecState* state;
|
||||
u8* texture;
|
||||
s32 height;
|
||||
s32 yEnd;
|
||||
s32 column;
|
||||
s32 xEnd;
|
||||
s32 green;
|
||||
s32 column;
|
||||
s32 yEnd;
|
||||
s32 tileWidth;
|
||||
s32 blueOffset;
|
||||
u16* output;
|
||||
s32 tileRow;
|
||||
s32 lumaSkip;
|
||||
s32 red;
|
||||
s8 crValue;
|
||||
s32 chromaSkip;
|
||||
s32 width;
|
||||
s32 cbValue;
|
||||
@@ -216,7 +216,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
cbValue = (s8)*cb++;
|
||||
crValue = (s8)*cr++;
|
||||
redOffset = (crValue * 359) >> 8;
|
||||
greenOffset = -(cbValue * 88 + crValue * 183) >> 8;
|
||||
greenOffset = -(crValue * 183 + cbValue * 88) >> 8;
|
||||
blueOffset = (cbValue * 454) >> 8;
|
||||
}
|
||||
{
|
||||
@@ -224,7 +224,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | green | red) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -238,7 +238,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | green | red) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -252,7 +252,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | green | red) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -266,7 +266,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | green | red) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -285,20 +285,20 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
}
|
||||
|
||||
static void TMCJPEGDEC_converterYUV411toRGBA8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s32 column;
|
||||
u8* luminance;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 tileWidth;
|
||||
u8* texture;
|
||||
s32 width;
|
||||
s32 height;
|
||||
s32 xEnd;
|
||||
s32 yEnd;
|
||||
s32 lumaSkip;
|
||||
s32 chromaSkip;
|
||||
s32 tileRow;
|
||||
s32 xEnd;
|
||||
u8* texture;
|
||||
TMCCJPEGDecState* state;
|
||||
u8* luminance;
|
||||
u8* cb;
|
||||
s32 width;
|
||||
s32 height;
|
||||
u8* cr;
|
||||
s32 column;
|
||||
s32 lumaSkip;
|
||||
s32 yEnd;
|
||||
s32 tileWidth;
|
||||
u16* output;
|
||||
s32 cbValue;
|
||||
s8 crValue;
|
||||
@@ -345,7 +345,7 @@ static void TMCJPEGDEC_converterYUV411toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
red = blue + redOffset;
|
||||
green = blue + greenOffset;
|
||||
blue = blue + blueOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((green | red | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -366,11 +366,11 @@ static void TMCJPEGDEC_converterYUV411toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
|
||||
static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s32 chromaSkip;
|
||||
s32 blue;
|
||||
s32 lumaSkip;
|
||||
s32 cbValue;
|
||||
s32 tileWidth;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 xEnd;
|
||||
u16* output;
|
||||
u8* texture;
|
||||
s32 width;
|
||||
s32 height;
|
||||
@@ -379,7 +379,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
s32 red;
|
||||
u8* cr;
|
||||
s32 column;
|
||||
u16* output;
|
||||
s32 xEnd;
|
||||
s32 yEnd;
|
||||
s32 redOffset;
|
||||
s32 tileRow;
|
||||
@@ -387,7 +387,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
s32 blueOffset;
|
||||
s32 value;
|
||||
s32 green;
|
||||
s32 lumaSkip;
|
||||
s32 blue;
|
||||
s32 crValue;
|
||||
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -415,7 +415,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -426,7 +426,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -441,21 +441,21 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
}
|
||||
|
||||
static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s32 column;
|
||||
u8* luminance;
|
||||
u8* cb;
|
||||
s32 blue;
|
||||
u16* output;
|
||||
s32 xEnd;
|
||||
u8* cr;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 tileWidth;
|
||||
u8* texture;
|
||||
u8* luminance;
|
||||
s32 width;
|
||||
s32 height;
|
||||
s32 xEnd;
|
||||
s32 yEnd;
|
||||
s32 lumaSkip;
|
||||
u8* cb;
|
||||
u8* texture;
|
||||
s32 column;
|
||||
s32 chromaSkip;
|
||||
s32 yEnd;
|
||||
s32 tileRow;
|
||||
u16* output;
|
||||
s32 cbValue;
|
||||
s32 crValue;
|
||||
s32 redOffset;
|
||||
@@ -463,7 +463,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
s32 blueOffset;
|
||||
s32 value;
|
||||
s32 red;
|
||||
s32 blue;
|
||||
s32 lumaSkip;
|
||||
s32 green;
|
||||
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -502,7 +502,7 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
green = value + greenOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -517,19 +517,19 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
}
|
||||
|
||||
static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s32 blue;
|
||||
s32 tileRow;
|
||||
s8 crValue;
|
||||
s32 chromaSkip;
|
||||
u8* luminance;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 xEnd;
|
||||
u8* texture;
|
||||
s32 width;
|
||||
s32 height;
|
||||
s32 blueOffset;
|
||||
u8* texture;
|
||||
s32 green;
|
||||
s32 blue;
|
||||
s32 lumaSkip;
|
||||
s32 yEnd;
|
||||
s32 tileRow;
|
||||
s32 xEnd;
|
||||
s32 value;
|
||||
s32 column;
|
||||
u8* cr;
|
||||
@@ -538,7 +538,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
s32 redOffset;
|
||||
u8* cb;
|
||||
u16* output;
|
||||
s32 green;
|
||||
s32 blueOffset;
|
||||
s32 red;
|
||||
s32 cbValue;
|
||||
|
||||
@@ -578,7 +578,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
|
||||
|
||||
|
||||
if ((blue | green | red) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -593,7 +593,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | green | red) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -620,11 +620,11 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
static void TMCJPEGDEC_converterYUV420toRGBA8edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u8* luminance = work->convBuf + 4;
|
||||
u8* cb = work->convBuf + 260;
|
||||
u8* cr = work->convBuf + 324;
|
||||
s32 width;
|
||||
TMCCJPEGDecState* state = work->pState;
|
||||
s32 tileWidth = (state->convWidth >> 2) << 1;
|
||||
u8* texture = state->pTexBuffer;
|
||||
s32 width;
|
||||
u8* cr = work->convBuf + 324;
|
||||
s32 height;
|
||||
if (state->dataSizeX == (u32)x) {
|
||||
width = state->stepXExt;
|
||||
@@ -660,7 +660,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
s32 green = value + greenOffset;
|
||||
s32 red = value + redOffset;
|
||||
s32 blue = value + blueOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((green | red | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -686,7 +686,7 @@ static void TMCJPEGDEC_converterYUV420toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
|
||||
static void TMCJPEGDEC_converterYUV211toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u16* output;
|
||||
s32 column;
|
||||
s32 tileRow;
|
||||
s32 redOffset;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 lumaSkip;
|
||||
@@ -695,7 +695,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
s32 height;
|
||||
s32 tileRow;
|
||||
s32 column;
|
||||
s32 chromaSkip;
|
||||
s32 width;
|
||||
s32 xEnd;
|
||||
@@ -742,7 +742,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -770,7 +770,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
u16* output;
|
||||
s32 lumaSkip;
|
||||
s32 blue;
|
||||
s32 tileRow;
|
||||
u8* texture;
|
||||
u8* luminance;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
@@ -783,7 +783,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
s32 greenOffset;
|
||||
s32 yEnd;
|
||||
s32 cbValue;
|
||||
u8* texture;
|
||||
s32 tileRow;
|
||||
s32 blueOffset;
|
||||
s32 red;
|
||||
s8 crValue;
|
||||
@@ -831,7 +831,7 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
green = value + greenOffset;
|
||||
red = value + redOffset;
|
||||
blue = value + blueOffset;
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
@@ -856,20 +856,20 @@ static void TMCJPEGDEC_converterYUV211toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
|
||||
|
||||
static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u16* output;
|
||||
s32 tileWidth;
|
||||
s32 tileRow;
|
||||
s32 xEnd;
|
||||
s32 rowSkip;
|
||||
u8* texture;
|
||||
u8* luminance;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
TMCCJPEGDecState* state;
|
||||
s8 crValue;
|
||||
s32 crValue;
|
||||
s32 height;
|
||||
s32 width;
|
||||
s32 column;
|
||||
s32 rowSkip;
|
||||
s32 xEnd;
|
||||
s32 yEnd;
|
||||
u8* texture;
|
||||
s32 tileWidth;
|
||||
s32 row;
|
||||
s32 red;
|
||||
s32 cbValue;
|
||||
@@ -899,7 +899,7 @@ static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
|
||||
green = value + (-(cbValue * 88 + crValue * 183) >> 8);
|
||||
red = value + ((crValue * 359) >> 8);
|
||||
blue = value + ((cbValue * 454) >> 8);
|
||||
if ((blue | red | green) >> 8) {
|
||||
if ((red | green | blue) >> 8) {
|
||||
blue = blue > 255 ? 255 : blue < 0 ? 0 : blue;
|
||||
green = green > 255 ? 255 : green < 0 ? 0 : green;
|
||||
red = red > 255 ? 255 : red < 0 ? 0 : red;
|
||||
|
||||
@@ -171,9 +171,7 @@ s32 TMCJPEGDEC_set_converterY8U8V8(TMCCJPEGDecWork* work) {
|
||||
static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s32 rowSkip;
|
||||
u8* output;
|
||||
s32 chromaXEnd;
|
||||
u32 tileRow;
|
||||
u32 chromaTileWidth;
|
||||
s32 chromaYEnd;
|
||||
u8* lumaTexture;
|
||||
TMCCJPEGDecState* state;
|
||||
@@ -216,17 +214,17 @@ static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
}
|
||||
luminance += rowSkip;
|
||||
}
|
||||
chromaTileWidth = state->chromaWidth >> 3;
|
||||
tileWidth = state->chromaWidth >> 3;
|
||||
x = (u32)x >> 2;
|
||||
width = 8 / state->scaleFactor;
|
||||
height = 8 / state->scaleFactor;
|
||||
chromaXEnd = x + width;
|
||||
xEnd = x + width;
|
||||
chromaYEnd = y + height;
|
||||
for (; y < chromaYEnd; y++) {
|
||||
for (column = x; column < chromaXEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
|
||||
for (column = x; column < xEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
|
||||
cb++;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
|
||||
cr++;
|
||||
}
|
||||
cb += 8 - width;
|
||||
@@ -235,7 +233,6 @@ static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
}
|
||||
|
||||
static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u32 chromaTileWidth;
|
||||
TMCCJPEGDecState* state;
|
||||
u8* lumaTexture;
|
||||
u8* luminance;
|
||||
@@ -250,9 +247,9 @@ static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u8* output;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
s32 xEnd;
|
||||
s32 tileOffset;
|
||||
s32 width;
|
||||
s32 tileOffset;
|
||||
s32 xEnd;
|
||||
u32 tileWidth;
|
||||
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -287,13 +284,13 @@ static void TMCJPEG_814F043C(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
x = (u32)x >> 2;
|
||||
width = (width + 3) >> 2;
|
||||
xEnd = x + width;
|
||||
chromaTileWidth = state->chromaWidth >> 3;
|
||||
tileWidth = state->chromaWidth >> 3;
|
||||
chromaEnd = y + height;
|
||||
for (; y < chromaEnd; y++) {
|
||||
for (column = x; column < xEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
|
||||
cb++;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
|
||||
cr++;
|
||||
}
|
||||
cb += 8 - width;
|
||||
@@ -306,9 +303,7 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u8* lumaTexture;
|
||||
u8* luminance;
|
||||
s32 column;
|
||||
s32 chromaXEnd;
|
||||
s32 row;
|
||||
u32 chromaTileWidth;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 width;
|
||||
s32 height;
|
||||
@@ -319,7 +314,6 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u8* cb;
|
||||
u32 tileWidth;
|
||||
u8* cr;
|
||||
s32 chromaRowSkip;
|
||||
|
||||
row = y;
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -344,24 +338,22 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
x = (u32)x >> 1;
|
||||
width = 8 / state->scaleFactor;
|
||||
height = 8 / state->scaleFactor;
|
||||
chromaXEnd = x + width;
|
||||
xEnd = x + width;
|
||||
chromaYEnd = y + height;
|
||||
chromaTileWidth = state->chromaWidth >> 3;
|
||||
chromaRowSkip = 8 - width;
|
||||
for (; y < chromaYEnd; y++) {
|
||||
for (column = x; column < chromaXEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
|
||||
tileWidth = state->chromaWidth >> 3;
|
||||
for (row = y; row < chromaYEnd; row++) {
|
||||
for (column = x; column < xEnd; column += 1) {
|
||||
(cbTexture + ((row & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (row >> 2) * tileWidth) << 5)] = *cb + 128;
|
||||
cb++;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
|
||||
(crTexture + ((row & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (row >> 2) * tileWidth) << 5)] = *cr + 128;
|
||||
cr++;
|
||||
}
|
||||
cb += chromaRowSkip;
|
||||
cb += 8 - width;
|
||||
cr += 8 - width;
|
||||
}
|
||||
}
|
||||
|
||||
static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u32 chromaTileWidth;
|
||||
TMCCJPEGDecState* state;
|
||||
u8* lumaTexture;
|
||||
u8* luminance;
|
||||
@@ -376,9 +368,9 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u8* output;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
s32 xEnd;
|
||||
s32 tileOffset;
|
||||
s32 width;
|
||||
s32 tileOffset;
|
||||
s32 xEnd;
|
||||
u32 tileWidth;
|
||||
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -413,13 +405,13 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
x = (u32)x >> 1;
|
||||
width = (width + 1) >> 1;
|
||||
xEnd = x + width;
|
||||
chromaTileWidth = state->chromaWidth >> 3;
|
||||
tileWidth = state->chromaWidth >> 3;
|
||||
chromaEnd = y + height;
|
||||
for (; y < chromaEnd; y++) {
|
||||
for (column = x; column < xEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
|
||||
cb++;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
|
||||
cr++;
|
||||
}
|
||||
cb += 8 - width;
|
||||
@@ -428,23 +420,21 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
}
|
||||
|
||||
static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
s32 chromaXEnd;
|
||||
s32 chromaYEnd;
|
||||
u8* lumaTexture;
|
||||
s32 height;
|
||||
u32 chromaTileWidth;
|
||||
u8* luminance;
|
||||
s32 column;
|
||||
u8* cbTexture;
|
||||
s32 xEnd;
|
||||
s32 row;
|
||||
u8* crTexture;
|
||||
u32 tileWidth;
|
||||
s32 xEnd;
|
||||
u8* cb;
|
||||
TMCCJPEGDecState* state;
|
||||
s32 yEnd;
|
||||
s32 width;
|
||||
u8* cr;
|
||||
s32 row;
|
||||
u32 tileWidth;
|
||||
|
||||
row = y;
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -470,14 +460,14 @@ static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
y = (u32)y >> 1;
|
||||
width = 8 / state->scaleFactor;
|
||||
height = 8 / state->scaleFactor;
|
||||
chromaXEnd = x + width;
|
||||
xEnd = x + width;
|
||||
chromaYEnd = y + height;
|
||||
chromaTileWidth = state->chromaWidth >> 3;
|
||||
tileWidth = state->chromaWidth >> 3;
|
||||
for (; y < chromaYEnd; y++) {
|
||||
for (column = x; column < chromaXEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
|
||||
for (column = x; column < xEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
|
||||
cb++;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
|
||||
cr++;
|
||||
}
|
||||
cb += 8 - width;
|
||||
@@ -486,7 +476,6 @@ static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
}
|
||||
|
||||
static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u32 chromaTileWidth;
|
||||
TMCCJPEGDecState* state;
|
||||
u8* lumaTexture;
|
||||
u8* luminance;
|
||||
@@ -497,13 +486,13 @@ static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
u8* crTexture;
|
||||
u32 tileRow;
|
||||
s32 height;
|
||||
s32 yEnd;
|
||||
s32 width;
|
||||
u8* output;
|
||||
u8* cb;
|
||||
u8* cr;
|
||||
s32 xEnd;
|
||||
s32 tileOffset;
|
||||
s32 width;
|
||||
s32 yEnd;
|
||||
u32 tileWidth;
|
||||
|
||||
luminance = work->convBuf + 4;
|
||||
@@ -539,13 +528,13 @@ static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
|
||||
x = (u32)x >> 1;
|
||||
width = (width + 1) >> 1;
|
||||
xEnd = x + width;
|
||||
chromaTileWidth = state->chromaWidth >> 3;
|
||||
tileWidth = state->chromaWidth >> 3;
|
||||
chromaEnd = y + ((height + 1) >> 1);
|
||||
for (; y < chromaEnd; y++) {
|
||||
for (column = x; column < xEnd; column += 1) {
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
|
||||
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cb + 128;
|
||||
cb++;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
|
||||
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * tileWidth) << 5)] = *cr + 128;
|
||||
cr++;
|
||||
}
|
||||
cb += 8 - width;
|
||||
|
||||
@@ -219,7 +219,7 @@ struct __zi8_work_data_s {
|
||||
ziU8 unk_0x17;
|
||||
ziU8 subLanguage; // 0x18
|
||||
ziU8 unk_0x19;
|
||||
ziU16 unk_0x1A;
|
||||
ziU16 separator; // 0x1A
|
||||
ziU8 unk_0x1C[3];
|
||||
ziU8 unk_0x1F;
|
||||
ziU16 unk_0x20[0x40];
|
||||
|
||||
@@ -796,11 +796,11 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
|
||||
if (remaining != 0) {
|
||||
remaining--;
|
||||
} else {
|
||||
totalCandidates++;
|
||||
totalCandidates = totalCandidates + 1;
|
||||
if (options->countOnly == '\0') {
|
||||
*output++ = spellingBuffer[spellingIndex];
|
||||
*output++ = 0;
|
||||
candidateCount++;
|
||||
candidateCount = candidateCount + 1;
|
||||
}
|
||||
else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
|
||||
if (candidateCount >= params->maxCandidates) goto finishSpelling;
|
||||
@@ -940,8 +940,7 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
|
||||
for (tableIndex = 0; tableIndex < params->count;) {
|
||||
while (*output != 0) {
|
||||
if (*output != 0x27) {
|
||||
*output |= 0xf300;
|
||||
output++;
|
||||
*output++ |= 0xf300;
|
||||
} else {
|
||||
*output++ = 0xf360;
|
||||
}
|
||||
@@ -1001,10 +1000,10 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
|
||||
}
|
||||
if (Zi8IsDupWordW(output,(ziU8)phoneticIndex,work) == 0) {
|
||||
if (remaining == 0) {
|
||||
totalCandidates++;
|
||||
totalCandidates = totalCandidates + 1;
|
||||
if (options->countOnly == 0) {
|
||||
output += phoneticIndex + 1;
|
||||
candidateCount++;
|
||||
++candidateCount;
|
||||
} else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
|
||||
if (candidateCount >= params->maxCandidates) goto finishSpelling;
|
||||
} else {
|
||||
|
||||
@@ -285,9 +285,9 @@ static ziBool ZiIsLetterHyphen(ziWChar character ZI_NEED_WORK) {
|
||||
else return ZI8_FALSE;
|
||||
}
|
||||
|
||||
void Zi8ChangeWordCase(ziWChar* word, ziU8 language, ziPtr work) {
|
||||
void Zi8ChangeWordCase(ziWChar* word, ziU8 language, ZiAlphaWork* work) {
|
||||
enum { LOWER_CASE, UPPER_CASE } upper = LOWER_CASE;
|
||||
if (((ZiAlphaWork*)work)->caseMode == 3) {
|
||||
if (work->caseMode == 3) {
|
||||
Zi8ChangeCharCase(1, word++, language, work);
|
||||
} else if (((ZiAlphaWork*)work)->caseMode == 1) {
|
||||
upper = UPPER_CASE;
|
||||
|
||||
@@ -18,7 +18,7 @@ static Zi8UInt Zi8SetFindCand(ziU8* foundCandidates, Zi8UInt ordinal, ziPtr work
|
||||
}
|
||||
|
||||
ziWChar* ZiGetNextPhonetic(ziWChar* spelling, ziWChar* end ZI_NEED_WORK) {
|
||||
while (*spelling && *spelling != ZI_WORK->unk_0x1A && *spelling != 0xF360 && spelling < end) {
|
||||
while (*spelling && *spelling != ZI_WORK->separator && *spelling != 0xF360 && spelling < end) {
|
||||
++spelling;
|
||||
}
|
||||
if (!*spelling || spelling == end) {
|
||||
@@ -37,8 +37,8 @@ int ZiPartialMatch(ziWChar* spelling, ziWChar* spellingEnd,
|
||||
if (spelling == spellingEnd || candidate == candidateEnd || !*spelling || !*candidate) {
|
||||
return 1;
|
||||
}
|
||||
while (*spelling != ZI_WORK->unk_0x1A && *spelling != 0xF360) {
|
||||
if (*candidate == ZI_WORK->unk_0x1A || *candidate == 0xF360) {
|
||||
while (*spelling != ZI_WORK->separator && *spelling != 0xF360) {
|
||||
if (*candidate == ZI_WORK->separator || *candidate == 0xF360) {
|
||||
break;
|
||||
}
|
||||
if (*spelling != *candidate) {
|
||||
@@ -753,8 +753,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
|
||||
if (!componentTable) {
|
||||
componentCount = Zi8GetTableCount(1, 7, work);
|
||||
componentOrdinals = (ziU8*)Zi8GetTableAddress(1, 7, work);
|
||||
componentCursor = (ziU8*)Zi8GetTableAddress(1, 2, work);
|
||||
componentTable = componentCursor;
|
||||
componentTable = componentCursor = (ziU8*)Zi8GetTableAddress(1, 2, work);
|
||||
componentCursor += 8;
|
||||
--componentCount;
|
||||
componentIndex = componentCount;
|
||||
@@ -2869,7 +2868,7 @@ ziU8 Zi8GetElementCount(ziWChar* elements, ziU8 elementCount, ziU8 charCount ZI_
|
||||
ziU8 count;
|
||||
ziWChar spacedElements[256];
|
||||
struct { ziWChar separator; } savedState;
|
||||
savedState.separator = ZI_WORK->unk_0x1A;
|
||||
savedState.separator = ZI_WORK->separator;
|
||||
if (elementCount <= 1 || !charCount) {
|
||||
return elementCount;
|
||||
}
|
||||
@@ -2882,9 +2881,9 @@ ziU8 Zi8GetElementCount(ziWChar* elements, ziU8 elementCount, ziU8 charCount ZI_
|
||||
if (spacedIndex == elementCount) {
|
||||
return elementCount;
|
||||
}
|
||||
ZI_WORK->unk_0x1A = 0xF360;
|
||||
ZI_WORK->separator = 0xF360;
|
||||
Zi8ZHaddSpace(elements, elementCount, spacedElements, 256, __zi8_work_data);
|
||||
ZI_WORK->unk_0x1A = savedState.separator;
|
||||
ZI_WORK->separator = savedState.separator;
|
||||
spacedIndex = elementIndex = count = 0;
|
||||
while (charCount && elementIndex < elementCount) {
|
||||
if (spacedElements[spacedIndex] == 0xF360) {
|
||||
|
||||
@@ -21,7 +21,7 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
|
||||
ZI_WORK->unk_0x0A = 0xFF;
|
||||
ZI_WORK->unk_0x10 = 0x64;
|
||||
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
|
||||
ZI_WORK->unk_0x1A = 0x20;
|
||||
ZI_WORK->separator = 0x20;
|
||||
ZI_WORK->unk_0x1C[2] = 0;
|
||||
ZI_WORK->unk_0x1B30 = 0;
|
||||
ZI_WORK->unk_0x1B3A = 0;
|
||||
|
||||
@@ -68,7 +68,7 @@ ziU8 Zi8ZHaddSpace(ziWChar* src, ziU8 count, ziWChar* dst,
|
||||
}
|
||||
if (pdst[k - 1] != 0xF360 &&
|
||||
(pdst[k - 1] < 0xF331 || pdst[k - 1] > 0xF335)) {
|
||||
pdst[k++] = ZI_WORK->unk_0x1A;
|
||||
pdst[k++] = ZI_WORK->separator;
|
||||
}
|
||||
psrc += i;
|
||||
n -= i;
|
||||
|
||||
@@ -41,7 +41,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
|
||||
current = ZI_WORK->uwdList;
|
||||
while (current != 0) {
|
||||
candidate = (ziUserWord*)current->word;
|
||||
if (ZI_WORK->unk_0x12E == 1 && word->priority > candidate->priority) break;
|
||||
if (ZI_WORK->unk_0x12E == 1 && candidate->priority < word->priority) break;
|
||||
if (candidate->length == length) {
|
||||
position = 0;
|
||||
while (position < length) {
|
||||
|
||||
@@ -41,6 +41,13 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
|
||||
return node;
|
||||
}
|
||||
|
||||
typedef struct ziDawgLongOffset {
|
||||
ziU8 flags;
|
||||
ziU8 middle;
|
||||
ziU8 low;
|
||||
} ziDawgLongOffset;
|
||||
typedef char ziDawgLongOffsetSizeCheck[(sizeof(ziDawgLongOffset) == 3) ? 1 : -1];
|
||||
|
||||
ziU8* ZiDAWGGetSibling(ziU8* cursor) {
|
||||
ziS32 depth;
|
||||
ziU8* node;
|
||||
@@ -70,14 +77,14 @@ ziU8* ZiDAWGGetSibling(ziU8* cursor) {
|
||||
}
|
||||
|
||||
if ((*cursor & 0x80) != 0) {
|
||||
node += (*cursor & 0x7f) * 0x10000 +
|
||||
(((ziU32)cursor[1] << 8) + (ziU32)cursor[2]) + 0x8000;
|
||||
node += (((const ziDawgLongOffset*)cursor)->flags & 0x7f) * 0x10000 +
|
||||
(((ziU32)(ziU16)cursor[1] << 8) +
|
||||
((const ziDawgLongOffset*)cursor)->low) + 0x8000;
|
||||
} else {
|
||||
node = cursor[1] + (node + (ziU16)*cursor * 0x100);
|
||||
}
|
||||
return node;
|
||||
} else {
|
||||
cursor = node;
|
||||
do {
|
||||
header = nodeHeaderTable[cursor[0] >> 4];
|
||||
if ((cursor[0] & 0xf) == 0xf) {
|
||||
|
||||
@@ -25,6 +25,12 @@ ziU8 Zi8GetFormatVersion(ziU8 ZI_NEED_WORK);
|
||||
ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
|
||||
ziU16 Zi8Uni2Ord(ziWChar ZI_NEED_WORK);
|
||||
|
||||
typedef struct ziEncodedOrdinal {
|
||||
ziU8 low;
|
||||
ziU8 high;
|
||||
} ziEncodedOrdinal;
|
||||
typedef char ziEncodedOrdinalSizeCheck[(sizeof(ziEncodedOrdinal) == 2) ? 1 : -1];
|
||||
|
||||
ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
ziChineseEntry* table = 0;
|
||||
ziU8* baseData = 0;
|
||||
@@ -134,10 +140,10 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
countLeft = count;
|
||||
cursor = ordinals;
|
||||
while (countLeft > 0) {
|
||||
value = (data[1] << 8) | data[0];
|
||||
value = ((ziU32)(ziU16)data[1] << 8) |
|
||||
((const ziEncodedOrdinal*)data)->low;
|
||||
data += 2;
|
||||
cursor++;
|
||||
if (value != *cursor) break;
|
||||
if (value != *++cursor) break;
|
||||
countLeft--;
|
||||
if (value & 0x8000) break;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,7 @@ ziU8 Zi8MatchOEMdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* word
|
||||
index = ZI_WORK->oemIdx;
|
||||
if ((ziS32)index >= ZI_WORK->oemLen) goto failed;
|
||||
if (ZI_WORK->oemMatch == 0) goto failed;
|
||||
capacity--;
|
||||
if ((ziS32)length >= (ziS32)capacity) {
|
||||
if ((ziS32)length >= (ziS32)--capacity) {
|
||||
failed:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -550,7 +550,15 @@ pf_s32 PFCACHE_DoWriteSector(PF_VOLUME* p_vol, PF_CACHE_PAGE** pp_head, const pf
|
||||
|
||||
#pragma dont_inline reset
|
||||
|
||||
#pragma dont_inline on
|
||||
static inline pf_u32 PFCACHE_RecordPageEndOverlap(PF_CACHE_PAGE* p_page, pf_u32 end_sector, pf_u32* p_num_success, pf_u32* p_num_rest_sector) {
|
||||
pf_u32 last_sector = end_sector - 1;
|
||||
pf_u32 num_overlap = end_sector - p_page->sector;
|
||||
*p_num_success += num_overlap;
|
||||
*p_num_rest_sector -= num_overlap;
|
||||
p_page->stat |= 2;
|
||||
return last_sector;
|
||||
}
|
||||
|
||||
pf_s32 PFCACHE_DoWriteNumSectorAndFreeIfNeeded(PF_VOLUME* p_vol, PF_CACHE_PAGE** pp_head, const pf_u8* p_buf, pf_u32 sector,
|
||||
pf_u32 num_sector, pf_u32* p_num_success) {
|
||||
PF_CACHE_PAGE* p_page = PF_NULL;
|
||||
@@ -609,11 +617,9 @@ pf_s32 PFCACHE_DoWriteNumSectorAndFreeIfNeeded(PF_VOLUME* p_vol, PF_CACHE_PAGE**
|
||||
(p_page->sector + p_page->size) >= (sector + num_sector)) {
|
||||
pf_memcpy(p_page->buffer, (pf_u8*)&p_buf[(p_page->sector - sector) << p_vol->bpb.log2_bytes_per_sector],
|
||||
(sector + num_sector - p_page->sector) << p_vol->bpb.log2_bytes_per_sector);
|
||||
num_overlap = p_page->size - ((p_page->sector + p_page->size) - (num_sector + sector));
|
||||
last_sector = p_page->sector + num_overlap - 1;
|
||||
*p_num_success += num_overlap;
|
||||
num_rest_sector -= num_overlap;
|
||||
p_page->stat |= 2;
|
||||
num_overlap = num_sector;
|
||||
num_overlap += sector;
|
||||
last_sector = PFCACHE_RecordPageEndOverlap(p_page, num_overlap, p_num_success, &num_rest_sector);
|
||||
p_ebuf = &p_page->buffer[(last_sector - p_page->sector) << p_vol->bpb.log2_bytes_per_sector];
|
||||
p_page->p_mod_sbuf = p_page->buffer;
|
||||
if (p_page->p_mod_ebuf == NULL || p_page->p_mod_ebuf < p_ebuf) {
|
||||
|
||||
@@ -511,8 +511,8 @@ pf_s32 PFENT_ITER_FindCluster(PF_DIR_ENT* p_ent, pf_u32 cluster, pf_bool* p_is_f
|
||||
iter.ffd.cluster_link.buffer = PF_NULL;
|
||||
iter.log2_entries_per_sector = p_ent->p_vol->bpb.log2_bytes_per_sector - 5;
|
||||
iter.file_sector_index = sector_index;
|
||||
entries_per_sector = 1 << iter.log2_entries_per_sector;
|
||||
iter.offset_mask = entries_per_sector - 1;
|
||||
iter.offset_mask = (1U << iter.log2_entries_per_sector) - 1;
|
||||
entries_per_sector = 1U << iter.log2_entries_per_sector;
|
||||
iter.p_vol = p_ent->p_vol;
|
||||
iter.sector = p_ent->entry_sector;
|
||||
iter.offset = p_ent->entry_offset;
|
||||
|
||||
@@ -1458,6 +1458,19 @@ s32 PFFAT_CountFreeClusters(PF_VOLUME* volume, u32* numFreeClusters)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline s32 PFFAT_ClearEntryWithBuf(PF_VOLUME* volume, u32 cluster, PF_CACHE_PAGE* page) {
|
||||
switch (volume->bpb.fat_type) {
|
||||
case FAT_12:
|
||||
return PFFAT12_WriteFATEntryWithBuf(volume, (u16)cluster, 0, page);
|
||||
case FAT_16:
|
||||
return PFFAT16_WriteFATEntryWithBuf(volume, cluster, 0, page);
|
||||
case FAT_32:
|
||||
return PFFAT32_WriteFATEntryWithBuf(volume, cluster, 0, page);
|
||||
default:
|
||||
return 15;
|
||||
}
|
||||
}
|
||||
|
||||
s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
|
||||
u32 size)
|
||||
{
|
||||
@@ -1523,9 +1536,9 @@ s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
|
||||
}
|
||||
if (nextCluster == 0) {
|
||||
s32 firstFlushError;
|
||||
PF_CACHE_PAGE* flushPage;
|
||||
u16 fatIndex;
|
||||
u32 fatSector;
|
||||
u16 fatIndex;
|
||||
const PF_CACHE_PAGE* flushPage;
|
||||
|
||||
firstFlushError = 0;
|
||||
flushPage = page;
|
||||
@@ -1546,33 +1559,19 @@ s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
|
||||
PFCACHE_FreeDataPage(volume, page);
|
||||
return 0;
|
||||
}
|
||||
if (chainIndex != -1) {
|
||||
error = PFFAT_WriteClusterWithBuf(file, startCluster, chainIndex,
|
||||
0, 1, page);
|
||||
chainIndex++;
|
||||
} else {
|
||||
currentPage = page;
|
||||
switch (volume->bpb.fat_type) {
|
||||
case FAT_12:
|
||||
error = PFFAT12_WriteFATEntryWithBuf(
|
||||
volume, (u16)startCluster, 0, currentPage);
|
||||
break;
|
||||
case FAT_16:
|
||||
error = PFFAT16_WriteFATEntryWithBuf(volume, startCluster, 0,
|
||||
currentPage);
|
||||
break;
|
||||
case FAT_32:
|
||||
error = PFFAT32_WriteFATEntryWithBuf(volume, startCluster, 0,
|
||||
currentPage);
|
||||
break;
|
||||
default:
|
||||
error = 15;
|
||||
break;
|
||||
{
|
||||
s32 writeError;
|
||||
if (chainIndex != -1) {
|
||||
writeError = PFFAT_WriteClusterWithBuf(file, startCluster, chainIndex,
|
||||
0, 1, page);
|
||||
chainIndex++;
|
||||
} else {
|
||||
writeError = PFFAT_ClearEntryWithBuf(volume, startCluster, page);
|
||||
}
|
||||
if (writeError != 0) {
|
||||
PFCACHE_FreeDataPage(volume, page);
|
||||
return writeError;
|
||||
}
|
||||
}
|
||||
if (error != 0) {
|
||||
PFCACHE_FreeDataPage(volume, page);
|
||||
return error;
|
||||
}
|
||||
if (size != 0 && fileSize != 0) {
|
||||
if (fileSize <= clusterSize) {
|
||||
@@ -1590,7 +1589,7 @@ s32 PFFAT_FreeChain(PFFAT_FFD* file, u32 startCluster, u32 chainIndex,
|
||||
s32 firstFlushError;
|
||||
u32 fatSector;
|
||||
u16 fatIndex;
|
||||
PF_CACHE_PAGE* flushPage;
|
||||
const PF_CACHE_PAGE* flushPage;
|
||||
|
||||
firstFlushError = 0;
|
||||
flushPage = page;
|
||||
|
||||
@@ -484,6 +484,7 @@ static inline unsigned long __nupBase64EncodedSize(unsigned long length) {
|
||||
}
|
||||
|
||||
static void __nupBase64Encode(u8* output, u8* input, unsigned long length) {
|
||||
static char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
u8* end = input + length;
|
||||
u32 value = 0;
|
||||
u32 count = 0;
|
||||
@@ -496,26 +497,19 @@ static void __nupBase64Encode(u8* output, u8* input, unsigned long length) {
|
||||
if (count < 3) {
|
||||
continue;
|
||||
}
|
||||
u8 encodedSecond = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 12 & 0x3f];
|
||||
u8 encodedFirst = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 18 & 0x3f];
|
||||
output[0] = encodedFirst;
|
||||
u8 encodedThird = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 6 & 0x3f];
|
||||
output[1] = encodedSecond;
|
||||
u8 encodedFourth = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value & 0x3f];
|
||||
output[2] = encodedThird;
|
||||
output[3] = encodedFourth;
|
||||
output[0] = alphabet[value >> 18 & 0x3f];
|
||||
output[1] = alphabet[value >> 12 & 0x3f];
|
||||
output[2] = alphabet[value >> 6 & 0x3f];
|
||||
output[3] = alphabet[value & 0x3f];
|
||||
count = 0;
|
||||
output += 4;
|
||||
}
|
||||
|
||||
if (count == 2) {
|
||||
value <<= 8;
|
||||
u8 encodedSecond = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 12 & 0x3f];
|
||||
u8 encodedFirst = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 18 & 0x3f];
|
||||
output[0] = encodedFirst;
|
||||
u8 encodedThird = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 6 & 0x3f];
|
||||
output[1] = encodedSecond;
|
||||
output[2] = encodedThird;
|
||||
output[0] = alphabet[value >> 18 & 0x3f];
|
||||
output[1] = alphabet[value >> 12 & 0x3f];
|
||||
output[2] = alphabet[value >> 6 & 0x3f];
|
||||
output[3] = fillByte;
|
||||
return;
|
||||
}
|
||||
@@ -523,10 +517,8 @@ static void __nupBase64Encode(u8* output, u8* input, unsigned long length) {
|
||||
return;
|
||||
}
|
||||
value <<= 16;
|
||||
u8 encodedSecond = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 12 & 0x3f];
|
||||
u8 encodedFirst = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[value >> 18 & 0x3f];
|
||||
output[0] = encodedFirst;
|
||||
output[1] = encodedSecond;
|
||||
output[0] = alphabet[value >> 18 & 0x3f];
|
||||
output[1] = alphabet[value >> 12 & 0x3f];
|
||||
output[2] = fillByte;
|
||||
output[3] = fillByte;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ typedef struct _CDBCryptBuf {
|
||||
u32 buffer32[0xFB00];
|
||||
}; // 0x00
|
||||
|
||||
u32 unk_0x3EC00;
|
||||
u32 unk_0x3EC04;
|
||||
u32 size; // 0x3EC00
|
||||
u32 offset; // 0x3EC04
|
||||
BOOL allocated; // 0x3EC08
|
||||
u8 unk_0x3EC0C[0x34];
|
||||
} CDBCryptBuf;
|
||||
|
||||
@@ -164,7 +164,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
|
||||
goto open_result_ready;
|
||||
open_location_ok:
|
||||
if (CDBFSSDIsMounted()) {
|
||||
err = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->unk_0x3EC00, NULL);
|
||||
err = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->size, NULL);
|
||||
} else {
|
||||
err = CDB_ERROR_SD_IS_NOT_MOUNTED;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ CDBErr CDBRecordOpen_(CDBRecord* record) {
|
||||
CDBCryptBufFree((CDBCryptBuf**)&record->cryptBuf);
|
||||
return err;
|
||||
}
|
||||
cryptBuf->unk_0x3EC04 = sizeof(CDBAttrBuf);
|
||||
cryptBuf->offset = sizeof(CDBAttrBuf);
|
||||
}
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ CDBErr CDBRecordOpenReadOnly_(CDBRecord* record) {
|
||||
goto result_ready;
|
||||
location_ok:
|
||||
if (CDBFSSDIsMounted()) {
|
||||
result = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->unk_0x3EC00, NULL);
|
||||
result = CDBRecordDecrypt(record, cryptBuf, 0x3EC00, &cryptBuf->size, NULL);
|
||||
} else {
|
||||
result = CDB_ERROR_SD_IS_NOT_MOUNTED;
|
||||
}
|
||||
@@ -233,7 +233,7 @@ CDBErr CDBRecordOpenReadOnly_(CDBRecord* record) {
|
||||
CDBCryptBufFree((CDBCryptBuf**)&record->cryptBuf);
|
||||
return result;
|
||||
}
|
||||
cryptBuf->unk_0x3EC04 = sizeof(CDBAttrBuf);
|
||||
cryptBuf->offset = sizeof(CDBAttrBuf);
|
||||
}
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
|
||||
@@ -264,8 +264,8 @@ CDBErr CDBRecordFileReadData(CDBRecord* record, void* buffer, u32 size, u32* rea
|
||||
CDBCryptBuf* cryptBuf = record->cryptBuf;
|
||||
|
||||
if (cryptBuf != NULL) {
|
||||
u32 unk = cryptBuf->unk_0x3EC00 - cryptBuf->unk_0x3EC04;
|
||||
if (cryptBuf->unk_0x3EC00 < unk) {
|
||||
u32 unk = cryptBuf->size - cryptBuf->offset;
|
||||
if (cryptBuf->size < unk) {
|
||||
unk = 0;
|
||||
}
|
||||
|
||||
@@ -274,8 +274,8 @@ CDBErr CDBRecordFileReadData(CDBRecord* record, void* buffer, u32 size, u32* rea
|
||||
}
|
||||
|
||||
if (unk != 0) {
|
||||
memcpy(buffer, (u8*)&cryptBuf->buffer[cryptBuf->unk_0x3EC04], unk);
|
||||
cryptBuf->unk_0x3EC04 += unk;
|
||||
memcpy(buffer, (u8*)&cryptBuf->buffer[cryptBuf->offset], unk);
|
||||
cryptBuf->offset += unk;
|
||||
}
|
||||
|
||||
if (readSize != NULL) {
|
||||
@@ -300,16 +300,16 @@ CDBErr CDBRecordFileSeekData(CDBRecord* record, u32 offset, CDBSeek seek) {
|
||||
if (cryptBuf != NULL) {
|
||||
switch (seek) {
|
||||
case CDB_SEEK_BEGIN: {
|
||||
cryptBuf->unk_0x3EC04 = sizeof(CDBAttrBuf);
|
||||
cryptBuf->unk_0x3EC04 += offset;
|
||||
cryptBuf->offset = sizeof(CDBAttrBuf);
|
||||
cryptBuf->offset += offset;
|
||||
break;
|
||||
}
|
||||
case CDB_SEEK_END: {
|
||||
cryptBuf->unk_0x3EC04 = (cryptBuf->unk_0x3EC00 - 1) - offset;
|
||||
cryptBuf->offset = (cryptBuf->size - 1) - offset;
|
||||
break;
|
||||
}
|
||||
case CDB_SEEK_CUR: {
|
||||
cryptBuf->unk_0x3EC04 += offset;
|
||||
cryptBuf->offset += offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -329,7 +329,7 @@ int CDBRecordFileTellData(CDBRecord* record) {
|
||||
CDBCryptBuf* cryptBuf = record->cryptBuf;
|
||||
|
||||
if (cryptBuf != NULL) {
|
||||
return cryptBuf->unk_0x3EC04 - sizeof(CDBAttrBuf);
|
||||
return cryptBuf->offset - sizeof(CDBAttrBuf);
|
||||
}
|
||||
return CDBFTellData(&recordFile->bridgeFile, record->key.location);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@ static int ReadHeaderChar(const NHTTPResponseInfo* response, NHTTPi_HDRBUFLIST**
|
||||
}
|
||||
|
||||
static int LowerCase(int character) {
|
||||
if((character>='A') & (character<='Z')) character+=32;
|
||||
return character;
|
||||
return ((character >= 'A') & (character <= 'Z')) ? character + 32 : character;
|
||||
}
|
||||
|
||||
s32 NHTTPi_findNextLineHdrRecvBuf(const NHTTPResponseInfo* response, s32 position, s32 limit, s32* colon, s32* newlineLength) {
|
||||
@@ -76,15 +75,17 @@ s32 NHTTPi_skipSpaceHdrRecvBuf(const NHTTPResponseInfo* response, s32 position,
|
||||
s32 NHTTPi_compareTokenN_HdrRecvBuf(const NHTTPResponseInfo* response, s32 position, s32 limit, const char* token, s8 delimiter) {
|
||||
NHTTPi_HDRBUFLIST* block;
|
||||
s32 offset;
|
||||
s8 character;
|
||||
if(position>=limit) return -1;
|
||||
FindHeaderBlock(response,position,&block,&offset);
|
||||
character=ReadHeaderChar(response,&block,&offset);
|
||||
while(LowerCase(character)==LowerCase(*token)) {
|
||||
if(*token==0 || *token==' ' || *token==delimiter || position==limit-1) return 0;
|
||||
character=ReadHeaderChar(response,&block,&offset);
|
||||
++position;
|
||||
++token;
|
||||
int character;
|
||||
|
||||
if (position < limit) {
|
||||
FindHeaderBlock(response, position, &block, &offset);
|
||||
character = ReadHeaderChar(response, &block, &offset);
|
||||
while (LowerCase((s8)character) == LowerCase(*token)) {
|
||||
if (*token == 0 || *token == ' ' || *token == delimiter || position == limit - 1) return 0;
|
||||
character = ReadHeaderChar(response, &block, &offset);
|
||||
++position;
|
||||
++token;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -120,10 +120,11 @@ NWC24Err NWC24iMinutesToOSCalendarTime(OSCalendarTime* calendar, s32 minutes) {
|
||||
NWC24Err NWC24iDateToOSCalendarTime(OSCalendarTime* calendar, const NWC24Date* date) {
|
||||
BOOL isLeapYear;
|
||||
s32 days;
|
||||
const u16 year = date->year;
|
||||
|
||||
isLeapYear = 0;
|
||||
|
||||
calendar->year = date->year;
|
||||
calendar->year = year;
|
||||
calendar->mon = date->month - 1;
|
||||
calendar->mday = date->day;
|
||||
calendar->hour = date->hour;
|
||||
@@ -132,7 +133,7 @@ NWC24Err NWC24iDateToOSCalendarTime(OSCalendarTime* calendar, const NWC24Date* d
|
||||
calendar->msec = 0;
|
||||
calendar->usec = 0;
|
||||
calendar->yday = date->day + DAYS_OF_YEAR[date->month - 1] - 1;
|
||||
if (((date->year % 4 == 0 && date->year % 100 != 0) || date->year % 400 == 0)) {
|
||||
if (((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)) {
|
||||
isLeapYear = 1;
|
||||
}
|
||||
if (isLeapYear && date->month > 2) {
|
||||
@@ -227,8 +228,9 @@ void ConvertDaysToDate(u16* year, u8* month, u8* day, s32 days) {
|
||||
for (;;) {
|
||||
s32 previousDays;
|
||||
u8 currentMonth;
|
||||
const u8* parsedMonth = month;
|
||||
previousDays = days;
|
||||
currentMonth = *month;
|
||||
currentMonth = *parsedMonth;
|
||||
if (currentMonth == 2 && IsLeapYear(*year)) {
|
||||
days -= 29;
|
||||
} else {
|
||||
|
||||
@@ -64,7 +64,7 @@ static NWC24Err ClearMBCEntry(MBCHeader* header, NWC24File* file, u32 offset);
|
||||
static NWC24Err MountVFMBox(NWC24MBoxType type);
|
||||
static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entry);
|
||||
static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* msg) NO_INLINE;
|
||||
BOOL NWC24iIsMsgObjReadable(const MBCEntry* entry) NO_INLINE;
|
||||
BOOL NWC24iIsMsgObjReadable(MBCEntry* entry) NO_INLINE;
|
||||
NWC24Err NWC24CreateVF(const char* path, u32 size);
|
||||
|
||||
static inline NWC24Err MakeCtrlPath(char* path, NWC24MBoxType type) {
|
||||
@@ -221,7 +221,7 @@ NWC24Err NWC24GetMsgObj(NWC24MsgObj* msg, NWC24MBoxType type, u32 id) {
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL NWC24iIsMsgObjReadable(const MBCEntry* entry) {
|
||||
BOOL NWC24iIsMsgObjReadable(MBCEntry* entry) {
|
||||
if (!(entry->type & 0x200000))
|
||||
return FALSE;
|
||||
if (entry->type & 0xFE000000)
|
||||
|
||||
@@ -430,14 +430,17 @@ static NWC24Err CheckMsgObject(const NWC24MsgObjPrivate* msg) {
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
static inline u32 Base64StorageSize(const u32* byteCount) {
|
||||
return (*byteCount * 4 + 2) / 3 + *byteCount / 57 * 2 + 4;
|
||||
}
|
||||
|
||||
static NWC24Err CheckMsgBoxSpace(const NWC24MsgObjPrivate* msg, NWC24MBoxType type) {
|
||||
u32 total = 0;
|
||||
u32 textSize = 0;
|
||||
s32 index;
|
||||
NWC24Err err;
|
||||
for (index = 0; index < msg->numAttached; ++index) {
|
||||
u32 size = msg->attachedSize[index];
|
||||
total += (size * 4 + 2) / 3 + size / 57 * 2 + 4;
|
||||
total += Base64StorageSize(&msg->attachedSize[index]);
|
||||
}
|
||||
switch (msg->encoding) {
|
||||
case NWC24_ENC_7BIT:
|
||||
@@ -766,19 +769,14 @@ static NWC24Err WriteMIMEAttachHeader(NWC24MsgObjPrivate* msg, u32 index) {
|
||||
char* buffer;
|
||||
const char* mime;
|
||||
const char* suffix;
|
||||
s32 typeLength, encodingLength, dispositionLength, mimeLength;
|
||||
int mimeLength;
|
||||
s32 first, second, third, total;
|
||||
NWC24Err err;
|
||||
Mail_memset(NWC24WorkP->stringWork, 0, 1024);
|
||||
buffer = NWC24WorkP->stringWork;
|
||||
mime = NWC24GetMIMETypeStr(msg->attachedType[index]);
|
||||
suffix = NWC24iGetMIMETypeSuffix(msg->attachedType[index]);
|
||||
encodingLength = Mail_strlen(ContentTxEncA);
|
||||
typeLength = Mail_strlen(ContentTypeA);
|
||||
dispositionLength = Mail_strlen(ContentDispA);
|
||||
typeLength += encodingLength;
|
||||
mimeLength = Mail_strlen(mime);
|
||||
mimeLength = (dispositionLength + typeLength) + mimeLength + 4;
|
||||
mimeLength = (Mail_strlen(ContentTypeA) + Mail_strlen(ContentTxEncA)) + Mail_strlen(ContentDispA) + Mail_strlen(mime) + 4;
|
||||
if (mimeLength >= 1024)
|
||||
return NWC24_ERR_NOMEM;
|
||||
first = Mail_sprintf(buffer, (char*)ContentTypeA, mime, (char)('a' + index), msg->msgId, suffix);
|
||||
|
||||
@@ -817,6 +817,7 @@ done:
|
||||
|
||||
NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 subjectSize, NWC24EncodingRegion region, u16 alternative, u8* work,
|
||||
u32 workSize, NWC24Charset charset, char* charsetName) {
|
||||
const u8* encodedInput = work;
|
||||
u8* second;
|
||||
u32 secondSize;
|
||||
u32 workHalf;
|
||||
@@ -844,7 +845,7 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
|
||||
default: goto done;
|
||||
}
|
||||
}
|
||||
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'B', work, workHalf - 1);
|
||||
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'B', (u8*)encodedInput, workHalf - 1);
|
||||
switch (result) { case NWC24_OK: break; default: goto done; }
|
||||
{
|
||||
sourceOffset = subjectLength;
|
||||
@@ -872,7 +873,7 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
|
||||
default: goto done;
|
||||
}
|
||||
}
|
||||
result = NWC24EncodeWord(second + total, secondSize - total, &outputLength, charsetName, 0x40, 'B', work, workHalf - 1);
|
||||
result = NWC24EncodeWord(second + total, secondSize - total, &outputLength, charsetName, 0x40, 'B', (u8*)encodedInput, workHalf - 1);
|
||||
switch (result) { case NWC24_OK: break; default: goto done; }
|
||||
sourceOffset += subjectLength;
|
||||
total = total + outputLength - 1;
|
||||
|
||||
@@ -138,9 +138,9 @@ int SOGetSockName(int socket, void* address) {
|
||||
int size;
|
||||
int result;
|
||||
s32 rm;
|
||||
SOSockAddr* addr;
|
||||
SOSockAddr* reply;
|
||||
NameRequest* request;
|
||||
SOSockAddr* reply;
|
||||
SOSockAddr* addr;
|
||||
addr=address;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
if(!addr || addr->len>8 || addr->len<8) result=-28;
|
||||
|
||||
@@ -101,7 +101,7 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
|
||||
int size;
|
||||
int result;
|
||||
InterfaceOption* request;
|
||||
InterfaceCommand* command;
|
||||
const InterfaceCommand* command;
|
||||
int* returnedLength;
|
||||
u8* reply;
|
||||
if ((result=SOiPrepareTempRm(NULL,&rm,&temporary))==0) {
|
||||
@@ -112,7 +112,7 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
|
||||
if(!request) result=-49;
|
||||
else {
|
||||
command=&request->command;
|
||||
command->level=level; command->option=option;
|
||||
request->command.level=level; request->command.option=option;
|
||||
returnedLength=&((InterfaceLength*)(command + 1))->length;
|
||||
reply=(u8*)((InterfaceLength*)returnedLength + 1);
|
||||
*returnedLength=OptionLength(length);
|
||||
|
||||
@@ -64,6 +64,7 @@ public:
|
||||
class AppearMemoState : public State {
|
||||
public:
|
||||
AppearMemoState() : mTime(0.0f) {}
|
||||
virtual ~AppearMemoState();
|
||||
Manager::StateType getStateType();
|
||||
void create();
|
||||
void init();
|
||||
@@ -1229,6 +1230,8 @@ Manager::StateType EditMemoState::getStateType() {
|
||||
|
||||
inline State::~State() {}
|
||||
|
||||
AppearMemoState::~AppearMemoState() {}
|
||||
|
||||
Manager::StateType AppearMemoState::getStateType() {
|
||||
return Manager::ST_Appearing;
|
||||
}
|
||||
@@ -1242,3 +1245,48 @@ Manager::StateType DispMemoState::getStateType() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void textinput::util::Animation::startAnm(f32 start, f32 end, f32 duration, AnimObserver* observer, void* data) {
|
||||
mfStartPoint = start;
|
||||
mfEndPoint = end;
|
||||
mfAnimationTime = duration;
|
||||
mfCurrentFrame = 0.0f;
|
||||
mbInAnimation = true;
|
||||
mpAnimObserver = observer;
|
||||
mpData = data;
|
||||
mbSE = false;
|
||||
if (observer) observer->onAnmEvent(AnimObserver::AE_0, data);
|
||||
}
|
||||
|
||||
inline void textinput::util::Animation::calc() {
|
||||
if (mbInAnimation) {
|
||||
if (mfCurrentFrame < mfAnimationTime) {
|
||||
mfCurrentFrame = 1.0f + mfCurrentFrame;
|
||||
} else {
|
||||
if (mbInAnimation && mpAnimObserver) {
|
||||
mpAnimObserver->onAnmEvent(AnimObserver::AE_1, mpData);
|
||||
}
|
||||
mbInAnimation = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline f32 textinput::util::Animation::getValue() {
|
||||
return hermiteInterporation(mfCurrentFrame, 0.0f, mfStartPoint, 0.0f, mfAnimationTime, mfEndPoint, 0.0f);
|
||||
}
|
||||
|
||||
inline bool textinput::util::Animation::isActive() {
|
||||
return mbInAnimation;
|
||||
}
|
||||
|
||||
inline void textinput::util::Animation::setSEFlag(bool flag) {
|
||||
mbSE = flag;
|
||||
}
|
||||
|
||||
inline bool textinput::util::Animation::isSEFlag() {
|
||||
return mbSE;
|
||||
}
|
||||
|
||||
inline void textinput::util::Animation::stop() {
|
||||
mbInAnimation = false;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ void LayoutByNW4R::create(MEMAllocator* allocator) {
|
||||
const char* forceName;
|
||||
u32 animationCount;
|
||||
u32 paneIndex = 0;
|
||||
do {
|
||||
for (; paneIndex < 25; ++paneIndex) {
|
||||
AnmPane* pane = NULL;
|
||||
const PaneAnimation& paneInfo = csPaneToAnimationInSign[paneIndex & 0xFFFF];
|
||||
switch (paneInfo.type) {
|
||||
@@ -260,8 +260,7 @@ void LayoutByNW4R::create(MEMAllocator* allocator) {
|
||||
}
|
||||
++animationIndex;
|
||||
}
|
||||
++paneIndex;
|
||||
} while (paneIndex < 25);
|
||||
}
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
@@ -111,12 +111,13 @@ void WithZi::init() {
|
||||
|
||||
void WithZi::clearCandidates() {
|
||||
if (mbDictionaryOpen != 0) {
|
||||
u16* const candidates = CandidatesBuffer;
|
||||
mInputLength = 0;
|
||||
mCandidateCount = 0;
|
||||
memset(ElementBuffer, 0, 0x1fe);
|
||||
memset(CandidatesBuffer, 0, 0x200);
|
||||
memset(CandidatesBuffer + 0x100, 0, 0x1fe);
|
||||
memset(CandidatesBuffer + 0x200, 0, 0x200);
|
||||
memset(candidates, 0, 0x200);
|
||||
memset(candidates + 0x100, 0, 0x1fe);
|
||||
memset(candidates + 0x200, 0, 0x200);
|
||||
memset(CandidatedWord, 0, 0x1400);
|
||||
memset(&mSearch, 0, sizeof(mSearch) + sizeof(mSearchState));
|
||||
mSearch.language = getPredictLanguage();
|
||||
@@ -125,7 +126,7 @@ void WithZi::clearCandidates() {
|
||||
mSearch.context = 1;
|
||||
mSearch.getOptions = 0x81;
|
||||
mSearch.elements = reinterpret_cast<wchar_t*>(ElementBuffer);
|
||||
mSearch.candidates = reinterpret_cast<wchar_t*>(&CandidatesBuffer[0x200]);
|
||||
mSearch.candidates = reinterpret_cast<wchar_t*>(&candidates[0x200]);
|
||||
mSearch.maxCandidates = 0x28;
|
||||
mSearch.elementCount = 0;
|
||||
mSearch.firstCandidate = 0;
|
||||
@@ -510,12 +511,14 @@ scanDone:
|
||||
}
|
||||
|
||||
u32 WithZi::setElementBuffer() {
|
||||
u16* elements;
|
||||
u16* candidates;
|
||||
u16 inputCharacter;
|
||||
u32 count = 0;
|
||||
memset(ElementBuffer, 0, 0x1fe);
|
||||
memset(&CandidatesBuffer[0x100], 0, 0x1fe);
|
||||
u16* elements = ElementBuffer;
|
||||
u16* candidates = CandidatesBuffer;
|
||||
u16 inputCharacter;
|
||||
elements = ElementBuffer;
|
||||
candidates = CandidatesBuffer;
|
||||
while ((inputCharacter = candidates[static_cast<u16>(count)]) != 0 && static_cast<u16>(count) < 0xff) {
|
||||
u16 index = count;
|
||||
elements[index] = inputCharacter;
|
||||
|
||||
@@ -1557,6 +1557,15 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
static inline math::VEC2 scaledPageOffset(const math::VEC2& source, f32 factor) {
|
||||
const f32 vertical = source.y * factor;
|
||||
const f32 horizontal = source.x * factor;
|
||||
math::VEC2 scaled;
|
||||
scaled.y = vertical;
|
||||
scaled.x = horizontal;
|
||||
return scaled;
|
||||
}
|
||||
|
||||
void Address::onPreviousPage() {
|
||||
switch (mState) {
|
||||
case STATE_NORMAL:
|
||||
@@ -1586,10 +1595,7 @@ namespace ipl {
|
||||
mPage = PAGE_MAX - 1;
|
||||
mNextPageNum = 0;
|
||||
mbCover = false;
|
||||
math::VEC2 offset;
|
||||
offset.y = sPageOffset.y * PAGE_MAX;
|
||||
offset.x = sPageOffset.x * PAGE_MAX;
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), scaledPageOffset(sPageOffset, PAGE_MAX));
|
||||
mpLayout->getAnim(4)->setAnmType(0);
|
||||
mpLayout->getAnim(4)->play();
|
||||
set_page_text("T_nmbr_b", mPage + 1);
|
||||
|
||||
@@ -638,7 +638,7 @@ namespace ipl {
|
||||
void ChannelObj::setLangPane(const layout::Object* layout) {
|
||||
int lang = System::getLanguage();
|
||||
const char* langGroup = scLangGroups[lang];
|
||||
char langCodeBuf[40] = "";
|
||||
char langCodeBuf[10][4] = {""};
|
||||
|
||||
bool foundLangGroup = false;
|
||||
|
||||
@@ -648,7 +648,7 @@ namespace ipl {
|
||||
} else {
|
||||
bool isNonRsoGroup = true;
|
||||
for (int i = 0; i < channel::MAX_ANIMS; i++) {
|
||||
char name[6];
|
||||
char name[8];
|
||||
sprintf(name, "Rso%d", i);
|
||||
if (strncmp(it->GetName(), name, 5) == 0) {
|
||||
isNonRsoGroup = false;
|
||||
@@ -663,8 +663,8 @@ namespace ipl {
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
if (strncmp(it->GetName(), scLangGroups[i], 3) == 0) {
|
||||
memcpy(&langCodeBuf[i], it->GetName(), 3);
|
||||
langCodeBuf[i + 3] = 0;
|
||||
memcpy(langCodeBuf[i], it->GetName(), 3);
|
||||
langCodeBuf[i][3] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -680,16 +680,15 @@ namespace ipl {
|
||||
} else {
|
||||
s32 region = System::getRegion();
|
||||
for (int i = 0; i < channel::MAX_ANIMS; i++) {
|
||||
char* groupName = (char*)scModuleData.langGroupLookup[region][i];
|
||||
|
||||
if (groupName != NULL) {
|
||||
if (strcmp(groupName, &langCodeBuf[scLangLookup[region][i]]) == 0) {
|
||||
nw4r::lyt::Group* group = layout->FindGroupByName(groupName);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter();
|
||||
it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
if (scModuleData.langGroupLookup[region][i] == NULL) {
|
||||
break;
|
||||
}
|
||||
if (strcmp(scModuleData.langGroupLookup[region][i], langCodeBuf[scLangLookup[region][i]]) == 0) {
|
||||
nw4r::lyt::Group* group = layout->FindGroupByName(scModuleData.langGroupLookup[region][i]);
|
||||
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter(); it != group->GetPaneList().GetEndIter(); it++) {
|
||||
it->mTarget->SetVisible(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1901,64 +1901,59 @@ namespace ipl {
|
||||
nw4r::ut::Rect projRect;
|
||||
System::getProjectionRect(&projRect);
|
||||
GXRenderModeObj* rMode = System::getRenderModeObj();
|
||||
f32 var_f29;
|
||||
f32 var_f30;
|
||||
f32 var_f31;
|
||||
f32 var_f1;
|
||||
u16 var_r0;
|
||||
u16 var_r3;
|
||||
f32 scissorX;
|
||||
f32 scissorY;
|
||||
f32 scissorWidth;
|
||||
f32 scissorHeight;
|
||||
u16 fbWidth;
|
||||
u16 efbHeight;
|
||||
if (mState == STATE_NORMAL_FADE_ZOOM || mState == STATE_NORMAL_DONE_FADE_ZOOM || mState == STATE_NORMAL_RESTART) {
|
||||
nw4r::math::MTX44 mtx;
|
||||
f32 rightScale = projRect.right / unk_0xE4.x;
|
||||
f32 leftScale = projRect.left / unk_0xE4.x;
|
||||
f32 topScale = projRect.top / unk_0xE4.y;
|
||||
f32 bottomScale = projRect.bottom / unk_0xE4.y;
|
||||
f32 bottom = unk_0xD8.y - bottomScale;
|
||||
f32 right = unk_0xD8.x + rightScale;
|
||||
f32 left = unk_0xD8.x + leftScale;
|
||||
f32 top = unk_0xD8.y - topScale;
|
||||
f32 right = unk_0xD8.x + projRect.right / unk_0xE4.x;
|
||||
f32 left = unk_0xD8.x + projRect.left / unk_0xE4.x;
|
||||
f32 bottom = unk_0xD8.y - projRect.bottom / unk_0xE4.y;
|
||||
f32 top = unk_0xD8.y - projRect.top / unk_0xE4.y;
|
||||
MTXOrtho(mtx, top, bottom, left, right, -100.0f, 100.0f);
|
||||
nw4r::math::VEC4 vec4_in(vec.x, vec.y, 0.0f, 1.0f);
|
||||
nw4r::math::VEC4 vec4;
|
||||
nw4r::math::VEC4Transform(&vec4, &mtx, &vec4_in);
|
||||
var_r0 = rMode->fbWidth;
|
||||
var_r3 = rMode->efbHeight;
|
||||
var_f29 = projRect.GetWidth();
|
||||
var_f30 = (var_r3 - ((1.0f + vec4.y) * var_r3 / 2)) - (mChanThumbOff_Y * unk_0xE4.y);
|
||||
f32 temp_f7_2 = var_r0 / var_f29;
|
||||
var_f31 = ((1.0f + vec4.x) * var_r0 / 2) - ((mChanThumbOff_X * unk_0xE4.x) * (temp_f7_2));
|
||||
var_f29 = 2.0f * (mChanThumbOff_X * unk_0xE4.x) * (var_r0 / var_f29);
|
||||
var_f1 = 2.0f * (mChanThumbOff_Y * unk_0xE4.y);
|
||||
fbWidth = rMode->fbWidth;
|
||||
efbHeight = rMode->efbHeight;
|
||||
f32 projectionWidth = projRect.GetWidth();
|
||||
scissorX = ((1.0f + vec4.x) * fbWidth / 2) - ((mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth));
|
||||
scissorY = (efbHeight - ((1.0f + vec4.y) * efbHeight / 2)) - (mChanThumbOff_Y * unk_0xE4.y);
|
||||
scissorWidth = 2.0f * (mChanThumbOff_X * unk_0xE4.x) * (fbWidth / projectionWidth);
|
||||
scissorHeight = 2.0f * (mChanThumbOff_Y * unk_0xE4.y);
|
||||
} else {
|
||||
var_r0 = rMode->fbWidth;
|
||||
var_r3 = rMode->efbHeight;
|
||||
var_f31 = ((f32)var_r0 / 2) + ((vec.x - mChanThumbOff_X) * (var_r0 / projRect.GetWidth()));
|
||||
var_f30 = (((f32)var_r3 / 2) - vec.y) - mChanThumbOff_Y;
|
||||
var_f29 = 2.0f * mChanThumbOff_X * (var_r0 / projRect.GetWidth());
|
||||
var_f1 = 2.0f * mChanThumbOff_Y;
|
||||
fbWidth = rMode->fbWidth;
|
||||
efbHeight = rMode->efbHeight;
|
||||
scissorX = ((f32)fbWidth / 2) + ((vec.x - mChanThumbOff_X) * (fbWidth / projRect.GetWidth()));
|
||||
scissorY = (((f32)efbHeight / 2) - vec.y) - mChanThumbOff_Y;
|
||||
scissorWidth = 2.0f * mChanThumbOff_X * (fbWidth / projRect.GetWidth());
|
||||
scissorHeight = 2.0f * mChanThumbOff_Y;
|
||||
}
|
||||
var_f31 -= 1.0f;
|
||||
var_f30 -= 1.0f;
|
||||
var_f29 += 2.0f;
|
||||
var_f1 += 2.0f;
|
||||
if (var_f31 >= var_r0 || (var_f31 + var_f29) <= 0.0f || var_f30 >= var_r3 || (var_f30 + var_f1) <= 0.0f) {
|
||||
scissorX -= 1.0f;
|
||||
scissorY -= 1.0f;
|
||||
scissorWidth += 2.0f;
|
||||
scissorHeight += 2.0f;
|
||||
if (scissorX >= fbWidth || (scissorX + scissorWidth) <= 0.0f || scissorY >= efbHeight || (scissorY + scissorHeight) <= 0.0f) {
|
||||
GXSetScissor(0, 0, 0, 0);
|
||||
} else {
|
||||
if (var_f31 < 0.0f) {
|
||||
var_f29 += var_f31;
|
||||
var_f31 = 0.0f;
|
||||
if (scissorX < 0.0f) {
|
||||
scissorWidth += scissorX;
|
||||
scissorX = 0.0f;
|
||||
}
|
||||
if (var_f30 < 0.0f) {
|
||||
var_f1 += var_f30;
|
||||
var_f30 = 0.0f;
|
||||
if (scissorY < 0.0f) {
|
||||
scissorHeight += scissorY;
|
||||
scissorY = 0.0f;
|
||||
}
|
||||
if ((var_f31 + var_f29) > 1705.0f) {
|
||||
var_f29 -= (var_f31 + var_f29) - 1705.0f;
|
||||
if ((scissorX + scissorWidth) > 1705.0f) {
|
||||
scissorWidth -= (scissorX + scissorWidth) - 1705.0f;
|
||||
}
|
||||
if ((var_f30 + var_f1) > 1705.0f) {
|
||||
var_f1 -= (var_f30 + var_f1) - 1705.0f;
|
||||
if ((scissorY + scissorHeight) > 1705.0f) {
|
||||
scissorHeight -= (scissorY + scissorHeight) - 1705.0f;
|
||||
}
|
||||
GXSetScissor(var_f31, var_f30, var_f29, var_f1);
|
||||
GXSetScissor(scissorX, scissorY, scissorWidth, scissorHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <private/os.h>
|
||||
#include <private/wpad.h>
|
||||
|
||||
#pragma dont_instantiate ipl::math::HermiteIntp<float>
|
||||
|
||||
|
||||
#undef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ipl {
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
SDButton::SDButton(EGG::Heap* heap) : Base(heap), unk_0x54(0) {
|
||||
SDButton::SDButton(EGG::Heap* heap) : Base(heap), mAnimWait(0) {
|
||||
setSceneParentFlags(SCN_PARENTFLAG_CALC | SCN_PARENTFLAG_DRAW);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
@@ -114,10 +114,10 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void SDButton::calc() {
|
||||
if (unk_0x54 == 1) {
|
||||
if (mAnimWait == 1) {
|
||||
if (!mpLayout->isPlaying(ANIM_HELP_BTN_ROLL_ON)) {
|
||||
reset_gui();
|
||||
unk_0x54 = 0;
|
||||
mAnimWait = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace ipl {
|
||||
switch (animNo) {
|
||||
case IDANIM_HELP_BTN_CLICK: {
|
||||
anim = mpLayout->getAnim(ANIM_HELP_BTN_ROLL_ON);
|
||||
unk_0x54 = 1;
|
||||
mAnimWait = 1;
|
||||
break;
|
||||
}
|
||||
case IDANIM_ARROW_RIGHT_CLICK: {
|
||||
|
||||
@@ -69,6 +69,13 @@ namespace ipl {
|
||||
SDMemory::~SDMemory() {}
|
||||
|
||||
void SDMemory::create(EGG::Heap* heap, nand::LayoutFile* layoutFile, SDChannelSelect* channelSelect) {
|
||||
s32 cachedTitleCount;
|
||||
const savedata::Manager* saveData;
|
||||
nw4r::lyt::TextBox* textBox;
|
||||
layout::Animator* scrollAnimator;
|
||||
ControlPaneEventHandler* controlEvent;
|
||||
TitlePaneEventHandler* titleEvent;
|
||||
DialogPaneEventHandler* dialogEvent;
|
||||
mpSDChannelSelect = channelSelect;
|
||||
|
||||
mpMainLayout = new layout::Object(heap, layoutFile, "arc", "mn_DialogWindow_ChChange_a.brlyt");
|
||||
@@ -89,7 +96,7 @@ namespace ipl {
|
||||
mpMainLayout->getAnim(5)->initAnmFrame();
|
||||
mpMainLayout->getAnim(8)->initAnmFrame();
|
||||
|
||||
nw4r::lyt::TextBox* textBox = static_cast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("T_Dialog_00"));
|
||||
textBox = static_cast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("T_Dialog_00"));
|
||||
textBox->SetString(System::getMessage(0xB0));
|
||||
textBox = static_cast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("TextBox_05"));
|
||||
textBox->SetString(System::getMessage(0xBB));
|
||||
@@ -143,8 +150,8 @@ namespace ipl {
|
||||
textBox = static_cast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_07"));
|
||||
textBox->SetString(System::getMessage(0xBA));
|
||||
|
||||
const savedata::Manager* saveData = System::getSaveData();
|
||||
s32 cachedTitleCount = 0;
|
||||
saveData = System::getSaveData();
|
||||
cachedTitleCount = 0;
|
||||
for (s32 i = 0; i < 48; ++i) {
|
||||
if (saveData->getTitleCacheEntry(i) == 0) {
|
||||
break;
|
||||
@@ -153,10 +160,12 @@ namespace ipl {
|
||||
}
|
||||
if (cachedTitleCount >= 5) {
|
||||
mpTitleLayout->FindPaneByName("N_Btn_3")->SetVisible(false);
|
||||
mpTitleLayout->FindPaneByName("N_Btn_4")->SetVisible(true);
|
||||
nw4r::lyt::Pane* expandedButton = mpTitleLayout->FindPaneByName("N_Btn_4");
|
||||
expandedButton->SetVisible(true);
|
||||
mDisplayMode = 4;
|
||||
} else {
|
||||
mpTitleLayout->FindPaneByName("N_Btn_3")->SetVisible(true);
|
||||
nw4r::lyt::Pane* compactButton = mpTitleLayout->FindPaneByName("N_Btn_3");
|
||||
compactButton->SetVisible(true);
|
||||
mpTitleLayout->FindPaneByName("N_Btn_4")->SetVisible(false);
|
||||
mDisplayMode = 3;
|
||||
}
|
||||
@@ -195,7 +204,7 @@ namespace ipl {
|
||||
mpDialogLayout->getAnim(11)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(8)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(18)->initAnmFrame();
|
||||
layout::Animator* scrollAnimator = mpDialogLayout->getAnim(18);
|
||||
scrollAnimator = mpDialogLayout->getAnim(18);
|
||||
scrollAnimator->initFrame();
|
||||
scrollAnimator->restart();
|
||||
|
||||
@@ -210,7 +219,7 @@ namespace ipl {
|
||||
mpDialogLayout->finishBinding();
|
||||
mpProgressLayout->getAnim(0)->initAnmFrame();
|
||||
|
||||
ControlPaneEventHandler* controlEvent = new ControlPaneEventHandler(this);
|
||||
controlEvent = new ControlPaneEventHandler(this);
|
||||
mpPaneManagers[0] = new gui::PaneManager(controlEvent, mpMainLayout->getDrawInfo(), NULL, NULL);
|
||||
mpPaneManagers[0]->setupScene(mpMainLayout);
|
||||
mpPaneManagers[0]->setAllComponentTriggerTarget(false);
|
||||
@@ -218,7 +227,7 @@ namespace ipl {
|
||||
mpPaneManagers[0]->setTriggerTarget(mpMainLayout->FindPaneByName(sControlPaneNames[i]), true);
|
||||
}
|
||||
|
||||
TitlePaneEventHandler* titleEvent = new TitlePaneEventHandler(this);
|
||||
titleEvent = new TitlePaneEventHandler(this);
|
||||
mpPaneManagers[1] = new gui::PaneManager(titleEvent, mpTitleLayout->getDrawInfo(), NULL, NULL);
|
||||
mpPaneManagers[1]->setupScene(mpTitleLayout);
|
||||
mpPaneManagers[1]->setAllComponentTriggerTarget(false);
|
||||
@@ -233,7 +242,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
DialogPaneEventHandler* dialogEvent = new DialogPaneEventHandler(this);
|
||||
dialogEvent = new DialogPaneEventHandler(this);
|
||||
mpPaneManagers[2] = new gui::PaneManager(dialogEvent, mpDialogLayout->getDrawInfo(), NULL, NULL);
|
||||
mpPaneManagers[2]->setupScene(mpDialogLayout);
|
||||
mpPaneManagers[2]->setAllComponentTriggerTarget(false);
|
||||
|
||||
@@ -729,8 +729,11 @@ namespace ipl {
|
||||
return;
|
||||
}
|
||||
|
||||
if (OSGetTime() - mOperationStartTime < OS_TIMER_CLOCK) {
|
||||
switch (OSGetTime() - mOperationStartTime < OS_TIMER_CLOCK) {
|
||||
default:
|
||||
return;
|
||||
case false:
|
||||
break;
|
||||
}
|
||||
setDialogMessage(1, 0);
|
||||
int result = mpSDWorker->get_async_result();
|
||||
@@ -781,11 +784,15 @@ namespace ipl {
|
||||
enqueueLoadNotice();
|
||||
}
|
||||
} else {
|
||||
int channelCount = 0;
|
||||
int channelIndex = 0;
|
||||
u32 titleIndex = 0;
|
||||
u32 titleId;
|
||||
u32 titleIndex;
|
||||
int channelIndex;
|
||||
int channelCount;
|
||||
channelCount = 0;
|
||||
channelIndex = 0;
|
||||
titleIndex = 0;
|
||||
for (; titleIndex < mSDTitleCount; ++titleIndex) {
|
||||
u32 titleId = mpSDTitleInfo[titleIndex].titleId;
|
||||
titleId = mpSDTitleInfo[titleIndex].titleId;
|
||||
if (titleId != 0x48415A41) {
|
||||
++channelCount;
|
||||
mpChannelTitleIds[channelIndex++] = titleId;
|
||||
@@ -3458,7 +3465,11 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
|
||||
if (event == 0) {
|
||||
switch (event) {
|
||||
default: return;
|
||||
case 0: break;
|
||||
}
|
||||
{
|
||||
if (mpScene->mState == 1) {
|
||||
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_OUT) {
|
||||
if (con != NULL) {
|
||||
@@ -3504,8 +3515,6 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ struct AOSSAccessPoint {
|
||||
u8 bssid[6];
|
||||
u16 capabilities;
|
||||
u32 rateCount;
|
||||
u8 rates[12];
|
||||
u8 rates[16];
|
||||
u32 beaconPeriod;
|
||||
u32 mode;
|
||||
};
|
||||
@@ -84,7 +84,7 @@ void* AOSSi_Alloc(u32 size) {
|
||||
}
|
||||
|
||||
void AOSSi_Free(void* block) {
|
||||
if (releaseMemory != NULL) {
|
||||
if (releaseMemory) {
|
||||
releaseMemory(0, block, 0);
|
||||
}
|
||||
}
|
||||
@@ -129,15 +129,15 @@ int AOSSi_EndLocal(void) {
|
||||
int AOSSi_WLANGetBSSList(struct AOSSAccessPointList** output) {
|
||||
int result = -1;
|
||||
int startupRetries = 0;
|
||||
int scanRetries = 0;
|
||||
int cleanupRetries = 0;
|
||||
WDScanParam scan ATTRIBUTE_ALIGN(32);
|
||||
WD_Info info ATTRIBUTE_ALIGN(32);
|
||||
int unlockRetries = 0;
|
||||
int driver;
|
||||
u8* buffer;
|
||||
WD_Info info ATTRIBUTE_ALIGN(32);
|
||||
WDScanParam scan;
|
||||
int cleanupRetries = 0;
|
||||
int scanRetries = 0;
|
||||
u8 macAddress[6];
|
||||
if (allocateMemory == NULL || releaseMemory == NULL) {
|
||||
if (!allocateMemory || !releaseMemory) {
|
||||
return -1;
|
||||
}
|
||||
driver = NCDLockWirelessDriver();
|
||||
@@ -157,7 +157,7 @@ startup:
|
||||
memcpy(macAddress, info.MAC, 6);
|
||||
}
|
||||
buffer = AOSSi_Alloc(0x3200);
|
||||
if (buffer != NULL) {
|
||||
if (buffer) {
|
||||
memset(buffer, 0, 0x3200);
|
||||
scan.channelBit = info.enableChannel;
|
||||
scan.maxChannelTime = 40;
|
||||
@@ -178,37 +178,37 @@ startup:
|
||||
count = *(u16*)buffer;
|
||||
if (count != 0) {
|
||||
list = AOSSi_Alloc(sizeof(*list) + (count - 1) * sizeof(struct AOSSAccessPoint));
|
||||
if (list == NULL) {
|
||||
if (!list) {
|
||||
result = -1;
|
||||
break;
|
||||
}
|
||||
list->count = count;
|
||||
descriptor = (WDBssDesc*)&buffer[2];
|
||||
for (index = 0; index < count; ++index) {
|
||||
struct AOSSAccessPoint* accessPoint = &list->accessPoints[index];
|
||||
int rate;
|
||||
int rateCount = 0;
|
||||
accessPoint->ssidLength = descriptor->ssidLength;
|
||||
memcpy(accessPoint->ssid, descriptor->ssid, 32);
|
||||
accessPoint->channel = descriptor->channel;
|
||||
memcpy(accessPoint->bssid, descriptor->bssid, 6);
|
||||
int rateCount;
|
||||
list->accessPoints[index].ssidLength = descriptor->ssidLength;
|
||||
memcpy(list->accessPoints[index].ssid, descriptor->ssid, 32);
|
||||
list->accessPoints[index].channel = descriptor->channel;
|
||||
memcpy(list->accessPoints[index].bssid, descriptor->bssid, 6);
|
||||
rateCount = 0;
|
||||
for (rate = 0; rate < 12; ++rate) {
|
||||
if (descriptor->rateSet.support & supportedRates[rate].mask) {
|
||||
accessPoint->rates[rateCount] = supportedRates[rate].value;
|
||||
list->accessPoints[index].rates[rateCount] = supportedRates[rate].value;
|
||||
if (descriptor->rateSet.basic & supportedRates[rate].mask) {
|
||||
accessPoint->rates[rateCount] |= 128;
|
||||
list->accessPoints[index].rates[rateCount] |= 128;
|
||||
}
|
||||
++rateCount;
|
||||
}
|
||||
}
|
||||
accessPoint->rateCount = rateCount;
|
||||
accessPoint->beaconPeriod = descriptor->beaconPeriod;
|
||||
list->accessPoints[index].rateCount = rateCount;
|
||||
list->accessPoints[index].beaconPeriod = descriptor->beaconPeriod;
|
||||
if ((descriptor->capabilities & 3) == 1) {
|
||||
accessPoint->mode = 1;
|
||||
list->accessPoints[index].mode = 1;
|
||||
} else if ((descriptor->capabilities & 3) == 2) {
|
||||
accessPoint->mode = 2;
|
||||
list->accessPoints[index].mode = 2;
|
||||
} else {
|
||||
accessPoint->mode = 0;
|
||||
list->accessPoints[index].mode = 0;
|
||||
}
|
||||
descriptor = (WDBssDesc*)((u16*)descriptor + descriptor->length);
|
||||
}
|
||||
@@ -222,7 +222,7 @@ startup:
|
||||
}
|
||||
if (++scanRetries > 10) {
|
||||
list = AOSSi_Alloc(sizeof(*list));
|
||||
if (list == NULL) {
|
||||
if (!list) {
|
||||
result = -1;
|
||||
break;
|
||||
}
|
||||
@@ -236,31 +236,29 @@ startup:
|
||||
AOSSi_Free(buffer);
|
||||
}
|
||||
cleanup:
|
||||
if (WD_Cleanup() != 0) {
|
||||
while (WD_Cleanup() != 0) {
|
||||
if (cleanupRetries > 10) {
|
||||
result = -1;
|
||||
goto unlock;
|
||||
}
|
||||
++cleanupRetries;
|
||||
AOSSi_SleepMs(10);
|
||||
goto cleanup;
|
||||
}
|
||||
unlock:
|
||||
if (NCDUnlockWirelessDriver(driver) != 0) {
|
||||
while (NCDUnlockWirelessDriver(driver) != 0) {
|
||||
if (unlockRetries > 10) {
|
||||
result = -1;
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
++unlockRetries;
|
||||
AOSSi_SleepMs(10);
|
||||
goto unlock;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionStatus* status) {
|
||||
int retries = 0;
|
||||
int result = 0;
|
||||
int result;
|
||||
WD_Info info ATTRIBUTE_ALIGN(32);
|
||||
NCDIfConfig* interfaceConfig = &AOSSi_NcdIfConfig;
|
||||
NCDIpConfig* ipConfig;
|
||||
@@ -288,6 +286,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
}
|
||||
interfaceConfig->netif.wireless.config.manual.ssidLength = (u8)connection->ssidLength;
|
||||
memcpy(interfaceConfig->netif.wireless.config.manual.ssid, connection->ssid, connection->ssidLength);
|
||||
result = 0;
|
||||
ipConfig = &AOSSi_NcdIpConfig;
|
||||
memset(ipConfig, 0, sizeof(*ipConfig));
|
||||
ipConfig->adjust.maxTransferUnit = 1300;
|
||||
@@ -321,13 +320,14 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
}
|
||||
}
|
||||
if (result == 0) {
|
||||
u32 ssidLength;
|
||||
status->connected = 1;
|
||||
if (WD_GetInfo(&info) == 0) {
|
||||
status->channel = info.channel;
|
||||
}
|
||||
status->ssidLength = interfaceConfig->netif.wireless.config.manual.ssidLength;
|
||||
memcpy(status->ssid, interfaceConfig->netif.wireless.config.manual.ssid,
|
||||
interfaceConfig->netif.wireless.config.manual.ssidLength);
|
||||
ssidLength = interfaceConfig->netif.wireless.config.manual.ssidLength;
|
||||
status->ssidLength = ssidLength;
|
||||
memcpy(status->ssid, interfaceConfig->netif.wireless.config.manual.ssid, ssidLength);
|
||||
} else {
|
||||
status->connected = 0;
|
||||
}
|
||||
|
||||
@@ -763,7 +763,7 @@ unlock_driver:
|
||||
int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet* previousRecords,
|
||||
u32* changedIndex) {
|
||||
u32 previousIndex;
|
||||
u32 currentIndex = 0;
|
||||
u32 currentIndex;
|
||||
int found = 0;
|
||||
int result = 0;
|
||||
u32 ssidLength;
|
||||
@@ -774,6 +774,7 @@ int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet*
|
||||
AtermApRecord* previousRecord = previousRecords->entries;
|
||||
|
||||
|
||||
currentIndex = 0;
|
||||
for (; currentIndex < currentRecords->count; currentIndex++) {
|
||||
AtermSsidBuffer ssidName;
|
||||
ssidName.clear.word0 = 0;
|
||||
@@ -816,8 +817,6 @@ int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet*
|
||||
int currentHasAoss;
|
||||
int previousHasAoss;
|
||||
|
||||
previousHasAoss = 0;
|
||||
currentHasAoss = 0;
|
||||
aossSsidName.clear.word0 = 0;
|
||||
aossSsidName.clear.word1 = 0;
|
||||
aossSsidName.clear.word2 = 0;
|
||||
@@ -827,6 +826,8 @@ int ATERMFindChangedApRecord(AtermApRecordSet* currentRecords, AtermApRecordSet*
|
||||
aossSsidName.clear.word6 = 0;
|
||||
aossSsidName.clear.word7 = 0;
|
||||
aossSsidName.clear.finalWord = 0;
|
||||
currentHasAoss = 0;
|
||||
previousHasAoss = 0;
|
||||
|
||||
currentRecord = currentRecords->entries;
|
||||
previousRecord = previousRecords->entries;
|
||||
@@ -1646,7 +1647,10 @@ s32 ATERMRunConfigProtocol(void) {
|
||||
SONtoHs(option->length);
|
||||
optionValue = option->value;
|
||||
}
|
||||
if (optionValue != NULL && optionType == 0x101) {
|
||||
if (optionValue == NULL || optionType != 0x101) {
|
||||
break;
|
||||
}
|
||||
{
|
||||
AtermProgress progress;
|
||||
u32 authenticationTime = (u32)(OSGetTime() /
|
||||
(__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
|
||||
@@ -1870,13 +1874,13 @@ int ATERMAesKeyWrap(u16* destination, u16* source, u32 length, void* key, u32 ke
|
||||
union { u64 value; u8 bytes[8]; } counter;
|
||||
u32 initialValue[2];
|
||||
u8* outputBlock;
|
||||
s32 blockOffset;
|
||||
s32 blockIndex;
|
||||
u8* destinationBytes;
|
||||
const u8* sourceBytes;
|
||||
u32 rounds;
|
||||
s32 blockCount;
|
||||
s32 pass;
|
||||
s32 blockIndex;
|
||||
s32 blockCount;
|
||||
u32 rounds;
|
||||
s32 blockOffset;
|
||||
int result = 1;
|
||||
|
||||
initialValue[1] = 0xA6A6A6A6;
|
||||
@@ -1895,11 +1899,11 @@ int ATERMAesKeyWrap(u16* destination, u16* source, u32 length, void* key, u32 ke
|
||||
memcpy(destinationBytes + 8, sourceBytes, length);
|
||||
memcpy(block.bytes, initialValue, sizeof(initialValue));
|
||||
for (pass = 0; pass < 6; pass++) {
|
||||
for (blockOffset = 8, blockIndex = 1; blockIndex <= blockCount; blockIndex++, blockOffset += 8) {
|
||||
for (blockIndex = 1, blockOffset = 8; blockIndex <= blockCount; blockIndex++, blockOffset += 8) {
|
||||
u64 passBase = (u64)(s64)blockCount * (u64)(s64)pass;
|
||||
u8* stateBytes = block.bytes;
|
||||
|
||||
outputBlock = destinationBytes + blockOffset;
|
||||
outputBlock = (u8*)(destination + blockOffset / 2);
|
||||
memcpy(stateBytes + 8, outputBlock, 8);
|
||||
ATERMAesEncryptBlock(expandedKey, rounds, stateBytes, stateBytes);
|
||||
counter.value = (u64)(s64)blockIndex + passBase;
|
||||
|
||||
@@ -30,12 +30,10 @@ namespace ipl {
|
||||
namespace scene {
|
||||
extern "C" MEMAllocator sRakuAllocator;
|
||||
MEMAllocator sRakuAllocator;
|
||||
struct RakuStatus {
|
||||
RakuProgress progress;
|
||||
RakuConfiguration configuration;
|
||||
};
|
||||
extern "C" RakuStatus sRakuStatus;
|
||||
RakuStatus sRakuStatus;
|
||||
extern "C" RakuProgress sRakuStatus;
|
||||
RakuProgress sRakuStatus;
|
||||
extern "C" RakuConfiguration sRakuConfiguration;
|
||||
RakuConfiguration sRakuConfiguration;
|
||||
extern "C" OSMessageQueue sRakuMsgQueue;
|
||||
OSMessageQueue sRakuMsgQueue;
|
||||
static u32 startTimeHigh = 0;
|
||||
@@ -61,8 +59,7 @@ public:
|
||||
virtual ~RakuRakuThread();
|
||||
virtual void* Run();
|
||||
virtual void unk_0x2C() = 0;
|
||||
void syncRakuProgress();
|
||||
static void progressCallback(RakuProgress* progress);
|
||||
static void syncRakuProgress(RakuProgress* progress);
|
||||
void destroy();
|
||||
int start();
|
||||
int getState();
|
||||
@@ -79,19 +76,15 @@ private:
|
||||
MEMHeapHandle mHeap;
|
||||
};
|
||||
|
||||
void RakuRakuThread::syncRakuProgress() {
|
||||
void RakuRakuThread::syncRakuProgress(RakuProgress* progress) {
|
||||
BOOL interrupts = OSDisableInterrupts();
|
||||
sRakuStatus.progress = *(RakuProgress*)this;
|
||||
sRakuStatus = *progress;
|
||||
OSTime time = OSGetTime();
|
||||
startTimeHigh = time >> 32;
|
||||
startTimeLow = time;
|
||||
OSRestoreInterrupts(interrupts);
|
||||
}
|
||||
|
||||
void RakuRakuThread::progressCallback(RakuProgress* progress) {
|
||||
((RakuRakuThread*)progress)->syncRakuProgress();
|
||||
}
|
||||
|
||||
RakuRakuThread::RakuRakuThread(EGG::Heap* heap) : utility::ut_thread() {
|
||||
u32 version = ATERMi_ApConfigGetVersion();
|
||||
if (((version >> 12) & 15) * 10 + ((version >> 8) & 15) != 1) {
|
||||
@@ -148,14 +141,14 @@ int RakuRakuThread::start() {
|
||||
mPriority = OSGetThreadPriority(OSGetCurrentThread()) - 1;
|
||||
active = true;
|
||||
mFinished = 0;
|
||||
memset(&sRakuStatus.configuration, 0, sizeof(RakuConfiguration));
|
||||
memset(&sRakuStatus.progress, 0, sizeof(RakuProgress));
|
||||
memset(&sRakuConfiguration, 0, sizeof(RakuConfiguration));
|
||||
memset(&sRakuStatus, 0, sizeof(RakuProgress));
|
||||
SOLibraryConfig socketConfig;
|
||||
socketConfig.alloc = RakuSocketAlloc;
|
||||
socketConfig.free = RakuSocketFree;
|
||||
SOInit(&socketConfig);
|
||||
ATERMi_ApConfigStart(mPriority, 200,
|
||||
progressCallback,
|
||||
syncRakuProgress,
|
||||
RakuAtermAlloc, RakuAtermFree, 4096);
|
||||
if (!mRunning) {
|
||||
mRunning = 1;
|
||||
@@ -207,7 +200,7 @@ int RakuRakuThread::getState() {
|
||||
return 0;
|
||||
}
|
||||
BOOL interrupts = OSDisableInterrupts();
|
||||
switch (sRakuStatus.progress.state) {
|
||||
switch (sRakuStatus.state) {
|
||||
case 1: displayState = 1; break;
|
||||
case 2: displayState = 2; break;
|
||||
case 3: displayState = 2; break;
|
||||
@@ -229,6 +222,30 @@ int RakuRakuThread::cancel() {
|
||||
return OSSendMessage(&sRakuMsgQueue, (OSMessage)1, 0);
|
||||
}
|
||||
|
||||
inline void copyRakuPrivacy(NCDApConfig* config, const RakuConfiguration* settings) {
|
||||
if (settings->security == 1) {
|
||||
config->privacy.mode = 1;
|
||||
config->privacy.wep40.keyId = settings->keyId;
|
||||
for (int index = 0; index < 4; ++index) {
|
||||
memcpy(config->privacy.wep40.key[index], settings->wepKeys[index], 5);
|
||||
}
|
||||
} else if (settings->security == 2) {
|
||||
config->privacy.mode = 2;
|
||||
config->privacy.wep104.keyId = settings->keyId;
|
||||
for (int index = 0; index < 4; ++index) {
|
||||
memcpy(config->privacy.wep104.key[index], settings->wepKeys[index], 13);
|
||||
}
|
||||
} else if (settings->security == 4) {
|
||||
config->privacy.mode = 4;
|
||||
memcpy(config->privacy.tkip.key, settings->passphrase, 64);
|
||||
config->privacy.tkip.keyLen = strlen(settings->passphrase);
|
||||
} else if (settings->security == 5) {
|
||||
config->privacy.mode = 6;
|
||||
memcpy(config->privacy.aes.key, settings->passphrase, 64);
|
||||
config->privacy.aes.keyLen = strlen(settings->passphrase);
|
||||
}
|
||||
}
|
||||
|
||||
int RakuRakuThread::finish(NCDApConfig* config, int* result) {
|
||||
if (!active) {
|
||||
if (result != NULL) {
|
||||
@@ -236,49 +253,29 @@ int RakuRakuThread::finish(NCDApConfig* config, int* result) {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
s32 state = sRakuStatus.progress.state;
|
||||
if ((u32)(state - 6) > 1) {
|
||||
return 0;
|
||||
}
|
||||
if (!mFinished) {
|
||||
if (state == 6) {
|
||||
ATERMi_ApConfigGetResult(&sRakuStatus.configuration);
|
||||
printInfo();
|
||||
s32 state = sRakuStatus.state;
|
||||
if ((u32)(state - 6) <= 1) {
|
||||
if (!mFinished) {
|
||||
if (state == 6) {
|
||||
ATERMi_ApConfigGetResult(&sRakuConfiguration);
|
||||
printInfo();
|
||||
}
|
||||
OSSendMessage(&sRakuMsgQueue, (OSMessage)1, 0);
|
||||
return 0;
|
||||
}
|
||||
OSSendMessage(&sRakuMsgQueue, (OSMessage)1, 0);
|
||||
SOFinish();
|
||||
active = false;
|
||||
destroy();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
SOFinish();
|
||||
active = false;
|
||||
destroy();
|
||||
if (config != NULL) {
|
||||
RakuConfiguration* settings = &sRakuStatus.configuration;
|
||||
memcpy(config->ssid, settings->ssid, 32);
|
||||
config->ssidLength = strlen(settings->ssid);
|
||||
if (settings->security == 1) {
|
||||
config->privacy.mode = 1;
|
||||
config->privacy.wep40.keyId = settings->keyId;
|
||||
for (int index = 0; index < 4; ++index) {
|
||||
memcpy(config->privacy.wep40.key[index], settings->wepKeys[index], 5);
|
||||
}
|
||||
} else if (settings->security == 2) {
|
||||
config->privacy.mode = 2;
|
||||
config->privacy.wep104.keyId = settings->keyId;
|
||||
for (int index = 0; index < 4; ++index) {
|
||||
memcpy(config->privacy.wep104.key[index], settings->wepKeys[index], 13);
|
||||
}
|
||||
} else if (settings->security == 4) {
|
||||
config->privacy.mode = 4;
|
||||
memcpy(config->privacy.tkip.key, settings->passphrase, 64);
|
||||
config->privacy.tkip.keyLen = strlen(settings->passphrase);
|
||||
} else if (settings->security == 5) {
|
||||
config->privacy.mode = 6;
|
||||
memcpy(config->privacy.aes.key, settings->passphrase, 64);
|
||||
config->privacy.aes.keyLen = strlen(settings->passphrase);
|
||||
}
|
||||
memcpy(config->ssid, sRakuConfiguration.ssid, 32);
|
||||
config->ssidLength = strlen(sRakuConfiguration.ssid);
|
||||
copyRakuPrivacy(config, &sRakuConfiguration);
|
||||
}
|
||||
if (result != NULL) {
|
||||
*result = sRakuStatus.progress.result;
|
||||
*result = sRakuStatus.result;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace ipl {
|
||||
// clang-format on
|
||||
|
||||
SettingButton::SettingButton(EGG::Heap* heap, int arg) : FaderSceneBase(heap), ::gui::EventHandler() {
|
||||
unk_0x264 = 64;
|
||||
unk_0x268 = 0;
|
||||
unk_0x26C = 0;
|
||||
unk_0x270 = 0;
|
||||
mCmdCapacity = 64;
|
||||
mCmdCount = 0;
|
||||
mCmdReadIdx = 0;
|
||||
mCmdWriteIdx = 0;
|
||||
mSettingArg = arg;
|
||||
mpLayout = NULL;
|
||||
mpLayoutFile = NULL;
|
||||
@@ -81,8 +81,8 @@ namespace ipl {
|
||||
|
||||
FaderSceneCommand SettingButton::calcNormal() {
|
||||
if (!mpLayout->getAnim(ANIM_ALPHA_IN)->isPlaying() && !mpLayout->getAnim(ANIM_ALPHA_OUT)->isPlaying() &&
|
||||
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && unk_0x268 != 0) {
|
||||
Unk unk = unk_0x64[unk_0x26C];
|
||||
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && mCmdCount != 0) {
|
||||
CmdEntry unk = mCmdQueue[mCmdReadIdx];
|
||||
switch (unk.command) {
|
||||
case CMD_SHOW_BTN: {
|
||||
showBtn();
|
||||
@@ -98,11 +98,11 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
if (unk_0x268 != 0) {
|
||||
if (++unk_0x26C >= unk_0x264) {
|
||||
unk_0x26C = 0;
|
||||
if (mCmdCount != 0) {
|
||||
if (++mCmdReadIdx >= mCmdCapacity) {
|
||||
mCmdReadIdx = 0;
|
||||
}
|
||||
unk_0x268--;
|
||||
mCmdCount--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,16 +225,16 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void SettingButton::reserve(int command, u32 msgId) {
|
||||
if (unk_0x264 != unk_0x268) {
|
||||
int unk = unk_0x270;
|
||||
unk_0x64[unk].command = command;
|
||||
unk_0x64[unk].msgID = msgId;
|
||||
unk_0x270++;
|
||||
if (mCmdCapacity != mCmdCount) {
|
||||
int unk = mCmdWriteIdx;
|
||||
mCmdQueue[unk].command = command;
|
||||
mCmdQueue[unk].msgID = msgId;
|
||||
mCmdWriteIdx++;
|
||||
|
||||
if (unk_0x270 >= unk_0x264) {
|
||||
unk_0x270 = 0;
|
||||
if (mCmdWriteIdx >= mCmdCapacity) {
|
||||
mCmdWriteIdx = 0;
|
||||
}
|
||||
unk_0x268++;
|
||||
mCmdCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -914,7 +914,8 @@ void CArGBAOdh::cdj_c_setQuantizationTable(SArCDJ_OdhMaster* master, u32 quality
|
||||
for (i = 0; i < 64; i++) {
|
||||
temp = ((const u16*)gArAANScales)[i];
|
||||
temp *= quantization[table * 64 + i];
|
||||
master->quantizationTables[table * 64 + i] = 0x4000000 / temp;
|
||||
temp = 0x4000000 / temp;
|
||||
master->quantizationTables[table * 64 + i] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1193,8 +1194,9 @@ s32 CArGBAOdh::huffmanCoder(u16* coefficientInput, SArCDJ_HuffmanRequest* reques
|
||||
}
|
||||
}
|
||||
code = request->dcTable[bitCount];
|
||||
if (EmitBit(((code & 0xFFFFFF) << bitCount) | (difference & ((1 << bitCount) - 1)), ((s32)code >> 24) + bitCount,
|
||||
request) == ODH_ERROR_80000004) {
|
||||
magnitude = (difference & ((1 << bitCount) - 1)) | ((code & 0xFFFFFF) << bitCount);
|
||||
code = (s32)code >> 24;
|
||||
if (EmitBit(magnitude, code + bitCount, request) == ODH_ERROR_80000004) {
|
||||
return ODH_ERROR_80000004;
|
||||
}
|
||||
|
||||
@@ -1223,8 +1225,9 @@ s32 CArGBAOdh::huffmanCoder(u16* coefficientInput, SArCDJ_HuffmanRequest* reques
|
||||
}
|
||||
}
|
||||
code = request->acTable[bitCount];
|
||||
if (EmitBit(((code & 0xFFFFFF) << bitCount) | (runLength & ((1 << bitCount) - 1)), ((s32)code >> 24) + bitCount,
|
||||
request) == ODH_ERROR_80000004) {
|
||||
magnitude = (runLength & ((1 << bitCount) - 1)) | ((code & 0xFFFFFF) << bitCount);
|
||||
code = (s32)code >> 24;
|
||||
if (EmitBit(magnitude, code + bitCount, request) == ODH_ERROR_80000004) {
|
||||
return ODH_ERROR_80000004;
|
||||
}
|
||||
|
||||
@@ -1243,8 +1246,9 @@ s32 CArGBAOdh::huffmanCoder(u16* coefficientInput, SArCDJ_HuffmanRequest* reques
|
||||
}
|
||||
}
|
||||
code = request->dcTable[bitCount];
|
||||
if (EmitBit(((code & 0xFFFFFF) << bitCount) | (value & ((1 << bitCount) - 1)), ((s32)code >> 24) + bitCount,
|
||||
request) == ODH_ERROR_80000004) {
|
||||
magnitude = (value & ((1 << bitCount) - 1)) | ((code & 0xFFFFFF) << bitCount);
|
||||
code = (s32)code >> 24;
|
||||
if (EmitBit(magnitude, code + bitCount, request) == ODH_ERROR_80000004) {
|
||||
return ODH_ERROR_80000004;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1245,3 +1245,504 @@ Immediate matching stack store/reload pairs in remaining targets: []. No definit
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successfully built distinct source trials; smoothing/projected geometry floating scheduling,250/250.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 3 successfully built distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successfully built distinct source trials; controller/ring initialization and floating scheduling,185/185.
|
||||
|
||||
# Round 4: fresh origin/main after KPAD reset and continuation landed
|
||||
Initial all-unit quick gate PASS. Pools checked explicitly first: address57/57, SD101/101, KPAD0/0. All owned data100%; no rename or extent edit needed. Current round uses new combinations of lifetime/alias boundaries and inline temporaries, rather than replaying prior variants.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals tested HEAD; still open 97.44634%. Structural diagnosis: 820/820; frame/branch shape agrees, layout/event lifetime and floating/register scheduling remain. Probe heap and owner const views before allocation tuning.
|
||||
- name immutable scene heap once for all layout allocations: (24, 793) structural/positional; instructions 821/820; restored.
|
||||
- construct GUI handler objects through named parent view: (19, 323) structural/positional; instructions 820/820; restored.
|
||||
- read completed code layout through const object view for label setup: build failed ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 317: } # Warning: ^ # (10184) return value expected ### mwcceppc.exe Compiler: # 438: nw4r::lyt::Pane* textPane = codeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_crd_btn_00", true); # Error: ^ # (10248) function call '[const ipl::layout::Object].getNW4RLyt()' does not # match # 'ipl::layout::Object::getNW4RLyt()' (non-static) # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
|
||||
Remote source equals tested HEAD; still open 88.03571%. Structural diagnosis: 82/84; identical stack buffer extent, name/display pointer addresses should remain live across pane lookup; cache-copy source/destination order differs.
|
||||
- combine mutable String and friend-record references: (20, 45) structural/positional; instructions 81/84; restored.
|
||||
- combine String view with reusable pane/text temporaries: (10, 39) structural/positional; instructions 83/84; restored.
|
||||
- name cached friend source and destination before copy: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals tested HEAD; still open 99.42105%. Structural diagnosis: 38/38; sole two differences exchange memcpy source and destination addi order, not register-only. Test typed inputs and narrower local boundaries.
|
||||
- source create-id pointer declared after name-copy call: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- mutable string view and const create-id view combined: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- initialize friend-id destination pointer at memcpy boundary: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
|
||||
Fetch origin/main adcd8ca586dc4ad15c62df304e560a7c974f1c12. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
|
||||
Remote source equals tested HEAD; still open 98.666664%. Structural diagnosis: 76/75; extra initialized default retained for unrecognized error; target leaves value unspecified. No uninitialized-value trial allowed; check safe selection boundary and local scope.
|
||||
- safe default initialized at error-message buffer declaration: (2, 45) structural/positional; instructions 77/75; restored.
|
||||
- switch collapsed to initialized default with network override: (12, 29) structural/positional; instructions 67/75; restored.
|
||||
- message pointer is immutable after exhaustive safe error selection: (1, 30) structural/positional; instructions 76/75; restored.
|
||||
|
||||
# Round 4: fresh origin/main after KPAD reset and continuation landed
|
||||
Initial all-unit quick gate PASS. Pools checked explicitly first: address57/57, SD101/101, KPAD0/0. All owned data100%; no rename or extent edit needed. Current round uses new combinations of lifetime/alias boundaries and inline temporaries, rather than replaying prior variants.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals tested HEAD; still open 97.73972%. Structural diagnosis: 145/146; earlier duration diagnosis was incomplete. Actual missing instruction is BS2-manager reload at loop-body entry; target has independent global and string bases, source reuses condition pointer. Frame matches; test loop boundaries first.
|
||||
- explicit endless loop with state-eight exit: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
- name BS2 polling manager at each condition evaluation: build failed ne\iplSceneManager.h:14 # Z:\mnt\drive2\projects\wii-ipl-workers\data-d5\include\iplSceneUI.h:11 # Z:\mnt\drive2\projects\wii-ipl-workers\data- # d5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 243: BS2Manager* manager; # Error: ^^^^^^^^^^ # (10140) undefined identifier 'BS2Manager' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- goto polling loop separates state query and update blocks: (4, 39) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
|
||||
Remote source equals tested HEAD; still open 99.15205%. Structural diagnosis: 170/171; branch form requires second success beq8 plus b failure; compaction count r8 vsr6. Direct switch with scope/default termination and counter order are distinct structural levers.
|
||||
- switch with natural final default fallthrough: (8, 143) structural/positional; instructions 172/171; restored.
|
||||
- switch default before explicit success arms: (58, 107) structural/positional; instructions 171/171; restored.
|
||||
- reverse error compaction count declaration lifetimes: (4, 142) structural/positional; instructions 170/171; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals tested HEAD; still open 97.81188%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
|
||||
- postincrement count before checking usage: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- threshold-first source comparison operand order: (6, 9) structural/positional; instructions 101/101; restored.
|
||||
- name output array views independently of count pointer: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals tested HEAD; still open 97.833336%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
|
||||
- postincrement count before checking usage: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- threshold-first source comparison operand order: (6, 9) structural/positional; instructions 102/102; restored.
|
||||
- name output array views independently of count pointer: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 68c4c9aeac0b0f28264f43f7c301ab20d873fb12. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
|
||||
Remote source equals tested HEAD; still open 97.29365%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
|
||||
- postincrement count before checking usage: (2, 22) structural/positional; instructions 126/126; restored.
|
||||
- threshold-first source comparison operand order: (6, 27) structural/positional; instructions 126/126; restored.
|
||||
- name output array views independently of count pointer: (2, 22) structural/positional; instructions 126/126; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main c7896c380230bd05f4f8c011166e96451c9eabfb. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
|
||||
Remote source equals tested HEAD; still open 97.55125%. Structural diagnosis: equal instruction counts; only threshold load/count store scheduling plus loop register lifetimes. Real output-buffer/operand views change alias scope without volatile casts.
|
||||
- postincrement count before checking usage: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- threshold-first source comparison operand order: (24, 36) structural/positional; instructions 361/361; restored.
|
||||
- name output array views independently of count pointer: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main c7896c380230bd05f4f8c011166e96451c9eabfb. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
|
||||
Remote source equals tested HEAD; still open 99.65714%. Structural diagnosis: 35/35; target loads heap before manager; source loads manager first. Ref/pointer object input boundary may affect allocator/alias assumptions.
|
||||
- save manager reference view after heap pointer definition: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- save manager reference before heap definition: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- heap reference view evaluated at flush boundary: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 2119935c1dd8033630087deb598defc52f48d619. Initial assembly diagnosis: (0, 0) structural/positional differences; instructions 108/108
|
||||
|
||||
Baseline-report correction: build/43U/report.json was stale despite a fresh gate, because gate generates a temporary report. Regenerated exact-name baseline directly with objdiff-cli before resuming SD work; current live gate remains90/94,117/129,21/29. No matched functions edited.
|
||||
|
||||
# Round 4: fresh origin/main after KPAD reset and continuation landed
|
||||
Initial all-unit quick gate PASS. Pools checked explicitly first: address57/57, SD101/101, KPAD0/0. All owned data100%; no rename or extent edit needed. Current round uses new combinations of lifetime/alias boundaries and inline temporaries, rather than replaying prior variants.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect calcCommon__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 2119935c1dd8033630087deb598defc52f48d619. Initial assembly diagnosis: (0, 0) structural/positional differences; instructions 108/108
|
||||
|
||||
Fresh-build baseline correction: SD calcCommon, initializeNormalPage and selectChannel are ALREADY exact on origin/main. Header commit bac1e542 changed SDButton setter declaration to one argument before this round. Initial quick gate used stale compiled SD object; building the owned SD object updated those matches. Skip all3; do not count inherited improvements. Live baseline is SD120/129.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
|
||||
Fetch origin/main ecee6f01e4ea2ca8f49a69d6259e21a60000ce7e. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
|
||||
Remote source equals tested HEAD; still open 93.4721%. Structural diagnosis: 233/233; target matrix input/scissor float scheduling differs. Constructor boundaries and geometry input/declaration order first.
|
||||
- separate uninitialized transformed input from vector constructor: (27, 72) structural/positional; instructions 233/233; restored.
|
||||
- swap framebuffer scalar declaration order: (23, 76) structural/positional; instructions 233/233; restored.
|
||||
- source scale division uses immutable scale vector reference: (59, 220) structural/positional; instructions 239/233; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface
|
||||
Fetch origin/main ecee6f01e4ea2ca8f49a69d6259e21a60000ce7e. Initial assembly diagnosis: (3, 109) structural/positional differences; instructions 143/144
|
||||
Remote source equals tested HEAD; still open 99.236115%. Structural diagnosis: 144/144; target branch target/event guard and scene/controller lifetimes differ. Read-only component/immutable scene-pointer input boundaries tested before registers.
|
||||
- normal event dispatch uses named immutable boolean: (3, 109) structural/positional; instructions 143/144; restored.
|
||||
- input component viewed as const during name lookup: build failed 5\src\scene\sdChannelSelect\iplSDChannelSelect.cpp:6) ### mwcceppc.exe Compiler: # File: src\scene\sdChannelSelect\iplSDChannelSelect.cpp # --------------------------------------------------------- # 3447: const char* paneName = component->getPane()->GetName(); # Error: ^ # (10248) function call '[const ipl::gui::PaneComponent].getPane()' does not # match # 'gui::PaneComponent::getPane()' (non-static) # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- normal-event owner stored in const pointer binding: (28, 128) structural/positional; instructions 137/144; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals tested HEAD; still open 97.44634%. Structural diagnosis: correct constness: NW4R layout getter requires mutable object; bind pointer const instead without changing layout.
|
||||
- immutable layout-pointer binding instead of const-pointee view: (52, 596) structural/positional; instructions 812/820; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals tested HEAD; still open 97.73972%. Structural diagnosis: correct manager type bs2::Manager; target has separate body/condition pointer loads.
|
||||
- name correctly typed BS2 polling manager at condition boundary: (4, 39) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (3, 109) structural/positional differences; instructions 143/144
|
||||
Remote source equals tested HEAD; still open 99.236115%. Structural diagnosis: Fresh setter header resolved prior register differences. Now only143/144, targetbeq8+b end versus ours bne end. Apply faithful switch dispatch boundary.
|
||||
- switch event with explicit default return before normal block: (0, 0) structural/positional; instructions 144/144; candidate kept.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals tested HEAD; still open 96.57895%. Structural diagnosis: 19/19; target double calibration and half-height coefficients reuse their input registers; prior named scalar input fixed reset. Test true coefficient lifetimes/operand order, same frame.
|
||||
- name double calibration value then multiply scale in place: (0, 13) structural/positional; instructions 19/19; restored.
|
||||
- reuse half-height coefficient variable as height product: build failed e/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 360: f32 x = src->x * halfHeight; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- name all calibration coefficients with original literal order: (0, 13) structural/positional; instructions 19/19; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals tested HEAD; still open 99.23077%. Structural diagnosis: 52/52; base-array pointer r4 versus targetr3, squared-height/zero floating registers. No stack reread evidence. Test typed array input and local declaration boundary.
|
||||
- unsigned immutable array index before controller lookup: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
- const array-base pointer binding before index addition: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
- reuse zero input and squared-height declaration before pointer: (0, 9) structural/positional; instructions 52/52; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals tested HEAD; still open 97.27723%. Structural diagnosis: 101/101; squared magnitude and target/circle weights float SSA lifetimes differ. All state outputs retained, same loop/frame.
|
||||
- name acceleration X/Y squared components before square-root: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
- immutable normal vector value loaded before target-component assignments: (29, 89) structural/positional; instructions 105/101; restored.
|
||||
- name circle interpolation weight at declaration boundary: (12, 67) structural/positional; instructions 100/101; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals tested HEAD; still open 98.15%. Structural diagnosis: 400/400; clamp/smooth helper limits and vector-copy lifetimes cause float/register scheduling differences. Probe helper input ownership and temporary scope.
|
||||
- name core acceleration clamp limit before axis updates: (32, 96) structural/positional; instructions 400/400; restored.
|
||||
- extension previous vector declared with top-level previous vectors: (16, 66) structural/positional; instructions 400/400; restored.
|
||||
- switch sample formats listed by high formats before low formats: (16, 66) structural/positional; instructions 400/400; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals tested HEAD; still open 98.348625%. Structural diagnosis: 109/109; target geometry coefficient lifetimes and vector store scheduling differ. Coefficient-first multiplication proved exact for continuation; test here too.
|
||||
- name horizontal and vertical tangent-normal product inputs: (2, 26) structural/positional; instructions 109/109; restored.
|
||||
- distance coefficient first in geometry offset multiplication: (2, 26) structural/positional; instructions 109/109; restored.
|
||||
- declare candidate geometry output vectors before object coordinates: (13, 33) structural/positional; instructions 109/109; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals tested HEAD; still open 94.82%. Structural diagnosis: 250/250; filter weights and projected vector temporaries drive FP scheduling. Test limit lifetimes and vector ordering.
|
||||
- dist filter named limit before magnitude normalization: (14, 46) structural/positional; instructions 250/250; restored.
|
||||
- pos filter normalized delta stored through two separate scalar temporaries: (14, 45) structural/positional; instructions 250/250; restored.
|
||||
- place delta vector declaration before point vector: (40, 71) structural/positional; instructions 250/250; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals tested HEAD; still open 97.52723%. Structural diagnosis: 459/459; polling state and sample loop/register lifetimes differ. No uninitialized output introduced, preserve sampling semantics.
|
||||
- available counter assignment after pointer declarations: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
- immutable core buttons mask when forming button state: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
- live sample and output pointer declarations precede saved sample: (11, 89) structural/positional; instructions 459/459; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals tested HEAD; still open 96.51351%. Structural diagnosis: 185/185; many controller/rotation initialization register ties. Named diagonal/calibration scalar lifetimes worked for reset; retain ordinary storage and loops.
|
||||
- reference diagonal squared components named inside loop: (9, 83) structural/positional; instructions 185/185; restored.
|
||||
- sensor conversion distance declared separately from reusable center offset: (9, 81) structural/positional; instructions 185/185; restored.
|
||||
- controller ring initialization uses named data-array pointer: (11, 82) structural/positional; instructions 185/185; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
|
||||
Remote source equals tested HEAD; still open 99.15205%. Structural diagnosis: Same branch lever just matched handler. Test explicit success destinations before default failure, preserving shared postprocessing.
|
||||
- separate explicit success jumps to common title-list block: (4, 143) structural/positional; instructions 170/171; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals tested HEAD; still open 96.57895%. Structural diagnosis: Correct C declaration scope. Keep half-height coefficient variable live through its multiply, as target does.
|
||||
- reuse half coefficient after all leading scalar declarations: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals tested HEAD; still open 97.27723%. Structural diagnosis: Target overwrites initial magnitude float register with smoothing weight; source separate temporary may prevent coalescing. This scalar is dead before smoothing assignment.
|
||||
- reuse acceleration magnitude as interpolation scale after normalization: (2, 35) structural/positional; instructions 101/101; restored.
|
||||
|
||||
Round4 exact candidate: button-handler onEventDerived144/144, ctxdiff0 and exact-name objdiff100. Explicit switch guard for event0 emits targetbeq8+b end. Fresh baselineSD120/129 ->121/129, code28152 ->28728. All-unit quick gatePASS, DOLcorrect, poolsidentical,0 regressions/patterns/style. Existing3 setter matches inherited from origin/main are excluded from claimed gain.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals tested HEAD; still open 99.23077%. Structural diagnosis: Remaining diff is7 pure registers; prior namedzero+declaration placement reduced4 floating differences, leaving only base-pointer coloring. Try definition-level scalar const, never volatility.
|
||||
- immutable channel parameter at function definition: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
- immutable height parameter at function definition: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
- both sensor-height scalar inputs immutable: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
- Last register search with real named zero and squared-height declarations: declaration block: | KPADInside* kpad; | f32 halfHeightSquared; | f32 zero; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 barDiagonalSquared; | start (0, 9) | improved (0, 7) | improved (0, 3) | best (0, 3) after 70 builds; kept in source: | KPADInside* kpad; | f32 barDiagonalSquared; | f32 halfHeightSquared; | f32 halfHeight; | f32 barOffsetX; | f32 barDiagonal; | f32 halfWidthSquared; | f32 halfWidth; | f32 negativeSensorHeight; | f32 zero; |
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main 91cc177cb74e645bb7cd47991aa232fb6061bfcc. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals tested HEAD; still open 96.57895%. Structural diagnosis: Same19/19 leaf structure. Final register-only search names the double literal separately from its scale product, as the target reuses that register. Previous round had only an anonymous double constant.
|
||||
- Last register search with named double calibration input: declaration block: | f64 correction; | f64 scaled; | f32 height; | f32 half; | f32 halfHeight; | f32 aspect; | f32 x; | f32 y; | start (0, 13) | improved (0, 12) | best (0, 12) after 75 builds; kept in source: | f32 aspect; | f64 scaled; | f32 height; | f32 half; | f32 halfHeight; | f64 correction; | f32 x; | f32 y; |
|
||||
|
||||
## Round4 final full clean gate and remaining-function audit
|
||||
Full non-quick gate over all3 units PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions,0 forbidden additions,0 readability warnings. Owned data100%, no symbol name/extent edits. Remaining function ELF extents end before/equal next symbol. Stack adjacent store/reload proof pairs []; no definition-level volatile justified.
|
||||
src/scene/address/iplAddressEdit: fresh exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: fresh exact 120 ->121/129; code 28152 ->28728/33828; data 2960 ->2960/2960.
|
||||
libs/RVL_SDK/src/kpad/KPAD: fresh exact 21 ->21/29; code 6756 ->6756/13056; data 8032 ->8032/8032.
|
||||
SD prompt baseline117 was stale; fresh origin/main compiled baseline120 includes3 setter matches inherited from bac1e542, excluded from worker gain. Worker gain is handler only120 ->121. Retained source diff only switch/event guard. Uncertainty remains on unsupported NWC24 error defaults; safe initialization retained instead of reproducing unspecified target values. All20 remaining functions have at least3 successful distinct source trials in this round, failed builds excluded.
|
||||
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 3 successful distinct source trials; layout construction lifetime/register scheduling; same820 instructions.
|
||||
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; text-array addresses folded until after pane lookup; target retains pointers across lookup,82/84.
|
||||
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successful distinct source trials; memcpy source/destination address evaluation order,38/38.
|
||||
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; extra safe default initialization; target appears to leave messageId undefined for unhandled error,76/75.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; BS2 polling body omits separate manager reload,145/146; loop/inline getter boundaries remain.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv 99.15205%; 4 successful distinct source trials; beq-plus-branch dispatch and compaction count coloring,170/171.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 3 successful distinct source trials; threshold load hoisted before count store,101/101.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 3 successful distinct source trials; threshold load hoisted before count store,102/102.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successful distinct source trials; threshold/count schedule plus loop coloring,126/126.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; four repeated threshold/count schedules,361/361.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successful distinct source trials; save manager/heap argument load order,35/35.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successful distinct source trials; matrix/scissor floating operand scheduling and temporaries,233/233.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos 96.57895%; 3 successful distinct source trials; floating calibration coefficient registers and multiply operands,19/19; named double calibration search best12 differences restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 6 successful distinct source trials; base-array register r4 versusr3 plus zero/squared-height float registers,52/52; scalar const inputs unchanged, declaration search best3 restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon 97.27723%; 4 successful distinct source trials; magnitude/interpolation and circle float-register lifetimes,101/101; scalar reuse did not change coloring.
|
||||
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 3 successful distinct source trials; clamp/smoothing inline boundaries and floating scheduling,400/400.
|
||||
- libs/RVL_SDK/src/kpad/KPAD select_1obj_first 98.348625%; 3 successful distinct source trials; geometry floating lifetimes and paired stores,109/109.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successful distinct source trials; smoothing/projected geometry floating scheduling,250/250.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 3 successful distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 3 successful distinct source trials; controller/ring initialization and floating scheduling,185/185.
|
||||
Final authority lines:
|
||||
```
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 121/129
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 21/29
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
# Round 6: HIGH, fresh structural investigation
|
||||
Fresh baseline after building all owned objects; pools address57/57, SD101/101, KPAD0/0 identical. Data already100% in all three; no unmatched data-name gap to rename. Prior medium source trials were restored, so this round checks different local types, scopes, inline helper boundaries and operand lifetimes.
|
||||
|
||||
## src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (19, 323) structural/positional differences; instructions 820/820
|
||||
Remote source equals freshly built baseline; still open 97.44634%. Structural diagnosis: 820 instructions and identical frame; literal-base/boardFile saved-register inversion dominates. Inspect structural differences before hoisting declarations: constructor inline boundaries, vector initialization and switch dispatch.
|
||||
- ordinary TextBalloon allocation with separately declared position: (49, 803) structural/positional; instructions 804/820; restored.
|
||||
- retain event objects through EventHandler base views: (19, 323) structural/positional; instructions 820/820; restored.
|
||||
- keep animation variable local to each mode arm: (19, 323) structural/positional; instructions 820/820; restored.
|
||||
- ordinary balloon new with a constructor argument vector temporary: (37, 803) structural/positional; instructions 808/820; candidate kept.
|
||||
- ordinary balloon new with named margin locals before allocation: (23, 331) structural/positional; instructions 818/820; restored.
|
||||
- mutable text-buffer views through mode initialization: (19, 323) structural/positional; instructions 820/820; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (10, 68) structural/positional differences; instructions 82/84
|
||||
Remote source equals freshly built baseline; still open 88.03571%. Structural diagnosis: Frame0x440 versus target0x450 follows missing two held text addresses; locals are actual arrays. Inspect memcpy argument alias class and UTF16 helper lifetime before declaration coloring.
|
||||
Frame diagnosis correction from disasm_fn: target frame is0x420, source also0x420;0x148/0x150 are code extents, not frame sizes. No extent overlap.
|
||||
- explicit first-element addresses for both text buffers: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- retain complete text array pointers before pane calls: (10, 68) structural/positional; instructions 82/84; restored.
|
||||
- use mutable views of copied friend and string fields: (10, 39) structural/positional; instructions 83/84; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 38/38
|
||||
Remote source equals freshly built baseline; still open 99.42105%. Structural diagnosis: Same frame and38 instructions; source/destination addi ordering at memcpy is the only difference. Check typed memcpy argument views before declaration search.
|
||||
Corrected prior-round diagnosis: relocation-resolved disasm proves the differing argument pair is wcsncpy(name), not memcpy(CreateID). Prior memcpy-only trials did not touch this mismatch.
|
||||
- name copy reads through a const String view: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- evaluate named source text before destination text: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
- typed destination wchar array rather than source array decay: (2, 2) structural/positional; instructions 38/38; restored.
|
||||
|
||||
## src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (1, 30) structural/positional differences; instructions 76/75
|
||||
Remote source equals freshly built baseline; still open 98.666664%. Structural diagnosis: 76/75 instructions, extra safe default message initialization. Retain defined behavior for unsupported NWC24 errors. Test exhaustive known-error branch layout without undefined/uninitialized state.
|
||||
- normalize unrecognized errors to the existing server fallback before dispatch: (8, 37) structural/positional; instructions 83/75; restored.
|
||||
- initialize the safe fallback in the explicit default branch: (4, 22) structural/positional; instructions 77/75; restored.
|
||||
- compute the supported network fallback directly with a boolean choice: (18, 47) structural/positional; instructions 65/75; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (4, 39) structural/positional differences; instructions 145/146
|
||||
Remote source equals freshly built baseline; still open 97.73972%. Structural diagnosis: 145/146; identical0x20 frame, target keeps BS2 global reload at loop entry. Compare basic block placement rather than tick arithmetic; all heap construction instructions align.
|
||||
- poll using equality-first completion and a continue arm: (9, 40) structural/positional; instructions 145/146; restored.
|
||||
- inline polling-state helper returning manager readiness: (4, 39) structural/positional; instructions 145/146; restored.
|
||||
- inline update helper separates manager argument from polling getter: (4, 39) structural/positional; instructions 145/146; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (4, 143) structural/positional differences; instructions 170/171
|
||||
Remote source equals freshly built baseline; still open 99.15205%. Structural diagnosis: 170/171, beq-plus-unconditional-branch result dispatch and error-compaction register order. Build branch arms from parsed brace boundaries, retaining common refresh in place.
|
||||
Corrected prior-round diagnosis: relocation-resolved target confirms the extra beq8/unconditional-return branch is the OSGetTime delay gate, not async-result dispatch. Result tests already match.
|
||||
- switch the elapsed-time boolean into the normal continuation: (0, 6) structural/positional; instructions 171/171; candidate kept.
|
||||
- declare scanned title before compaction counters: (0, 6) structural/positional; instructions 171/171; candidate kept.
|
||||
- compaction count uses the same unsigned type as title count: (1, 6) structural/positional; instructions 171/171; restored.
|
||||
- signed SDK count keeps native comparison width: (0, 6) structural/positional; instructions 171/171; restored.
|
||||
- write compacted title before advancing accepted count: (0, 6) structural/positional; instructions 171/171; restored.
|
||||
- separate destination-index advancement from the title store: (0, 6) structural/positional; instructions 171/171; restored.
|
||||
- Register-only declaration search on compaction title/count/index block: declaration block: | u32 titleId; | int channelCount = 0; | int channelIndex = 0; | u32 titleIndex = 0; | start (0, 6) | improved (0, 4) | best (0, 4) after 16 builds; kept in source: | u32 titleId; | u32 titleIndex = 0; | int channelIndex = 0; | int channelCount = 0; |
|
||||
- separate compaction declarations from zero assignments in target order: (0, 0) structural/positional; instructions 171/171; candidate kept.
|
||||
Exact handleSDTitleListResult: corrected the time-gate dispatch, then separated compaction declarations from assignments. Register search found the type/index/count order; preserving count/index/title zero assignments removed all6 differences. ctxdiff171/171 diffs0; exact-name objdiff100; all-unit quick gatePASS, data100%, pools identical,0 regressions/forbidden/readability. SD121 ->122; code28728 ->29412.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
After local exact commit160e985a, remote duplicate checks compare origin/main source against original round baseline0c06b01c, not modified HEAD. origin/main5518cb16 has no owned-unit diff.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.81188%. Structural diagnosis: 101/101 and same frame; compare count-store versus requirement load ordering, then native signed arithmetic and legal signed counterpart views.
|
||||
- native signed intermediate for bounded accepted-title count: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- count uses a legal signed counterpart view for alias analysis: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
- inline usage predicate with scalar input values: (24, 40) structural/positional; instructions 104/101; restored.
|
||||
- inline accepted-count update isolates the store boundary: (2, 4) structural/positional; instructions 101/101; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main 5518cb16fda3091c727d974aacf477a2cf89b74a. Initial assembly diagnosis: (2, 4) structural/positional differences; instructions 102/102
|
||||
Remote source equals freshly built baseline; still open 97.833336%. Structural diagnosis: 102/102. Same post-memcpy count/threshold scheduling as forward scan, confirmed by instruction diff; compare native intermediate type, inline store helper and a fixed-size requirement view.
|
||||
- native signed next-count local in reverse scan: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- inline count update using an output reference: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
- two-element readonly usage view in reverse scan: (2, 4) structural/positional; instructions 102/102; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main bc303bc36e5ea826ef9da39d6e9c9ed9c79e4ba9. Initial assembly diagnosis: (2, 22) structural/positional differences; instructions 126/126
|
||||
Remote source equals freshly built baseline; still open 97.29365%. Structural diagnosis: 126/126; u64 titleId allocated after page/order counters causes saved-register inversion; count/store scheduling also differs. Hoist the real title ID separately before trying declaration coloring.
|
||||
- declare loaded title ID before traversal counters: (2, 7) structural/positional; instructions 126/126; restored.
|
||||
- explicit page-row view when looking up the channel entry: (2, 22) structural/positional; instructions 126/126; restored.
|
||||
- native signed next-count local in page-ordered scan: (2, 22) structural/positional; instructions 126/126; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl
|
||||
Fetch origin/main bc303bc36e5ea826ef9da39d6e9c9ed9c79e4ba9. Initial assembly diagnosis: (8, 16) structural/positional differences; instructions 361/361
|
||||
Remote source equals freshly built baseline; still open 97.55125%. Structural diagnosis: 361/361, four repeated count/store/threshold windows; no string or data difference. Test real intermediate width and mutable/aggregate read views, then reject any non-exact result.
|
||||
- native next-count locals for all special-channel append sites: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- fixed-size readonly second-usage view for special title scans: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
- inline output-reference increments at special-channel boundaries: (8, 16) structural/positional; instructions 361/361; restored.
|
||||
Expanded volatility proof audit includes adjacent stfs/lfs and stfd/lfd, as well as stw/lwz; same-address store/reload pairs []. No unjustified volatile added.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv
|
||||
Fetch origin/main 9077ef8c7a1ab5bf7605f439ed621214b97999e3. Initial assembly diagnosis: (2, 2) structural/positional differences; instructions 35/35
|
||||
Remote source equals freshly built baseline; still open 99.65714%. Structural diagnosis: 35/35. Target obtains Mem2App before SaveData receiver; compare readonly receiver helper and combined heap-before-flag lifetimes, no pointer-global mutation or volatility.
|
||||
- readonly save-manager input at inline flush boundary: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- heap declaration precedes the flag update with assignment at flush: (2, 2) structural/positional; instructions 35/35; restored.
|
||||
- application heap retained across the animation initialization: (15, 29) structural/positional; instructions 36/35; restored.
|
||||
|
||||
## src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj
|
||||
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (23, 68) structural/positional differences; instructions 233/233
|
||||
Remote source equals freshly built baseline; still open 93.4721%. Structural diagnosis: 233/233; matrix-call inputs are register differences, but framebuffer width/height conversion order and widthScale lifetime change scheduling. Target keeps projection width in f29, ours keeps its quotient there; remove quotient local first.
|
||||
- use the projection quotient directly in horizontal scissor arithmetic: (36, 71) structural/positional; instructions 233/233; restored.
|
||||
- compute framebuffer horizontal conversion before vertical arithmetic: (29, 64) structural/positional; instructions 233/233; restored.
|
||||
- keep framebuffer dimensions in unsigned arithmetic-width locals: (23, 68) structural/positional; instructions 233/233; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos
|
||||
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (0, 9) structural/positional differences; instructions 19/19
|
||||
Remote source equals freshly built baseline; still open 96.57895%. Structural diagnosis: Leaf19/19, no frame/branches. Target coalesces double correction in f0 and uses coefficient-first aspect multiplication. Combine those operand choices before declaration coloring.
|
||||
- coefficient-first aspect and inline double correction product: (0, 10) structural/positional; instructions 19/19; restored.
|
||||
- reuse each calibration coefficient in its own product local: build failed e/private/bte -DNDEBUG=1 -DTARGET_RVL -ipa file -fp_contract off -lang=c -MMD -c libs/RVL_SDK/src/kpad/KPAD.c -o build/43U/src/libs/RVL_SDK/src/kpad && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d build/43U/src/libs/RVL_SDK/src/kpad/KPAD.d ### mwcceppc.exe Compiler: # File: libs\RVL_SDK\src\kpad\KPAD.c # ------------------------------------- # 360: f32 x = src->x * halfHeight; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. ; restored.
|
||||
- separate declarations then reuse calibrated scalar products: (0, 14) structural/positional; instructions 19/19; candidate kept.
|
||||
- give the shared aspect coefficient its own scalar lifetime: (0, 13) structural/positional; instructions 19/19; candidate kept.
|
||||
- Register-only last, reused-coefficient declaration search: declaration block: | f64 scaled; | f32 height; | f32 halfHeight; | f32 x; | f32 y; | f32 aspect; | start (0, 13) | improved (0, 11) | best (0, 11) after 40 builds; kept in source: | f32 aspect; | f32 height; | f32 halfHeight; | f32 x; | f32 y; | f64 scaled; |
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight
|
||||
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (0, 7) structural/positional differences; instructions 52/52
|
||||
Remote source equals freshly built baseline; still open 99.23077%. Structural diagnosis: 52/52,0 normalized differences. Base literal r4/r3 and zero/squared-height register coloring remain. Separate base and channel adjustment and compare min branch before declaration search.
|
||||
- initialize base state then apply the channel index: (4, 9) structural/positional; instructions 52/52; restored.
|
||||
- state address initialized in the leading declaration block: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
- select the limiting extent with an explicit comparison arm: (2, 9) structural/positional; instructions 52/52; restored.
|
||||
- native int channel formal with a translation-unit-only declaration guard: (0, 7) structural/positional; instructions 52/52; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon
|
||||
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (2, 35) structural/positional differences; instructions 101/101
|
||||
Remote source equals freshly built baseline; still open 97.27723%. Structural diagnosis: 101/101; raw .long floating compares inflate normalized score, but geometry math and branch targets align. Replace pairs of flattened scalar locals by meaningful Vec2 intermediates, preserving operation order.
|
||||
- group normalized acceleration components in a Vec2 local: (28, 91) structural/positional; instructions 105/101; restored.
|
||||
- group the smoothed horizon candidate in a Vec2 local: (23, 77) structural/positional; instructions 97/101; restored.
|
||||
- group normalized output axis components in a Vec2 local: (23, 78) structural/positional; instructions 103/101; restored.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD read_kpad_acc
|
||||
Fetch origin/main 2050ad7616acfcb7752e5a6da8b7f44f22c6cafd. Initial assembly diagnosis: (16, 66) structural/positional differences; instructions 400/400
|
||||
Remote source equals freshly built baseline; still open 98.15%. Structural diagnosis: 400/400; clamp/smoothing inline helper boundaries determine FP temporaries. Test parameter order and a scalar-only smoothing helper, rather than merely reordering caller vector declarations.
|
||||
Structural correction before helpers: ctxdiff also shows two opposite error/device/format branch forms at206..212; isolate these before FP temporary experiments.
|
||||
- separate error/device guards and switch the two extension formats: (15, 63) structural/positional; instructions 400/400; candidate kept.
|
||||
- keep each accepted format as a distinct switch break arm: (15, 63) structural/positional; instructions 400/400; candidate kept.
|
||||
- switch the accepted-format boolean with default return first: (22, 230) structural/positional; instructions 404/400; candidate kept.
|
||||
- single-format switch only when the primary format is absent: (12, 60) structural/positional; instructions 400/400; candidate kept.
|
||||
- reuse the smoothing magnitude local through its absolute-value branch: (63, 302) structural/positional; instructions 394/400; restored.
|
||||
- declare smoothing magnitude before signed delta then assign in original order: (7, 25) structural/positional; instructions 400/400; kept.
|
||||
- assign smoothing magnitude directly in both sign branches: (1, 1) structural/positional; instructions 400/400; kept.
|
||||
- preserve unsigned comparison in the fallback format switch: (1, 1) structural/positional; instructions 400/400; restored.
|
||||
- boolean fallback-format dispatch keeps the comparison unsigned: (12, 197) structural/positional; instructions 403/400; restored.
|
||||
- two explicit accepted-format branches share the extension block: (10, 194) structural/positional; instructions 399/400; restored.
|
||||
- unsigned SDK-format case constant in the fallback switch: (1, 1) structural/positional; instructions 400/400; restored.
|
||||
- byte-relative fallback-format switch: (10, 198) structural/positional; instructions 401/400; restored.
|
||||
- accept either extension format through a single-pass block: (10, 194) structural/positional; instructions 399/400; restored.
|
||||
- place extension acceleration in the positive accepted-format branch: (12, 197) structural/positional; instructions 399/400; restored.
|
||||
- explicit unsupported-format else returns from extension branch: (12, 197) structural/positional; instructions 399/400; restored.
|
||||
- native unsigned switch discriminant for the byte format: (1, 1) structural/positional; instructions 400/400; restored.
|
||||
read_kpad_acc best partial400/400 differs only instruction210: cmpwi r0,5 versus target cmplwi r0,5. All60 original FP differences removed by declaring magnitude before delta and explicit sign branches; separate error/device guards plus nested format switch fixed branch form. Unsigned casts, case constant, positive-if/else and single-pass accepted-format alternatives did not remove the final comparator difference. Exact-only policy: restored partial source; reproducible candidate saved /tmp/fz16r6.readacc.near.c, not committed.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD select_1obj_first
|
||||
Fetch origin/main c1183780c2b53e044f91775b29b580d306e4423e. Initial assembly diagnosis: (2, 26) structural/positional differences; instructions 109/109
|
||||
Remote source equals freshly built baseline; still open 98.348625%. Structural diagnosis: 109/109, source/target branch and frame align; register/operand differences reside in geometry scalar setup and paired candidate coordinates. Compare a reused tangent basis and scalar candidate variables before declaration search.
|
||||
- separate all seven geometry and traversal declarations from assignments: (2, 26) structural/positional; instructions 109/109; candidate kept.
|
||||
- declare candidate vectors before loading their scalar center coordinates: (2, 26) structural/positional; instructions 109/109; candidate kept.
|
||||
- treat the candidate-array boundary as a readonly object pointer: (2, 26) structural/positional; instructions 109/109; restored.
|
||||
- Register-only last, separated traversal/candidate block search: declaration block: | KPADDPDObject* object; | KPADDPDObject* end; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; | start (2, 26) | best (2, 26) after 52 builds; source restored; best order was: | KPADDPDObject* object; | KPADDPDObject* end; | f32 scale; | f32 productX; | f32 productY; | f32 offsetX; | f32 offsetY; |
|
||||
- Register-only last, separated traversal/candidate block search: declaration block: | Vec2 leftPosition; | Vec2 rightPosition; | f32 x; | f32 y; | start (2, 26) | improved (2, 24) | best (2, 24) after 16 builds; kept in source: | Vec2 leftPosition; | f32 y; | f32 x; | Vec2 rightPosition; |
|
||||
|
||||
Verified frame/extent audit (authoritative corrections to any earlier guessed frame):
|
||||
create__Q33ipl5scene11AddressEditFv: extent 0x414..0x10e4 <= next 0x10e4; source/target first instruction (('stwu', 'r1, -0x60(r1)'), ('stwu', 'r1, -0x60(r1)'))
|
||||
get_friendinfo__Q33ipl5scene11AddressEditFv: extent 0x5604..0x5754 <= next 0x5754; source/target first instruction (('stwu', 'r1, -0x420(r1)'), ('stwu', 'r1, -0x420(r1)'))
|
||||
update_friendinfo__Q33ipl5scene11AddressEditFv: extent 0x5798..0x5830 <= next 0x5830; source/target first instruction (('stwu', 'r1, -0x10(r1)'), ('stwu', 'r1, -0x10(r1)'))
|
||||
set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err: extent 0x6690..0x67bc <= next 0x67bc; source/target first instruction (('stwu', 'r1, -0x60(r1)'), ('stwu', 'r1, -0x60(r1)'))
|
||||
create__Q33ipl5scene15SDChannelSelectFv: extent 0x478..0x6c0 <= next 0x6c0; source/target first instruction (('stwu', 'r1, -0x20(r1)'), ('stwu', 'r1, -0x20(r1)'))
|
||||
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv: extent 0x14d8..0x1784 <= next 0x1784; source/target first instruction (('stwu', 'r1, -0x30(r1)'), ('stwu', 'r1, -0x30(r1)'))
|
||||
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x25a4..0x2738 <= next 0x2738; source/target first instruction (('stwu', 'r1, -0x40(r1)'), ('stwu', 'r1, -0x40(r1)'))
|
||||
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x2738..0x28d0 <= next 0x28d0; source/target first instruction (('stwu', 'r1, -0x40(r1)'), ('stwu', 'r1, -0x40(r1)'))
|
||||
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x28d0..0x2ac8 <= next 0x2ac8; source/target first instruction (('stwu', 'r1, -0x60(r1)'), ('stwu', 'r1, -0x60(r1)'))
|
||||
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl: extent 0x2ac8..0x306c <= next 0x306c; source/target first instruction (('stwu', 'r1, -0x80(r1)'), ('stwu', 'r1, -0x80(r1)'))
|
||||
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv: extent 0x31d0..0x325c <= next 0x325c; source/target first instruction (('stwu', 'r1, -0x10(r1)'), ('stwu', 'r1, -0x10(r1)'))
|
||||
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj: extent 0x5d40..0x60e4 <= next 0x60e4; source/target first instruction (('stwu', 'r1, -0xe0(r1)'), ('stwu', 'r1, -0xe0(r1)'))
|
||||
KPADGetProjectionPos: extent 0x430..0x47c <= next 0x47c; source/target first instruction (('lfs', 'f3, 0xc(r5)'), ('lfs', 'f3, 0xc(r5)'))
|
||||
KPADSetSensorHeight: extent 0x47c..0x54c <= next 0x54c; source/target first instruction (('stwu', 'r1, -0x30(r1)'), ('stwu', 'r1, -0x30(r1)'))
|
||||
calc_acc_horizon: extent 0x6e0..0x874 <= next 0x874; source/target first instruction (('stwu', 'r1, -0x30(r1)'), ('stwu', 'r1, -0x30(r1)'))
|
||||
read_kpad_acc: extent 0x998..0xfd8 <= next 0xfd8; source/target first instruction (('stwu', 'r1, -0x50(r1)'), ('stwu', 'r1, -0x50(r1)'))
|
||||
select_1obj_first: extent 0x13e8..0x159c <= next 0x159c; source/target first instruction (('stwu', 'r1, -0x20(r1)'), ('stwu', 'r1, -0x20(r1)'))
|
||||
calc_dpd_variable: extent 0x1710..0x1af8 <= next 0x1af8; source/target first instruction (('stwu', 'r1, -0x20(r1)'), ('stwu', 'r1, -0x20(r1)'))
|
||||
KPADRead: extent 0x2514..0x2c40 <= next 0x2c40; source/target first instruction (('stwu', 'r1, -0xc0(r1)'), ('stwu', 'r1, -0xc0(r1)'))
|
||||
KPADInit: extent 0x2c40..0x2f24 <= next 0x2f24; source/target first instruction (('stwu', 'r1, -0x90(r1)'), ('stwu', 'r1, -0x90(r1)'))
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable
|
||||
Fetch origin/main c1183780c2b53e044f91775b29b580d306e4423e. Initial assembly diagnosis: (14, 45) structural/positional differences; instructions 250/250
|
||||
Remote source equals freshly built baseline; still open 94.82%. Structural diagnosis: 250/250; target rotation multiplies direction components first, while ours uses tangent first; a distance-filter ternary also introduces a transient f1. Apply the explicit sign-branch lever established on read_kpad_acc before register search.
|
||||
- direction-first horizontal rotation products in positional projection: (12, 40) structural/positional; instructions 250/250; candidate kept.
|
||||
- distance-filter sign branches assign its magnitude local directly: (12, 40) structural/positional; instructions 250/250; candidate kept.
|
||||
- separate positional rotation/average declarations from assignments: (17, 41) structural/positional; instructions 250/250; candidate kept.
|
||||
- Register search after operand/sign-branch trials, block f32 magnitude;: declaration block: | f32 magnitude; | f32 dx; | f32 next; | start (17, 41) | best (17, 41) after 6 builds; source restored; best order was: | f32 magnitude; | f32 dx; | f32 next; |
|
||||
- Register search after operand/sign-branch trials, block f32 rotatedY;: declaration block: | f32 rotatedY; | f32 rotatedX; | f32 scaleX; | f32 scaleY; | start (17, 41) | improved (12, 40) | best (12, 40) after 13 builds; kept in source: | f32 rotatedX; | f32 rotatedY; | f32 scaleX; | f32 scaleY; |
|
||||
Extended PPC diagnostic decodes unsupported floating compares and paired-single save/load instructions in /tmp only; no source/target bytes or repository tools changed. It separates register differences from real load/branch scheduling:
|
||||
KPADGetProjectionPos decoded structure/register score (0, 9)
|
||||
KPADSetSensorHeight decoded structure/register score (0, 7)
|
||||
calc_acc_horizon decoded structure/register score (0, 35)
|
||||
read_kpad_acc decoded structure/register score (5, 66)
|
||||
select_1obj_first decoded structure/register score (0, 26)
|
||||
calc_dpd_variable decoded structure/register score (13, 45)
|
||||
KPADRead decoded structure/register score (11, 89)
|
||||
KPADInit decoded structure/register score (6, 81)
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADRead
|
||||
Fetch origin/main ff90063ef9623d776c62711aeb89c7a225f7a3b5. Initial assembly diagnosis: (11, 89) structural/positional differences; instructions 459/459
|
||||
Remote source equals freshly built baseline; still open 97.52723%. Structural diagnosis: 459/459,0xc0 frame. Target copyOutput computes available*0x84 then subtracts0x84; ours computes (available-1)*0x84. Correct pointer-expression grouping and computation placement before register search.
|
||||
- form the output endpoint before subtracting one status: (46, 284) structural/positional; instructions 459/459; candidate kept.
|
||||
- initialize the output endpoint then decrement as a separate pointer operation: (46, 284) structural/positional; instructions 459/459; candidate kept.
|
||||
- copy older samples using a one-past cursor and the previous status slot: (75, 284) structural/positional; instructions 459/459; candidate kept.
|
||||
- prepare count and output endpoint before calculating the ring start: (40, 282) structural/positional; instructions 459/459; candidate kept.
|
||||
- signed available count matches the public signed return value: (11, 89) structural/positional; instructions 459/459; candidate kept.
|
||||
- signed count endpoint followed by status-pointer subtraction: (46, 284) structural/positional; instructions 459/459; restored.
|
||||
KPADRead structural trials: pointer-first endpoint forms computed available*0x84 as desired but increased source frame0xc0 ->0xd0 and shifted callee-save coloring; hoisting endpoint/count and using signed available did not cure it. Original0xc0 frame/459 instructions restored; register-only search deferred because cursor scheduling remains structural.
|
||||
|
||||
## libs/RVL_SDK/src/kpad/KPAD KPADInit
|
||||
Fetch origin/main 0d9b03878228a086954abc59b964164b0f7db5f2. Initial assembly diagnosis: (9, 81) structural/positional differences; instructions 185/185
|
||||
Remote source equals freshly built baseline; still open 96.51351%. Structural diagnosis: 185/185,0x90 frame; target constructs the40000 repeat delay earlier than ours, plus saved FP coloring. Name the real default delay, then compare matrix base and squared-diagonal temporaries before declaration search.
|
||||
- name and initialize the default repeat delay before controller setup: (9, 81) structural/positional; instructions 185/185; candidate kept.
|
||||
- initialize the first matrix element through the shared matrix pointer: (31, 110) structural/positional; instructions 185/185; restored.
|
||||
- name the sensor-diagonal square before the square-root boundary: (9, 81) structural/positional; instructions 185/185; candidate kept.
|
||||
- Register-only last on sixteen real scalar/pointer declarations with decoded PPC comparisons: declaration block: | KPADInside* kpad; | f32 distanceValue; | f32 sensorDistance; | f32 diagonalSquared; | f32 rotationElement; | f32 referenceWidth; | f32 referenceHeight; | f32 objectInterval; | f32 zero; | f32 degreesToRadians; | f32 one; | f32* matrix; | u32 i; | s32 chan; | BOOL enabled; | u16 repeatDelay; | start (6, 81) | improved (6, 70) | improved (6, 66) | improved (6, 62) | improved (6, 54) | improved (6, 51) | best (6, 51) after 388 builds; kept in source: | f32 referenceHeight; | f32 objectInterval; | f32 sensorDistance; | f32 diagonalSquared; | f32 rotationElement; | f32 referenceWidth; | KPADInside* kpad; | f32 distanceValue; | f32 zero; | f32 degreesToRadians; | f32 one; | u32 i; | f32* matrix; | s32 chan; | BOOL enabled; | u16 repeatDelay; |
|
||||
- share the named unit value with sensitivity initialization: (8, 51) structural/positional; instructions 185/185; candidate kept.
|
||||
KPADInit declaration search improved81 ->51 differences after388 builds, but early repeat-constant/global-base scheduling remained6 decoded structural differences. Sharing a named unit scalar with sensitivity initialization did not improve it. Partial source restored; source/target retain0x90 frame and185 instructions.
|
||||
|
||||
Pre-full-gate completeness audit: freshly regenerated report lists19 remaining non-matching functions; every one has >=3 successfully built distinct source trials in this HIGH round; failed build excluded.86 successful function trials and531 declaration-search builds logged; all non-exact candidates restored.
|
||||
|
||||
## Round6 final full clean gate and remaining-function audit
|
||||
Full non-quick gate over all3 units PASS; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; all pools identical;0 regressions,0 forbidden additions,0 readability warnings. Owned data100%, no symbol name/extent edits. Remaining function ELF extents end before/equal next symbol. Stack adjacent store/reload proof pairs []; no definition-level volatile justified.
|
||||
src/scene/address/iplAddressEdit: fresh exact 90 ->90/94; code 23044 ->23044/27112; data 2560 ->2560/2560.
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: fresh exact 121 ->122/129; code 28728 ->29412/33828; data 2960 ->2960/2960.
|
||||
libs/RVL_SDK/src/kpad/KPAD: fresh exact 21 ->21/29; code 6756 ->6756/13056; data 8032 ->8032/8032.
|
||||
One exact SD title-result match committed160e985a this round. All unaccepted source/header experiments restored; the exact SD time-gate/compaction change and attempts log retained. None of the remaining functions is claimed complete. Every remaining function has at least3 successfully built distinct source trials this HIGH round, failed builds excluded. Uncertainty remains on unsupported NWC24 error defaults and compiler register/load scheduling; safe message initialization retained. All per-function fetches used the shared git lock; remote owned source equals fresh baseline0c06b01c throughout. Extents/data names untouched; no duplicate owned remote match.
|
||||
- src/scene/address/iplAddressEdit create__Q33ipl5scene11AddressEditFv 97.44634%; 6 successful distinct source trials; balloon construction null-guard/temporary boundary and retained name-pointer lifetimes; same820 instructions.
|
||||
- src/scene/address/iplAddressEdit get_friendinfo__Q33ipl5scene11AddressEditFv 88.03571%; 3 successful distinct source trials; text-array addresses folded until after pane lookup; target retains pointers across lookup,82/84.
|
||||
- src/scene/address/iplAddressEdit update_friendinfo__Q33ipl5scene11AddressEditFv 99.42105%; 3 successful distinct source trials; wcsncpy name-source versus destination address evaluation order,38/38; prior memcpy diagnosis corrected by resolved relocation.
|
||||
- src/scene/address/iplAddressEdit set_err_msg__Q33ipl5scene11AddressEditFPwUl8NWC24Err 98.666664%; 3 successful distinct source trials; extra safe default initialization; target appears to leave messageId undefined for unhandled error,76/75.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect create__Q33ipl5scene15SDChannelSelectFv 97.73972%; 3 successful distinct source trials; BS2 polling body omits separate manager reload,145/146; loop/inline getter boundaries remain.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.81188%; 4 successful distinct source trials; threshold load hoisted before count store,101/101.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.833336%; 3 successful distinct source trials; threshold load hoisted before count store,102/102.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.29365%; 3 successful distinct source trials; threshold/count schedule plus loop coloring,126/126.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl 97.55125%; 3 successful distinct source trials; four repeated threshold/count schedules,361/361.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv 99.65714%; 3 successful distinct source trials; save manager/heap argument load order,35/35.
|
||||
- src/scene/sdChannelSelect/iplSDChannelSelect setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj 93.4721%; 3 successful distinct source trials; matrix/scissor floating operand scheduling and temporaries,233/233.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADGetProjectionPos 96.57895%; 3 successful distinct source trials; floating coefficient registers and multiply operands,19/19; reused-coefficient declaration search best11 differences versus original9; all partial variants restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADSetSensorHeight 99.23077%; 4 successful distinct source trials; base-array register r4 versusr3 plus zero/squared-height float registers,52/52; native int index views unchanged.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_acc_horizon 97.27723%; 3 successful distinct source trials; magnitude/interpolation and circle float-register lifetimes,101/101; Vec2 grouping produced97/103/105 instructions versus target101 and was restored; original35 FP differences remain.
|
||||
- libs/RVL_SDK/src/kpad/KPAD read_kpad_acc 98.15%; 16 successful distinct source trials; original branch/FP-helper differences remain; best structural/helper reconstruction400/400 had only cmpwi versus cmplwi at fallback-format comparison, restored pending exactness.
|
||||
- libs/RVL_SDK/src/kpad/KPAD select_1obj_first 98.348625%; 3 successful distinct source trials; geometry floating lifetimes and paired stores,109/109; separated declaration search best24 versus original26 differences, restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD calc_dpd_variable 94.82%; 3 successful distinct source trials; smoothing/projected geometry floating scheduling,250/250; direction-first operand variation best40 versus original45 differences, restored.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADRead 97.52723%; 6 successful distinct source trials; sample loop/polling temporaries and branch scheduling,459/459.
|
||||
- libs/RVL_SDK/src/kpad/KPAD KPADInit 96.51351%; 4 successful distinct source trials; controller/ring initialization and floating scheduling,185/185; sixteen-local search best51 versus original81 differences after388 builds, restored.
|
||||
Final authority lines:
|
||||
```
|
||||
[src/scene/address/iplAddressEdit] instruction-exact functions: 90/94
|
||||
[src/scene/sdChannelSelect/iplSDChannelSelect] instruction-exact functions: 122/129
|
||||
[libs/RVL_SDK/src/kpad/KPAD] instruction-exact functions: 21/29
|
||||
GATE PASS
|
||||
```
|
||||
|
||||
3884
tools/decomp-assist/fz20.attempts.md
Normal file
3884
tools/decomp-assist/fz20.attempts.md
Normal file
File diff suppressed because it is too large
Load Diff
1209
tools/decomp-assist/fz21.attempts.md
Normal file
1209
tools/decomp-assist/fz21.attempts.md
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
99
tools/decomp-assist/linkgap-audio.attempts.md
Normal file
99
tools/decomp-assist/linkgap-audio.attempts.md
Normal file
@@ -0,0 +1,99 @@
|
||||
# linkgap-audio: eggAudioExpMgr — Equivalent-but-unlinkable analysis
|
||||
|
||||
Branch: agent/w1005/linkgap-audio. Unit stays **Equivalent**.
|
||||
|
||||
## Status
|
||||
|
||||
Per-symbol match is complete: all 8 .text fns + the 0x78 vtable match orig
|
||||
(fuzzy 100.0 code+data, every fn individually 100). The .o emit set now
|
||||
matches orig's exactly (see gates below).
|
||||
|
||||
**Remaining linker-visible diff: secondary-vt thunk emit order.**
|
||||
|
||||
- orig `.text` tail: `[@52@__dt__SimpleAudioMgrWithFx @+1fc][@52@calc__SimpleAudioMgr @+204]`
|
||||
- mine: `[@52@calc @+1fc][@52@__dt__ @+204]` (swapped)
|
||||
|
||||
Both thunks are byte-identical bodies, so objdiff fn-level fuzzy is 100 for
|
||||
each — but the .o's symbol order carries into the linked DOL, so flipping
|
||||
Matching fails the DOL hash. This is the *only* blocker.
|
||||
|
||||
## Emit-set gates (kept)
|
||||
|
||||
`EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS` is defined at the top of
|
||||
eggAudioExpMgr.cpp and gates these headers (TU-local: other TUs are
|
||||
unaffected since the macro is only defined in this .cpp):
|
||||
|
||||
- `libs/EGG/include/egg/core/eggAudioArcPlayerMgr.h` — 9 ArcPlayer virtuals
|
||||
(openArchive/openDvd/openNand/setupMemory/close/loadGroup/startSound/
|
||||
prepareSound/holdSound families) -> non-inline decls for this TU.
|
||||
- `libs/EGG/include/egg/core/eggAudioHeapMgr.h` — SoundHeapMgr
|
||||
`loadState`/`getCurrentLevel` -> decls.
|
||||
- `libs/NW4R/include/nw4r/ut/Lock.h` — `detail::AutoLock<OSMutex>` ct/dt ->
|
||||
decls.
|
||||
|
||||
Without the gates MWCC weak-emits 10 extra inline fns (ArcPlayer
|
||||
hold/prepare/startSound x9 + NonCopyable/AutoLock/SoundHeap helpers) that
|
||||
orig's .o does not contain. With gates the emit set is byte-for-byte orig:
|
||||
same 8 .text syms at the same offsets/sizes + `__vt__` at .data+0x0/0x78.
|
||||
|
||||
Residual cosmetic diff (does not affect the link): orig's
|
||||
`__ct__AudioFxMgrArg` and `SaveState` are STB_GLOBAL; mine STB_WEAK.
|
||||
Both dedup/resolve identically at link.
|
||||
|
||||
## Thunk-order mechanism (decoded)
|
||||
|
||||
Surveyed every orig .o with >=2 `@N@` adjustor thunks; my compiler
|
||||
reproduces orig's order in ALL of them (iplSound, iplGCWindow,
|
||||
iplMemoryCard, MyTiBg, tiCellPhone, iplBoard, ...) EXCEPT this unit.
|
||||
|
||||
Best-fit model for orig's ordering: thunks emit in the order the
|
||||
*overriding virtuals are declared in the most-derived class*, with
|
||||
thunks for inherited overrides emitted after the class's own declared
|
||||
virtuals:
|
||||
|
||||
- SimpleAudioMgrWithFx declares `[~dtor, initialize]` -> own dtor thunk
|
||||
first, then the inherited `SimpleAudioMgr::calc` thunk -> [dt][calc] = orig
|
||||
- ipl::snd::System declares `calc` before `~System` -> [calc][dt] = orig
|
||||
- iplMemoryCard `[onTrig,onLeft,onPoint,~dt]` -> that order = orig
|
||||
(NOT .text def order, which is [onPoint,onLeft,onTrig])
|
||||
- tiCellPhone `[~dt,updateInput,calc,draw,init]` = orig
|
||||
|
||||
My build instead emits thunks in *reverse secondary-vt slot order*
|
||||
(the .rela.data stream is written backward — observable on every unit;
|
||||
extraction .os sort relocs so orig's real write order is unknowable).
|
||||
The two orders coincide for every surveyed unit except this one — it is
|
||||
the only unit where a derived-declared dtor and an ancestor-declared
|
||||
override (`SimpleAudioMgr::calc`, declared in the base) disagree.
|
||||
|
||||
## What flips it (and why it was vetoed)
|
||||
|
||||
Adding ANY second polymorphic class whose vt is built in this TU and
|
||||
*shares* the secondary base flips the pair to orig's [dt][calc]:
|
||||
verified with `class Sample : public SimpleAudioMgrWithFx` (emit
|
||||
`[dt_WithFx][calc][dt_Sample]` — the parent's set comes out in forward
|
||||
slot order once WithFx's vt is built as a parent). An unrelated
|
||||
polymorphic class (no shared base) does NOT flip it; a declared-but-
|
||||
never-defined derived class does NOT flip it (vt never built).
|
||||
|
||||
Mechanistically: orig's TU very likely caused WithFx's vt to be built
|
||||
*as a parent* (a second derived class whose vt anchored elsewhere —
|
||||
e.g. EGG's real `ipl::snd::System`-style class compiled in another TU
|
||||
is the only known retail derivee), which emits the parent's thunks in
|
||||
forward slot order. Any such class is invented here -> owner veto
|
||||
(not in retail symbols). Orig's .o emits exactly one vtable, so no
|
||||
second polymorphic class was ODR-emitted in the real TU either — the
|
||||
trigger lived in code we cannot see (or is a compiler-version artifact).
|
||||
|
||||
## Tried and rejected (all still [calc][dt])
|
||||
|
||||
- dtor declared after `initialize` in the class decl
|
||||
- dtor DEFINITION moved before/after ctor in the .cpp
|
||||
- unrelated polymorphic class (no shared secondary base)
|
||||
- derived class declared but never defined (no vt build)
|
||||
|
||||
## What would close it
|
||||
|
||||
A legitimate source construct that causes a second vt-build sharing
|
||||
the ArcPlayer secondary vtable in this TU, or a linker-level symbol
|
||||
ordering mechanism (none exists: symbols.txt is label-only, linker lays
|
||||
out .text in .o symbol order). Until then: Equivalent.
|
||||
89
tools/decomp-assist/linkgap.attempts.md
Normal file
89
tools/decomp-assist/linkgap.attempts.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# linkgap leaf — iplChannelTitle + eggAudioExpMgr
|
||||
|
||||
## iplChannelTitle — emission restored, 3144 is provably impossible
|
||||
|
||||
Orig .o `.data` = 0x950; last symbol ends 0x87c; bytes 0x87c-0x950 are zeros
|
||||
in both the extraction .o and the DOL (verified at DOL file off 0x31F504).
|
||||
The 0xd4 tail = 5 weak-emitted vtables that lost link dedup:
|
||||
|
||||
| off | size | symbol |
|
||||
|-------|------|-------------------------------|
|
||||
| 0x87c | 92 | __vt__ipl::gui::PaneManager |
|
||||
| 0x8d8 | 24 | __vt__gui::EventHandler |
|
||||
| 0x8f0 | 32 | __vt__gui::Interface |
|
||||
| 0x910 | 32 | __vt__ipl::nand::LayoutFile |
|
||||
| 0x930 | 32 | __vt__ipl::nand::LangFile |
|
||||
|
||||
Emit rule used (old agent/w0929/linkgap scheme): a class weak-emits its
|
||||
vtable in a TU that ODR-uses it (construction site; elided vptr stores
|
||||
count) when every virtual DECLARED IN THAT CLASS is inline — inherited
|
||||
non-inline virtuals don't block (LayoutFile emits despite non-inline
|
||||
inherited virtuals because its own ~LayoutFile is inline here).
|
||||
|
||||
Source mechanism, all real decls, no invented names:
|
||||
- `#define IPL_CHANNEL_TITLE_NOVTABLE` at cpp top (undef after includes).
|
||||
- GUIManager.h: ~Interface -> `~Interface(){}` for CT (gate); EventHandler
|
||||
loses `__declspec(novtable)` for CT.
|
||||
- iplGuiManager.h: ~PaneManager -> `~PaneManager(){}` for CT.
|
||||
- iplNand.h: LangFile's five virtuals gated to inline dummies for CT;
|
||||
~LayoutFile -> `~LayoutFile(){}` for CT.
|
||||
- `#pragma dont_instantiate ipl::math::HermiteIntp<float>` keeps
|
||||
HermiteIntp's vtable UND (orig also UNDs it).
|
||||
|
||||
Result: all 5 emit STB_WEAK at the exact orig offsets, .data=0x950, the
|
||||
raw .data bytes are byte-identical to orig's (all-zero tail), and the
|
||||
full DOL is byte-identical (sha1 26116613f624061ba99c8d1a299aaa6efa85670d)
|
||||
with the unit flipped Matching.
|
||||
|
||||
### Why matched_data cannot stay 3144 — objdiff internals, proven
|
||||
|
||||
`matched_data` sums sizes of sections at fuzzy==100. `.data` fuzzy is
|
||||
computed (objdiff-core diff/data.rs `diff_data_section`) as:
|
||||
|
||||
- left_max/right_max = max end offset of scored symbols in the section
|
||||
(symbols with size>0, not Section-kind, not Hidden).
|
||||
- Compare section bytes over 0..max (patience diff) AND pair relocations
|
||||
in the same range; if every left reloc matches, score =
|
||||
max(symbol-name-match%, byte-diff%). Otherwise symbol-name-match only.
|
||||
- Symbol-name-match = sum(size*match%)/sum(size) over left symbols.
|
||||
|
||||
Any symbol'd object emitted at 0x87c+ therefore scores <100 regardless
|
||||
of content, because orig's extraction .o has neither a symbol nor a
|
||||
reloc there (dedup'd weak emits are invisible in the DOL, so the
|
||||
extractor dropped them — rela.data max offset is 0x878). Measured:
|
||||
|
||||
- 0 emits (.data=0x87c): .data fuzzy 100.0 -> matched_data 3144
|
||||
- 5 emits (.data=0x950): .data fuzzy 95.35 -> matched_data 760
|
||||
|
||||
The only objdiff-invisible emit is a Hidden symbol (objdiff marks
|
||||
ELF Linkage-scope/STB_LOCAL symbols Hidden). But a local emit cannot
|
||||
lose dedup, so its content (vtable pointers) would be written into the
|
||||
DOL -> nonzero tail -> hash fails. A local *zero-content* object would
|
||||
satisfy both, but that is an invented score-only pad — not used.
|
||||
|
||||
RESOLUTION: name orig's real tail objects in config/43U/symbols.txt.
|
||||
The orig .o is rebuilt by `dtk dol split` from symbols.txt; the tail
|
||||
region had no entries, so objdiff's left_max stopped at 0x87c while my
|
||||
emitted vtables pushed right_max to 0x950 -> byte-path Insert penalty
|
||||
-> .data 95.35 / matched_data 760. Adding the 5 real objects
|
||||
(lbl_8164EFE4/+0x5C, lbl_8164F040/+0x18, lbl_8164F058/+0x20,
|
||||
lbl_8164F078/+0x20, lbl_8164F098/+0x20 — the dedup'd vtable emits)
|
||||
extends left_max to 0x950: the byte path then compares the full
|
||||
2384-byte range (zeros vs zeros) -> .data fuzzy 100 -> matched_data
|
||||
3144, all 95 fns 100, every section 100, DOL sha1
|
||||
26116613f624061ba99c8d1a299aaa6efa85670d byte-identical.
|
||||
|
||||
Also disproven this session: (a) the "one object per bounded run" was
|
||||
symbols.txt label granularity, not real .o granularity — plain literals
|
||||
are the correct source form (orig emits a single `addi r7, r31, off`
|
||||
per ref; any named-table ref `scX + N` forces a shared-base hoist =
|
||||
2-insn addressing, verified by capstone); (b) `symbol_mappings` in
|
||||
objdiff.json is ignored by objdiff-cli 3.4.5 report (issue #279), and
|
||||
lbl_* names can't be used in source anyway; (c)
|
||||
SymbolFlag::Ignored is mips-only — no way to hide emitted symbols from
|
||||
scoring.
|
||||
|
||||
## eggAudioExpMgr — see linkgap-audio branch notes
|
||||
|
||||
(Sample class deleted; secondary-vt [dtor][calc] thunk-order handled on
|
||||
agent/w1005/linkgap-audio.)
|
||||
1045
tools/decomp-assist/rt7.attempts.md
Normal file
1045
tools/decomp-assist/rt7.attempts.md
Normal file
File diff suppressed because it is too large
Load Diff
2238
tools/decomp-assist/rt8.attempts.md
Normal file
2238
tools/decomp-assist/rt8.attempts.md
Normal file
File diff suppressed because it is too large
Load Diff
46
tools/decomp-assist/rt8.high.final-gate.txt
Normal file
46
tools/decomp-assist/rt8.high.final-gate.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/scene/memoryCard/iplMemoryCardManager] pool: IDENTICAL
|
||||
[src/scene/memoryCard/iplMemoryCardManager] objdiff: code 2572/5396 data None/None functions 18/26 fuzzy 97.8836 linked code 0
|
||||
[src/scene/memoryCard/iplMemoryCardManager] instruction-exact functions: 18/26
|
||||
[src/scene/memoryCard/iplMemoryCardManager] section .text size 5396 match 97.88362
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: isMoveEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl 99.830505
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: isCopyEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl 99.830505
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs 92.30769
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: update_file_array__Q33ipl5scene17MemoryCardManagerFUc 99.72222
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl 87.55
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: getComment__Q33ipl5scene17MemoryCardManagerFUcsi 98.94309
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: create_banner__Q33ipl5scene17MemoryCardManagerFUcs 90.42453
|
||||
[src/scene/memoryCard/iplMemoryCardManager] below 100: getBlocks__Q33ipl5scene17MemoryCardManagerFUcs 92.0
|
||||
[src/scene/memoryCard/iplMemoryCardManager] baseline: code 2572/5396 data None functions 18 fuzzy 97.8836
|
||||
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
|
||||
[src/scene/setting/iplRakuRakuThread] objdiff: code 2168/2168 data 456/456 functions 14/14 fuzzy 100.0000 linked code 0
|
||||
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 14/14
|
||||
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
|
||||
[src/keyboard/tiCandidateBox] pool: IDENTICAL
|
||||
[src/keyboard/tiCandidateBox] objdiff: code 19988/24000 data 4652/4652 functions 109/112 fuzzy 99.4395 linked code 0
|
||||
[src/keyboard/tiCandidateBox] instruction-exact functions: 108/112
|
||||
[src/keyboard/tiCandidateBox] section .ctors size 4 match 100.0
|
||||
[src/keyboard/tiCandidateBox] section .data size 3488 match 100.0
|
||||
[src/keyboard/tiCandidateBox] section .rodata size 1048 match 100.0
|
||||
[src/keyboard/tiCandidateBox] section .sdata size 32 match 100.0
|
||||
[src/keyboard/tiCandidateBox] section .sdata2 size 80 match 100.0
|
||||
[src/keyboard/tiCandidateBox] section .text size 24000 match 99.4395
|
||||
[src/keyboard/tiCandidateBox] below 100: create__Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator 92.71023
|
||||
[src/keyboard/tiCandidateBox] below 100: createAnmPane___Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator 96.56481
|
||||
[src/keyboard/tiCandidateBox] below 100: CalcPaneLocate___Q39textinput12candidatebox10UITextAreaFv 99.873566
|
||||
[src/keyboard/tiCandidateBox] baseline: code 19988/24000 data 4652 functions 109 fuzzy 99.4395
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 90.71801 -> 90.74859
|
||||
global fuzzy_match_percent: 99.57510 -> 99.57892
|
||||
global complete_code_percent: 71.01273 -> 71.01273
|
||||
global matched_data_percent: 99.36639 -> 99.36639
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
|
||||
GATE PASS
|
||||
21
tools/decomp-assist/rt8.high.raku13-gate.txt
Normal file
21
tools/decomp-assist/rt8.high.raku13-gate.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
|
||||
[src/scene/setting/iplRakuRakuThread] objdiff: code 1636/2168 data 456/456 functions 13/14 fuzzy 97.7860 linked code 0
|
||||
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 13/14
|
||||
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 97.78598
|
||||
[src/scene/setting/iplRakuRakuThread] below 100: finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi 90.97744
|
||||
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 90.71801 -> 90.73083
|
||||
global fuzzy_match_percent: 99.57510 -> 99.57732
|
||||
global complete_code_percent: 71.01273 -> 71.01273
|
||||
global matched_data_percent: 99.36639 -> 99.36639
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
|
||||
GATE PASS
|
||||
20
tools/decomp-assist/rt8.high.raku14-gate.txt
Normal file
20
tools/decomp-assist/rt8.high.raku14-gate.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
full build: ok
|
||||
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
|
||||
[src/scene/setting/iplRakuRakuThread] objdiff: code 2168/2168 data 456/456 functions 14/14 fuzzy 100.0000 linked code 0
|
||||
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 14/14
|
||||
[src/scene/setting/iplRakuRakuThread] section .bss size 296 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .data size 136 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sbss size 16 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .sdata size 8 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] section .text size 2168 match 100.0
|
||||
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
|
||||
regressions vs baseline: 0
|
||||
global matched_code_percent: 90.71801 -> 90.74859
|
||||
global fuzzy_match_percent: 99.57510 -> 99.57892
|
||||
global complete_code_percent: 71.01273 -> 71.01273
|
||||
global matched_data_percent: 99.36639 -> 99.36639
|
||||
forbidden patterns added (net, per file): 0
|
||||
readability warnings (net, per file; must be 0 in the final result): 0
|
||||
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
|
||||
GATE PASS
|
||||
34
tools/decomp-assist/rt8.high.report.md
Normal file
34
tools/decomp-assist/rt8.high.report.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# rt8 HIGH report
|
||||
|
||||
Final full gate: GATE PASS. Full 43U build passed, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d, zero regressions and zero forbidden/readability additions. Final gate output is rt8.high.final-gate.txt.
|
||||
|
||||
Before -> after:
|
||||
- MemoryCardManager instruction-exact18->18, objdiff code2572->2572/5396, data absent.
|
||||
- RakuRakuThread instruction-exact12->14, objdiff code1252->2168/2168, data456->456/456.
|
||||
- tiCandidateBox gate instruction-exact108->108, objdiff exact109->109, code19988->19988/24000, data4652->4652/4652.
|
||||
|
||||
Remaining functions:
|
||||
- isMoveEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl | 99.830505% | two commuted address-add operands
|
||||
- isCopyEnable__Q33ipl5scene17MemoryCardManagerFUcUlPl | 99.830505% | two commuted address-add operands
|
||||
- isBannerEnable__Q33ipl5scene17MemoryCardManagerFUcs | 92.30769% | epilogue setup scheduled before flag load
|
||||
- update_file_array__Q33ipl5scene17MemoryCardManagerFUc | 99.72222% | four command/address register substitutions
|
||||
- _create_icon__Q33ipl5scene17MemoryCardManagerFUcsl | 87.55% | texture-base lifetimes, address operands and register allocation
|
||||
- getComment__Q33ipl5scene17MemoryCardManagerFUcsi | 98.94309% | comment/trim pointer register allocation
|
||||
- create_banner__Q33ipl5scene17MemoryCardManagerFUcs | 90.42453% | render address lifetimes and register allocation
|
||||
- getBlocks__Q33ipl5scene17MemoryCardManagerFUcs | 92.0% | epilogue setup scheduled before size load
|
||||
- create__Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | 92.71023% | inlined initialization loop and pane-name lifetimes
|
||||
- createAnmPane___Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | 96.56481% | descriptor reloads and constructor register allocation
|
||||
- CalcPaneLocate___Q39textinput12candidatebox10UITextAreaFv | 99.873566% | eleven forward-width f2/f3 substitutions
|
||||
|
||||
Matched this round:
|
||||
- start__Q33ipl5scene14RakuRakuThreadFv: separate progress and configuration objects restore compiler BSS pooling,96/96 instructions,diffs0.
|
||||
- finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi: structured finish guard and typed inline privacy copy restore133/133 instructions,diffs0.
|
||||
|
||||
Data proof: previous F4-byte sRakuStatus bundled12-byte progress with adjacent232-byte configuration. Target callback copy/clear and result/clear API arguments prove separate C/E8 objects at unchanged810BDDE0/810BDDEC. Combined byte ownership and BSS section0x128 remain unchanged. Both functions and all data now match fully.
|
||||
|
||||
Commits: d408dadb,14b52bf2.
|
||||
Retained implementation files: src/scene/setting/iplRakuRakuThread.cpp, config/43U/symbols.txt.
|
||||
Verification files: rt8.attempts.md,rt8.high.raku13-gate.txt,rt8.high.raku14-gate.txt,rt8.high.final-gate.txt.
|
||||
|
||||
Measurement caveat: gate reports candidatebox108/112 while objdiff reports109/112. onGUIEvent raw1800bytes are identical; odiff treats a condition-register operand as a branch target and subtracts different function starts. Tools were not changed.
|
||||
All remaining functions have at least three distinct compiled HIGH attempts recorded in rt8.attempts.md.
|
||||
Reference in New Issue
Block a user