Compare commits

..

112 Commits

Author SHA1 Message Date
Devin AI
ce5c0fa3c0 mcard2 round 2: normalized-diff verification of all sub-100 fns
Evidence-only pass: every sub-100 fn in iplMemoryCardManager +
iplCardSequence verified instruction-identical modulo regs or
documented regroup/scheduler ties (restgpr-addi placement, extsh
s16-marshal proof boundary, rlwimi in-place vs copy-then-insert,
member-chain addressing regroup). Failed variants recorded:
cell row-ptr (2), iconOffsets array-ptr, nextIcon index local.

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 16:43:29 +00:00
Devin AI
5bd429bb96 mslmisc: mcard2 rotation — sCardSlotName rename + iconFmt array-index arm
- symbols.txt: lbl_81696CF8 -> sCardSlotName__Q23ipl10memorycard
- loadCardFileIcons case-0: iconFmt[count] = iconFmt[count-1] (matches
  orig's arr[k-1]->arr[k] copy semantics; fn 508->507, fuzzy +0.02)
- attempts.md: full mcard2 tie-family evidence (add operand-order,
  callee-window rotations, extsh per-use marshal, addressing regroup)

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 16:43:29 +00:00
Devin AI
08c817a452 mslmisc: revert linkgap-owned files (iplChannelTitle.cpp, iplInterporation.h)
Both are owned by the linkgap worker right now — reverting to avoid a
semantic conflict. sdChannelTitle's HermiteIntp<f32>::get re-emits weak
until the linkgap gate lands on main; RuntimeTypeInfo.h gate kept
(IPL_SD_CHANNEL_TITLE_CPP only affects this TU).

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 16:43:29 +00:00
Devin AI
99f32d7246 mslmisc: HermiteIntp weak-UND parity + DynamicCast gate + global array binding
- iplChannelTitle.cpp: out-of-line HermiteIntp<f32>::get (orig emission site)
- iplInterporation.h: get() declared-only under IPL_CHANNEL_TITLE_NOVTABLE
- iplSDChannelTitle.cpp: narrow gate scope (iplInterporation.h only, gui vts
  still emitted like orig), DynamicCast UND, extern const arrays
- RuntimeTypeInfo.h: IPL_SD_CHANNEL_TITLE_CPP joins the declared-only gate
- attempts.md: Manager-vt emission artifact + flushSaveBeforeExit base-reg tie

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 16:43:29 +00:00
Devin AI
9e17cf9dd1 mslmisc: decode enqueue*Notice real signatures (u64/ptr args, MWCC aligned-pair marshal)
The r4 marshal anomaly was MWCC u64 argument marshaling: a u64 arg lands only
in aligned register pairs (r5:r6 for a member fn), so r4 is never materialized.

Decoded from orig def bodies (which arg regs feed the command stores) + callers:
- enqueueChannelNotice/enqueueStateNotice: (u64 titleId, u32 value/state)
- enqueueMoveNotice/enqueueDeleteNotice: (u64 titleId)
- enqueueErrorNotice: (ESTitleId**, ESTitleId**)
- enqueueCommandNotice: (ESTitleId**, ESTitleId**, ESTitleId**)

Fixed decls, defs, symbols.txt mangles, and sdChannelTitle call sites — all
defs and callers now instruction-identical. Extended the header's
per-TU access gate with IPL_SD_CHANNEL_MEMORY_CPP and deleted the five
extern "C" address stubs in iplSDMemory.cpp in favor of real member calls.

sdChannelTitle fuzzy 99.98883 (+648B). Both units stay NonMatching:
flushSaveBeforeExit eval-order tie, ConstructOpAnalyzeGLGR interleave window,
splitter extent artifacts documented in tools/decomp-assist/mslmisc.attempts.md.

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-02 16:43:29 +00:00
coah
5518cb16fd match(NWC24MsgSubject 9/12, NWC24DateParser 6/8) (fz7h) (worker 5c09b5ac) (#830) 2026-10-02 11:21:02 -05:00
coah
0c06b01c8d Restore memo manager animation vtable and destructor emission for linking (#829) 2026-10-02 11:19:48 -05:00
coah
adc15fdf6f Link matched FAT directory-entry iterator (#828) 2026-10-02 11:17:41 -05:00
coah
dea64a8c9c data(tiPcKeyboard data 100%) (fz21b) (worker c70a72a8) (#827) 2026-10-02 11:10:50 -05:00
coah
3cde45682d match(pf_entry_iterator 16/16) (fz3i) (worker 03d4f3a7) (#826) 2026-10-02 11:04:54 -05:00
coah
ae7cf34cab match(iplSDChannelSelect 121/129) (fz16d) (worker df276bb6) (#825) 2026-10-02 11:03:03 -05:00
coah
91cc177cb7 ci: stop the separate README progress commit (#824)
Landings now write the README progress table inside their own commit,
so the progress job only rebuilds and publishes the numbers to the job
summary instead of pushing a second docs commit to main.
2026-10-02 10:51:22 -05:00
github-actions[bot]
ecee6f01e4 docs: update progress [skip ci] 2026-10-02 15:50:37 +00:00
coah
28d3333887 Link matched JPEG resolution-change routines (#823) 2026-10-02 10:49:57 -05:00
github-actions[bot]
2119935c1d docs: update progress [skip ci] 2026-10-02 15:48:02 +00:00
coah
c7896c3802 match(ATERM 15/26) (fz20) (worker 4adbcdd4) (#822) 2026-10-02 10:46:43 -05:00
github-actions[bot]
68c4c9aeac docs: update progress [skip ci] 2026-10-02 15:45:30 +00:00
coah
1b942565f7 match(Texture_MCUtoY8U8V8 11/13) (fz15e) (worker 2e0b96a1) (#821) 2026-10-02 10:44:28 -05:00
github-actions[bot]
a9705fa1a3 docs: update progress [skip ci] 2026-10-02 15:43:50 +00:00
coah
e1f0ef93a5 match(BS2Update 9/10) (fz1f) (worker 8d7decce) (#820) 2026-10-02 10:42:48 -05:00
github-actions[bot]
adcd8ca586 docs: update progress [skip ci] 2026-10-02 15:40:05 +00:00
coah
76d72f06ce match(idct_resolution_change_var 6/6) (fz3h) (worker ac1e42c9) (#819) 2026-10-02 10:39:11 -05:00
github-actions[bot]
b0474b6eac docs: update progress [skip ci] 2026-10-02 15:38:42 +00:00
coah
9ce28d272f match(KPAD 21/29) (fz16c) (worker a1ca8f8d) (#818) 2026-10-02 10:37:46 -05:00
github-actions[bot]
771208ab77 docs: update progress [skip ci] 2026-10-02 15:10:45 +00:00
coah
cee13c5a0b Correct SD notice APIs to accept aligned 64-bit title IDs (#817) 2026-10-02 10:10:09 -05:00
github-actions[bot]
1c974dbd49 docs: update progress [skip ci] 2026-10-02 14:53:28 +00:00
devin-ai-integration[bot]
bac1e5427a Decode iplSDChannelTitle + ut_ArchiveFontBase (source-only, stays NonMatching) (#816)
- SDButton::setEventHandler was genuinely 1-arg in retail (dead second
  param): corrected decl/def/call sites + symbols.txt mangle. Fixes 5
  fns to instruction-identical and lifts iplSDChannelTitle data to
  .data/.rodata/.sdata/.sdata2 100% (was 12.1%).
- ut_ArchiveFontBase: reordered sheetOffsetsScratch decl/assign to
  match orig materialization.

Both units remain NonMatching — flip attempts verified to break the
linked DOL: iplSDChannelTitle's object emits 51 net-extra anonymous
literal objects (pool merge/order differs, fuzzy 99.94) plus two fns
+4B each (updateCopyStart, startCopyProgress); ut_ArchiveFontBase has
a ~0x380B content region differing (fuzzy 98.47). DOL sha1 stays
26116613f624061ba99c8d1a299aaa6efa85670d with them unlinked.

Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: coah80 <usernamecole7@gmail.com>
2026-10-02 09:52:51 -05:00
github-actions[bot]
b6687e9ff9 docs: update progress [skip ci] 2026-10-02 11:41:42 +00:00
coah
ff52d5235d Restore focus-object emission order and shared pane string for native linking (#814) 2026-10-02 06:40:57 -05:00
github-actions[bot]
7be7f1594e docs: update progress [skip ci] 2026-10-02 11:34:52 +00:00
coah
51b483cbb7 Restore FAT directory definition order and link directory/volume routines (#812) 2026-10-02 06:34:15 -05:00
github-actions[bot]
1bb1fb08be docs: update progress [skip ci] 2026-10-02 11:33:16 +00:00
coah
2f759f35f1 match(iplAddress 95/101) (fz10e) (worker 3c5ccd78) (#813) 2026-10-02 06:32:21 -05:00
github-actions[bot]
ed5c96bd85 docs: update progress [skip ci] 2026-10-02 11:24:46 +00:00
coah
3816427a3e match(iplAddressEdit 90/94) (fz16b) (worker 95d2a3ab) (#811) 2026-10-02 06:23:21 -05:00
github-actions[bot]
2d0a4faa6f docs: update progress [skip ci] 2026-10-02 11:22:42 +00:00
coah
a61a7cf140 match(pf_volume 37/37, idct_resolution_change_var 5/6) (fz3g) (worker fa51267c) (#810) 2026-10-02 06:21:42 -05:00
github-actions[bot]
dce9e0732d docs: update progress [skip ci] 2026-10-02 11:20:10 +00:00
coah
8121c71188 match(Texture_MCUtoY8U8V8 6/13, NWC24MsgCommit 16/18) (fz15c) (worker c264f4a8) (#809) 2026-10-02 06:18:58 -05:00
github-actions[bot]
d6997b0cb9 docs: update progress [skip ci] 2026-10-02 11:15:33 +00:00
github-actions[bot]
6b80fd87f5 docs: update progress [skip ci] 2026-10-02 11:13:58 +00:00
coah
8f920a08c2 match(pf_dir 38/38, iplFocusObject 89/89) (fz1e) (worker db809c39) (#808) 2026-10-02 06:13:48 -05:00
coah
9c81288c55 Link matched eZiText DAWG routines (#807) 2026-10-02 06:12:34 -05:00
github-actions[bot]
abb652bb85 docs: update progress [skip ci] 2026-10-02 11:09:26 +00:00
coah
b578087994 match(Zi8MatchUWDdata; zi8uwd 3/4) (data-d11g) (worker bd9a219c) (#806) 2026-10-02 06:07:57 -05:00
github-actions[bot]
d542ace0ed docs: update progress [skip ci] 2026-10-02 11:02:05 +00:00
coah
d195c16c86 match(zi8dawg 6/6) (fz10d) (worker 64753ac9) (#805) 2026-10-02 06:00:09 -05:00
github-actions[bot]
2daa6aedf6 docs: update progress [skip ci] 2026-10-02 10:55:47 +00:00
coah
9432f36a57 Link matched NWC24 message-reading routines (#804) 2026-10-02 05:54:37 -05:00
github-actions[bot]
4f77bbd2ae docs: update progress [skip ci] 2026-10-02 10:49:20 +00:00
coah
9c6416820d match(NWC24MsgRead 16/16) (fz7e) (worker 784d9f03) (#803) 2026-10-02 05:47:59 -05:00
github-actions[bot]
4bfa1b6c4c docs: update progress [skip ci] 2026-10-02 10:40:05 +00:00
coah
cbed5f6d77 Link matched USB mass-storage block routines (#801) 2026-10-02 05:38:55 -05:00
github-actions[bot]
f8da383802 docs: update progress [skip ci] 2026-10-02 10:38:03 +00:00
coah
18786d6b7d match(ZiDAWGGetChild; zidawg1 3/6) (data-d11f) (worker 07efcb48) (#802) 2026-10-02 05:36:59 -05:00
github-actions[bot]
e7e35742dd docs: update progress [skip ci] 2026-10-02 10:33:16 +00:00
coah
73a89b06e5 match(iplAddressEdit 88/94) (fz16) (worker 41ea7122) (#800) 2026-10-02 05:32:10 -05:00
github-actions[bot]
f0d938021e docs: update progress [skip ci] 2026-10-02 10:26:08 +00:00
coah
e9545f74d5 match(NWC24MsgSubject 8/12) (fz7d) (worker 8ef4fd28) (#799) 2026-10-02 05:25:05 -05:00
github-actions[bot]
d0a9514c9b docs: update progress [skip ci] 2026-10-02 10:22:53 +00:00
github-actions[bot]
c653415d77 docs: update progress [skip ci] 2026-10-02 10:22:05 +00:00
coah
f98ffd0da3 Link matched SD channel object natively (#797) 2026-10-02 05:21:44 -05:00
coah
c31af38e0e Link matched HTTP worker and FAT cluster routines (#796) 2026-10-02 05:21:17 -05:00
github-actions[bot]
9aef037505 docs: update progress [skip ci] 2026-10-02 10:20:51 +00:00
coah
72cf3991b2 match(pf_volume 35/37, pf_entry_iterator 15/16, puh_msc_blk 11/11) (fz3f) (worker 6b7deeb0) (#798) 2026-10-02 05:19:45 -05:00
github-actions[bot]
d8937f9e82 docs: update progress [skip ci] 2026-10-02 10:12:22 +00:00
coah
36d651fe72 match(NWC24iMBoxCheck: volatile oldest-id local proven by store/reload) (orchestrator) (worker 2dcffb88) (#795) 2026-10-02 05:11:13 -05:00
github-actions[bot]
e133119aa5 docs: update progress [skip ci] 2026-10-02 10:09:35 +00:00
coah
fa50eeea1a Link matched NWC24 MIME parser natively (#794) 2026-10-02 05:08:40 -05:00
coah
ae5f904c0b Match CHANS integer parser with a read-only input object (#793) 2026-10-02 05:08:34 -05:00
github-actions[bot]
11f4b29c64 docs: update progress [skip ci] 2026-10-02 10:04:23 +00:00
coah
c7344eccc8 match(NHTTP_thread 26/26, pf_cluster 8/8) (fz8c) (worker 0b57076a) (#792) 2026-10-02 05:03:18 -05:00
github-actions[bot]
86cda2adbe docs: update progress [skip ci] 2026-10-02 10:01:15 +00:00
coah
0d1fa438ba Match HTTP socket send with a const request view and link (#790) 2026-10-02 05:00:25 -05:00
github-actions[bot]
343fa90f9b docs: update progress [skip ci] 2026-10-02 09:59:04 +00:00
coah
ed52b1987e data(ziswordw, zi8uwd data 100%) (data-d11e) (worker d8fd359e) (#791) 2026-10-02 04:57:57 -05:00
github-actions[bot]
00f44a924b docs: update progress [skip ci] 2026-10-02 09:53:45 +00:00
coah
d494f44516 match(NWC24Mime 16/16) (fz7c) (worker 112576fc) (#789) 2026-10-02 04:52:29 -05:00
github-actions[bot]
5439b99f38 docs: update progress [skip ci] 2026-10-02 09:49:58 +00:00
coah
4ccc441d7e data(iplSDChannelTitle, tiCandidateBox data 100%) (data-d15b) (worker 1e30e292) (#788) 2026-10-02 04:48:32 -05:00
github-actions[bot]
4264e5ff51 docs: update progress [skip ci] 2026-10-02 09:44:23 +00:00
coah
f182215e66 match(NHTTP_socket_RVL 9/10, lyt_window data) (fz2e) (worker 3f0262d6) (#787) 2026-10-02 04:42:46 -05:00
github-actions[bot]
fe6a45c09a docs: update progress [skip ci] 2026-10-02 09:21:35 +00:00
coah
f07dd4a6ca match(NWC24Mime 15/16) (fz7b) (worker b676b7bc) (#786) 2026-10-02 04:20:07 -05:00
github-actions[bot]
65cd387bcb docs: update progress [skip ci] 2026-10-02 09:07:11 +00:00
coah
d0c3d43000 match(vi 29/30) (fz10) (worker 2323903b) (#785) 2026-10-02 04:05:45 -05:00
github-actions[bot]
a2abf24854 docs: update progress [skip ci] 2026-10-02 09:01:43 +00:00
coah
1ce1b0458a Link matched USB access-point thread natively (#784) 2026-10-02 04:00:56 -05:00
github-actions[bot]
0e37502750 docs: update progress [skip ci] 2026-10-02 09:00:50 +00:00
coah
78d6827757 Link matched board scene natively (#783) 2026-10-02 03:58:42 -05:00
coah
b0fbec3f25 Link matched HMAC and socket-information units (#782) 2026-10-02 03:58:34 -05:00
coah
d34e09d5dc match(iplUSBAPThread 7/7, iplSDChannelObj 37/38) (fz1d) (worker bb4dde27) (#781) 2026-10-02 03:54:27 -05:00
github-actions[bot]
7cce8859c3 docs: update progress [skip ci] 2026-10-02 08:51:16 +00:00
coah
711ee737f9 match(zi8pud2 6/8; zidawg1 data 100%, structure) (data-d11d) (worker 41cd3236) (#780) 2026-10-02 03:49:46 -05:00
github-actions[bot]
82def66db6 docs: update progress [skip ci] 2026-10-02 08:49:06 +00:00
coah
2039813ccf match(iplBoard 94/94) (fz2d) (worker 0e765719) (#779) 2026-10-02 03:47:50 -05:00
github-actions[bot]
eabfb0cde9 docs: update progress [skip ci] 2026-10-02 08:47:14 +00:00
coah
2cc9824045 match(hmac 3/3, SOInformation 4/4) (fz8) (worker 4ecc5f21) (#778) 2026-10-02 03:46:04 -05:00
github-actions[bot]
6f90840464 docs: update progress [skip ci] 2026-10-02 08:45:35 +00:00
coah
0978b074b8 data(tiInputForm, tiKeyboard data 100%) (data-d4c) (worker a49df763) (#777) 2026-10-02 03:44:38 -05:00
github-actions[bot]
252e40e22f docs: update progress [skip ci] 2026-10-02 08:44:10 +00:00
coah
2230741db8 match(NWC24Mime 13/16) (fz7) (worker 3a4b90c9) (#776) 2026-10-02 03:43:07 -05:00
github-actions[bot]
f3adacfe3d docs: update progress [skip ci] 2026-10-02 08:39:36 +00:00
coah
1cd71c6903 Describe existing MetroTRK trap entries as sized functions (#775) 2026-10-02 03:38:51 -05:00
github-actions[bot]
7b64914abb docs: update progress [skip ci] 2026-10-02 08:23:28 +00:00
devin-ai-integration[bot]
199de6f6c0 Link bannerSound/AxAdpcmPlayer (clean subset) (#774)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: coah80 <usernamecole7@gmail.com>
2026-10-02 03:22:37 -05:00
github-actions[bot]
513c2a869e docs: update progress [skip ci] 2026-10-02 08:07:20 +00:00
coah
24b6645572 match(SOOption 3/4, pf_volume 34/37) (fz3c) (worker f024666b) (#773) 2026-10-02 03:06:10 -05:00
github-actions[bot]
9536177edd docs: update progress [skip ci] 2026-10-02 08:01:44 +00:00
coah
81325e667c Restore SDK path function emission order and native linking (#772) 2026-10-02 03:00:54 -05:00
coah
51d5dc519b Refresh completion code total after removing overlapping extent (#771) 2026-10-02 02:57:20 -05:00
85 changed files with 33846 additions and 1355 deletions

View File

@@ -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

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.48% | 88.74% | 64.70% | 98.77% |
| 99.56% | 90.41% | 69.63% | 99.37% |
units 932/1027 complete, functions 12274/12563 matched.
units 951/1027 complete, functions 12347/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 -->

View File

@@ -4576,12 +4576,12 @@ enqueueNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB254; // type:
enqueueLoadNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB308; // type:function size:0x5C
enqueuePageNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB364; // type:function size:0x5C
enqueueResultNotice__Q33ipl5scene15SDChannelSelectFUl = .text:0x813DB3C0; // type:function size:0x5C
enqueueChannelNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB41C; // type:function size:0x5C
enqueueMoveNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB478; // type:function size:0x5C
enqueueStateNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB4D4; // type:function size:0x5C
enqueueErrorNotice__Q33ipl5scene15SDChannelSelectFUlUl = .text:0x813DB530; // type:function size:0x5C
enqueueCommandNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB58C; // type:function size:0x60
enqueueDeleteNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB5EC; // type:function size:0x60
enqueueChannelNotice__Q33ipl5scene15SDChannelSelectFUxUl = .text:0x813DB41C; // type:function size:0x5C
enqueueMoveNotice__Q33ipl5scene15SDChannelSelectFUx = .text:0x813DB478; // type:function size:0x5C
enqueueStateNotice__Q33ipl5scene15SDChannelSelectFUxUl = .text:0x813DB4D4; // type:function size:0x5C
enqueueErrorNotice__Q33ipl5scene15SDChannelSelectFPPUxPPUx = .text:0x813DB530; // type:function size:0x5C
enqueueCommandNotice__Q33ipl5scene15SDChannelSelectFPPUxPPUxPPUx = .text:0x813DB58C; // type:function size:0x60
enqueueDeleteNotice__Q33ipl5scene15SDChannelSelectFUx = .text:0x813DB5EC; // type:function size:0x60
clearCommandQueue__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB64C; // type:function size:0x40
clearNoticeQueue__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB68C; // type:function size:0x40
processWorkerCommands__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB6CC; // type:function size:0x518
@@ -4798,8 +4798,8 @@ iplSDChannelTitle_setPaneMessage = .text:0x813E8D14; // type:function size:0xB8
iplSDChannelTitle_loadBannerMetaFiles = .text:0x813E8DCC; // type:function size:0xA4
iplSDChannelTitle_fetchTmdViewTask = .text:0x813E8E70; // type:function size:0x94
iplSDChannelTitle_passesParentalCheck = .text:0x813E8F04; // type:function size:0x100
iplSDChannelTitle_onTitlePaneEvent = .text:0x813E9004; // type:function size:0x2E8
iplSDChannelTitle_onTitleButtonEvent = .text:0x813E92EC; // type:function size:0x17C
onEvent__Q33ipl5scene23SDTitlePaneEventHandlerFUlUlPv = .text:0x813E9004; // type:function size:0x2E8
onEventDerived__Q33ipl5scene25SDTitleButtonEventHandlerFUlUlPCQ33ipl10controller9Interface = .text:0x813E92EC; // type:function size:0x17C
startResetting__Q33ipl5scene14SDChannelTitleFv = .text:0x813E9468; // type:function size:0xC
@20@__dt__Q33ipl5scene14SDChannelTitleFv = .text:0x813E9474; // type:function size:0x8
__ct__Q33ipl5scene8SDButtonFPQ23EGG4Heap = .text:0x813E947C; // type:function size:0x9C
@@ -4814,7 +4814,7 @@ reset_gui__Q33ipl5scene8SDButtonFv = .text:0x813E9BC0; // type:function size:0x1
startPointEvent__Q33ipl5scene8SDButtonFPCcPQ33ipl10controller9Interface = .text:0x813E9D08; // type:function size:0x258
startLeftEvent__Q33ipl5scene8SDButtonFPCc = .text:0x813E9F60; // type:function size:0x220
isActive__Q33ipl5scene8SDButtonCFv = .text:0x813EA180; // type:function size:0xC
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
setEventHandler__Q33ipl5scene8SDButtonFPQ23gui12EventHandler = .text:0x813EA18C; // type:function size:0x14
setText__Q33ipl5scene8SDButtonFPCcPCw = .text:0x813EA1A0; // type:function size:0xB4
animation__Q33ipl5scene8SDButtonFi = .text:0x813EA254; // type:function size:0x1C4
initArrowAppearance__Q33ipl5scene8SDButtonFib = .text:0x813EA418; // type:function size:0xD0
@@ -13802,10 +13802,10 @@ __ieee754_sqrt = .text:0x8160CD34; // type:function size:0x248
nan = .text:0x8160CF7C; // type:function size:0x4
sqrt = .text:0x8160CF80; // type:function size:0x4
GetTRKConnected = .text:0x8160CF84; // type:function size:0x10
TRKAccessFile = .text:0x8160CFA0; // type:function
TRKOpenFile = .text:0x8160CFA8; // type:function
TRKCloseFile = .text:0x8160CFB0; // type:function
TRKPositionFile = .text:0x8160CFB8; // type:function
TRKAccessFile = .text:0x8160CFA0; // type:function size:0x8
TRKOpenFile = .text:0x8160CFA8; // type:function size:0x8
TRKCloseFile = .text:0x8160CFB0; // type:function size:0x8
TRKPositionFile = .text:0x8160CFB8; // type:function size:0x8
__TRK_write_console = .text:0x8160CFC0; // type:function size:0xBC
__read_console = .text:0x8160D07C; // type:function size:0xBC
EnableMetroTRKInterrupts = .text:0x8160D138; // type:function size:0x20
@@ -16990,34 +16990,66 @@ lbl_81654F23 = .data:0x81654F23; // type:object size:0x12 data:string
lbl_81654F35 = .data:0x81654F35; // type:object size:0x19 data:string
lbl_81654F4E = .data:0x81654F4E; // type:object size:0x26 data:string
lbl_81654F74 = .data:0x81654F74; // type:object size:0x1F data:string
lbl_81654F98 = .data:0x81654F98; // type:object size:0xC data:string
lbl_81654FA4 = .data:0x81654FA4; // type:object size:0xC data:string
lbl_81654FB0 = .data:0x81654FB0; // type:object size:0xD data:string
lbl_81654FBD = .data:0x81654FBD; // type:object size:0xD data:string
lbl_81654FCA = .data:0x81654FCA; // type:object size:0xC data:string
lbl_81654FD6 = .data:0x81654FD6; // type:object size:0xC data:string
lbl_81654FE2 = .data:0x81654FE2; // type:object size:0x26
lbl_81655008 = .data:0x81655008; // type:object size:0x2B data:string
lbl_81655033 = .data:0x81655033; // type:object size:0x29 data:string
lbl_8165505C = .data:0x8165505C; // type:object size:0x2A data:string
lbl_81655086 = .data:0x81655086; // type:object size:0x24 data:string
lbl_816550AA = .data:0x816550AA; // type:object size:0x23 data:string
lbl_816550CD = .data:0x816550CD; // type:object size:0x3F
lbl_8165510C = .data:0x8165510C; // type:object size:0xD data:string
lbl_81655119 = .data:0x81655119; // type:object size:0x13 data:string
lbl_8165512C = .data:0x8165512C; // type:object size:0x12 data:string
lbl_81655140 = .data:0x81655140; // type:object size:0x3C
lbl_8165517C = .data:0x8165517C; // type:object size:0x120
jumptable_8165529C = .data:0x8165529C; // type:object size:0x7C scope:local
lbl_81655318 = .data:0x81655318; // type:object size:0xB2
lbl_816553CA = .data:0x816553CA; // type:object size:0x34
lbl_816553FE = .data:0x816553FE; // type:object size:0xB data:string
lbl_81655409 = .data:0x81655409; // type:object size:0x10 data:string
lbl_81655419 = .data:0x81655419; // type:object size:0x14 data:string
lbl_8165542D = .data:0x8165542D; // type:object size:0x14 data:string
lbl_81655441 = .data:0x81655441; // type:object size:0x12 data:string
lbl_81655453 = .data:0x81655453; // type:object size:0xF data:string
lbl_81655462 = .data:0x81655462; // type:object size:0x62
@18027 = .data:0x81654F98; // type:object size:0xC scope:local data:string
@18028 = .data:0x81654FA4; // type:object size:0xC scope:local data:string
@18029 = .data:0x81654FB0; // type:object size:0xD scope:local data:string
@18030 = .data:0x81654FBD; // type:object size:0xD scope:local data:string
@18031 = .data:0x81654FCA; // type:object size:0xC scope:local data:string
@18032 = .data:0x81654FD6; // type:object size:0xC scope:local data:string
@18033 = .data:0x81654FE2; // type:object size:0x9 scope:local data:string
sButtonGroups__Q23ipl5scene = .data:0x81654FEC; // type:object size:0x1C scope:local
@18034 = .data:0x81655008; // type:object size:0x2B scope:local data:string
@18035 = .data:0x81655033; // type:object size:0x29 scope:local data:string
@18036 = .data:0x8165505C; // type:object size:0x2A scope:local data:string
@18037 = .data:0x81655086; // type:object size:0x24 scope:local data:string
@18038 = .data:0x816550AA; // type:object size:0x23 scope:local data:string
@18039 = .data:0x816550CD; // type:object size:0x24 scope:local data:string
sButtonAnimationNames__Q23ipl5scene = .data:0x816550F4; // type:object size:0x18 scope:local
@18040 = .data:0x8165510C; // type:object size:0xD scope:local data:string
@18041 = .data:0x81655119; // type:object size:0x13 scope:local data:string
@18042 = .data:0x8165512C; // type:object size:0x12 scope:local data:string
sBannerAnimationNames__Q23ipl5scene = .data:0x81655140; // type:object size:0xC scope:local
sTexturePaneNames__Q23ipl5scene = .data:0x8165514C; // type:object size:0x30 scope:local
@22820 = .data:0x8165517C; // type:object size:0xE scope:local data:string
@22960 = .data:0x8165518A; // type:object size:0x1D scope:local data:string
@22961 = .data:0x816551A7; // type:object size:0xB scope:local data:string
@22962 = .data:0x816551B2; // type:object size:0xB scope:local data:string
@22963 = .data:0x816551BD; // type:object size:0xB scope:local data:string
@22964 = .data:0x816551C8; // type:object size:0x1C scope:local data:string
@22965 = .data:0x816551E4; // type:object size:0x23 scope:local data:string
@22966 = .data:0x81655207; // type:object size:0x25 scope:local data:string
@22967 = .data:0x8165522C; // type:object size:0xB scope:local data:string
@22968 = .data:0x81655237; // type:object size:0x20 scope:local data:string
@22970 = .data:0x81655257; // type:object size:0x21 scope:local data:string
@22972 = .data:0x81655278; // type:object size:0xD scope:local data:string
@22975 = .data:0x81655285; // type:object size:0xB scope:local data:string
@22976 = .data:0x81655290; // type:object size:0xC scope:local data:string
@23080 = .data:0x8165529C; // type:object size:0x7C scope:local
@23094 = .data:0x81655318; // type:object size:0xF scope:local data:string
@23172 = .data:0x81655327; // type:object size:0x1A scope:local data:string
@23173 = .data:0x81655341; // type:object size:0x1C scope:local data:string
@23174 = .data:0x8165535D; // type:object size:0xF scope:local data:string
@23175 = .data:0x8165536C; // type:object size:0xE scope:local data:string
@23176 = .data:0x8165537A; // type:object size:0x19 scope:local data:string
@23177 = .data:0x81655393; // type:object size:0xA scope:local data:string
@23178 = .data:0x8165539D; // type:object size:0xB scope:local data:string
@23179 = .data:0x816553A8; // type:object size:0x14 scope:local data:string
@23181 = .data:0x816553BC; // type:object size:0xE scope:local data:string
@23314 = .data:0x816553CA; // type:object size:0xD scope:local data:string
@23343 = .data:0x816553D7; // type:object size:0xB scope:local data:string
@23344 = .data:0x816553E2; // type:object size:0xB scope:local data:string
@23345 = .data:0x816553ED; // type:object size:0x11 scope:local data:string
@23366 = .data:0x816553FE; // type:object size:0xB scope:local data:string
@23587 = .data:0x81655409; // type:object size:0x10 scope:local data:string
@23645 = .data:0x81655419; // type:object size:0x14 scope:local data:string
@23769 = .data:0x8165542D; // type:object size:0x14 scope:local data:string
@23878 = .data:0x81655441; // type:object size:0x12 scope:local data:string
@23964 = .data:0x81655453; // type:object size:0xF scope:local data:string
@24191 = .data:0x81655462; // type:object size:0x16 scope:local data:string
@24247 = .data:0x81655478; // type:object size:0x10 scope:local data:string
@24248 = .data:0x81655488; // type:object size:0x14 scope:local data:string
@24249 = .data:0x8165549C; // type:object size:0xF scope:local data:string
@24250 = .data:0x816554AB; // type:object size:0x16 scope:local data:string
__vt__Q33ipl5scene25SDTitleButtonEventHandler = .data:0x816554C4; // type:object size:0x1C
__vt__Q33ipl5scene23SDTitlePaneEventHandler = .data:0x816554E0; // type:object size:0x18
__vt__Q33ipl5scene14SDChannelTitle = .data:0x816554F8; // type:object size:0x68
@@ -17597,7 +17629,7 @@ __vt__Q49textinput8keyboard13cellphonetype12EventHandler = .data:0x8165C758; //
__vt__Q49textinput8keyboard13cellphonetype4Base = .data:0x8165C778; // type:object size:0xA8
scP_txtScrll_UP = .data:0x8165C820; // type:object size:0xE data:string
scP_txtScrll_DOWN = .data:0x8165C830; // type:object size:0x10 data:string
lbl_8165C840 = .data:0x8165C840; // type:object size:0x80
csButtonAnimations__Q29textinput9inputform = .data:0x8165C840; // type:object size:0x80
scN_JPNUSAEUR = .data:0x8165C8C0; // type:object size:0xC data:string
scN_separateBarAll = .data:0x8165C8CC; // type:object size:0x11 data:string
scT_2l_TextBox = .data:0x8165C8E0; // type:object size:0xD data:string
@@ -17608,28 +17640,30 @@ scT_title_textKOR = .data:0x8165C928; // type:object size:0x10 data:string
scN_separateBarCHN = .data:0x8165C938; // type:object size:0x11 data:string
scT_2l_TextBoxCHN = .data:0x8165C950; // type:object size:0x10 data:string
scT_title_textCHN = .data:0x8165C960; // type:object size:0x10 data:string
lbl_8165C970 = .data:0x8165C970; // type:object size:0x20 data:2byte
jumptable_8165C990 = .data:0x8165C990; // type:object size:0xA0 scope:local
jumptable_8165CA30 = .data:0x8165CA30; // type:object size:0x28 scope:local
jumptable_8165CA58 = .data:0x8165CA58; // type:object size:0x34 scope:local
jumptable_8165CA8C = .data:0x8165CA8C; // type:object size:0xC0 scope:local
jumptable_8165CB4C = .data:0x8165CB4C; // type:object size:0x94 scope:local
lbl_8165CBE0 = .data:0x8165CBE0; // type:object size:0x34
lbl_8165CC14 = .data:0x8165CC14; // type:object size:0xE data:string
lbl_8165CC28 = .data:0x8165CC28; // type:object size:0x24
lbl_8165CC4C = .data:0x8165CC4C; // type:object size:0xD data:string
jumptable_8165CC5C = .data:0x8165CC5C; // type:object size:0x1C scope:local
@6599 = .data:0x8165C970; // type:object size:0x20 data:2byte
@13162 = .data:0x8165C990; // type:object size:0xA0 scope:local
@13178 = .data:0x8165CA30; // type:object size:0x28 scope:local
@13457 = .data:0x8165CA58; // type:object size:0x34 scope:local
@13456 = .data:0x8165CA8C; // type:object size:0xC0 scope:local
@13510 = .data:0x8165CB4C; // type:object size:0x94 scope:local
@13512 = .data:0x8165CBE0; // type:object size:0xD data:string
@13580 = .data:0x8165CBF0; // type:object size:0x22 scope:local data:string
@13639 = .data:0x8165CC14; // type:object size:0xE data:string
@13640 = .data:0x8165CC28; // type:object size:0x10 data:string
@13654 = .data:0x8165CC38; // type:object size:0x11 scope:local data:string
@13724 = .data:0x8165CC4C; // type:object size:0xD data:string
@14933 = .data:0x8165CC5C; // type:object size:0x1C scope:local
__vt__Q39textinput9inputform19NormalButtonAnmPane = .data:0x8165CC78; // type:object size:0x2C
__vt__Q39textinput9inputform7AnmPane = .data:0x8165CCA4; // type:object size:0x2C
__vt__Q39textinput9inputform12EventHandler = .data:0x8165CCD0; // type:object size:0x20
__vt__Q39textinput9inputform12LayoutByNW4R = .data:0x8165CCF0; // type:object size:0x240
__vt__Q39textinput9inputform4Base = .data:0x8165CF30; // type:object size:0x1A8
__vt__Q39textinput9inputform10EditBuffer = .data:0x8165D0D8; // type:object size:0x10
__vt__Q39textinput9inputform10EditBuffer = .data:0x8165D0D8; // type:object size:0xC
__vt__Q39textinput8tistring8WithAtok = .data:0x8165D0E8; // type:object size:0x140
__vt__Q29textinput4Base = .data:0x8165D228; // type:object size:0x30
__vt__Q29textinput4Base = .data:0x8165D228; // type:object size:0x14
__vt__Q39textinput4util9Animation = .data:0x8165D258; // type:object size:0x24
lbl_8165D258 = .data:0x8165D27C; // type:object size:0xD data:string
@STRING@GetTextColor__Q34nw4r3lyt7TextBoxCFUl = .data:0x8165D28C; // type:object size:0x44
@STRING@onOutOfLength__Q29textinput13EventObserverFv = .data:0x8165D27C; // type:object size:0xD scope:local data:string
@STRING@GetTextColor__Q34nw4r3lyt7TextBoxCFUl = .data:0x8165D28C; // type:object size:0x41 data:string
scT_prdc_Text_00 = .data:0x8165D2D0; // type:object size:0xF data:string
scP_prdc_scrl_Left = .data:0x8165D2E0; // type:object size:0x11 data:string
scCandidatePaneData = .data:0x8165D2F8; // type:object size:0x68C
@@ -17638,47 +17672,47 @@ scW_predictWindow = .data:0x8165DA08; // type:object size:0x10 data:string
scN_predictInput = .data:0x8165DA18; // type:object size:0xF data:string
scW_OnOff_Area = .data:0x8165DA28; // type:object size:0xD data:string
scN_prdc_Texts = .data:0x8165DA38; // type:object size:0xD data:string
jumptable_8165DA48 = .data:0x8165DA48; // type:object size:0x1C scope:local
lbl_8165DA64 = .data:0x8165DA64; // type:object size:0xF data:string
lbl_8165DA74 = .data:0x8165DA74; // type:object size:0xF data:string
lbl_8165DA84 = .data:0x8165DA84; // type:object size:0xF data:string
lbl_8165DA94 = .data:0x8165DA94; // type:object size:0xF data:string
lbl_8165DAA4 = .data:0x8165DAA4; // type:object size:0xF data:string
lbl_8165DAB4 = .data:0x8165DAB4; // type:object size:0xF data:string
lbl_8165DAC4 = .data:0x8165DAC4; // type:object size:0xF data:string
lbl_8165DAD4 = .data:0x8165DAD4; // type:object size:0xF data:string
lbl_8165DAE4 = .data:0x8165DAE4; // type:object size:0xF data:string
lbl_8165DAF4 = .data:0x8165DAF4; // type:object size:0xF data:string
lbl_8165DB04 = .data:0x8165DB04; // type:object size:0xF data:string
lbl_8165DB14 = .data:0x8165DB14; // type:object size:0xF data:string
lbl_8165DB24 = .data:0x8165DB24; // type:object size:0xF data:string
lbl_8165DB34 = .data:0x8165DB34; // type:object size:0xF data:string
lbl_8165DB44 = .data:0x8165DB44; // type:object size:0xF data:string
lbl_8165DB54 = .data:0x8165DB54; // type:object size:0xF data:string
lbl_8165DB64 = .data:0x8165DB64; // type:object size:0xF data:string
lbl_8165DB74 = .data:0x8165DB74; // type:object size:0xF data:string
lbl_8165DB84 = .data:0x8165DB84; // type:object size:0xF data:string
lbl_8165DB94 = .data:0x8165DB94; // type:object size:0xF data:string
lbl_8165DBA4 = .data:0x8165DBA4; // type:object size:0xF data:string
lbl_8165DBB4 = .data:0x8165DBB4; // type:object size:0xF data:string
lbl_8165DBC4 = .data:0x8165DBC4; // type:object size:0xF data:string
lbl_8165DBD4 = .data:0x8165DBD4; // type:object size:0xF data:string
lbl_8165DBE4 = .data:0x8165DBE4; // type:object size:0xF data:string
lbl_8165DBF4 = .data:0x8165DBF4; // type:object size:0xF data:string
lbl_8165DC04 = .data:0x8165DC04; // type:object size:0xF data:string
lbl_8165DC14 = .data:0x8165DC14; // type:object size:0xF data:string
lbl_8165DC24 = .data:0x8165DC24; // type:object size:0xF data:string
lbl_8165DC34 = .data:0x8165DC34; // type:object size:0xF data:string
lbl_8165DC44 = .data:0x8165DC44; // type:object size:0xF data:string
lbl_8165DC54 = .data:0x8165DC54; // type:object size:0xF data:string
lbl_8165DC64 = .data:0x8165DC64; // type:object size:0xF data:string
lbl_8165DC74 = .data:0x8165DC74; // type:object size:0xF data:string
lbl_8165DC84 = .data:0x8165DC84; // type:object size:0xF data:string
lbl_8165DC94 = .data:0x8165DC94; // type:object size:0xF data:string
lbl_8165DCA4 = .data:0x8165DCA4; // type:object size:0xF data:string
lbl_8165DCB4 = .data:0x8165DCB4; // type:object size:0xF data:string
lbl_8165DCC4 = .data:0x8165DCC4; // type:object size:0xF data:string
lbl_8165DCD4 = .data:0x8165DCD4; // type:object size:0xF data:string
@10530 = .data:0x8165DA48; // type:object size:0x1C scope:local
@6761 = .data:0x8165DA64; // type:object size:0xF scope:local data:string
@6762 = .data:0x8165DA74; // type:object size:0xF scope:local data:string
@6763 = .data:0x8165DA84; // type:object size:0xF scope:local data:string
@6764 = .data:0x8165DA94; // type:object size:0xF scope:local data:string
@6765 = .data:0x8165DAA4; // type:object size:0xF scope:local data:string
@6766 = .data:0x8165DAB4; // type:object size:0xF scope:local data:string
@6767 = .data:0x8165DAC4; // type:object size:0xF scope:local data:string
@6768 = .data:0x8165DAD4; // type:object size:0xF scope:local data:string
@6769 = .data:0x8165DAE4; // type:object size:0xF scope:local data:string
@6770 = .data:0x8165DAF4; // type:object size:0xF scope:local data:string
@6771 = .data:0x8165DB04; // type:object size:0xF scope:local data:string
@6772 = .data:0x8165DB14; // type:object size:0xF scope:local data:string
@6773 = .data:0x8165DB24; // type:object size:0xF scope:local data:string
@6774 = .data:0x8165DB34; // type:object size:0xF scope:local data:string
@6775 = .data:0x8165DB44; // type:object size:0xF scope:local data:string
@6776 = .data:0x8165DB54; // type:object size:0xF scope:local data:string
@6777 = .data:0x8165DB64; // type:object size:0xF scope:local data:string
@6778 = .data:0x8165DB74; // type:object size:0xF scope:local data:string
@6779 = .data:0x8165DB84; // type:object size:0xF scope:local data:string
@6782 = .data:0x8165DB94; // type:object size:0xF scope:local data:string
@6783 = .data:0x8165DBA4; // type:object size:0xF scope:local data:string
@6784 = .data:0x8165DBB4; // type:object size:0xF scope:local data:string
@6785 = .data:0x8165DBC4; // type:object size:0xF scope:local data:string
@6786 = .data:0x8165DBD4; // type:object size:0xF scope:local data:string
@6787 = .data:0x8165DBE4; // type:object size:0xF scope:local data:string
@6788 = .data:0x8165DBF4; // type:object size:0xF scope:local data:string
@6789 = .data:0x8165DC04; // type:object size:0xF scope:local data:string
@6790 = .data:0x8165DC14; // type:object size:0xF scope:local data:string
@6791 = .data:0x8165DC24; // type:object size:0xF scope:local data:string
@6792 = .data:0x8165DC34; // type:object size:0xF scope:local data:string
@6793 = .data:0x8165DC44; // type:object size:0xF scope:local data:string
@6794 = .data:0x8165DC54; // type:object size:0xF scope:local data:string
@6795 = .data:0x8165DC64; // type:object size:0xF scope:local data:string
@6796 = .data:0x8165DC74; // type:object size:0xF scope:local data:string
@6797 = .data:0x8165DC84; // type:object size:0xF scope:local data:string
@6798 = .data:0x8165DC94; // type:object size:0xF scope:local data:string
@6799 = .data:0x8165DCA4; // type:object size:0xF scope:local data:string
@6800 = .data:0x8165DCB4; // type:object size:0xF scope:local data:string
@6801 = .data:0x8165DCC4; // type:object size:0xF scope:local data:string
@10601 = .data:0x8165DCD4; // type:object size:0xF scope:local data:string
__vt__Q39textinput12candidatebox13PredictWindow = .data:0x8165DCE4; // type:object size:0x2C
__vt__Q39textinput12candidatebox12OnOffAnmPane = .data:0x8165DD10; // type:object size:0x2C
__vt__Q39textinput12candidatebox22CandidateScrollAnmPane = .data:0x8165DD3C; // type:object size:0x2C
@@ -17780,18 +17814,18 @@ __vt__Q39textinput11nw4rmanager6Layout = .data:0x8165F818; // type:object size:0
__vt__Q39textinput11nw4rmanager8PaneFifo = .data:0x8165F890; // type:object size:0x1C scope:weak
__vt__Q39textinput11nw4rmanager13AnimPaneGroup = .data:0x8165F8AC; // type:object size:0x1C
__vt__Q39textinput11nw4rmanager7AnmPane = .data:0x8165F8C8; // type:object size:0x24
lbl_8165F8F0 = .data:0x8165F8F0; // type:object size:0xD data:string
lbl_8165F900 = .data:0x8165F900; // type:object size:0x1B data:string
lbl_8165F920 = .data:0x8165F920; // type:object size:0x18 data:string
lbl_8165F938 = .data:0x8165F938; // type:object size:0x16 data:string
lbl_8165F950 = .data:0x8165F950; // type:object size:0x1B data:string
lbl_8165F96C = .data:0x8165F96C; // type:object size:0x16 data:string
lbl_8165F988 = .data:0x8165F988; // type:object size:0x18 data:string
lbl_8165F9A0 = .data:0x8165F9A0; // type:object size:0x16 data:string
@8031 = .data:0x8165F8F0; // type:object size:0xD data:string
@8076 = .data:0x8165F900; // type:object size:0x1B data:string
@8086 = .data:0x8165F920; // type:object size:0x18 data:string
@8090 = .data:0x8165F938; // type:object size:0x16 data:string
@8115 = .data:0x8165F950; // type:object size:0x1B data:string
@8148 = .data:0x8165F96C; // type:object size:0x16 data:string
@8156 = .data:0x8165F988; // type:object size:0x18 data:string
@8168 = .data:0x8165F9A0; // type:object size:0x16 data:string
__vt__Q29textinput7Manager = .data:0x8165F9B8; // type:object size:0xD0
__vt__Q49textinput8keyboard10signwindow6Sample = .data:0x8165FA88; // type:object size:0x110
__vt__Q49textinput8keyboard10signwindow6Sample = .data:0x8165FA88; // type:object size:0x10C
__vt__Q39textinput11predictlang6Sample = .data:0x8165FB98; // type:object size:0xE0
__vt__Q39textinput11predictlang4Base = .data:0x8165FC78; // type:object size:0x28
__vt__Q39textinput11predictlang4Base = .data:0x8165FC78; // type:object size:0x24
__vt__Q39textinput7toolbar6Sample = .data:0x8165FCA0; // type:object size:0xD0
__vt__Q39textinput9inputform6Sample = .data:0x8165FD70; // type:object size:0x240
__vt__Q39textinput12candidatebox6Sample = .data:0x8165FFB0; // type:object size:0x130
@@ -18004,13 +18038,13 @@ csCNKeyboard__Q39textinput8keyboard6pctype = .data:0x81667850; // type:object si
@196 = .data:0x81667C78; // type:object size:0x10 scope:local data:wstring
cLanguageIndependentString__Q29textinput15langindependent = .data:0x81667C88; // type:object size:0x190
__vt__Q29textinput15CommandReceiver = .data:0x81667E18; // type:object size:0x20
lbl_81667E38 = .data:0x81667E38; // type:object size:0x19 data:string
lbl_81667E58 = .data:0x81667E58; // type:object size:0x10 data:string
lbl_81667E68 = .data:0x81667E68; // type:object size:0x11 data:string
lbl_81667E7C = .data:0x81667E7C; // type:object size:0x16 data:string
lbl_81667E94 = .data:0x81667E94; // type:object size:0x19 data:string
lbl_81667EB0 = .data:0x81667EB0; // type:object size:0x16 data:string
lbl_81667EC8 = .data:0x81667EC8; // type:object size:0x11 data:string
@8346 = .data:0x81667E38; // type:object size:0x19 data:string
@8347 = .data:0x81667E58; // type:object size:0x10 data:string
@8369 = .data:0x81667E68; // type:object size:0x11 data:string
@8385 = .data:0x81667E7C; // type:object size:0x16 data:string
@8386 = .data:0x81667E94; // type:object size:0x19 data:string
@8402 = .data:0x81667EB0; // type:object size:0x16 data:string
@8410 = .data:0x81667EC8; // type:object size:0x11 data:string
__vt__Q49textinput6extend2bg4Base = .data:0x81667EE0; // type:object size:0x10
__vt__Q49textinput6extend4memo18DisappearMemoState = .data:0x81667EF0; // type:object size:0x58
__vt__Q49textinput6extend4memo13EditMemoState = .data:0x81667F48; // type:object size:0x58
@@ -20725,15 +20759,12 @@ lbl_81694B4C = .sdata2:0x81694B4C; // type:object size:0x4 align:4 data:float
lbl_81694B50 = .sdata2:0x81694B50; // type:object size:0x4 align:4 data:float
lbl_81694B58 = .sdata2:0x81694B58; // type:object size:0x8 align:8 data:double
sMissingTitle__Q23ipl5scene = .sdata2:0x81694B60; // type:object size:0x8 data:wstring
lbl_81694B68 = .sdata2:0x81694B68; // type:object size:0x4 align:4 data:float
lbl_81694B6C = .sdata2:0x81694B6C; // type:object size:0x4 align:4 data:float
lbl_81694B70 = .sdata2:0x81694B70; // type:object size:0x4 align:4 data:float
lbl_81694B74 = .sdata2:0x81694B74; // type:object size:0x1 data:byte
lbl_81694B75 = .sdata2:0x81694B75; // type:object size:0x1 data:byte
lbl_81694B76 = .sdata2:0x81694B76; // type:object size:0x1 data:byte
lbl_81694B77 = .sdata2:0x81694B77; // type:object size:0x1 data:byte
lbl_81694B78 = .sdata2:0x81694B78; // type:object size:0x8 align:8 data:double
lbl_81694B80 = .sdata2:0x81694B80; // type:object size:0x4 align:4 data:float
@22804 = .sdata2:0x81694B68; // type:object size:0x4 scope:local align:4 data:float
@22973 = .sdata2:0x81694B6C; // type:object size:0x4 scope:local align:4 data:float
@22974 = .sdata2:0x81694B70; // type:object size:0x4 scope:local align:4 data:float
@18592 = .sdata2:0x81694B74; // type:object size:0x4 scope:local data:byte
@23648 = .sdata2:0x81694B78; // type:object size:0x8 scope:local align:8 data:double
@24146 = .sdata2:0x81694B80; // type:object size:0x4 scope:local align:4 data:float
scBalloonMsg__Q23ipl5scene = .sdata2:0x81694B88; // type:object size:0x8 scope:local
@11491 = .sdata2:0x81694B90; // type:object size:0x4 scope:local align:4 data:float
@11492 = .sdata2:0x81694B94; // type:object size:0x4 scope:local align:4 data:float
@@ -20812,9 +20843,9 @@ lbl_81694C98 = .sdata2:0x81694C98; // type:object size:0x4 align:4 data:float
lbl_81694C9C = .sdata2:0x81694C9C; // type:object size:0x4 align:4 data:float
lbl_81694CA0 = .sdata2:0x81694CA0; // type:object size:0x4 align:4 data:float
lbl_81694CA8 = .sdata2:0x81694CA8; // type:object size:0x8 align:8 data:double
lbl_81694CB0 = .sdata2:0x81694CB0; // type:object size:0x4 align:4 data:float
lbl_81694CB4 = .sdata2:0x81694CB4; // type:object size:0x4 align:4 data:float
lbl_81694CB8 = .sdata2:0x81694CB8; // type:object size:0x8 align:8 data:double
@4196 = .sdata2:0x81694CB0; // type:object size:0x4 align:4 data:float
@4197 = .sdata2:0x81694CB4; // type:object size:0x4 align:4 data:float
@4202 = .sdata2:0x81694CB8; // type:object size:0x8 align:8 data:double
@3511 = .sdata2:0x81694CC0; // type:object size:0x4 scope:local align:4 data:float
@3561 = .sdata2:0x81694CC4; // type:object size:0x4 scope:local align:4 data:float
@3625 = .sdata2:0x81694CC8; // type:object size:0x8 scope:local align:8 data:double
@@ -21244,7 +21275,7 @@ lbl_81695548 = .sdata2:0x81695548; // type:object size:0x8 align:8 data:double
scLytFatalColorR = .sdata2:0x81695550; // type:object size:0x1 data:byte
scLytFatalColorG = .sdata2:0x81695551; // type:object size:0x1 data:byte
scLytFatalColorB = .sdata2:0x81695552; // type:object size:0x1 data:byte
scLytFatalColorA = .sdata2:0x81695553; // type:object size:0x5 data:byte
scLytFatalColorA = .sdata2:0x81695553; // type:object size:0x1 data:byte
@6184 = .sdata2:0x81695558; // type:object size:0x4 scope:local align:4 data:float
@6185 = .sdata2:0x8169555C; // type:object size:0x4 scope:local align:4 data:float
@6186 = .sdata2:0x81695560; // type:object size:0x4 scope:local align:4 data:float
@@ -21462,7 +21493,7 @@ lbl_81695998 = .sdata2:0x81695998; // type:object size:0x1 data:byte
lbl_81695999 = .sdata2:0x81695999; // type:object size:0x1 data:byte
lbl_8169599C = .sdata2:0x8169599C; // type:object size:0x1 data:byte
lbl_8169599D = .sdata2:0x8169599D; // type:object size:0x1 data:byte
lbl_816959A0 = .sdata2:0x816959A0; // type:object size:0x8 data:byte
lbl_816959A0 = .sdata2:0x816959A0; // type:object size:0x1 data:byte
@3654 = .sdata2:0x816959A8; // type:object size:0x4 scope:local align:4 data:float
@3714 = .sdata2:0x816959AC; // type:object size:0x4 scope:local align:4 data:float
lbl_816959B0 = .sdata2:0x816959B0; // type:object size:0x8 align:8 data:double
@@ -22209,7 +22240,7 @@ lbl_81696CD2 = .sdata:0x81696CD2; // type:object size:0x7 data:string
@12747 = .sdata:0x81696CE2; // type:object size:0x4 scope:local data:wstring
@12851 = .sdata:0x81696CE6; // type:object size:0x7 scope:local data:string
@12910 = .sdata:0x81696CED; // type:object size:0x8 scope:local data:string
lbl_81696CF8 = .sdata:0x81696CF8; // type:object size:0x3 data:string
sCardSlotName__Q23ipl10memorycard = .sdata:0x81696CF8; // type:object size:0x3 data:string
@2405 = .sdata:0x81696D00; // type:object size:0x7 scope:local data:string
@2437 = .sdata:0x81696D08; // type:object size:0x6 scope:local data:string
@2438 = .sdata:0x81696D0E; // type:object size:0x3 scope:local data:string
@@ -22452,7 +22483,7 @@ scBtnSoundType__Q23ipl5scene = .sdata:0x81697258; // type:object size:0x8 scope:
@12749 = .sdata:0x8169727C; // type:object size:0x5 scope:local data:string
lbl_81697288 = .sdata:0x81697288; // type:object size:0x2
lbl_8169728A = .sdata:0x8169728A; // type:object size:0x4 data:string
lbl_81697290 = .sdata:0x81697290; // type:object size:0x4
voiceVe$3399 = .sdata:0x81697290; // type:object size:0x4
@4605 = .sdata:0x81697298; // type:object size:0x4 scope:local data:string
lbl_816972A0 = .sdata:0x816972A0; // type:object size:0x8
lbl_816972A8 = .sdata:0x816972A8; // type:object size:0x8 data:wstring
@@ -23741,7 +23772,7 @@ csZiStringColorRight__Q29textinput9inputform = .sbss:0x81698D10; // type:object
csUnderlateColor__Q29textinput9inputform = .sbss:0x81698D14; // type:object size:0x4 data:4byte
csUnInputedWCharColorSpace__Q29textinput9inputform = .sbss:0x81698D18; // type:object size:0x4 data:4byte
sfColorPhase__Q29textinput9inputform = .sbss:0x81698D1C; // type:object size:0x4 align:4 data:float
lbl_81698D20 = .sbss:0x81698D20; // type:object size:0x4 data:4byte
defaultEventObserver__9textinput = .sbss:0x81698D20; // type:object size:0x4 data:4byte
s_dakuten_map__Q29textinput4util = .sbss:0x81698D28; // type:object size:0x8 scope:local data:4byte
s_handaku_map__Q29textinput4util = .sbss:0x81698D30; // type:object size:0x8 scope:local data:4byte
s_small_map__Q29textinput4util = .sbss:0x81698D38; // type:object size:0x8 scope:local data:4byte

View File

@@ -738,11 +738,11 @@ config.libs = [
]
),
IPLSection("board", [
Object(Equivalent, "scene/board/iplBoard.cpp"),
Object(Matching, "scene/board/iplBoard.cpp"),
Object(Matching, "scene/board/iplBoardObject.cpp"),
Object(Matching, "scene/board/iplBoardSD.cpp"),
Object(Matching, "scene/board/iplUrlProcessor.cpp"),
Object(Equivalent, "scene/board/iplFocusObject.cpp"),
Object(Matching, "scene/board/iplFocusObject.cpp"),
]
),
IPLSection("button", [
@@ -850,7 +850,7 @@ config.libs = [
),
IPLSection("sdChannelSelect", [
Object(NonMatching, "scene/sdChannelSelect/iplSDChannelSelect.cpp"),
Object(NonMatching, "scene/sdChannelSelect/iplSDChannelObj.cpp"),
Object(Matching, "scene/sdChannelSelect/iplSDChannelObj.cpp"),
]
),
IPLSection("sdChannelTitle", [
@@ -874,7 +874,7 @@ config.libs = [
Object(Matching, "scene/setting/iplParental.cpp"),
Object(Matching, "scene/setting/iplAPScanThread.cpp"),
Object(Matching, "scene/setting/iplUSBAP.cpp"),
Object(NonMatching, "scene/setting/iplUSBAPThread.cpp"),
Object(Matching, "scene/setting/iplUSBAPThread.cpp"),
Object(Matching, "scene/setting/iplAOSSThread.cpp"),
Object(NonMatching, "scene/setting/AOSSLink.c"),
Object(NonMatching, "scene/setting/iplRakuRakuThread.cpp"),
@@ -901,7 +901,7 @@ config.libs = [
),
IPLSection("bannerSound", [
Object(Matching, "bannerSound/AudioWavePlayer.cpp"),
Object(Equivalent, "bannerSound/AxAdpcmPlayer.cpp"),
Object(Matching, "bannerSound/AxAdpcmPlayer.cpp"),
Object(Matching, "bannerSound/BannerSoundPlayer.cpp"),
Object(Matching, "bannerSound/AudioWaveUtility.cpp"),
]
@@ -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"]),
@@ -989,7 +989,7 @@ config.libs = [
Object(NonMatching, "clib/zi8cgetc.c"),
Object(Matching, "clib/zi8cinfo.c"),
Object(Matching, "clib/zi8copy.c"),
Object(NonMatching, "clib/zi8dawg.c"),
Object(Matching, "clib/zi8dawg.c"),
Object(Matching, "clib/zi8getc.c"),
Object(NonMatching, "clib/zi8getc2.c"),
Object(Matching, "clib/zi8getSW.c"),
@@ -1045,7 +1045,7 @@ config.libs = [
Object(Matching, "net/crc.c"),
Object(NonMatching, "net/md5.c"),
Object(Matching, "net/sha1.c"),
Object(NonMatching, "net/hmac.c"),
Object(Matching, "net/hmac.c"),
Object(Matching, "net/neterrorcode.c"),
Object(Matching, "net/NETVersion.c"),
Object(NonMatching, "net/aes.c"),
@@ -1060,9 +1060,9 @@ config.libs = [
Object(NonMatching, "nhttp/NHTTP_recvbuf.c"),
Object(Matching, "nhttp/NHTTP_request.c"),
Object(Matching, "nhttp/NHTTP_response.c"),
Object(NonMatching, "nhttp/NHTTP_socket_RVL.c"),
Object(Matching, "nhttp/NHTTP_socket_RVL.c"),
Object(NonMatching, "nhttp/NHTTP_stdlib_RVL.c"),
Object(NonMatching, "nhttp/NHTTP_thread.c"),
Object(Matching, "nhttp/NHTTP_thread.c"),
Object(Matching, "nhttp/d_nhttp_private.c"),
Object(Matching, "nhttp/d_nhttp.c"),
Object(Matching, "nhttp/d_nhttp_common.c"),
@@ -1076,11 +1076,11 @@ config.libs = [
Object(Matching, "nwc24/NWC24Manage.c"),
Object(Matching, "nwc24/NWC24MsgObj.c"),
Object(NonMatching, "nwc24/NWC24MBoxCtrl.c"),
Object(NonMatching, "nwc24/NWC24Mime.c"),
Object(Matching, "nwc24/NWC24Mime.c"),
Object(Matching, "nwc24/NWC24Stream.c"),
Object(Matching, "nwc24/NWC24Parser.c"),
Object(NonMatching, "nwc24/NWC24MsgCommit.c"),
Object(NonMatching, "nwc24/NWC24MsgRead.c"),
Object(Matching, "nwc24/NWC24MsgRead.c"),
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
Object(Matching, "nwc24/NWC24Schedule.c"),
Object(NonMatching, "nwc24/NWC24DateParser.c"),
@@ -1097,7 +1097,7 @@ config.libs = [
RevoEXLib("so", [
Object(Matching, "so/SOCommon.c"),
Object(NonMatching, "so/SOBasic.c"),
Object(NonMatching, "so/SOInformation.c"),
Object(Matching, "so/SOInformation.c"),
Object(NonMatching, "so/SOOption.c"),
]
),
@@ -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"),
@@ -1692,19 +1692,19 @@ config.libs = [
Object(Matching, "fa/pdm_disk.c"),
Object(NonMatching, "fa/pdm_partition.c"),
Object(NonMatching, "fa/pf_cache.c"),
Object(NonMatching, "fa/pf_cluster.c"),
Object(NonMatching, "fa/pf_dir.c"),
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(Matching, "fa/pf_entry_iterator.c"),
Object(NonMatching, "fa/pf_fat.c"),
Object(Matching, "fa/pf_fat12.c"),
Object(Matching, "fa/pf_fat16.c"),
Object(Matching, "fa/pf_fat32.c"),
Object(Matching, "fa/pf_fatfs.c"),
Object(Matching, "fa/pf_file.c"),
Object(NonMatching, "fa/pf_path.c"),
Object(Matching, "fa/pf_path.c"),
Object(Matching, "fa/pf_sector.c"),
Object(NonMatching, "fa/pf_volume.c"),
Object(Matching, "fa/pf_volume.c"),
Object(Matching, "fa/pf_volume_apiadd.c"),
Object(Matching, "fa/pf_cp932.c"),
Object(Matching, "fa/pf_api_util.c"),
@@ -1860,7 +1860,7 @@ config.libs = [
Object(Matching, "fa/msc/puh_msc.c"),
Object(Matching, "fa/msc/puh_msc_cmd.c"),
Object(NonMatching, "fa/msc/puh_msc_blk.c"),
Object(Matching, "fa/msc/puh_msc_blk.c"),
]
),
RVLSDKLib("sdi", [

View File

@@ -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*);

View File

@@ -143,7 +143,11 @@ namespace ipl {
#else
VEC3 operator-(const VEC3& rhs) const { return VEC3(x - rhs.x, y - rhs.y, z - rhs.z); }
#endif
#ifdef IPL_FOCUS_OBJECT_CPP
VEC3 operator*(f32 val) const;
#else
VEC3 operator*(f32 val) const { return VEC3(x * val, y * val, z * val); }
#endif
VEC3 operator*(f64 val) const {
nw4r::math::VEC3 vecOut;
VEC3Scale(&vecOut, this, (f32)val);

View File

@@ -53,24 +53,7 @@ namespace ipl {
mBScroller.init();
}
BOOL calc(bool canScroll) __attribute__((never_inline)) /*for now*/ {
BOOL result = FALSE;
if (canScroll) {
if (mBScroller.calc()) {
result = TRUE;
}
}
mScroller.calc();
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
mScroller.addScroll(movable);
mBScroller.addSoundFreq(movable);
return result;
}
BOOL calc(bool canScroll);
BOOL is_busy() const {
BOOL result = TRUE;

View File

@@ -65,7 +65,11 @@ namespace ipl {
virtual BOOL isReady() const { return FALSE; }
/** @brief If the user can power off/reset the system */
#ifdef IPL_SD_CHANNEL_TITLE_CPP
virtual BOOL isResetAcceptable() { return TRUE; }
#else
virtual BOOL isResetAcceptable() const { return TRUE; }
#endif
/** @brief The scene running code when powering off/resetting the system */
virtual void startResetting() {}
/** @brief If the scene has finished its powering off/resetting task */

View File

@@ -102,12 +102,7 @@ namespace ipl {
static const char* getButtonName(int button) { return smButtonName[button]; }
#endif
#ifdef IPL_SD_CHANNEL_SELECT_CPP
void setEventHandler(::gui::EventHandler * event,
::gui::EventHandler * optOutEvent = NULL);
#else
void setEventHandler(::gui::EventHandler * event, ::gui::EventHandler * optOutEvent);
#endif
void setEventHandler(::gui::EventHandler * event);
void setText(const char* paneName, u32 msgId);
void setText(const char* paneName, const wchar_t* text);

View File

@@ -188,7 +188,7 @@ namespace ipl {
static const char* mscClockPaneNames[3];
static const char* mscMaskPaneName;
#if defined(IPL_SD_CHANNEL_TITLE_CPP) || defined(IPL_SD_CHANNEL_OBJ_CPP)
#if defined(IPL_SD_CHANNEL_TITLE_CPP) || defined(IPL_SD_CHANNEL_OBJ_CPP) || defined(IPL_SD_CHANNEL_MEMORY_CPP)
public:
#else
private:
@@ -203,12 +203,12 @@ namespace ipl {
bool enqueueLoadNotice();
bool enqueuePageNotice();
bool enqueueResultNotice(u32 result);
bool enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value);
bool enqueueMoveNotice(u32 controller, u32 page, u32 index);
bool enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state);
bool enqueueErrorNotice(u32 page, u32 index);
bool enqueueCommandNotice(u32 page, u32 index, u32 command);
bool enqueueDeleteNotice(u32 controller, u32 page, u32 index);
bool enqueueChannelNotice(u64 titleId, u32 value);
bool enqueueMoveNotice(u64 titleId);
bool enqueueStateNotice(u64 titleId, u32 state);
bool enqueueErrorNotice(ESTitleId** titleIds, ESTitleId** secondaryTitles);
bool enqueueCommandNotice(ESTitleId** titles, ESTitleId** secondaryTitles, ESTitleId** names);
bool enqueueDeleteNotice(u64 titleId);
void clearCommandQueue();
void clearNoticeQueue();
void calcChannelObjects();

View File

@@ -1,32 +1,45 @@
// Yes, versions other than 4.3U align by 8.
#if defined(VERSION_43U)
#pragma function_align 32
#else
#pragma function_align 8
#endif // VERSION_43U
#endif
#include <TRK_Hollywood_Revolution.h>
#pragma force_active on
// Encapsulating function to get the file to align properly
asm void __targsupp() {
// clang-format off
#ifdef __MWERKS__
// clang-format off
asm DSIOResult TRKAccessFile(MessageCommandID cmd, unsigned int handle, int* count, unsigned char* buffer) {
#ifdef __MWERKS__
nofralloc
entry TRKAccessFile
twi 31, r0, 0
blr
entry TRKOpenFile
twi 31, r0, 0
blr
entry TRKCloseFile
twi 31, r0, 0
blr
entry TRKPositionFile
twi 31, r0, 0
blr
#endif // __MWERKS__
// clang-format on
twi 31, r0, 0
blr
#endif
}
#pragma function_align 8
asm DSIOResult TRKOpenFile() {
#ifdef __MWERKS__
nofralloc
twi 31, r0, 0
blr
#endif
}
asm DSIOResult TRKCloseFile() {
#ifdef __MWERKS__
nofralloc
twi 31, r0, 0
blr
#endif
}
asm DSIOResult TRKPositionFile() {
#ifdef __MWERKS__
nofralloc
twi 31, r0, 0
blr
#endif
}
// clang-format on

View File

@@ -37,7 +37,7 @@ namespace nw4r {
} // namespace detail
template <typename TDerived, typename TBase>
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP)
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP) || defined(IPL_SD_CHANNEL_TITLE_CPP)
TDerived DynamicCast(TBase* pPtr);
#else
inline TDerived DynamicCast(TBase* pPtr) {

View File

@@ -1,13 +1,13 @@
#include <nw4r/db/assert.h>
extern "C" const u8 scLytFatalColorR = 255;
extern "C" const u8 scLytFatalColorG = 255;
extern "C" const u8 scLytFatalColorB = 255;
extern "C" const u8 scLytFatalColorA = 0;
extern "C" const u8 scLytFatalColorR;
extern "C" const u8 scLytFatalColorG;
extern "C" const u8 scLytFatalColorB;
extern "C" const u8 scLytFatalColorA;
extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
#undef NW4R_ASSERT
#define NW4R_ASSERT(x) \
#define NW4R_GLOBAL_ASSERT(x) \
{ \
if (!(x)) { \
GXColor front = {*((volatile const u8*)&::scLytFatalColorR), *((volatile const u8*)&::scLytFatalColorG), \
@@ -17,6 +17,15 @@ extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system
} \
}
#define NW4R_ASSERT(x) \
{ \
if (!(x)) { \
GXColor front = {255, 255, 255, 0}; \
GXColor back = {0, 0, 0, 0}; \
OSFatal((GXColor)front, (GXColor)back, ::scLytFatalMsg); \
} \
}
#include <nw4r/lyt/window.h>
#include <nw4r/lyt/common.h>
@@ -488,7 +497,7 @@ namespace nw4r {
}
Material* Window::GetFrameMaterial(u32 frameIdx) const {
NW4R_ASSERT(frameIdx < WINDOWFRAME_MAX);
NW4R_GLOBAL_ASSERT(frameIdx < WINDOWFRAME_MAX);
if (frameIdx >= mFrameNum) {
return NULL;
}
@@ -501,3 +510,8 @@ namespace nw4r {
}
} // namespace lyt
} // namespace nw4r
extern "C" const u8 scLytFatalColorR = 255;
extern "C" const u8 scLytFatalColorG = 255;
extern "C" const u8 scLytFatalColorB = 255;
extern "C" const u8 scLytFatalColorA = 0;

View File

@@ -368,20 +368,20 @@ namespace nw4r {
u32 sheetOffsetsScratchSize;
dataBlockCount = font->hdr.dataBlocks; // 0x0E
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
dataBlockCount = font->hdr.dataBlocks; // 0x0E
// countName = font->glgr.inner.nameCount;
countSheet = font->glgr.inner.sheetCount;
// count0A = font->glgr.inner.smthCount_0x0a;
// count0C = font->glgr.inner.smthCount_0x0c;
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
font->glgr.inner.smthCount_0x0c);
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
pGlgr = &font->glgr;
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {

View File

@@ -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);

View File

@@ -15,9 +15,13 @@ static s8 clampS8(s32 v) {
void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag) {
s32 bd;
s32 d;
s32 c;
s32 a;
s32 cd;
s32 oddrot;
s32 evsum;
s32 rot;
s32 d;
s32 b;
s32* sp;
@@ -26,57 +30,41 @@ void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag
s32 tmp[64];
s32 i;
s32 evsum, rot, oddrot, cd;
sp = block + 24;
dp = tmp + 24;
for (i = 0; i < 2; i++) {
a = sp[0]; // 0x0
b = sp[1]; // 0x4
c = sp[2]; // 0x8
d = sp[3]; // 0xc
for (i = 0; i < 4; i++) {
s32 a, b, c, d;
s32 odddiff, bd, evsum, cd, rot, oddrot;
a = sp[0];
b = sp[1];
c = sp[2];
d = sp[3];
odddiff = b - d;
bd = b + d;
evsum = a + c;
oddrot = (0xB5 * (sp[1] - sp[3]) >> 8) + bd;
rot = (0xB5 * (sp[1] - sp[3])) >> 8;
dp[1] = (a - c) + rot;
dp[2] = (a - c) - rot;
dp[3] = evsum - oddrot;
dp[0] = evsum + oddrot;
b = sp[-7]; // -0x1c
d = sp[-5]; // -0x14
bd = b + d;
rot = ((b - d) * 0xB5) >> 8;
cd = a - c;
rot = (odddiff * 0xB5) >> 8;
oddrot = rot + bd;
a = sp[-8]; // -0x20
c = sp[-6]; // -0x18
dp[-8] = (a + c) + oddrot;
dp[-7] = (a - c) + rot;
dp[-6] = (a - c) - rot;
dp[-5] = (a + c) - oddrot;
sp -= 16;
dp -= 16;
dp[0] = evsum + oddrot;
dp[1] = cd + rot;
dp[2] = cd - rot;
dp[3] = evsum - oddrot;
sp -= 8;
dp -= 8;
}
{
u32 idx = 3;
sp = tmp + 3;
for (i = 0; i < 4; i++) {
u8* bp = conv_row_ptr + idx;
a = sp[0] + 0x40000;
b = sp[8];
d = sp[24];
c = sp[16];
a = tmp[idx] + 0x40000;
b = tmp[idx + 8];
d = tmp[idx + 24];
c = tmp[idx + 16];
evsum = a + c;
cd = a - c;
@@ -90,7 +78,6 @@ void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag
bp[pitch * 2] = clampU8((cd - rot) >> 11);
bp[pitch * 4 - pitch] = clampU8((evsum - oddrot) >> 11);
sp--;
idx -= 1;
}
}
@@ -131,38 +118,37 @@ void TMCJPEGDEC_IdctBlock4x4_Col(s32* sp, u8* conv_row_ptr, u16 pitch, s32 zigza
s32 a, b, c, d;
s32 evsum, evdiff, oddsum, odddiff, rot, oddrot;
for (i = 0; i < 2; i++) {
s32 a0 = src[0], b0 = src[1], c0 = src[2], d0 = src[3];
s32 a1 = src[-8], b1 = src[-7], c1 = src[-6], d1 = src[-5];
s32 odddiff0 = b0 - d0;
s32 oddsum0 = b0 + d0;
s32 evsum0 = a0 + c0;
s32 evdiff0 = a0 - c0;
s32 rot0 = (odddiff0 * 0xB5) >> 8;
s32 odddiff1 = b1 - d1;
s32 oddsum1 = b1 + d1;
s32 evsum1 = a1 + c1;
s32 evdiff1 = a1 - c1;
s32 rot1 = (odddiff1 * 0xB5) >> 8;
dst[0] = evsum0 + (oddsum0 + rot0);
dst[1] = evdiff0 + rot0;
dst[2] = evdiff0 - rot0;
dst[3] = evsum0 - (oddsum0 + rot0);
dst[-8] = evsum1 + (oddsum1 + rot1);
dst[-7] = evdiff1 + rot1;
dst[-6] = evdiff1 - rot1;
dst[-5] = evsum1 - (oddsum1 + rot1);
src -= 16;
dst -= 16;
for (i = 0; i < 4; i++) {
a = src[0];
b = src[1];
c = src[2];
d = src[3];
odddiff = b - d;
oddsum = b + d;
evsum = a + c;
evdiff = a - c;
rot = (odddiff * 0xB5) >> 8;
oddrot = rot + oddsum;
dst[0] = evsum + oddrot;
dst[1] = evdiff + rot;
dst[2] = evdiff - rot;
dst[3] = evsum - oddrot;
src -= 8;
dst -= 8;
}
src = tmp + 3;
for (i = 3; i >= 0; i--) {
s32 evdiff;
s32 a;
s32 c;
s32 b;
s32 evsum;
s32 d;
s32 oddsum;
s32 odddiff;
s32 rot;
s32 oddrot;
u8* out = conv_row_ptr + i;
a = src[0];
b = src[8];
@@ -170,7 +156,7 @@ void TMCJPEGDEC_IdctBlock4x4_Col(s32* sp, u8* conv_row_ptr, u16 pitch, s32 zigza
d = src[24];
odddiff = b - d;
oddsum = b + d;
oddsum = d + b;
evsum = a + c;
evdiff = a - c;
rot = odddiff * 0xB5 >> 8;

View File

@@ -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;
}
{
@@ -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;
@@ -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 ((blue | green | red) >> 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 ((blue | green | red) >> 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 ((blue | green | red) >> 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;
@@ -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;
@@ -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 ((blue | green | red) >> 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 ((blue | green | red) >> 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,9 +856,9 @@ 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;
@@ -867,9 +867,9 @@ static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
s32 height;
s32 width;
s32 column;
s32 rowSkip;
s32 xEnd;
s32 yEnd;
u8* texture;
s32 tileWidth;
s32 row;
s32 red;
s32 cbValue;
@@ -896,10 +896,10 @@ static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
cbValue = (s8)*cb++;
crValue = (s8)*cr++;
value = *luminance++;
green = value + (-(cbValue * 88 + crValue * 183) >> 8);
green = value + (-(crValue * 183 + cbValue * 88) >> 8);
red = value + ((crValue * 359) >> 8);
blue = value + ((cbValue * 454) >> 8);
if ((blue | red | green) >> 8) {
if ((blue | green | red) >> 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;

View File

@@ -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;
@@ -361,7 +358,6 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
u8* luminance;
@@ -376,9 +372,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 +409,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 +424,21 @@ static void TMCJPEG_814F11C4(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F17E0(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 height;
s32 chromaYEnd;
s32 column;
u8* lumaTexture;
s32 chromaXEnd;
s32 height;
u8* luminance;
u32 chromaTileWidth;
s32 column;
u8* cbTexture;
s32 width;
s32 row;
u8* crTexture;
u32 tileWidth;
s32 xEnd;
u8* cb;
TMCCJPEGDecState* state;
s32 yEnd;
s32 xEnd;
s32 width;
u8* cr;
s32 row;
u32 tileWidth;
row = y;
luminance = work->convBuf + 4;
@@ -470,14 +464,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 +480,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 +490,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 +532,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;
@@ -554,9 +547,8 @@ static void TMCJPEG_814F1F48(TMCCJPEGDecWork* work, s32 x, s32 y) {
}
static void TMCJPEG_814F2570(TMCCJPEGDecWork* work, s32 x, s32 y) {
u32 chromaTileWidth;
TMCCJPEGDecState* state;
u8* lumaTexture;
TMCCJPEGDecState* state;
u8* luminance;
s32 column;
s32 row;
@@ -596,13 +588,13 @@ static void TMCJPEG_814F2570(TMCCJPEGDecWork* work, s32 x, s32 y) {
luminance += 8 - width;
}
y = (u32)y >> 1;
chromaTileWidth = state->chromaWidth >> 3;
tileWidth = state->chromaWidth >> 3;
chromaEnd = y + 8 / state->scaleFactor;
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;

View File

@@ -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;
@@ -1001,10 +1001,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 = candidateCount + 1;
} else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
if (candidateCount >= params->maxCandidates) goto finishSpelling;
} else {

View File

@@ -187,8 +187,7 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
ZI_WORK->unk_0x1764 = (ziU8*)group;
if (ZI_WORK->unk_0x1764 == 0) {
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK);
ZI_WORK->unk_0x1764 = (ziU8*)tableAddress;
ZI_WORK->unk_0x1764 = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
}
}
if (ZI_WORK->unk_0x1764 != 0) {

View File

@@ -49,22 +49,25 @@ void Zi8CopyZHSpelling(ziU8* source, ziWChar* output, ziU16 capacity, int size,
}
}
}
ziU8 ZADP_Zi8SetPDremoveOpt(ziU8 option ZI_NEED_WORK) {
ziU8 ZADP_Zi8SetPDremoveOpt(ziU8 option, struct __zi8_work_data_s* __zi8_work_data) {
ziU8 previous;
previous = ZI_WORK->pdRemoveOpt;
ZI_WORK->pdRemoveOpt = option;
previous = __zi8_work_data->pdRemoveOpt;
__zi8_work_data->pdRemoveOpt = option;
Zi8LogError(100, __zi8_work_data);
return previous;
}
ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziWChar* spelling, ziU16 spellingCapacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
int fallback = 0;
ziU8* bytePattern;
ziWChar folded;
ziU32 entrySize;
int wordSize, copied;
ziPudSection* section;
int wordSize;
int copied;
ziU8* word;
int index;
int fallback = 0;
ziU32 entrySize;
ziPudHeader* table;
ziPudSection* section;
ziU8* byteOutput;
if (!(ZI_WORK->pudCount <= 16 && ZI_WORK->pudCount != 0 && ZI_WORK->pudTable[ZI_WORK->pudCount - 1] != 0)) {
Zi8LogError(0x4B0, __zi8_work_data);
return 0;
@@ -78,8 +81,8 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
index = 0;
while (index < table->languageCount) {
if (section->language == language) break;
index++;
section++;
index++;
}
if (index >= table->languageCount) {
Zi8LogError(0x4F6, __zi8_work_data);
@@ -100,18 +103,20 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
entrySize = wordSize;
if (language == 1) {
if (ZI_WORK->unk_0x17 > *word) goto next;
entrySize = wordSize - 1;
wordSize--;
entrySize--;
word++;
wordSize = ZiGetZHWordSize((ziWChar*)word, entrySize);
} else if (ZI_WORK->unk_0x31E != 0 && complete != 0 && wordSize > length && word[length] == 0x20) goto matchText;
} else if (ZI_WORK->unk_0x31E != 0 && complete != 0 && length < wordSize && word[length] == 0x20) goto matchText;
if ((ziS32)length > (ziS32)wordSize || (complete != 0 && wordSize != length) || (complete == 0 && wordSize == length)) {
next:
ZI_WORK->unk_0x318++;
word += entrySize;
} else {
if (language == 1) {
bytePattern = (ziU8*)pattern;
for (index = 0; index < length; index++) {
if (word[index] != ((ziU8*)pattern)[index]) goto next;
if (word[index] != bytePattern[index]) goto next;
}
goto matched;
}
@@ -134,11 +139,12 @@ matched:
return 1;
}
if (language == 1) {
index = 0;
for (copied = 0; index < (ziS32)wordSize && copied < capacity; copied++) {
((ziU8*)output)[index] = word[index];
((ziU8*)output)[index + 1] = word[index + 1];
index += 2;
byteOutput = (ziU8*)output;
for (index = copied = 0; index < (ziS32)wordSize && copied < capacity; copied++) {
byteOutput[index] = word[index];
index++;
byteOutput[index] = word[index];
index++;
}
Zi8CopyZHSpelling(word, spelling, spellingCapacity, entrySize, wordSize);
} else {
@@ -168,16 +174,16 @@ matched:
}
}
}
ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation, struct __zi8_work_data_s* __zi8_work_data) {
ziU32 result;
if (continuation == 0) ZI_WORK->pudCount = 1;
if (continuation == 0) __zi8_work_data->pudCount = 1;
for (;;) {
result = Zi8_8147FD7C(pattern, length, language, output, capacity, complete, continuation, __zi8_work_data);
if ((ziU8)result != 0) break;
if (++ZI_WORK->pudCount <= 16) {
if (++__zi8_work_data->pudCount <= 16) {
continuation = 0;
} else {
ZI_WORK->pudCount = 1;
__zi8_work_data->pudCount = 1;
break;
}
}

View File

@@ -15,11 +15,11 @@ void Zi8Memset(ziPtr, ziU32, ziU32);
ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
ziU8 length;
ziU8 position;
ziUwdNode* previous;
ziUwdNode* current;
ziUwdNode* added;
ziUserWord* candidate;
ziU8 position;
if (ZI_WORK->uwdCount >= 32) {
Zi8LogError(0x19D, __zi8_work_data);
return 0;
@@ -56,8 +56,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
previous = current;
current = current->next;
}
length = ZI_WORK->uwdCount++;
added = &ZI_WORK->uwdNodes[length];
added = &ZI_WORK->uwdNodes[ZI_WORK->uwdCount++];
if (previous == 0) {
ZI_WORK->uwdList = added;
added->next = current;
@@ -87,23 +86,24 @@ void Zi8_8148047C(ziPtr __zi8_work_data) {
ZI_WORK->uwdList = 0;
}
ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16 currentLength, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
ziWChar folded;
int fallback = 0;
int visited = 0;
int prefixLength;
int position, previousOffset;
ziU32 size;
ziU8 entryLanguage;
ziU32 entryLength;
ziUserDictionary* dictionary;
ziU8* cursor;
ziU8* begin;
ziU8* boundary;
ziU8* end;
ziUserWord* candidate;
ziUserWord* previous;
ziUserWord* result;
ziUserDictionary* dictionary;
int firstSegment;
ziU32 size;
int headerSize;
int entryLanguage;
volatile int entryLength;
int previousOffset;
int visited = 0;
int fallback = 0;
ziWChar folded;
ziU8* text;
int position;
int prefixLength;
Zi8LogError(100, __zi8_work_data);
if (!(ZI_WORK->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
Zi8ReplaceLastError(0x19C, __zi8_work_data);
@@ -111,16 +111,17 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
}
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
if (continuation != 0) {
result = Zi8_814803F4(__zi8_work_data);
text = (ziU8*)Zi8_814803F4(__zi8_work_data);
entryLength = 0;
if (result != 0) {
entryLanguage = result->language;
entryLength = result->length;
if (text != 0) {
language = ((ziUserWord*)text)->language;
entryLength = ((ziUserWord*)text)->length;
if (entryLength >= capacity) {
Zi8_8148047C(__zi8_work_data);
return 0;
}
for (position = 0; position < (ziS32)entryLength; position++) output[position] = Zi8ConvertUC2WC(result->text[position], entryLanguage, __zi8_work_data);
text = ((ziUserWord*)text)->text;
for (position = 0; position < (ziS32)entryLength; position++) output[position] = Zi8ConvertUC2WC(text[position], language, __zi8_work_data);
}
return entryLength;
}
@@ -130,17 +131,20 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
if (currentWord == 0 || currentLength == 0 || currentWord[currentLength - 1] != 0x20) ZI_WORK->unk_0x140 = 0;
else {
prefixLength = 0;
for (position = currentLength - 2; currentWord[position] != 0x20 && position >= 0; position--) prefixLength++;
for (position = currentLength - 2; position >= 0;) {
if (currentWord[position] == 0x20) break;
position--;
prefixLength++;
}
position++;
if (prefixLength == 0 || prefixLength > 63) ZI_WORK->unk_0x140 = 0;
else {
ZI_WORK->unk_0x140 = 1;
ZI_WORK->unk_0x141[0] = prefixLength + 5;
ZI_WORK->unk_0x141[prefixLength + 4] = prefixLength + 5;
ZI_WORK->unk_0x141[prefixLength + 4] = ZI_WORK->unk_0x141[0] = prefixLength + 5;
ZI_WORK->unk_0x141[1] = language;
ZI_WORK->unk_0x141[2] = prefixLength;
previousOffset = 4;
for (; prefixLength > 0; prefixLength--, position++) {
while (prefixLength > 0) {
folded = currentWord[position];
ZI_WORK->unk_0x141[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = 0;
@@ -152,48 +156,56 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
ZI_WORK->unk_0x140 = 0;
break;
}
prefixLength--;
position++;
}
}
}
if (ZI_WORK->unk_0x140 == 0 && length == 0) return 0;
rescan:
begin = dictionary->entries + dictionary->current;
cursor = begin = dictionary->entries + dictionary->current;
boundary = (ziU8*)dictionary + dictionary->boundary + 7;
end = (ziU8*)dictionary + dictionary->end + 7;
cursor = begin;
if (begin < boundary) firstSegment = 1;
else firstSegment = 0;
while (firstSegment ? cursor < boundary : cursor < end) {
while ((cursor < boundary && firstSegment) || (cursor < end && !firstSegment)) {
size = *cursor;
candidate = (ziUserWord*)cursor;
position = visited++;
if ((ziS32)ZI_WORK->unk_0x13C <= position && (size & 0xC0) == 0) {
if ((ziS32)ZI_WORK->unk_0x13C > visited++ || (((ziUserWord*)cursor)->size & 0xC0) != 0) {
next:
if ((cursor += size) > end) {
if (firstSegment) break;
firstSegment = 1;
size = cursor - end - 1;
cursor = dictionary->entries + size;
}
} else {
previous = (ziUserWord*)(cursor + size);
if ((ziU8*)previous > end) previous = (ziUserWord*)(cursor + ((ziU8*)dictionary - end) + 7);
entryLanguage = candidate->language;
entryLength = candidate->length;
if (entryLanguage == language && length <= entryLength && entryLength < capacity && (complete == 0 || entryLength == length) && (complete != 0 || entryLength != length)) {
if ((ziU8*)previous > end) previous = (ziUserWord*)(dictionary->entries + (cursor - end - 1));
text = cursor;
headerSize = *text++;
entryLanguage = *text++;
entryLength = *text++;
text++;
if (entryLanguage == language && entryLength >= length && entryLength < capacity && (complete == 0 || entryLength == length) && (complete != 0 || entryLength != length)) {
for (position = 0; position < length; position++) {
if (pattern[position] < 0xEFF1 || pattern[position] > 0xF010) {
folded = Zi8ConvertUC2WC(candidate->text[position], language, __zi8_work_data);
if (pattern[position] >= 0xEFF1 && pattern[position] <= 0xF010) {
if (pattern[position] != Zi8ConvertUC2Key(text[position], language, __zi8_work_data)) goto next;
} else {
folded = Zi8ConvertUC2WC(text[position], language, __zi8_work_data);
if (folded != pattern[position] && (!ZI_WORK->unk_0x1F || !Zi8ChangeCharCase(0, &folded, language, __zi8_work_data) || folded != pattern[position])) goto next;
} else if (pattern[position] != Zi8ConvertUC2Key(candidate->text[position], language, __zi8_work_data)) goto next;
}
}
if (ZI_WORK->unk_0x140 != 0) {
if (ZI_WORK->unk_0x141[0] != previous->size || ZI_WORK->unk_0x141[1] != previous->language || ZI_WORK->unk_0x141[2] != previous->length) goto next;
for (position = 4; position < ZI_WORK->unk_0x141[2] + 4; position++) {
if (ZI_WORK->unk_0x141[position] != ((ziU8*)previous)[position] && ZI_WORK->unk_0x184[position] != ((ziU8*)previous)[position]) goto next;
prefixLength = 4;
position = ZI_WORK->unk_0x141[2] + 4;
for (; prefixLength < position; prefixLength++) {
if (ZI_WORK->unk_0x141[prefixLength] != ((ziU8*)previous)[prefixLength] && ZI_WORK->unk_0x184[prefixLength] != ((ziU8*)previous)[prefixLength]) goto next;
}
}
Zi8_81480224(candidate, __zi8_work_data);
Zi8_81480224((ziUserWord*)cursor, __zi8_work_data);
}
}
next:
cursor += size;
if (end < cursor) {
if (firstSegment) break;
firstSegment = 1;
cursor = dictionary->entries + (cursor - end - 1);
goto next;
}
}
if (ZI_WORK->unk_0x140 != 0 && length != 0) {
@@ -201,23 +213,24 @@ next:
visited = 0;
goto rescan;
}
if (complete == 1 && length != 0 && continuation == 0) {
if (length == 1 && complete != 0 && continuation == 0) {
complete = 0;
fallback = 1;
visited = 0;
goto rescan;
}
}
result = Zi8_814803F4(__zi8_work_data);
entryLength = 0;
if (result != 0) {
entryLanguage = result->language;
entryLength = result->length;
text = (ziU8*)Zi8_814803F4(__zi8_work_data);
if (text != 0) {
language = ((ziUserWord*)text)->language;
entryLength = ((ziUserWord*)text)->length;
if (entryLength >= capacity) {
Zi8_8148047C(__zi8_work_data);
return 0;
}
for (position = 0; position < (ziS32)entryLength; position++) output[position] = Zi8ConvertUC2WC(result->text[position], entryLanguage, __zi8_work_data);
text = ((ziUserWord*)text)->text;
for (position = 0; position < (ziS32)entryLength; position++) output[position] = Zi8ConvertUC2WC(text[position], language, __zi8_work_data);
return entryLength;
}
return entryLength;
return 0;
}

View File

@@ -1,7 +1,7 @@
#include <zi8clib/zierror.h>
#include <zi8clib/zitypes.h>
extern ziU16 nodeHeaderTable[16];
extern const ziU16 nodeHeaderTable[16];
ziU32 ZiDAWGGetChild(ziU32 node) {
ziU32 base;
@@ -22,11 +22,10 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
node += offset;
if (((ziU32)header & 2) != 0) {
if ((*(ziU8*)node & 0x80) != 0) {
offset = (*(ziU8*)node & 0x7f) * 0x10000 + ((ziU32)*((ziU8*)node + 1) & 0xffff) * 0x100 + 0x8000;
offset += *((ziU8*)node + 2);
offset = ((*(ziU8*)node & 0x7f) << 16) +
((((ziU32)*((ziU8*)node + 1) & 0xffff) << 8) + *((ziU8*)node + 2)) + 0x8000;
} else {
offset = ((ziU32)*(ziU8*)node & 0xffff) * 0x100;
offset += (ziU32)*((ziU8*)node + 1);
offset = (((ziU32)*(ziU8*)node & 0xffff) << 8) + (ziU32)*((ziU8*)node + 1);
}
} else if (((ziU32)header & 8) != 0) {
if ((*(ziU8*)node & 0x80) != 0) {
@@ -43,9 +42,9 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
}
ziU8* ZiDAWGGetSibling(ziU8* cursor) {
ziU16 header;
ziU8* node;
ziS32 depth;
ziU8* node;
ziU16 header;
ziS32 offset;
depth = 0;
@@ -71,8 +70,8 @@ ziU8* ZiDAWGGetSibling(ziU8* cursor) {
}
if ((*cursor & 0x80) != 0) {
node += (*cursor & 0x7f) * 0x10000 + (ziU32)cursor[1] * 0x100 +
(ziU32)cursor[2] + 0x8000;
node += (*cursor & 0x7f) * 0x10000 +
(((ziU32)cursor[1] << 8) + (ziU32)cursor[2]) + 0x8000;
} else {
node = cursor[1] + (node + (ziU16)*cursor * 0x100);
}
@@ -127,7 +126,7 @@ ziU8 ZiDAWGgetEOWattribute(ziU32 node) {
return (nodeHeaderTable[*(ziU8*)node >> 4] & 0x10) > 0;
}
ziU32 ZiDAWGgetCHARattribute(ziPtr context, ziU32 node, ziPtr __zi8_work_data) {
ziU32 ZiDAWGgetCHARattribute(zi8DawgCtx* context, ziU32 node, ziPtr __zi8_work_data) {
ziU8 key;
ziU32 attribute;
@@ -137,15 +136,15 @@ ziU32 ZiDAWGgetCHARattribute(ziPtr context, ziU32 node, ziPtr __zi8_work_data) {
key = (ziU32)*(ziU8*)node & 0xf;
}
if (key > ((zi8DawgCtx*)context)->cap) {
if (key > context->cap) {
Zi8LogError(0x138b, __zi8_work_data);
return 0;
}
attribute = key << 24;
attribute |= ((ziU8*)((zi8DawgCtx*)context)->p0C)[key] << 16;
attribute += ((ziU32)((ziU8*)((zi8DawgCtx*)context)->p08)[key * 2] & 0xFFFF) << 8;
attribute += ((ziU8*)((zi8DawgCtx*)context)->p08)[key * 2 + 1];
attribute |= ((ziU8*)context->p0C)[key] << 16;
attribute |= (((ziU32)((ziU8*)context->p08)[key * 2] & 0xFFFF) << 8) +
((ziU8*)context->p08 + key * 2)[1];
Zi8LogError(0x64, __zi8_work_data);
return attribute;
}
@@ -158,9 +157,9 @@ ziU32 ZiDAWGGetGraph(ziPtr context) {
ziU32 ZiDAWGGetGraphInfo(zi8DawgCtx* context, ziU8* entry, ziU16* keys) {
ziU32 graph;
ziS32 result;
ziU32 end;
ziU8 depth;
ziU32 end;
ziS32 result;
graph = ZiDAWGGetGraph(context);
result = 0;
@@ -203,7 +202,7 @@ checkEntry:
break;
}
end = (ziU32)(entry + (((ziU16)entry[0] << 8) + entry[1]) * 10 + 10);
end = (((ziU16)entry[0] << 8) + entry[1]) * 10 + ((ziU32)entry + 10);
entry += 10;
depth++;
keys++;

View File

@@ -26,28 +26,22 @@ ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
ziU16 Zi8Uni2Ord(ziWChar ZI_NEED_WORK);
ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
int offset;
ziU8 group;
ziU8 remaining;
ziU16 value;
ziWChar* cursor;
ziSearchState search;
ziChineseEntry* table = 0;
ziU8* baseData = 0;
ziU8 group = 0;
ziU8 remaining = 0;
ziU16 value = 0;
ziGetParam request;
ziWChar ordinals[65];
int count;
int unmatched;
int countLeft;
ziChineseEntry* entry;
ziChineseEntry* table;
ziWChar* cursor;
ziU8* data;
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
ziU32 savedFormats = ZI_WORK->unk_0x1410;
ziU8 savedCount = ZI_WORK->unk_0x1418;
search.flags = 0;
search.word = 0;
search.length = 0;
search.position = 0;
search.capacity = 0;
search.options = 0;
ziSearchState search = {0};
Zi8LogError(100, __zi8_work_data);
if (word == 0 || *word == 0) {
Zi8ReplaceLastError(300, __zi8_work_data);
@@ -59,8 +53,8 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
}
((ziU8*)&search.length)[0] = count;
((ziU8*)&search.flags)[2] = 1;
((ziU16*)&search.capacity)[0] = 64;
search.word = word;
((ziU16*)&search.capacity)[0] = 64;
request.language = language;
request.getMode = 0;
request.subLanguage = 7;
@@ -84,65 +78,70 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 6;
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 7;
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 8;
} else if (ZI_WORK->unk_0x1C[0] == 0) ZI_WORK->unk_0x1418 = 1;
else ZI_WORK->unk_0x1418 = 2;
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2;
else ZI_WORK->unk_0x1418 = 1;
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);
ZI_WORK->unk_0x1410 = savedFormats;
ZI_WORK->unk_0x1418 = savedCount;
if (count != 0) return 1;
}
if (language == 1) {
if (language != 1) {
Zi8ReplaceLastError(0x26C, __zi8_work_data);
return 0;
}
{
count = 0;
do {
while (word[count] != 0) {
ordinals[count] = Zi8Uni2Ord(word[count], __zi8_work_data);
if (ordinals[count] == 0xFFFF) return 0;
count++;
if (count == 64) return 0;
} while (word[count] != 0);
}
{
if (count == 1) return 1;
count--;
if (count-- == 1) return 1;
ordinals[count] |= 0x8000;
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1, __zi8_work_data) & 2;
table = (ziChineseEntry*)Zi8GetTableAddress(1, 0, __zi8_work_data);
entry = table + ordinals[0];
data = (ziU8*)Zi8GetTableAddress(1, 1, __zi8_work_data);
data += ((entry->offsetHigh & 15) << 16 | ((entry->offsetLow[0] << 8) | entry->offsetLow[1]));
baseData = (ziU8*)Zi8GetTableAddress(1, 1, __zi8_work_data);
baseData += ((entry->offsetHigh & 15) << 16 | (entry->offsetLow[1] | (entry->offsetLow[0] << 8)));
data = baseData;
if (ZI_WORK->cangjieEnabled != 0) {
switch (*data & 7) {
case 2:
offset = 2;
countLeft = 2;
break;
case 3:
case 4:
offset = 3;
countLeft = 3;
break;
case 5:
offset = 4;
countLeft = 4;
break;
default:
offset = 1;
countLeft = 1;
break;
}
data += offset;
data += countLeft;
}
if ((*data & 0x80) == 0) return 0;
group = 0;
data += ((*data & 0x7F) >> 4) + 1;
if ((*data & 0x80) != 0) {
group = 0;
data += ((*data & 0x7F) >> 4) + 1;
} else return 0;
while ((group & 0x80) == 0) {
group = *data++;
for (remaining = group & 15; remaining != 0; remaining--) {
unmatched = count;
countLeft = count;
cursor = ordinals;
while (unmatched > 0) {
value = data[0] | (data[1] << 8);
while (countLeft > 0) {
value = (data[1] << 8) | data[0];
data += 2;
cursor++;
if (value != *cursor) break;
unmatched--;
countLeft--;
if (value & 0x8000) break;
}
if (unmatched == 0) return 1;
if (countLeft == 0) return 1;
if (!(value & 0x8000)) {
data++;
while (!(*data & 0x80)) data += 2;
@@ -153,7 +152,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
Zi8LogError(0x2BD, __zi8_work_data);
return 0;
}
} else Zi8ReplaceLastError(0x26C, __zi8_work_data);
}
return 0;
}
ziWChar Zi8ConvertUC2UserKey(ziChar character, ziU8 language ZI_NEED_WORK) {

View File

@@ -72,7 +72,11 @@ struct DVDCommandBlock {
DVDCommandBlock* prev; // 0x04
u32 command; // 0x08
#ifdef BS2_MACH_VOLATILE_DVD_STATE
volatile s32 state;
#else
s32 state; // 0x0C
#endif
u32 offset; // 0x10
u32 length; // 0x14

View File

@@ -86,9 +86,14 @@ s32 uhf_msc_blk_mount(FADisk* disk) {
return ((device->flags >> 2) & 1) - 1;
}
static inline u16 ReadTransferBlocks(u32 remaining, u32 limit) {
u16 count = limit;
if (remaining <= limit) { count = remaining; }
return count;
}
s32 uhf_msc_blk_pread(FADisk* disk, u8* buffer, u32 sector, u32 blocks, u32* completed) {
UHF_MSC_DEVICE* device;
u16 transfer_blocks;
struct { UHF_MSC_DEVICE* device; u16 blocks; } transfer;
s32 error;
u32 block_size;
u8* transfer_buffer;
@@ -103,24 +108,24 @@ s32 uhf_msc_blk_pread(FADisk* disk, u8* buffer, u32 sector, u32 blocks, u32* com
if (blocks == 0) {
return 0;
}
device = NULL;
transfer.device = NULL;
{
u32 index;
UHF_MSC_DEVICE* candidate;
for (candidate = uhg_msc_blk_device_tbl, index = 0; index < 8; candidate++, index++) {
if (candidate->disk == disk) {
device = &uhg_msc_blk_device_tbl[index];
transfer.device = &uhg_msc_blk_device_tbl[index];
break;
}
}
}
if (device == NULL) {
if (transfer.device == NULL) {
return -1;
}
if (!(device->flags & 4)) {
if (!(transfer.device->flags & 4)) {
return -1;
}
block_size = device->block_size;
block_size = transfer.device->block_size;
if (block_size == 0) {
return -1;
}
@@ -138,21 +143,18 @@ s32 uhf_msc_blk_pread(FADisk* disk, u8* buffer, u32 sector, u32 blocks, u32* com
transfer_buffer = buffer;
}
do {
transfer_blocks = transfer_limit;
if (blocks <= transfer_limit) {
transfer_blocks = blocks;
}
error = usbh_msc_read10(device, sector, transfer_blocks, transfer_buffer, sense);
transfer.blocks = ReadTransferBlocks(blocks, transfer_limit);
error = usbh_msc_read10(transfer.device, sector, transfer.blocks, transfer_buffer, sense);
if (error == 0) {
if (!cacheable) {
memcpy(buffer, transfer_buffer, transfer_blocks * block_size);
buffer += transfer_blocks * block_size;
memcpy(buffer, transfer_buffer, transfer.blocks * block_size);
buffer += transfer.blocks * block_size;
} else {
transfer_buffer += transfer_blocks * block_size;
transfer_buffer += transfer.blocks * block_size;
}
blocks -= transfer_blocks;
sector += transfer_blocks;
*completed += transfer_blocks;
blocks -= transfer.blocks;
sector += transfer.blocks;
*completed += transfer.blocks;
if (blocks == 0) {
break;
}
@@ -162,8 +164,8 @@ s32 uhf_msc_blk_pread(FADisk* disk, u8* buffer, u32 sector, u32 blocks, u32* com
case 11:
break;
case 34:
if (device->disk != NULL) {
pdm_disk_notify_media_insert(device->disk);
if (transfer.device->disk != NULL) {
pdm_disk_notify_media_insert(transfer.device->disk);
}
break;
default:

View File

@@ -603,31 +603,35 @@ pf_s32 PFCLUSTER_InsertCluster(PFCLUSTER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent,
pf_s32 PFCLUSTER_DeleteCluster(PFCLUSTER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent,
pf_u32 cluster_index, pf_u32 num_clusters, pf_u32* p_deleted_clusters) {
struct ClusterDeletion {
pf_u32 length;
pf_u32 cluster_size;
pf_u32 position;
};
struct ClusterDeletion deletion;
pf_s32 err;
pf_u32 previous_cluster;
pf_u32 next_cluster;
pf_u32 first_deleted_cluster;
pf_u32 last_deleted_cluster;
PF_VOLUME* p_vol;
pf_u32 cluster_size;
pf_u32 byte_position;
p_vol = p_ent->p_vol;
cluster_size = p_vol->bpb.bytes_per_sector << p_vol->bpb.log2_sectors_per_cluster;
byte_position = cluster_index * cluster_size;
deletion.cluster_size = p_vol->bpb.bytes_per_sector << p_vol->bpb.log2_sectors_per_cluster;
deletion.position = cluster_index * deletion.cluster_size;
err = PFFAT_TraceClustersChain(&p_iter->ffd, *p_iter->ffd.p_start_cluster,
byte_position, &previous_cluster, &first_deleted_cluster);
deletion.position, &previous_cluster, &first_deleted_cluster);
if (err != 0) return err;
if (cluster_index == 0) first_deleted_cluster = p_ent->start_cluster;
num_clusters = num_clusters * cluster_size;
if (num_clusters > p_ent->file_size - byte_position) num_clusters = p_ent->file_size - byte_position;
err = PFFAT_TraceClustersChain(&p_iter->ffd, first_deleted_cluster, num_clusters, &last_deleted_cluster, &next_cluster);
deletion.length = num_clusters * deletion.cluster_size;
if (deletion.length > p_ent->file_size - deletion.position) deletion.length = p_ent->file_size - deletion.position;
err = PFFAT_TraceClustersChain(&p_iter->ffd, first_deleted_cluster, deletion.length, &last_deleted_cluster, &next_cluster);
if (err != 0) return err;
if (cluster_index == 0) {
if (next_cluster == PFFAT_GetValueOfEOC2(p_vol)) next_cluster = 0;
p_ent->start_cluster = next_cluster;
}
p_ent->file_size -= num_clusters;
p_ent->file_size -= deletion.length;
PFENT_getcurrentDateTimeForEnt(&p_ent->modify_date, &p_ent->modify_time);
p_ent->access_date = p_ent->modify_date;
err = PFENT_updateEntry(p_ent, 1);
@@ -636,13 +640,13 @@ pf_s32 PFCLUSTER_DeleteCluster(PFCLUSTER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent,
err = PFCACHE_FlushDataCacheSpecific(p_vol, PF_NULL);
if (err != 0) return err;
}
err = PFFAT_FreeChain(&p_iter->ffd, first_deleted_cluster, -1U, num_clusters);
err = PFFAT_FreeChain(&p_iter->ffd, first_deleted_cluster, -1U, deletion.length);
if (err != 0) return err;
if (cluster_index != 0) {
err = PFFAT_WriteValueToSpecifiedCluster(p_vol, previous_cluster, next_cluster);
if (err != 0) return err;
}
*p_deleted_clusters = num_clusters / cluster_size;
if (num_clusters % cluster_size != 0) ++*p_deleted_clusters;
*p_deleted_clusters = deletion.length / deletion.cluster_size;
if (deletion.length % deletion.cluster_size != 0) ++*p_deleted_clusters;
return 0;
}

View File

@@ -140,15 +140,19 @@ extern pf_s32 PFVOL_CheckCurrentDir(PF_VOLUME* volume, pf_u32 start_cluster);
extern pf_s32 PFENT_RemoveEntry(PF_DIR_ENT* entry, PF_ENT_ITER* iter);
extern pf_s32 PFFAT_FreeChain(PFDIR_FFD* ffd, pf_u32 start_cluster, pf_u32 chain_index, pf_u32 size);
static inline pf_u32 current_directory_is_open(PF_VOLUME* volume, pf_u32 cluster) {
static inline PF_CUR_DIR* current_directories(PFDIR_VOLUME_DIRS* state) {
return state->current_dirs;
}
static inline pf_u32 current_directory_is_open(PF_VOLUME* volume, const PF_DIR_ENT* entry) {
pf_u32 index;
for (index = 0; index < 4; index++) {
if (pf_vol_set.volume_state.volumes[index].p_vol == volume) {
PFDIR_VOLUME_DIRS* state = (PFDIR_VOLUME_DIRS*)volume;
PF_CUR_DIR* directory = state->current_dirs;
if (volume == pf_vol_set.volume_state.volumes[index].p_vol) {
PFDIR_VOLUME_DIRS* state = (PFDIR_VOLUME_DIRS*)pf_vol_set.volume_state.volumes[index].p_vol;
PF_CUR_DIR* directory = current_directories(state);
pf_u32 slot;
for (slot = 0; slot < 4; slot++, directory++) {
if ((directory->stat & 1) != 0 && directory->directory.start_cluster == cluster) { return 1; }
if ((directory->stat & 1) != 0 && directory->directory.start_cluster == entry->start_cluster) { return 1; }
}
}
}
@@ -381,7 +385,7 @@ pf_s32 PFDIR_p_readdir(PFDIR_DIR* dir, PFDIR_READ_RESULT* result) {
return 0;
}
extern pf_s32 PFENT_findEntry(PFDIR_FFD*, PF_DIR_ENT*, pf_u32, PFDIR_STR*, pf_u8, pf_u32*, pf_u32*);
extern pf_s32 PFENT_findEntry(PFDIR_FFD*, PF_DIR_ENT*, pf_u32, PFDIR_STR*, pf_u32, pf_u32);
extern pf_s32 PFFAT_GetSectorSpecified(PFDIR_FFD*, pf_u32, pf_u32, pf_u32*);
extern pf_s32 PFPATH_transformInUnicode(pf_u16*, const pf_s8*);
extern void PFPATH_SetSearchPattern(pf_s8*, pf_u16*, PFDIR_STR*);
@@ -408,17 +412,9 @@ extern void PFPATH_AdjustExtShortName(pf_s8* name, pf_u32 position);
extern pf_s32 PFCACHE_AllocateDataPage(PF_VOLUME* volume, pf_u32 sector, PF_CACHE_PAGE** page, pf_u32* size);
extern void PFCACHE_FreeDataPage(PF_VOLUME* volume, PF_CACHE_PAGE* page);
static inline void set_dot_entry(pf_u8* buffer) {
pf_u32 index;
buffer[0] = '.';
buffer[1] = ' ';
buffer[2] = ' ';
buffer[3] = ' ';
buffer[4] = ' ';
buffer[5] = ' ';
buffer[6] = ' ';
buffer[7] = ' ';
buffer[8] = ' ';
buffer[9] = ' ';
buffer[10] = ' ';
for (index = 1; index < 11; index++) { buffer[index] = ' '; }
}
static inline void set_dot_dot_entry(pf_u8* buffer) {
@@ -453,7 +449,7 @@ extern pf_s32 PFENT_ITER_GetEntryOfPattern(PF_ENT_ITER* iter, PF_DIR_ENT* entry,
extern pf_s32 PFENT_ITER_FindEntry(PF_ENT_ITER* iter, PF_DIR_ENT* entry, PFDIR_STR* pattern,
pf_u8 attributes, pf_u32 start, pf_u32* found);
extern pf_s32 PFENT_findEntry(PFDIR_FFD* ffd, PF_DIR_ENT* entry, pf_u32 start, PFDIR_STR* pattern,
pf_u8 attributes, pf_u32* logical_position, pf_u32* entry_position);
pf_u32 required_attributes, pf_u32 forbidden_attributes);
extern pf_u32 PFSTR_GetCodeMode(PFDIR_STR* path);
extern const pf_s8* PFSTR_GetStrPos(PFDIR_STR* path, pf_u32 target);
extern pf_s32 PFPATH_SplitPathPattern(PF_STR* path, PFDIR_STR* directory, PFDIR_STR* pattern);
@@ -467,6 +463,16 @@ extern pf_s32 PFFILE_FsexecOpenFile(PF_DIR_ENT* entry, PF_ENT_ITER* iter, pf_u32
extern pf_s32 PFPATH_cmpName(const pf_s8* short_name, PFDIR_STR* pattern, pf_u32 short_search);
extern pf_s32 PFPATH_cmpNameUni(const pf_u16* name, PFDIR_STR* pattern);
pf_s32 PFDIR_p_mkdir(PF_VOLUME* volume, PF_STR* path, pf_u32 option, PF_DTA* data) {
pf_u32 index;
pf_u32* next_sector;
pf_u16 filename_length;
pf_u16 original_offset;
pf_u8 checksum;
pf_u8 lfn_count = 0;
pf_u32 cluster;
pf_u32 lfn_index;
pf_u32 entry_sector;
pf_s32 error;
PF_DIR_ENT parent_entry;
PF_DIR_ENT entry;
pf_s8 normalized_name[512];
@@ -480,19 +486,9 @@ pf_s32 PFDIR_p_mkdir(PF_VOLUME* volume, PF_STR* path, pf_u32 option, PF_DTA* dat
pf_u32 found;
pf_u32 page_size;
PF_CACHE_PAGE* page;
pf_u8 lfn_count = 0;
pf_u32 sector = 0;
pf_u32 written;
pf_u32 position;
pf_u32 entry_sector;
pf_u16 filename_length;
pf_u16 original_offset;
pf_u8 checksum;
pf_u32 cluster;
pf_u32 index;
pf_u32 lfn_index;
pf_u32* next_sector;
pf_s32 error;
error = PFPATH_SplitPath((PFDIR_STR*)path, &directory, &filename);
if (error != 0) { return error; }
@@ -870,12 +866,15 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
pf_u32 found;
pf_u16 time;
pf_u8 deleted_marker[1] = {0xE5};
pf_u16 saved_initial_char = 0;
pf_u32 sector;
pf_u32* next_sector;
pf_s32 filename_length;
pf_s32 parse_error;
pf_u32* next_sector;
pf_s32 allocation_error = 0;
pf_u32 sector;
pf_u16 saved_initial_char = 0;
pf_s32 parse_error;
const pf_s8* filename;
pf_u32 remaining_lfns;
pf_u32 lfn_index;
pf_s32 error;
pf_u32 index;
PF_DIR_ENT* update_entry;
@@ -911,11 +910,11 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
}
PFSTR_SetLocalStr(&destination_name, (pf_u32)normalized_name);
if (PFSTR_GetCodeMode(&destination_name) == 1) {
const pf_s8* filename = PFSTR_GetStrPos(&destination_name, 1);
filename = PFSTR_GetStrPos(&destination_name, 1);
error = pf_strcmp(PFSTR_GetStrPos(&directory, 1), filename);
} else {
const pf_u16* filename = (const pf_u16*)PFSTR_GetStrPos(&destination_name, 1);
error = pf_w_strcmp((const pf_u16*)PFSTR_GetStrPos(&directory, 1), filename);
filename = PFSTR_GetStrPos(&destination_name, 1);
error = pf_w_strcmp((const pf_u16*)PFSTR_GetStrPos(&directory, 1), (const pf_u16*)filename);
}
if (error != 0) {
error = PFENT_ITER_GetEntryOfPath(&destination_iter, &destination_entry,
@@ -925,23 +924,24 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
}
destination_entry.start_cluster = source_parent.start_cluster;
PFFAT_InitFFD(&destination_iter.ffd, &destination_hint, volume, &destination_entry.start_cluster);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0);
if (error == 0) { return 8; }
if (error != 0 && error != 3) { return error; }
if ((source_entry.attr & 0x10) == 0) {
if (PFFILE_IsOpened(&source_entry) != 0) { return 0x13; }
} else {
if (directory_is_open(&source_entry) != 0) { return 0x13; }
if (current_directory_is_open(source_entry.p_vol, source_entry.start_cluster) != 0) { return 0x1C; }
if (current_directory_is_open(source_entry.p_vol, &source_entry) != 0) { return 0x1C; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)"..", 1, 0, 2) == 0) { return 0x1C; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)".", 1, 0, 1) == 0) { return 0x1C; }
{
pf_u32 directory_sector;
PFDIR_SFD* file = ((PFDIR_VOLUME_DIRS*)volume)->sfds;
pf_u32 directory_sector = volume->bpb.first_data_sector +
directory_sector = volume->bpb.first_data_sector +
((source_entry.start_cluster - 2) << volume->bpb.log2_sectors_per_cluster);
for (index = 0; index < 5; index++, file++) {
if ((file->stat & 1) != 0 && (file->stat & 2) != 0) {
if (file->dir_entry.p_vol == volume && file->dir_entry.entry_sector == directory_sector) { return 0x13; }
if (volume == file->dir_entry.p_vol && directory_sector == file->dir_entry.entry_sector) { return 0x13; }
found = 0;
error = PFENT_ITER_FindCluster(&file->dir_entry, source_entry.start_cluster, &found);
if (error != 0) { return error; }
@@ -961,12 +961,13 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
destination_entry.num_entry_LFNs = 0;
PFENT_getcurrentDateTimeForEnt(&destination_entry.access_date, &time);
error = PFENT_updateEntry(&destination_entry, 1);
goto finish_rename;
if (error != 0) { return error; }
goto return_allocation_error;
}
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
saved_initial_char = source_entry.long_name[0];
source_entry.long_name[0] = 0;
for (index = 1; index <= source_entry.num_entry_LFNs; index++) {
for (lfn_index = 1; lfn_index <= source_entry.num_entry_LFNs; lfn_index++) {
error = PFENT_ITER_Retreat(&source_iter, 0);
if (error != 0) { return error; }
error = PFSEC_WriteData(volume, deleted_marker, source_iter.sector,
@@ -1004,7 +1005,7 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (allocation_error != 0) {
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
source_entry.long_name[0] = saved_initial_char;
source_entry.entry_offset -= (pf_u16)(source_entry.num_entry_LFNs * 32);
source_entry.entry_offset -= ((pf_u32)source_entry.num_entry_LFNs << 5) & (0xffU << 5);
}
update_entry = &source_entry;
} else {
@@ -1013,13 +1014,13 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
PFENT_getcurrentDateTimeForEnt(&destination_entry.access_date, &time);
update_entry = &destination_entry;
}
index = update_entry->num_entry_LFNs;
if (index != 0 && (update_entry->small_letter_flag & 0x18) == 0) {
remaining_lfns = update_entry->num_entry_LFNs;
if (remaining_lfns != 0 && (update_entry->small_letter_flag & 0x18) == 0) {
sector = update_entry->entry_sector;
next_sector = previous_chain;
while (index >= 1) {
PFENT_storeLFNEntryFieldsToBuf(entry_buffer, update_entry, index,
update_entry->check_sum, index == update_entry->num_entry_LFNs);
while (remaining_lfns >= 1) {
PFENT_storeLFNEntryFieldsToBuf(entry_buffer, update_entry, remaining_lfns,
update_entry->check_sum, remaining_lfns == update_entry->num_entry_LFNs);
error = PFSEC_WriteData(volume, entry_buffer, sector, update_entry->entry_offset, 32, &written, 0);
if (error != 0) { return error; }
if (written != 32) { return 0x11; }
@@ -1028,13 +1029,13 @@ pf_s32 PFDIR_p_rename(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
update_entry->entry_offset = 0;
sector = *next_sector++;
}
index--;
remaining_lfns--;
}
update_entry->entry_sector = sector;
}
error = PFENT_updateEntry(update_entry, 1);
finish_rename:
if (error != 0) { allocation_error = error; }
if (error != 0) { return error; }
return_allocation_error:
return allocation_error;
}
pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
@@ -1057,15 +1058,16 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
pf_u32 found;
pf_u16 time;
pf_u8 deleted_marker[1] = {0xE5};
pf_u16 saved_initial_char = 0;
pf_u32 sector;
pf_u32* next_sector;
pf_s32 filename_length;
pf_u32* next_sector;
pf_u32 parent_cluster;
pf_u32 sector;
pf_s32 parse_error;
pf_s32 allocation_error;
pf_s32 error;
pf_u32 index;
pf_u16 saved_initial_char = 0;
pf_u32 lfn_index;
pf_u32 index;
PF_DIR_ENT* update_entry;
error = PFENT_ITER_GetEntryOfPath(&source_iter, &source_entry, volume, (PFDIR_STR*)old_path, 0);
@@ -1083,7 +1085,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (error != 0) { return error; }
destination_entry.start_cluster = destination_parent.start_cluster;
PFFAT_InitFFD(&destination_iter.ffd, &destination_hint, volume, &destination_entry.start_cluster);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &destination_name, 0x7F, 0);
if (error == 0) {
if (destination_entry.entry_sector == source_entry.entry_sector &&
destination_entry.entry_offset == source_entry.entry_offset) { return 0; }
@@ -1094,18 +1096,19 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (PFFILE_IsOpened(&source_entry) != 0) { return 0x13; }
} else {
if (directory_is_open(&source_entry) != 0) { return 0x13; }
if (current_directory_is_open(source_entry.p_vol, source_entry.start_cluster) != 0) { return 0x1C; }
if (current_directory_is_open(source_entry.p_vol, &source_entry) != 0) { return 0x1C; }
error = PFPATH_SplitPath((PFDIR_STR*)old_path, &directory, &source_name);
if (error != 0) { return error; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)"..", 1, 0, 2) == 0) { return 10; }
if (PFSTR_StrNCmp(&source_name, (const pf_s8*)".", 1, 0, 1) == 0) { return 10; }
{
pf_u32 directory_sector;
PFDIR_SFD* file = ((PFDIR_VOLUME_DIRS*)volume)->sfds;
pf_u32 directory_sector = volume->bpb.first_data_sector +
directory_sector = volume->bpb.first_data_sector +
((source_entry.start_cluster - 2) << volume->bpb.log2_sectors_per_cluster);
for (index = 0; index < 5; index++, file++) {
if ((file->stat & 1) != 0 && (file->stat & 2) != 0) {
if (file->dir_entry.p_vol == volume && file->dir_entry.entry_sector == directory_sector) { return 0x13; }
if (volume == file->dir_entry.p_vol && directory_sector == file->dir_entry.entry_sector) { return 0x13; }
found = 0;
error = PFENT_ITER_FindCluster(&file->dir_entry, source_entry.start_cluster, &found);
if (error != 0) { return error; }
@@ -1115,12 +1118,11 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
}
destination_entry.start_cluster = destination_parent.start_cluster;
for (;;) {
pf_u32 parent_cluster;
if (destination_entry.start_cluster == 1 || destination_entry.start_cluster == 0) { break; }
PFFAT_InitFFD(&destination_iter.ffd, &destination_hint, volume, &destination_entry.start_cluster);
PFSTR_InitStr(&parent_name, (const pf_s8*)"..", 1);
PFSTR_SetLocalStr(&parent_name, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &parent_name, 0x7F, 0, 0);
error = PFENT_findEntry(&destination_iter.ffd, &destination_entry, 0, &parent_name, 0x7F, 0);
if (error != 0) { return error; }
parent_cluster = destination_entry.start_cluster;
if (parent_cluster == 1 || parent_cluster == 0) { break; }
@@ -1140,9 +1142,10 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
parse_error = PFPATH_parseShortName(destination_entry.short_name, &destination_name);
if (destination_entry.short_name[0] == 0) { return 2; }
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
pf_u32 entry_index;
saved_initial_char = source_entry.long_name[0];
source_entry.long_name[0] = 0;
for (index = 1; index <= source_entry.num_entry_LFNs; index++) {
for (entry_index = 1; entry_index <= source_entry.num_entry_LFNs; entry_index++) {
error = PFENT_ITER_Retreat(&source_iter, 0);
if (error != 0) { return error; }
error = PFSEC_WriteData(volume, deleted_marker, source_iter.sector,
@@ -1180,7 +1183,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
if (allocation_error != 0) {
if (source_entry.num_entry_LFNs != 0 && (source_entry.small_letter_flag & 0x18) == 0) {
source_entry.long_name[0] = saved_initial_char;
source_entry.entry_offset -= (source_entry.num_entry_LFNs & 0xff) * 32;
source_entry.entry_offset -= ((pf_u32)source_entry.num_entry_LFNs << 5) & (0xffU << 5);
}
update_entry = &source_entry;
} else {
@@ -1192,7 +1195,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
PFFAT_InitFFD(&source_iter.ffd, &source_hint, volume, &source_entry.start_cluster);
PFSTR_InitStr(&parent_name, (const pf_s8*)"..", 1);
PFSTR_SetLocalStr(&parent_name, 0);
error = PFENT_findEntry(&source_iter.ffd, &source_entry, 0, &parent_name, 0x7F, 0, 0);
error = PFENT_findEntry(&source_iter.ffd, &source_entry, 0, &parent_name, 0x7F, 0);
if (error != 0) { return error; }
if (destination_parent.start_cluster == 1 || destination_parent.start_cluster == 0 ||
(destination_parent.start_cluster == 2 && volume->bpb.fat_type == FAT_32)) {
@@ -1230,6 +1233,164 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
return allocation_error;
}
pf_s32 PFDIR_p_fsnext(PF_DTA* data) {
PFDIR_FFD ffd;
PFDIR_FAT_HINT hint;
PF_DIR_ENT entry;
PFDIR_STR pattern;
pf_u32 logical_position = 0;
pf_u32 entry_position = 0;
pf_u32 code_mode;
pf_s32 index = 0;
pf_s32 error;
if ((data->status & 1) == 1) {
code_mode = 1;
error = PFSTR_InitStr(&pattern, data->reg_exp, code_mode);
} else {
code_mode = 2;
error = PFSTR_InitStr(&pattern, (const pf_s8*)((PF_DTAW*)data)->reg_expW, code_mode);
}
if (error != 0) {
return error;
}
PFSTR_SetLocalStr(&pattern, (pf_u32)data->reg_exp);
while (entry_position < 999999) {
if (data->parent_pos >= 999999) { return 10; }
entry.start_cluster = data->parent_start_cluster;
PFFAT_InitFFD(&ffd, &hint, data->p_vol, &entry.start_cluster);
error = PFENT_findEntryPos(&ffd, &entry, data->parent_pos, &pattern, data->attr, 0,
&logical_position, &entry_position);
if (error != 0) { return error; }
data->parent_pos = entry_position + 1;
if (entry_position == 999999) { return 3; }
else { break; }
}
pf_strcpy(data->FileName, entry.short_name);
if ((data->status & 2) == 2) {
PFPATH_transformInUnicode(((PF_DTAW*)data)->FileNameW, data->FileName);
}
if (entry.long_name[0] != 0) {
if ((pf_vol_set.setting & 2) == 2) {
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 1;
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 2;
} else {
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
}
if ((data->status & 2) == 2) {
pf_w_strcpy(((PF_DTAW*)data)->LongNameW, entry.long_name);
}
} else {
data->LongName[0] = 0;
if ((data->status & 2) == 2) {
((PF_DTAW*)data)->LongNameW[0] = 0;
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files != 0) {
for (index = 0; index < 5; index++) {
if ((((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 1) != 0 && (((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 2) != 0 &&
entry.p_vol == ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.p_vol &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_sector == entry.entry_sector &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_offset == entry.entry_offset) {
data->FileSize = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.file_size;
data->Time = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_time;
data->Date = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_date;
data->Attribute = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.attr;
data->num_entry_LFNs = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.num_entry_LFNs;
data->ordinal = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.ordinal;
data->check_sum = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.check_sum;
break;
}
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files == 0 || index == 5) {
data->FileSize = entry.file_size;
data->Time = entry.modify_time;
data->Date = entry.modify_date;
data->Attribute = entry.attr;
data->num_entry_LFNs = entry.num_entry_LFNs;
data->ordinal = entry.ordinal;
data->check_sum = entry.check_sum;
}
return 0;
}
pf_s32 PFDIR_p_fsfirst(PF_VOLUME* volume, PF_STR* path, pf_u8 attributes, PF_DTA* data) {
PFDIR_STR directory;
PFDIR_STR pattern;
PF_DIR_ENT entry;
PF_ENT_ITER iter;
pf_s32 error;
error = PFPATH_SplitPathPattern(path, &directory, &pattern);
if (error != 0) {
return error;
}
error = PFENT_ITER_GetEntryOfPattern(&iter, &entry, volume, &directory);
if (error != 0) {
return error;
}
if ((entry.attr & 0x10) == 0) {
return 0x14;
}
data->parent_start_cluster = entry.start_cluster;
data->parent_pos = 0;
data->p_vol = entry.p_vol;
data->attr = attributes;
data->status = 0;
if (PFSTR_GetCodeMode(&pattern) == 1) {
PFPATH_SetSearchPattern(data->reg_exp, 0, &pattern);
data->status |= 1;
} else {
PFPATH_SetSearchPattern(data->reg_exp, ((PF_DTAW*)data)->reg_expW, &pattern);
data->status |= 2;
}
return PFDIR_p_fsnext(data);
}
pf_s32 PFDIR_p_fsexec_chmod(PF_DTA* data, PF_DIR_ENT* entry, pf_u32 mode, pf_u32 attributes) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)entry->p_vol;
pf_u16 date;
pf_u16 time;
pf_u8 create_time_ms;
pf_s32 index = 0;
pf_s32 error;
if ((attributes & 0x40) != 0) {
attributes = (pf_u8)(attributes & ~0x40);
}
if ((entry->attr & 0x10) != 0) {
if ((attributes & 4) != 0) {
return 10;
}
if (directory_is_open(entry) != 0) { return 0x13; }
entry->attr = attributes | 0x10;
} else {
if ((attributes & 0x10) != 0) {
return 10;
}
if (PFFILE_IsOpened(entry) != 0) {
return 0x13;
}
entry->attr = attributes;
}
PFENT_getcurrentDateTimeForEnt(&entry->access_date, &time);
error = PFENT_updateEntry(entry, 0);
if (error != 0) {
return error;
}
if ((mode & 0x80000000) == 0) {
data->Attribute = entry->attr;
}
error = PFCACHE_FlushDataCacheSpecific(entry->p_vol, 0);
if (error != 0) { return error; }
return 0;
}
pf_s32 PFDIR_p_fsexec_remove(PF_DTA* data, PF_DIR_ENT* entry, PF_ENT_ITER* iter) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)entry->p_vol;
PFDIR_FAT_HINT hint;
@@ -1283,47 +1444,6 @@ pf_s32 PFDIR_p_fsexec_remove(PF_DTA* data, PF_DIR_ENT* entry, PF_ENT_ITER* iter)
return release_directory_chain(&iter->ffd, start_cluster, chain_size);
}
pf_s32 PFDIR_p_fsexec_chmod(PF_DTA* data, PF_DIR_ENT* entry, pf_u32 mode, pf_u32 attributes) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)entry->p_vol;
pf_u16 date;
pf_u16 time;
pf_u8 create_time_ms;
pf_s32 index = 0;
pf_s32 error;
if ((attributes & 0x40) != 0) {
attributes = (pf_u8)(attributes & ~0x40);
}
if ((entry->attr & 0x10) != 0) {
if ((attributes & 4) != 0) {
return 10;
}
if (directory_is_open(entry) != 0) { return 0x13; }
entry->attr = attributes | 0x10;
} else {
if ((attributes & 0x10) != 0) {
return 10;
}
if (PFFILE_IsOpened(entry) != 0) {
return 0x13;
}
entry->attr = attributes;
}
PFENT_getcurrentDateTimeForEnt(&entry->access_date, &time);
error = PFENT_updateEntry(entry, 0);
if (error != 0) {
return error;
}
if ((mode & 0x80000000) == 0) {
data->Attribute = entry->attr;
}
error = PFCACHE_FlushDataCacheSpecific(entry->p_vol, 0);
if (error != 0) { return error; }
return 0;
}
pf_s32 PFDIR_p_fsexec_fopen(PF_DTA* data, PF_DIR_ENT* entry, PF_ENT_ITER* iter, pf_u32 flags,
pf_u32 mode) {
pf_s8 long_name[13];
@@ -1910,121 +2030,3 @@ void PFDIR_chdmod(PF_STR* path, pf_u8 attributes) {
}
volume_dirs->cache.signature = 0;
}
pf_s32 PFDIR_p_fsnext(PF_DTA* data) {
PFDIR_FFD ffd;
PFDIR_FAT_HINT hint;
PF_DIR_ENT entry;
PFDIR_STR pattern;
pf_u32 logical_position = 0;
pf_u32 entry_position = 0;
pf_u32 code_mode;
pf_s32 index = 0;
pf_s32 error;
if ((data->status & 1) == 1) {
code_mode = 1;
error = PFSTR_InitStr(&pattern, data->reg_exp, code_mode);
} else {
code_mode = 2;
error = PFSTR_InitStr(&pattern, (const pf_s8*)((PF_DTAW*)data)->reg_expW, code_mode);
}
if (error != 0) {
return error;
}
PFSTR_SetLocalStr(&pattern, (pf_u32)data->reg_exp);
while (entry_position < 999999) {
if (data->parent_pos >= 999999) { return 10; }
entry.start_cluster = data->parent_start_cluster;
PFFAT_InitFFD(&ffd, &hint, data->p_vol, &entry.start_cluster);
error = PFENT_findEntryPos(&ffd, &entry, data->parent_pos, &pattern, data->attr, 0,
&logical_position, &entry_position);
if (error != 0) { return error; }
data->parent_pos = entry_position + 1;
if (entry_position == 999999) { return 3; }
else { break; }
}
pf_strcpy(data->FileName, entry.short_name);
if ((data->status & 2) == 2) {
PFPATH_transformInUnicode(((PF_DTAW*)data)->FileNameW, data->FileName);
}
if (entry.long_name[0] != 0) {
if ((pf_vol_set.setting & 2) == 2) {
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 1;
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
pf_vol_set.setting &= 0xFFFFFFFC;
pf_vol_set.setting |= 2;
} else {
PFPATH_transformFromUnicodeToNormal(data->LongName, entry.long_name);
}
if ((data->status & 2) == 2) {
pf_w_strcpy(((PF_DTAW*)data)->LongNameW, entry.long_name);
}
} else {
data->LongName[0] = 0;
if ((data->status & 2) == 2) {
((PF_DTAW*)data)->LongNameW[0] = 0;
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files != 0) {
for (index = 0; index < 5; index++) {
if ((((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 1) != 0 && (((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].stat & 2) != 0 &&
entry.p_vol == ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.p_vol &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_sector == entry.entry_sector &&
((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.entry_offset == entry.entry_offset) {
data->FileSize = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.file_size;
data->Time = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_time;
data->Date = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.modify_date;
data->Attribute = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.attr;
data->num_entry_LFNs = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.num_entry_LFNs;
data->ordinal = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.ordinal;
data->check_sum = ((PFDIR_VOLUME_DIRS*)data->p_vol)->sfds[index].dir_entry.check_sum;
break;
}
}
}
if (((PFDIR_VOLUME_DIRS*)data->p_vol)->num_opened_files == 0 || index == 5) {
data->FileSize = entry.file_size;
data->Time = entry.modify_time;
data->Date = entry.modify_date;
data->Attribute = entry.attr;
data->num_entry_LFNs = entry.num_entry_LFNs;
data->ordinal = entry.ordinal;
data->check_sum = entry.check_sum;
}
return 0;
}
pf_s32 PFDIR_p_fsfirst(PF_VOLUME* volume, PF_STR* path, pf_u8 attributes, PF_DTA* data) {
PFDIR_STR directory;
PFDIR_STR pattern;
PF_DIR_ENT entry;
PF_ENT_ITER iter;
pf_s32 error;
error = PFPATH_SplitPathPattern(path, &directory, &pattern);
if (error != 0) {
return error;
}
error = PFENT_ITER_GetEntryOfPattern(&iter, &entry, volume, &directory);
if (error != 0) {
return error;
}
if ((entry.attr & 0x10) == 0) {
return 0x14;
}
data->parent_start_cluster = entry.start_cluster;
data->parent_pos = 0;
data->p_vol = entry.p_vol;
data->attr = attributes;
data->status = 0;
if (PFSTR_GetCodeMode(&pattern) == 1) {
PFPATH_SetSearchPattern(data->reg_exp, 0, &pattern);
data->status |= 1;
} else {
PFPATH_SetSearchPattern(data->reg_exp, ((PF_DTAW*)data)->reg_expW, &pattern);
data->status |= 2;
}
return PFDIR_p_fsnext(data);
}

View File

@@ -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;
@@ -726,25 +726,29 @@ pf_s32 PFENT_ITER_GetEntryOfIter(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent) {
return 0;
}
static inline pf_u32 CopyLongNameFragment(PFITER_ENT_ITER* iter, pf_u8* destination, pf_u32 offset) {
pf_memcpy(destination, &iter->buf[1], 10);
pf_memcpy(destination + 10, &iter->buf[14], 12);
pf_memcpy(destination + 22, &iter->buf[28], 4);
return offset + 26;
}
pf_s32 PFENT_ITER_GetLFNEntryName(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent) {
pf_u32 i;
pf_u32 index;
pf_u8* destination;
pf_u32 i;
pf_s32 err;
if (p_ent->num_entry_LFNs != 0 && !(p_ent->small_letter_flag & 0x18)) {
index = 0;
for (i = 0; i < p_ent->num_entry_LFNs; ++i) {
pf_u16* destination;
i = 0;
for (index = 0; i < p_ent->num_entry_LFNs; ++i) {
err = PFENT_ITER_Retreat(p_iter, 0);
if (err != 0) return err;
err = PFENT_ITER_LoadEntry(p_iter);
if (err != 0) return err;
destination = &p_ent->long_name[index];
pf_memcpy(destination, &p_iter->buf[1], 10);
pf_memcpy(destination + 5, &p_iter->buf[14], 12);
pf_memcpy(destination + 11, &p_iter->buf[28], 4);
index += 13;
destination = (pf_u8*)p_ent->long_name + index;
index = CopyLongNameFragment(p_iter, destination, index);
}
p_ent->long_name[index] = 0;
p_ent->long_name[(p_ent->num_entry_LFNs * 26U) >> 1] = 0;
}
return 0;
}

View File

@@ -321,41 +321,7 @@ pf_u32 PFPATH_DoMatchFileNameWithPattern(pf_u16 c_name, PF_FILE_NAME_ITER* p_nam
return 1;
}
pf_bool PFPATH_MatchFileNameWithPattern(const pf_s8* file_name, PF_STR* p_pattern, pf_bool is_long_name) {
pf_u16 c_name;
pf_u16 c_pat;
PF_FILE_NAME_ITER name;
PF_STR pattern;
pf_bool result;
result = PF_TRUE;
name.buf = file_name;
name.current = 0;
name.kind = is_long_name;
name.index = 0;
pattern = *p_pattern;
if (PFSTR_GetCodeMode(p_pattern) == 1) {
if (is_long_name == PF_FALSE && (pf_vol_set.setting & 0x02) == 0x02 && PFPATH_CheckExtShortNameSignature(&pattern) == 1) {
result = PFPATH_CheckExtShortNameSignature(&pattern);
if (result == 1) {
name.index += 2;
pattern.p_head += 2;
}
}
} else if ((pf_vol_set.setting & 0x02) == 0x02 && is_long_name == PF_FALSE &&
PFSTR_StrNCmp(p_pattern, (pf_s8*)".", 1, 0, 1) != 0 && PFSTR_StrNCmp(p_pattern, (pf_s8*)"..", 1, 0, 2) != 0 &&
PFPATH_CheckExtShortName(p_pattern, 1, PF_FALSE) == 0) {
result = PF_FALSE;
}
if (result == PF_TRUE) {
c_name = PFPATH_GetNextCharOfFileName(&name);
c_pat = PFPATH_GetNextCharOfPattern(&pattern, is_long_name);
result = PFPATH_DoMatchFileNameWithPattern(c_name, &name, c_pat, &pattern, is_long_name);
}
return result;
}
pf_bool PFPATH_MatchFileNameWithPattern(const pf_s8* file_name, PF_STR* p_pattern, pf_bool is_long_name);
pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* matched_end) {
pf_u32 read_char;
@@ -577,6 +543,42 @@ PF_VOLUME* PFPATH_GetVolumeFromPath(PF_STR* p_path) {
return p_vol;
}
pf_bool PFPATH_MatchFileNameWithPattern(const pf_s8* file_name, PF_STR* p_pattern, pf_bool is_long_name) {
pf_u16 c_name;
pf_u16 c_pat;
PF_FILE_NAME_ITER name;
PF_STR pattern;
pf_bool result;
result = PF_TRUE;
name.buf = file_name;
name.current = 0;
name.kind = is_long_name;
name.index = 0;
pattern = *p_pattern;
if (PFSTR_GetCodeMode(p_pattern) == 1) {
if (is_long_name == PF_FALSE && (pf_vol_set.setting & 0x02) == 0x02 && PFPATH_CheckExtShortNameSignature(&pattern) == 1) {
result = PFPATH_CheckExtShortNameSignature(&pattern);
if (result == 1) {
name.index += 2;
pattern.p_head += 2;
}
}
} else if ((pf_vol_set.setting & 0x02) == 0x02 && is_long_name == PF_FALSE &&
PFSTR_StrNCmp(p_pattern, (pf_s8*)".", 1, 0, 1) != 0 && PFSTR_StrNCmp(p_pattern, (pf_s8*)"..", 1, 0, 2) != 0 &&
PFPATH_CheckExtShortName(p_pattern, 1, PF_FALSE) == 0) {
result = PF_FALSE;
}
if (result == PF_TRUE) {
c_name = PFPATH_GetNextCharOfFileName(&name);
c_pat = PFPATH_GetNextCharOfPattern(&pattern, is_long_name);
result = PFPATH_DoMatchFileNameWithPattern(c_name, &name, c_pat, &pattern, is_long_name);
}
return result;
}
pf_s32 PFPATH_putShortName(pf_u8* pDirEntry, const pf_s8* short_name, pf_u8 attr) {
pf_s32 i = 0;

View File

@@ -225,8 +225,6 @@ typedef struct PFVOL_SET {
PFVOL_SET pf_vol_set;
static s8 default_volume_label[12] = "NO NAME ";
static const u8 deleted_entry_mark[8] = {0xE5};
extern s32 PFDRV_mount(PFVOL_VOLUME* volume);
extern s32 PFDRV_unmount(PFVOL_VOLUME* volume, u32 mode);
extern s32 PFDRV_format(PFVOL_VOLUME* volume, const u8* format_options);
@@ -372,8 +370,13 @@ static inline s32 finalize_volume(PFVOL_VOLUME* volume) {
if (error != 0) { return error; }
return 0;
}
static inline s32 copy_codeset(const PFVOL_CHARCODE* code_set) {
pf_vol_set.codeset = *code_set;
static inline s32 copy_codeset(PFVOL_CHARCODE* code_set) {
pf_vol_set.codeset.oem2unicode = code_set->oem2unicode;
pf_vol_set.codeset.unicode2oem = code_set->unicode2oem;
pf_vol_set.codeset.oem_char_width = code_set->oem_char_width;
pf_vol_set.codeset.is_oem_mb_char = code_set->is_oem_mb_char;
pf_vol_set.codeset.unicode_char_width = code_set->unicode_char_width;
pf_vol_set.codeset.is_unicode_mb_char = code_set->is_unicode_mb_char;
return 0;
}
s32 PFVOL_DoMountVolume(PFVOL_VOLUME* volume) {
@@ -584,7 +587,7 @@ s32 PFVOL_p_rmvvol(PFVOL_VOLUME* volume) {
u32 logical_position;
u32 entry_position;
u32 processed;
u8 deleted = deleted_entry_mark[0];
u8 deleted[1] = {0xE5};
s32 error;
error = PFENT_GetRootDir(volume, &root_entry);
@@ -599,7 +602,7 @@ s32 PFVOL_p_rmvvol(PFVOL_VOLUME* volume) {
return error;
}
if (entry_position != 999999) {
error = PFSEC_WriteData(volume, &deleted, entry.entry_sector, entry.entry_offset, 1, &processed, 0);
error = PFSEC_WriteData(volume, deleted, entry.entry_sector, entry.entry_offset, 1, &processed, 0);
if (error != 0) {
return error;
}
@@ -1102,7 +1105,13 @@ s32 PFVOL_attach(PFVOL_DRIVER* driver, s32 notify_command, void* callback_data)
pf_vol_set.num_attached_drives++;
if (PFDRV_IsInserted(volume) != 0) {
driver->stat |= 0x10;
attach_mount(volume, driver);
error = clear_mount(volume);
if (error != 0) {
pf_vol_set.last_error = error;
volume->last_error = error;
return 0;
}
driver->stat |= 2;
}
return 0;
}
@@ -1458,7 +1467,7 @@ s32 PFVOL_getvolcfg(s8 drive, u32* config) {
return 0;
}
s32 PFVOL_setcode(const PFVOL_CHARCODE* code_set) {
s32 PFVOL_setcode(PFVOL_CHARCODE* code_set) {
if (pf_vol_set.num_mounted_volumes > 0) {
pf_vol_set.last_error = 36;
return 36;
@@ -1466,17 +1475,21 @@ s32 PFVOL_setcode(const PFVOL_CHARCODE* code_set) {
return copy_codeset(code_set);
}
static inline u32 ContextStatus(const PFVOL_CONTEXT* context) {
return context->stat & 1;
}
s32 PFVOL_regctx(void) {
s32 context_id;
s32 free_context_index;
u32 context_index;
s32 free_context_index;
s32 context_id;
s32 error;
error = PFSYS_GetCurrentContextID(&context_id);
if (error != 0) { pf_vol_set.last_error = 26; return 26; }
free_context_index = 0;
for (context_index = 1; context_index < 4; context_index++) {
u32 stat;
stat = pf_vol_set.context[context_index - 1].stat & 1;
stat = ContextStatus(&pf_vol_set.context[context_index - 1]);
if (stat != 0 && pf_vol_set.context[context_index - 1].context_id == context_id) { break; }
if (stat == 0 && free_context_index == 0) { free_context_index = context_index; }
}

View File

@@ -562,11 +562,13 @@ static inline u32 kbdChannelFlags(u32 channel) {
}
static void kbd_led_handler(BOOL success, void* callbackArg) {
const KBDLEDCallbackData* callback;
u32 index;
u32 err;
index = (u32)callbackArg;
callback = &kbdLCBuf[index];
kbdCmdBuf[index].device = 0;
if (kbdLCBuf[index].callbackAddress == (USBKBDCmdLEDCallback)(u32)kbdCmdBuf[index].device) {
if (callback->callbackAddress == (USBKBDCmdLEDCallback)(u32)kbdCmdBuf[index].device) {
return;
}
switch (success) {

View File

@@ -276,14 +276,15 @@ static inline f32 object_interval_distance(f32 interval) {
const f32 sensorIntervalConversion = 0.383864f;
static void reset_kpad(KPADInside* kpad) {
f32 upperY;
f32 sensorDistance;
f32 distanceValue;
f32 zero;
f32 sensorDistance;
f32 upperY;
f32 lowerY;
f32 one;
f32 negativeOne;
KPADDPDObject* object;
f32 calibratedDistance;
negativeOne = -1.0f;
one = 1.0f;
zero = 0.0f;
@@ -299,8 +300,9 @@ static void reset_kpad(KPADInside* kpad) {
kpad->value508 = negativeOne / kp_err_dist_speed;
kpad->value50C = kp_ah_circle_radius * kp_ah_circle_radius;
kpad->value514 = kp_err_dist_min;
distanceValue = kp_dist_vv1 / sensorDistance;
kpad->value510 = kp_dist_vv1;
calibratedDistance = kp_dist_vv1;
distanceValue = calibratedDistance / sensorDistance;
kpad->value510 = calibratedDistance;
kpad->status.release = 0;
kpad->status.trig = 0;
kpad->status.hold = 0;
@@ -854,26 +856,33 @@ static s8 select_1obj_continue(KPADInside* kpad) {
}
*matchedCandidate = *source;
{
f32 axisX = kpad->horizonTangent.x;
f32 normX = kpad->horizonAxis.x;
f32 axisY = kpad->horizonTangent.y;
f32 normY = kpad->horizonAxis.y;
f32 distance = kpad->dpdObjectDistance;
f32 horizontal = axisX * normX;
f32 vertical = axisY * normX;
f32 offsetX;
f32 directionX;
f32 distance;
f32 normY;
f32 vertical;
f32 directionY;
f32 offsetX;
f32 axisY;
f32 horizontal;
f32 axisX;
f32 directionX;
f32 normX;
f32 offsetY;
f32 tangentY;
f32 tangentX;
axisX = kpad->horizonTangent.x;
normX = kpad->horizonAxis.x;
axisY = kpad->horizonTangent.y;
normY = kpad->horizonAxis.y;
distance = kpad->dpdObjectDistance;
horizontal = axisX * normX;
vertical = axisY * normX;
tangentY = axisY * normY;
tangentX = axisX * normY;
directionX = horizontal + tangentY;
directionY = vertical - tangentX;
offsetX = directionX * distance;
offsetX = distance * directionX;
kpad->dpdObjectDirection.x = directionX;
offsetY = directionY * distance;
offsetY = distance * directionY;
kpad->dpdObjectDirection.y = directionY;
if (matchedCandidate == kpad->dpdState.candidates) {
kpad->dpdState.candidates[1].x = matchedCandidate->x + offsetX;

View File

@@ -1167,9 +1167,9 @@ u32 VIGetRetraceCount(void)
static u32 getCurrentHalfLine(void)
{
u32 horizontalCount;
u32 previousVerticalCount;
u32 verticalCount;
u32 previousVerticalCount;
u32 horizontalCount;
verticalCount = __VIRegs[22] & 0x7FF;
for (;;) {
@@ -1180,7 +1180,7 @@ static u32 getCurrentHalfLine(void)
break;
}
}
return ((horizontalCount - 1) / CurrTiming->hlw) + ((verticalCount - 1) * 2);
return ((verticalCount - 1) * 2) + ((horizontalCount - 1) / CurrTiming->hlw);
}
static u32 getCurrentFieldEvenOdd(void)

View File

@@ -669,9 +669,10 @@ CDBErr CDBCryptBuffer(void* buffer, u32 size, void* iv, u32* processedSize, BOOL
CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32 size, u32* encryptedSize) {
CDBRecordFile* recordFile;
CDBErr err;
u32 fileSize;
u32 dataSize;
u32 fileSize;
u32 cryptSize;
u32 authenticatedSize;
int fileOffset;
u8 iv[0x10];
u8 wiiIdKey[0x40] ATTRIBUTE_ALIGN(64);
@@ -760,10 +761,11 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
if ((s32)record->file == 0) {
err = CDB_ERROR_27;
} else {
fileOffset = CDBRecordFileTellData(record);
if (fileOffset < 0) {
int position = CDBRecordFileTellData(record);
if (position < 0) {
err = CDB_ERROR_CANNOT_OPEN_FILE;
} else {
fileOffset = position;
err = CDB_ERROR_OK;
}
}
@@ -810,8 +812,9 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
CDBGetWiiIdKey((char*)wiiIdKey);
CDBGetDeviceKey((char*)&wiiIdKey[12]);
CDBAttrClearSignature((CDBAttr*)buffer);
authenticatedSize = cryptSize + CDB_RECORD_BUFFER_SIZE;
NETHMACInit(&hmac, NETGetSHA1Interface(), wiiIdKey, 0x40);
NETHMACUpdate(&hmac, buffer, cryptSize + CDB_RECORD_BUFFER_SIZE);
NETHMACUpdate(&hmac, buffer, authenticatedSize);
NETHMACGetDigest(&hmac, digest);
memcpy(((CDBAttrBuf*)buffer)->signature.sha1Hmac, digest, sizeof(digest));
if (encryptedSize != 0) {

View File

@@ -19,15 +19,23 @@ typedef struct HMACContext {
u8 key[64];
} HMACContext;
void NETHMACInit(HMACContext* context, const DigestInterface* interface, const void* key, u32 length) {
u8 innerKey[64];
static inline void BeginDigest(HMACContext* context, u8 mask) {
u8 blockKey[64];
u32 i;
u32 keyLength;
void* work = context->digestContext;
const char* function = "NETHMACInit";
keyLength = context->keyLength;
for (i = 0; i < keyLength; ++i) blockKey[i] = context->key[i] ^ mask;
memset(blockKey + keyLength, mask, context->interface.blockSize - keyLength);
context->interface.init(work);
context->interface.update(work, blockKey, context->interface.blockSize);
}
void NETHMACInit(HMACContext* context, const DigestInterface* interface, const void* key, u32 length) {
void* work = context->digestContext;
context->interface = *interface;
if (context->interface.contextSize > 96 || context->interface.blockSize > 64) {
OSReport("%s(%d):[warning in %s]", "hmac.c", 100, function);
OSReport("%s(%d):[warning in %s]", "hmac.c", 100, __FUNCTION__);
OSReport("specified interface needs too large workmemory.");
OSReport("\n");
return;
@@ -41,11 +49,7 @@ void NETHMACInit(HMACContext* context, const DigestInterface* interface, const v
context->interface.getDigest(work, context->key);
context->keyLength = context->interface.digestSize;
}
keyLength = context->keyLength;
for (i=0; i<keyLength; ++i) innerKey[i] = context->key[i] ^ 0x36;
memset(innerKey + keyLength, 0x36, context->interface.blockSize - keyLength);
context->interface.init(context->digestContext);
context->interface.update(context->digestContext, innerKey, context->interface.blockSize);
BeginDigest(context, 0x36);
}
void NETHMACUpdate(HMACContext* context, const void* data, u32 length) {
@@ -54,16 +58,9 @@ void NETHMACUpdate(HMACContext* context, const void* data, u32 length) {
void NETHMACGetDigest(HMACContext* context, void* digest) {
u8 innerDigest[64];
u8 outerKey[64];
u32 i;
u32 keyLength;
void* work = context->digestContext;
context->interface.getDigest(work, innerDigest);
keyLength = context->keyLength;
for (i=0; i<keyLength; ++i) outerKey[i] = context->key[i] ^ 0x5c;
memset(outerKey + keyLength, 0x5c, context->interface.blockSize - keyLength);
context->interface.init(context->digestContext);
context->interface.update(context->digestContext, outerKey, context->interface.blockSize);
BeginDigest(context, 0x5c);
context->interface.update(work, innerDigest, context->interface.digestSize);
context->interface.getDigest(work, digest);
}

View File

@@ -95,7 +95,7 @@ s32 NHTTPi_SocRecv_sub(NHTTPConnectionInfo* connection, s32 socket, void* data,
} else return result;
}
if(connection->recvBufDataLen!=0) {
if((u32)length>connection->recvBufDataLen) length=connection->recvBufDataLen;
length = (u32)length > connection->recvBufDataLen ? connection->recvBufDataLen : length;
NHTTPi_memcpy(data,buffer+connection->recvBufOffset,length);
connection->recvBufDataLen-=length;
if(connection->recvBufDataLen==0) {
@@ -168,7 +168,7 @@ s32 NHTTPi_SocSend_sub(s32 socket, const char* data, u32 length, s32 flags) {
return sent;
}
s32 NHTTPi_SocSend(NHTTPRequestInfo* request, s32 socket, const char* data, s32 length, s32 flags) {
s32 NHTTPi_SocSend(const NHTTPRequestInfo* request, s32 socket, const void* data, s32 length, s32 flags) {
s32 result;
SSLId ssl=request->sslId;
if(ssl>0) result=SSLWrite(ssl,data,length);

View File

@@ -82,7 +82,7 @@ s32 NHTTPi_ReceivedCallback(void* mutex, NHTTPConnectionInfo* connection);
void NHTTPi_NotifyCompletion(NHTTPConnectionInfo* connection);
void NHTTPi_SetVirtualContentLength(NHTTPConnectionInfo* connection, u32 length);
BOOL NHTTPi_isRecvBufFull(NHTTPResponseInfo* response, s32 offset);
s32 NHTTPi_SocSend(NHTTPRequestInfo* request, s32 socket, const void* buffer, s32 length, s32 flags);
s32 NHTTPi_SocSend(const NHTTPRequestInfo* request, s32 socket, const void* buffer, s32 length, s32 flags);
s32 NHTTPi_SocRecv(void* mutex, NHTTPRequestInfo* request, s32 socket, void* buffer, s32 length, s32 flags);
s32 NHTTPi_SocClose(void* mutex, NHTTPRequestInfo* request, s32 socket);
s32 NHTTPi_SocOpen(NHTTPRequestInfo* request);
@@ -986,9 +986,16 @@ static BOOL NHTTPi_ThreadParseHeaderProc(NHTTPThreadContext* context)
if (length > 0x100) context->keepAlive = FALSE;
else if (length > 0)
{
struct TokenMatch {
BOOL matched;
};
struct TokenMatch match = {FALSE};
if (NHTTPi_compareTokenN_HdrRecvBuf(response, offset, offset + length, "Keep-Alive", 0) == 0)
context->keepAlive = TRUE;
else context->keepAlive = FALSE;
{
match.matched = TRUE;
context->keepAlive = match.matched;
}
else context->keepAlive = match.matched;
}
else context->keepAlive = FALSE;
}

View File

@@ -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) {
@@ -176,7 +177,8 @@ s32 ConvertDateToDays(u16 year, u8 month, u8 day) {
}
validDate:
daysOfYear = day - 1 + DAYS_OF_YEAR[month - 1];
daysOfYear = day - 1;
daysOfYear += DAYS_OF_YEAR[month - 1];
if (month >= 3) {
isLeapYear = 0;
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
@@ -206,31 +208,41 @@ void ConvertDaysToDate(u16* year, u8* month, u8* day, s32 days) {
for (;;) {
u16 currentYear = *year;
s32 previousDays = days;
BOOL leapYear = (currentYear % 4 == 0 && currentYear % 100 != 0) || currentYear % 400 == 0;
BOOL leapYear = TRUE;
BOOL commonLeapYear = FALSE;
if (currentYear % 4 == 0 && currentYear % 100 != 0) {
commonLeapYear = TRUE;
}
if (!commonLeapYear && currentYear % 400 != 0) {
leapYear = FALSE;
}
days -= 365 + (leapYear != FALSE);
if (days < 0) {
days = previousDays;
break;
}
*year = *year + 1;
*year += 1;
continue;
}
for (;;) {
s32 previousDays = days;
if (*month == 2) {
BOOL leapYear = IsLeapYear(*year);
if (leapYear) {
days -= 29;
} else {
days -= DAYS_OF_MONTH[*month - 1];
}
s32 previousDays;
u8 currentMonth;
const u8* parsedMonth = month;
previousDays = days;
currentMonth = *parsedMonth;
if (currentMonth == 2 && IsLeapYear(*year)) {
days -= 29;
} else {
days -= DAYS_OF_MONTH[*month - 1];
days -= DAYS_OF_MONTH[currentMonth - 1];
}
if (days < 0) {
*day += previousDays;
return;
if (days >= 0) {
*month += 1;
} else {
days = previousDays;
break;
}
*month = *month + 1;
}
*day += days;
}

View File

@@ -555,14 +555,14 @@ NWC24Err NWC24iMBoxFlushHeader(NWC24MBoxType type) {
return result != NWC24_OK ? result : closeResult;
}
static inline void GetOldestMsgId(const MBCHeader* header, u32* id) {
static inline void GetOldestMsgId(const MBCHeader* header, volatile u32* id) {
*id = header->oldestId;
}
NWC24Err NWC24iMBoxCheck(NWC24MBoxType type, u32 size) {
u32 required;
struct {
u32 oldestId;
volatile u32 oldestId;
MBCHeader* header;
} mailbox;
NWC24Err err;

View File

@@ -231,11 +231,11 @@ static NWC24Err QEncode(char* encoded, u32 encodedCapacity, u32* encodedSize, u8
}
static NWC24Err QDecode(char* decoded, u32 decodedCapacity, u32* decodedSize, char* encoded, u32 encodedSize, u32* encodedSizeOut, int flags) {
u32 decodedOffset = 0;
u32 encodedOffset;
u32 decodedOffset = 0;
u8 value = 0;
char* input;
char* output;
u8 value = 0;
NWC24Err result = NWC24_OK;
if (decoded == NULL)
@@ -255,7 +255,7 @@ static NWC24Err QDecode(char* decoded, u32 decodedCapacity, u32* decodedSize, ch
input = encoded;
output = decoded;
for (encodedOffset = 0; encodedOffset < encodedSize; encodedOffset++) {
if (decodedCapacity <= decodedOffset) {
if (decodedOffset >= decodedCapacity) {
result = NWC24_ERR_OVERFLOW;
break;
}
@@ -265,15 +265,15 @@ static NWC24Err QDecode(char* decoded, u32 decodedCapacity, u32* decodedSize, ch
decodedOffset++;
} else if (*input == '=' && encodedOffset + 2 < encodedSize) {
BOOL validHex = TRUE;
u32 inputAfterEqual = encodedOffset + 1;
char* current = ++input;
if (*current == ' ' || *current == '\t') {
char* next = current + 1;
input++;
encodedOffset++;
if (*input == ' ' || *input == '\t') {
char* next = input + 1;
u32 scan = 1;
while (inputAfterEqual + scan + 1 < encodedSize) {
while (encodedOffset + scan + 1 < encodedSize) {
if (*next == '\r' && next[1] == '\n') {
inputAfterEqual += scan;
current = next;
encodedOffset += scan;
input = next;
break;
}
if (*next != ' ' && *next != '\t') {
@@ -283,29 +283,27 @@ static NWC24Err QDecode(char* decoded, u32 decodedCapacity, u32* decodedSize, ch
scan++;
}
}
if (*current == '\r' && current[1] == '\n') {
current += 2;
encodedOffset = inputAfterEqual + 1;
input = current;
if (*input == '\r' && input[1] == '\n') {
input += 2;
encodedOffset++;
} else {
int high = Util_xtoi(*current);
int high = Util_xtoi(*input);
int low;
if (high >= 0) {
value = (high & 0x0F) << 4;
}
if (high < 0) { validHex = FALSE; }
low = Util_xtoi(current[1]);
low = Util_xtoi(input[1]);
if (low >= 0) {
value |= low & 0x0F;
}
if (low < 0) { validHex = FALSE; }
current += 2;
input += 2;
if (validHex) {
*output++ = (char)value;
decodedOffset++;
}
encodedOffset = inputAfterEqual + 1;
input = current;
encodedOffset++;
}
} else {
*output++ = *input++;
@@ -501,22 +499,42 @@ static BOOL CopyWithoutLinearWhiteSpaces(char* output, int* outputSize, char* in
}
static inline char* FindMarker(char* input, u32 size, const char* marker) {
u32 markerLength = Mail_strlen(marker);
u32 offset;
u32 markerLength;
markerLength = Mail_strlen(marker);
for (offset = 0; offset <= size; offset++) {
char* current = input + offset;
if (Mail_strncmp(current, marker, markerLength) == 0)
return current;
return input + offset;
}
return NULL;
}
static inline char* FindMarkerAfterPrefix(char* input, u32 size, u32 prefix, const char* marker) {
u32 markerLength = Mail_strlen(marker);
char* current = input + prefix;
char* current;
u32 offset;
u32 markerLength;
markerLength = Mail_strlen(marker);
current = input + prefix;
for (offset = 0; offset <= size; offset++) {
if (Mail_strncmp(current, marker, markerLength) == 0) {
return input + offset + prefix;
return input + prefix + offset;
}
current++;
}
return NULL;
}
static inline char* FindEncodingMarker(char* encoded, u32 size) {
u32 offset;
u32 markerLength;
const char* marker;
char* current;
marker = "?";
markerLength = Mail_strlen(marker);
current = encoded;
for (offset = 0; offset <= size; offset++) {
if (Mail_strncmp(current, marker, markerLength) == 0) {
return encoded + offset;
}
current++;
}
@@ -524,14 +542,28 @@ static inline char* FindMarkerAfterPrefix(char* input, u32 size, u32 prefix, con
}
static inline NWC24Err ExtractWordEncoding(char* encoding, u32* encodingSize, char* encoded, u32 encodedSize) {
char* delimiter = FindMarkerAfterPrefix(encoded, encodedSize, 0, "?");
char* delimiter = FindEncodingMarker(encoded, encodedSize);
if (delimiter == NULL) { return NWC24_ERR_INVALID_VALUE; }
*encoding = delimiter[1];
*encodingSize = 2;
return NWC24_OK;
}
static inline BOOL IsLinearWhitespaceOnly(char* text, u32 size) {
u32 offset;
BOOL whitespaceOnly;
whitespaceOnly = TRUE;
for (offset = 0; offset < size && text[offset] != '\0'; offset++) {
char value = text[offset];
if (value != ' ' && value != '\t' && value != '\r' && value != '\n') {
whitespaceOnly = FALSE;
}
}
return whitespaceOnly;
}
static NWC24Err DecodeWord(char* charsetData, u32 charsetCapacity, char* decoded, u32 decodedCapacity, u32* decodedSize, char* encoded,
u32 encodedSize, u32* encodedSizeOut) {
char encoding;
char* encodedWord;
u32 consumedSize;
u32 decodedLength;
@@ -548,7 +580,6 @@ static NWC24Err DecodeWord(char* charsetData, u32 charsetCapacity, char* decoded
if (encodedSizeOut != NULL) { *encodedSizeOut = 0; }
encodedWord = FindMarker(encoded, encodedSize, "=?");
if (encodedWord == encoded) {
char encoding;
result = ExtractCharset(charsetData, charsetCapacity, &consumedSize, encodedWord, encodedSize);
if (result != NWC24_OK) { return result; }
encodedLength = consumedSize;
@@ -574,15 +605,7 @@ static NWC24Err DecodeWord(char* charsetData, u32 charsetCapacity, char* decoded
}
decodedLength = localSize;
if (encodedWord != NULL) {
BOOL whitespaceOnly = TRUE;
u32 offset;
for (offset = 0; offset < localSize && decoded[offset] != '\0'; offset++) {
char value = decoded[offset];
if (value != ' ' && value != '\t' && value != '\r' && value != '\n') {
whitespaceOnly = FALSE;
}
}
if (whitespaceOnly) {
if (IsLinearWhitespaceOnly(decoded, localSize)) {
*decoded = '\0';
decodedLength = 1;
}
@@ -695,8 +718,9 @@ static NWC24Err ExtractCharset(char* charset, u32 charsetCapacity, u32* charsetS
return NWC24_OK;
}
static inline char* FindMarkerOffsetPrefix(char* input, u32 size, u32 prefix, const char* marker) {
u32 markerLength = Mail_strlen(marker);
u32 offset;
u32 markerLength;
markerLength = Mail_strlen(marker);
for (offset = 0; offset <= size; offset++) {
if (Mail_strncmp(input + offset + prefix, marker, markerLength) == 0) {
return input + prefix + offset;

View File

@@ -202,33 +202,40 @@ static inline NWC24Err WriteMBNoReplyField(NWC24MsgObjPrivate* msg) {
return err;
}
static inline NWC24Err WriteMBRegDateField(NWC24MsgObjPrivate* msg, u32 flags) {
typedef struct {
u32 flags;
char* buffer;
} MBFieldWork;
static inline NWC24Err WriteMBRegDateField(NWC24MsgObjPrivate* msg) {
MBFieldWork field;
NWC24Err err;
s32 length;
char* buffer;
if (!flags)
field.flags = msg->msgBoardFlags.raw & 0xFFFF;
if (!field.flags)
return NWC24_OK;
buffer = NWC24WorkP->stringWork;
Mail_memset(buffer, 0, 1024);
Mail_sprintf(buffer, "X-Wii-MB-RegDate: %04X\r\n", flags);
length = STD_strnlen(buffer, 1024);
err = NWC24FWrite(buffer, length, m_pFile);
field.buffer = NWC24WorkP->stringWork;
Mail_memset(field.buffer, 0, 1024);
Mail_sprintf(field.buffer, "X-Wii-MB-RegDate: %04X\r\n", field.flags);
length = STD_strnlen(field.buffer, 1024);
err = NWC24FWrite(field.buffer, length, m_pFile);
if (err == NWC24_OK)
msg->length += length;
return err;
}
static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg, u32 flags) {
static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg) {
MBFieldWork field;
NWC24Err err;
s32 length;
char* buffer;
if (!flags)
field.flags = msg->msgBoardFlags.raw & 0xFF0000;
if (!field.flags)
return NWC24_OK;
buffer = NWC24WorkP->stringWork;
Mail_memset(buffer, 0, 1024);
Mail_sprintf(buffer, "X-Wii-MB-Delay: %02X\r\n", flags >> 16);
length = STD_strnlen(buffer, 1024);
err = NWC24FWrite(buffer, length, m_pFile);
field.buffer = NWC24WorkP->stringWork;
Mail_memset(field.buffer, 0, 1024);
Mail_sprintf(field.buffer, "X-Wii-MB-Delay: %02X\r\n", field.flags >> 16);
length = STD_strnlen(field.buffer, 1024);
err = NWC24FWrite(field.buffer, length, m_pFile);
if (err == NWC24_OK)
msg->length += length;
return err;
@@ -306,8 +313,8 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
CHECK_WRITE(WriteIconNewField(msg));
if (msg->msgBoardFlags.raw != 0) {
CHECK_WRITE(WriteMBNoReplyField(msg));
{ u16 dateFlags = msg->msgBoardFlags.raw; CHECK_WRITE(WriteMBRegDateField(msg, dateFlags)); }
CHECK_WRITE(WriteMBDelayField(msg, msg->msgBoardFlags.raw & 0xFF0000));
CHECK_WRITE(WriteMBRegDateField(msg));
CHECK_WRITE(WriteMBDelayField(msg));
}
}
CHECK_WRITE(WriteExtraFields(msg));

View File

@@ -19,7 +19,7 @@ static inline NWC24Err SelectMBox(const NWC24MsgObjPrivate* msg, NWC24MBoxType*
}
NWC24Err NWC24ReadMsgField(const NWC24MsgObj* msg, char* fieldName, u8* output, u32 capacity) {
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
NWC24File file;
NWC24FileStream stream;
char* field;
@@ -268,7 +268,7 @@ NWC24Err NWC24ReadMsgMBOptOutFlag(const NWC24MsgObj* msg, BOOL* optOut, u32* app
}
NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacity) {
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
NWC24MBoxType type;
NWC24File file;
NWC24FileStream stream;
@@ -312,7 +312,7 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
}
NWC24Err NWC24ReadMsgSubject(const NWC24MsgObj* msg, char* subject, u32 capacity) {
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
NWC24MBoxType type;
NWC24File file;
u32 length;
@@ -386,14 +386,14 @@ NWC24Err NWC24ReadMsgTextEx(const NWC24MsgObj* msg, char* text, u32 capacity, ch
}
static NWC24Err ReadMsgTextInternal(const NWC24MsgObj* msg, char* text, u32 capacity, char* charset, u32 charsetCapacity, NWC24Encoding* encoding) {
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
u32 length;
NWC24MBoxType type;
NWC24File file;
NWC24Err result, closeResult;
NWC24Err overflow = NWC24_OK;
u32 length;
u32 decodedSize;
char* buffer;
u32 decodedSize;
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
return NWC24_ERR_LIB_NOT_OPENED;
if (!(privateMsg->type & 0x200))
@@ -408,13 +408,15 @@ static NWC24Err ReadMsgTextInternal(const NWC24MsgObj* msg, char* text, u32 capa
return result;
}
length = privateMsg->textSize;
if (length == 0)
length = privateMsg->text.size;
switch (length) {
case 0: length = privateMsg->text.size; break;
default: break;
}
if (length == 0)
return NWC24_ERR_NULL;
if (length > capacity - 1) {
overflow = NWC24_ERR_OVERFLOW;
length = capacity - 1;
overflow = NWC24_ERR_OVERFLOW;
}
result = NWC24iMBoxOpenStoredMsg(type, privateMsg->msgId, &file);
switch (result) {
@@ -450,13 +452,16 @@ static NWC24Err ReadMsgTextInternal(const NWC24MsgObj* msg, char* text, u32 capa
result = NWC24FRead(text, length, &file);
text[length] = 0;
break;
case 2:
case 2: {
NWC24Err decodeResult;
decodedSize = 0;
result = ReadBase64Data(&file, &privateMsg->text, (u8*)text, length, &decodedSize);
if (result == NWC24_OK && decodedSize != privateMsg->textSize)
result = NWC24_ERR_FORMAT;
decodeResult = ReadBase64Data(&file, &privateMsg->text, (u8*)text, length, &decodedSize);
if (decodeResult == NWC24_OK && decodedSize != privateMsg->textSize)
decodeResult = NWC24_ERR_FORMAT;
result = decodeResult;
text[length] = 0;
break;
}
case 3:
result = ReadQPText(privateMsg, &file, text, length);
break;
@@ -468,15 +473,15 @@ static NWC24Err ReadMsgTextInternal(const NWC24MsgObj* msg, char* text, u32 capa
}
close:
closeResult = NWC24iMBoxCloseMsg(&file);
if (result == NWC24_OK)
result = closeResult;
if (result == NWC24_OK)
result = overflow;
return result;
if (result != NWC24_OK)
closeResult = result;
if (closeResult != NWC24_OK)
overflow = closeResult;
return overflow;
}
NWC24Err NWC24ReadMsgAttached(const NWC24MsgObj* msg, u32 index, u8* output, u32 capacity) {
const NWC24MsgObjPrivate* privateMsg = (const NWC24MsgObjPrivate*)msg;
NWC24MsgObjPrivate* privateMsg = (NWC24MsgObjPrivate*)msg;
NWC24File file;
NWC24MBoxType type;
u32 decodedSize;
@@ -505,11 +510,8 @@ NWC24Err NWC24ReadMsgAttached(const NWC24MsgObj* msg, u32 index, u8* output, u32
}
decodedSize = 0;
result = ReadBase64Data(&file, &privateMsg->attached[index], output, capacity, &decodedSize);
switch (result) {
case NWC24_OK:
if (decodedSize != privateMsg->attachedSize[index]) { result = NWC24_ERR_FORMAT; }
break;
default: break;
if (result == NWC24_OK) {
if (decodedSize != ((const NWC24MsgObjPrivate*)msg)->attachedSize[index]) result = NWC24_ERR_FORMAT;
}
closeResult = NWC24iMBoxCloseMsg(&file);
if (result == NWC24_OK)

View File

@@ -743,15 +743,16 @@ NWC24Err NWC24iSetMsgSubjectQP(NWC24MsgObj* msg, const u16* subject, u32 subject
u32 workSize, NWC24Charset charset, char* charsetName) {
u32 workHalf;
u32 sourceOffset;
u32 secondSize;
u32 charsetLength;
u8* second;
u32 subjectLength;
u32 lineLength;
u32 outputLength;
u32 secondSize;
u32 total;
u32 combinedLength;
u32 i;
u32 charsetLength;
u32 outputLength;
u32 firstCharsetLength;
NWC24Err result;
secondSize = workSize - (workSize >> 1);
@@ -770,8 +771,8 @@ NWC24Err NWC24iSetMsgSubjectQP(NWC24MsgObj* msg, const u16* subject, u32 subject
work[i] = ' ';
}
}
charsetLength = strlen(charsetName);
NWC24iDetectBreakPoint(&lineLength, charset, work, subjectLength, (0x38 - charsetLength) / 3);
firstCharsetLength = strlen(charsetName);
NWC24iDetectBreakPoint(&lineLength, charset, work, subjectLength, (0x38 - firstCharsetLength) / 3);
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'Q', work, lineLength);
switch (result) {
default:
@@ -816,9 +817,10 @@ done:
NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 subjectSize, NWC24EncodingRegion region, u16 alternative, u8* work,
u32 workSize, NWC24Charset charset, char* charsetName) {
u32 workHalf;
u32 secondSize;
const u8* encodedInput = work;
u8* second;
u32 secondSize;
u32 workHalf;
u32 subjectLength;
u32 lineLength;
u32 sourceOffset;
@@ -827,19 +829,23 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
u32 charsetLength;
NWC24Err result;
workHalf = workSize >> 1;
secondSize = workSize - workHalf;
second = work + workHalf;
second = work + (workSize >> 1);
secondSize = workSize - (workSize >> 1);
charsetLength = strlen(charsetName);
lineLength = ((0x36 - charsetLength) * 3) >> 2;
if (lineLength > workHalf) {
if (lineLength > (workSize >> 1)) {
result = NWC24_ERR_OVERFLOW;
} else {
workHalf = lineLength + 1;
subjectLength = subjectSize;
result = NWC24iConvertFromInternalEncoding(work, &workHalf, subject, &subjectLength, charsetName, 0x40, region, alternative);
switch (result) { case NWC24_OK: case NWC24_ERR_OVERFLOW: break; default: goto done; }
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'B', work, workHalf - 1);
if (result != NWC24_OK) {
switch (result) {
case NWC24_ERR_OVERFLOW: break;
default: goto done;
}
}
result = NWC24EncodeWord(second, secondSize, &outputLength, charsetName, 0x40, 'B', (u8*)encodedInput, workHalf - 1);
switch (result) { case NWC24_OK: break; default: goto done; }
{
sourceOffset = subjectLength;
@@ -849,7 +855,7 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
charsetLength = strlen(charsetName);
lineLength = (((0x3E - charsetLength) * 3) >> 2) + 1;
total = outputLength - 1;
for (; sourceOffset < subjectSize; sourceOffset += subjectLength) {
for (; sourceOffset < subjectSize;) {
subjectLength = subjectSize - sourceOffset;
workHalf = lineLength;
if (secondSize - total < 3) {
@@ -861,9 +867,15 @@ NWC24Err NWC24iSetMsgSubjectBase64(NWC24MsgObj* msg, const u16* subject, u32 sub
second[total++] = ' ';
result = NWC24iConvertFromInternalEncoding(work, &workHalf, subject + sourceOffset, &subjectLength, charsetName, 0x40, region,
alternative);
switch (result) { case NWC24_OK: case NWC24_ERR_OVERFLOW: break; default: goto done; }
result = NWC24EncodeWord(second + total, secondSize - total, &outputLength, charsetName, 0x40, 'B', work, workHalf - 1);
if (result != NWC24_OK) {
switch (result) {
case NWC24_ERR_OVERFLOW: break;
default: goto done;
}
}
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;
}
result = NWC24SetMsgSubject(msg, (char*)second, total);

View File

@@ -47,95 +47,130 @@ s32 SOGetHostID(void) {
return address;
}
SOHostEnt* SOGetHostByName(const char* name) {
static inline int GetHostReply(const char* name, s32* rm, SOHostEnt** host) {
HostReply* reply;
int length;
char* request;
int result;
int size;
int length;
SOHostEnt* host;
if (!name) return -28;
length = strlen(name);
size = (length + 32) & ~31;
request = SOiAlloc(12, size);
reply = SOiGetSysWork()->host;
if (!request) return -49;
strcpy(request, name);
result = IOS_Ioctl(*rm, 17, request, length + 1, reply, 0x460);
if (result >= 0) {
int displacement = (int)reply->nameStorage - (int)reply->host.name;
u8** address = reply->addresses;
while (*address) { *address += displacement; ++address; }
reply->host.aliases = (char**)((u8*)reply->host.aliases + displacement);
*host = &reply->host;
reply->host.name += displacement;
reply->host.addrList = (u8**)((u8*)reply->host.addrList + displacement);
}
SOiFree(12, request, size);
return result;
}
SOHostEnt* SOGetHostByName(const char* name) {
SOHostEnt* host = NULL;
s32 rm;
char* request;
host = NULL;
if((result=SOiPrepare(NULL,&rm))==0) {
if(!name) result=-28;
else {
length=strlen(name);
size=(length+32)&~31;
request=SOiAlloc(12,size);
reply=SOiGetSysWork()->host;
if(!request) result=-49;
else {
strcpy(request,name);
result=IOS_Ioctl(rm,17,request,length+1,reply,0x460);
if(result>=0) {
int displacement=(int)reply->nameStorage-(int)reply->host.name;
u8** address=reply->addresses;
while(*address) { *address+=displacement; ++address; }
reply->host.aliases=(char**)((u8*)reply->host.aliases+displacement);
host=&reply->host;
reply->host.name+=displacement;
reply->host.addrList=(u8**)((u8*)reply->host.addrList+displacement);
}
SOiFree(12,request,size);
}
}
SOiConclude(NULL,result);
int result;
if ((result = SOiPrepare(NULL, &rm)) == 0) {
result = GetHostReply(name, &rm, &host);
SOiConclude(NULL, result);
}
return host;
}
static int NameSize(const char* name) { return name ? strlen(name)+1 : 0; }
static inline int NameSize(const char* name) {
if (name == NULL) {
return 0;
} else {
return strlen(name) + 1;
}
}
static inline int NameLength(const char* name) {
if (name == NULL) {
return 0;
} else {
return strlen(name);
}
}
static inline int ServiceSize(const char* node, const char* service) {
if (service == NULL) {
return 0;
} else {
return strlen(node) + 1;
}
}
static inline int GetAddressReply(const char* nodeName, const char* servName, const SOAddrInfo* hints,
SOAddrInfo** resultInfo, s32* rm) {
SOAddrInfo* requestHints;
AddrInfoRequest* request;
char* service;
int nodeLength;
AddrInfoReply* reply;
int size;
char* node;
int serviceLength;
int result;
serviceLength = ServiceSize(nodeName, servName);
nodeLength = NameSize(nodeName);
size=(((nodeLength+31)&~31)+((serviceLength+31)&~31)+95)&~31;
request=SOiAlloc(12,size);
if(!request) result=-49;
else {
reply=SOiAlloc(10,0x840);
if(!reply) { SOiFree(12,request,size); result=-49; }
else {
node=(char*)request->storage;
service=node+((NameSize(nodeName)+31)&~31);
requestHints=(SOAddrInfo*)(service+((ServiceSize(nodeName, servName)+31)&~31));
if(nodeName) strcpy(node,nodeName);
request->vectors[0].base=nodeName ? (u8*)node : NULL;
request->vectors[0].length=NameLength(nodeName);
if(servName) strcpy(service,servName);
request->vectors[1].base=servName ? (u8*)service : NULL;
request->vectors[1].length=NameLength(servName);
if(hints) memcpy(requestHints,hints,32);
else memset(requestHints,0,32);
if(requestHints->family==0) requestHints->family=2;
if(requestHints->family==23) {
*resultInfo=NULL; result=-68; SOiFree(10,reply,0x840);
} else {
request->vectors[2].base=(u8*)requestHints; request->vectors[2].length=32;
request->vectors[3].base=(u8*)reply; request->vectors[3].length=0x834;
result=IOS_Ioctlv(*rm,24,3,1,request->vectors);
if(result>=0) {
SOAddrInfo* entry=reply->entries;
u8* address=reply->addresses;
*resultInfo=entry;
while(entry) {
entry->addr=address;
if(entry->next) entry->next=entry+1;
entry=entry->next;
address+=28;
}
} else { *resultInfo=NULL; SOiFree(10,reply,0x840); }
}
SOiFree(12,request,size);
}
}
return result;
}
int SOGetAddrInfo(const char* nodeName, const char* servName, const SOAddrInfo* hints, SOAddrInfo** resultInfo) {
s32 rm;
int result,size;
AddrInfoRequest* request;
AddrInfoReply* reply;
char* node;
char* service;
SOAddrInfo* requestHints;
if((result=SOiPrepare(NULL,&rm))==0) {
size=(((NameSize(nodeName)+31)&~31)+((servName ? strlen(nodeName)+32 : 31)&~31)+95)&~31;
request=SOiAlloc(12,size);
if(!request) result=-49;
else {
reply=SOiAlloc(10,0x840);
if(!reply) { SOiFree(12,request,size); result=-49; }
else {
node=(char*)request->storage;
service=node+((NameSize(nodeName)+31)&~31);
requestHints=(SOAddrInfo*)(service+((servName ? strlen(nodeName)+32 : 31)&~31));
if(nodeName) strcpy(node,nodeName);
request->vectors[0].base=nodeName ? (u8*)node : NULL;
request->vectors[0].length=nodeName ? strlen(nodeName) : 0;
if(servName) strcpy(service,servName);
request->vectors[1].base=servName ? (u8*)service : NULL;
request->vectors[1].length=servName ? strlen(servName) : 0;
if(hints) memcpy(requestHints,hints,32);
else memset(requestHints,0,32);
if(requestHints->family==0) requestHints->family=2;
if(requestHints->family==23) {
*resultInfo=NULL; result=-68; SOiFree(10,reply,0x840);
} else {
request->vectors[2].base=(u8*)requestHints; request->vectors[2].length=32;
request->vectors[3].base=(u8*)reply; request->vectors[3].length=0x834;
result=IOS_Ioctlv(rm,24,3,1,request->vectors);
if(result>=0) {
SOAddrInfo* entry=reply->entries;
u8* address=reply->addresses;
*resultInfo=entry;
while(entry) {
entry->addr=address;
if(entry->next) entry->next=entry+1;
entry=entry->next;
address+=28;
}
} else { *resultInfo=NULL; SOiFree(10,reply,0x840); }
}
SOiFree(12,request,size);
}
}
result=SOiConclude(NULL,result);
int result;
if ((result = SOiPrepare(NULL, &rm)) == 0) {
result = GetAddressReply(nodeName, servName, hints, resultInfo, &rm);
result = SOiConclude(NULL, result);
}
return result;
}

View File

@@ -17,14 +17,19 @@ typedef struct SocketOption {
u8 value[20];
} SocketOption;
typedef struct InterfaceCommand { int level; int option; } InterfaceCommand;
typedef union InterfaceCommand {
struct { int level; int option; };
u8 bytes[32];
} InterfaceCommand;
typedef union InterfaceLength {
int length;
u8 bytes[32];
} InterfaceLength;
typedef struct InterfaceOption {
IOSIoVector vectors[4];
union {
InterfaceCommand command;
u8 commandBlock[32];
};
InterfaceCommand command;
union {
int length;
u8 lengthBlock[32];
@@ -34,10 +39,7 @@ typedef struct InterfaceOption {
typedef struct InterfaceSetting {
IOSIoVector vectors[4];
union {
InterfaceCommand command;
u8 commandBlock[32];
};
InterfaceCommand command;
u8 value[1];
} InterfaceSetting;
@@ -96,9 +98,9 @@ static int OptionLength(int* length) {
int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int* length) {
s32 rm;
int temporary;
InterfaceOption* request;
int result;
int size;
int result;
InterfaceOption* request;
InterfaceCommand* command;
int* returnedLength;
u8* reply;
@@ -111,8 +113,8 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
else {
command=&request->command;
command->level=level; command->option=option;
returnedLength=&request->length;
reply=request->value;
returnedLength=&((InterfaceLength*)(command + 1))->length;
reply=(u8*)((InterfaceLength*)returnedLength + 1);
*returnedLength=OptionLength(length);
request->vectors[0].base=(u8*)command;
request->vectors[0].length=8;
@@ -138,9 +140,9 @@ int SOGetInterfaceOpt(void* interface, int level, int option, void* value, int*
int SOSetInterfaceOpt(void* interface, int level, int option, const void* value, int length) {
s32 rm;
int temporary;
InterfaceSetting* request;
int result;
int size;
int result;
InterfaceSetting* request;
InterfaceCommand* command;
u8* reply;
if ((result=SOiPrepareTempRm(NULL,&rm,&temporary))==0) {
@@ -152,7 +154,7 @@ int SOSetInterfaceOpt(void* interface, int level, int option, const void* value,
else {
command=&request->command;
command->level=level; command->option=option;
reply=request->value;
reply=(u8*)(command + 1);
if(value) memcpy(reply,value,length);
else memset(reply,0,length);
request->vectors[0].base=(u8*)command; request->vectors[0].length=8;

View File

@@ -1,3 +1,4 @@
#define BS2_MACH_VOLATILE_DVD_STATE
#define BS2_MACH_FIVE_ARG_READ
#include "BS2/BS2.h"
#include "BS2/BS2BringUp.h"
@@ -64,7 +65,7 @@ volatile int CacheFailed = 0;
volatile int RegionValid = 0;
volatile int NandPending = 0;
vu32 CancelNand = 0;
u32 LowReadResult = 0;
vu32 LowReadResult = 0;
u32 CacheCommandComplete = 0;
u32 AudioBufferUnconfigured = 0;
u64 ResetTime = 0;
@@ -577,7 +578,7 @@ void BS2StartGame() {
u32 (*entry)(void);
StartingGame = TRUE;
while (DVDGetCommandBlockStatus(&CoverBlock) != DVD_STATE_IDLE) {
while (CoverBlock.state != DVD_STATE_IDLE) {
}
BS2Report("BS2StartGame(1)\n");
@@ -677,8 +678,6 @@ void BS2StartGame() {
LowReadResult = 0;
DVDLowReadDiskID(&DiskID, (DVDLowCallback)callback);
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
status = LowReadResult;
@@ -693,8 +692,6 @@ void BS2StartGame() {
LowReadResult = 0;
DVDLowRequestError((DVDLowCallback)callback);
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
driveError = DVDLowGetImmBufferReg() & 0xFF000000;
if (driveError == 0x01000000 || (driveError = DVDLowGetImmBufferReg() & 0xFF000000) == 0x03000000) {
@@ -729,8 +726,6 @@ disk_done:
(DVDLowCallback)callback);
}
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
status = LowReadResult;
@@ -748,8 +743,6 @@ disk_done:
LowReadResult = 0;
DVDLowRequestError((DVDLowCallback)callback);
while (LowReadResult == 0) {
BOOL enabled = OSDisableInterrupts();
OSRestoreInterrupts(enabled);
}
driveError = DVDLowGetImmBufferReg() & 0xFF000000;
if (driveError == 0x01000000 || (driveError = DVDLowGetImmBufferReg() & 0xFF000000) == 0x03000000) {

View File

@@ -9,14 +9,10 @@
#include <string.h>
typedef struct UpdateThreadData {
OSThread thread;
u8 stack[4096];
} UpdateThreadData;
static u32 Flags0[BS2_UPDATE_ENTRY_COUNT] = {0};
static u32 Flags1[BS2_UPDATE_ENTRY_COUNT] = {0};
static UpdateThreadData Thread = {0};
static OSThread Thread = {0};
static u8 ThreadStack[4096] = {0};
static BS2UpdateHeader UpdateHeader0 ALIGN32 = {0};
static BS2UpdateHeader UpdateHeader1 ALIGN32 = {0};
@@ -39,7 +35,7 @@ static u32 UpdateImportResult = 0;
u32 StartUpdate = 0;
u32 CancelUpdate = 0;
static u32 UpdateProgress = 0;
static s32 rc = 0;
static volatile s32 rc = 0;
static u64 VersionIOS = 0;
static u32 VersionMEM2 = 0;
static u32 VersionES = 0;
@@ -76,9 +72,9 @@ void BS2UpdateInit(void* allocator) {
memset(EntriesToImport, 0, 0x40000);
memset(Flags1, 0, sizeof(Flags1));
BS2Report("Create update thread\n");
OSCreateThread(&Thread.thread, UpdateThread, NULL, Thread.stack + sizeof(Thread.stack),
sizeof(Thread.stack), 31, 1);
OSResumeThread(&Thread.thread);
OSCreateThread(&Thread, UpdateThread, NULL, ThreadStack + sizeof(ThreadStack),
sizeof(ThreadStack), 31, 1);
OSResumeThread(&Thread);
}
static void* UpdateThread(void* argument) {

View File

@@ -205,7 +205,7 @@ void AxAdpcmSimplePlayer::init() {
}
int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
Header* head = mpBNSBuffer = (Header*)data;
mpBNSBuffer = (Header*)data;
sSysPauseFlag = false;
@@ -224,7 +224,6 @@ int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
ChannelInfo* chanInfoBufB[2];
ChannelInfo* chanInfoBufA[2];
AdpcmCoeffs** pCoeffsBufB = NULL;
int i;
u32* channelStartOffsets;
INFOBlock* infoBlock;
@@ -240,13 +239,13 @@ int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
int chanCount;
{
if (head->byteOrder != 0xFEFF) {
if (((Header*)data)->byteOrder != 0xFEFF) {
chanCount = 0;
goto clean_up;
}
infoBlock = ADD_OFFSET(INFOBlock, data, head->infoHead.offset);
dataBlock = ADD_OFFSET(DATABlock, data, head->dataHead.offset);
infoBlock = ADD_OFFSET(INFOBlock, data, ((Header*)data)->infoHead.offset);
dataBlock = ADD_OFFSET(DATABlock, data, ((Header*)data)->dataHead.offset);
if (infoBlock->head.sig != 'INFO') {
chanCount = 0;
goto clean_up;
@@ -268,8 +267,6 @@ int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
pChanInfoBufB = chanInfoBufB;
pChanDataBuf = chanDataBuf;
pCoeffsBufA = coeffsBufA;
pCoeffsBufB = coeffsBufB;
pAxvpbBuf = axVoiceBuf;
for (i = 0; chanCount = infoBlock->channelCount, i < chanCount; i++) {
int chanStartOffs = channelStartOffsets[i];
ChannelInfo* chanInfo = ADD_OFFSET(ChannelInfo, infoBlockDataBase, chanStartOffs);
@@ -278,8 +275,9 @@ int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
pChanInfoBufB[i] = chanInfo;
pChanDataBuf[i] = ADD_OFFSET(void, dataBlockDataBase, chanInfo->dataOff);
pCoeffsBufA[i] = ADD_OFFSET(AdpcmCoeffs, infoBlockDataBase, chanInfo->coeffOff);
pCoeffsBufB[i] = ADD_OFFSET(AdpcmCoeffs, infoBlockDataBase, chanInfo->coeffOff);
coeffsBufB[i] = ADD_OFFSET(AdpcmCoeffs, infoBlockDataBase, chanInfo->coeffOff);
pAxvpbBuf = axVoiceBuf;
pAxvpbBuf[i] = AXAcquireVoice(0x1f, VoiceCallback, 0);
if (pAxvpbBuf[i] == NULL) {
chanCount = 0;
@@ -312,37 +310,33 @@ int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
axAddr.currentAddressHi = (u32)currAddr >> 0x10;
axAddr.currentAddressLo = (u32)currAddr & 0xFFFF;
axAdpcm.a[0][0] = pCoeffsBufB[i]->a[0][0];
axAdpcm.a[0][1] = pCoeffsBufB[i]->a[0][1];
axAdpcm.a[1][0] = pCoeffsBufB[i]->a[1][0];
axAdpcm.a[1][1] = pCoeffsBufB[i]->a[1][1];
axAdpcm.a[2][0] = pCoeffsBufB[i]->a[2][0];
axAdpcm.a[2][1] = pCoeffsBufB[i]->a[2][1];
axAdpcm.a[3][0] = pCoeffsBufB[i]->a[3][0];
axAdpcm.a[3][1] = pCoeffsBufB[i]->a[3][1];
axAdpcm.a[4][0] = pCoeffsBufB[i]->a[4][0];
axAdpcm.a[4][1] = pCoeffsBufB[i]->a[4][1];
axAdpcm.a[5][0] = pCoeffsBufB[i]->a[5][0];
axAdpcm.a[5][1] = pCoeffsBufB[i]->a[5][1];
axAdpcm.a[6][0] = pCoeffsBufB[i]->a[6][0];
axAdpcm.a[6][1] = pCoeffsBufB[i]->a[6][1];
axAdpcm.a[7][0] = pCoeffsBufB[i]->a[7][0];
axAdpcm.a[7][1] = pCoeffsBufB[i]->a[7][1];
axAdpcm.gain = pCoeffsBufB[i]->cfg.gain;
axAdpcm.pred_scale = pCoeffsBufB[i]->cfg.predScale;
axAdpcm.yn1 = pCoeffsBufB[i]->cfg.yn1;
axAdpcm.yn2 = pCoeffsBufB[i]->cfg.yn2;
axAdpcm.a[0][0] = coeffsBufB[i]->a[0][0];
axAdpcm.a[0][1] = coeffsBufB[i]->a[0][1];
axAdpcm.a[1][0] = coeffsBufB[i]->a[1][0];
axAdpcm.a[1][1] = coeffsBufB[i]->a[1][1];
axAdpcm.a[2][0] = coeffsBufB[i]->a[2][0];
axAdpcm.a[2][1] = coeffsBufB[i]->a[2][1];
axAdpcm.a[3][0] = coeffsBufB[i]->a[3][0];
axAdpcm.a[3][1] = coeffsBufB[i]->a[3][1];
axAdpcm.a[4][0] = coeffsBufB[i]->a[4][0];
axAdpcm.a[4][1] = coeffsBufB[i]->a[4][1];
axAdpcm.a[5][0] = coeffsBufB[i]->a[5][0];
axAdpcm.a[5][1] = coeffsBufB[i]->a[5][1];
axAdpcm.a[6][0] = coeffsBufB[i]->a[6][0];
axAdpcm.a[6][1] = coeffsBufB[i]->a[6][1];
axAdpcm.a[7][0] = coeffsBufB[i]->a[7][0];
axAdpcm.a[7][1] = coeffsBufB[i]->a[7][1];
axAdpcm.gain = coeffsBufB[i]->cfg.gain;
axAdpcm.pred_scale = coeffsBufB[i]->cfg.predScale;
axAdpcm.yn1 = coeffsBufB[i]->cfg.yn1;
axAdpcm.yn2 = coeffsBufB[i]->cfg.yn2;
u32 ratio = infoBlock->sampleRate / 32000.0f * 65536.0f;
axSrc.ratioHi = ratio >> 16;
axSrc.ratioLo = ratio & 0xFFFF;
axSrc.currentAddressFrac = 0;
axSrc.last_samples[0] = 0;
axSrc.last_samples[1] = 0;
axSrc.last_samples[2] = 0;
axSrc.last_samples[3] = 0;
axSrc.last_samples[3] = axSrc.last_samples[2] = axSrc.last_samples[1] = axSrc.last_samples[0] = axSrc.currentAddressFrac = 0;
AXVPB* vpbA = axVoiceBuf[i];
AXVPB* vpbA = pAxvpbBuf[i];
AXSetVoiceType(vpbA, 0);
AXSetVoiceAddr(vpbA, &axAddr);
AXSetVoiceAdpcm(vpbA, &axAdpcm);
@@ -359,7 +353,7 @@ int AxAdpcmSimplePlayer::start(void* data, u32 length, AxAdpcmHandle* handle) {
Voices[vpbA->index].getMix()->vL = 0;
}
}
AXVPB* vpbB = axVoiceBuf[i];
AXVPB* vpbB = pAxvpbBuf[i];
AXSetVoiceMix(vpbB, Voices[vpbA->index].getMix());
static AXPBVE voiceVe = {32768, 0};
AXSetVoiceVe(vpbB, &voiceVe);

View File

@@ -619,7 +619,7 @@ vmFloat VmIntToFloat(vmU64 integer) {
return result;
}
static s32 CHANSVmParseInt(CHANSVmObjHdr* obj, s32 base, u64* out) {
static s32 CHANSVmParseInt(const CHANSVmObjHdr* obj, s32 base, u64* out) {
u8 type = obj->type;
u32 stringLength;
u32 charCount;

View File

@@ -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;
}

View File

@@ -22,7 +22,9 @@ namespace textinput {
#pragma section sconst_type ".sdata"
extern "C" const char* scCommonTextAnimName = scT_prdc_Text_00;
extern "C" const char* scCommonScrollAnimName = scP_prdc_scrl_Left;
extern "C" const wchar_t scEmptyWChars[4] = {0, 0, 0, 1};
#pragma explicit_zero_data on
extern "C" const wchar_t scEmptyWChars[4] = {0, 0, 0, 0};
#pragma explicit_zero_data reset
extern "C" const char scP_OnBtn[8] = "P_OnBtn";
extern "C" const char scB_OnBtn[8] = "B_OnBtn";
#pragma pop

View File

@@ -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) {
@@ -249,18 +249,18 @@ void LayoutByNW4R::create(MEMAllocator* allocator) {
animationCount = paneInfo.animationCount;
u16 animationIndex = 0;
while (animationIndex < animationCount) {
void* resource = mpMultiArcResourceAccessor->GetResource(0, paneInfo.animations[animationIndex]->name);
const AnimationFile* const& animation = paneInfo.animations[animationIndex];
void* resource = mpMultiArcResourceAccessor->GetResource(0, animation->name);
AnimTransformPane* transform = static_cast<AnimTransformPane*>(
getLayout()->CreateAnimTransform(resource, mpMultiArcResourceAccessor));
if (forceName != NULL) {
pane->forceAddAnimation(allocator, paneInfo.animations[animationIndex]->id, transform, forceName, false, true);
pane->forceAddAnimation(allocator, animation->id, transform, forceName, false, true);
} else {
pane->addAnimation(allocator, paneInfo.animations[animationIndex]->id, transform, false, true);
pane->addAnimation(allocator, animation->id, transform, false, true);
}
++animationIndex;
}
++paneIndex;
} while (paneIndex < 25);
}
init();
}

View File

@@ -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;

View File

@@ -1607,8 +1607,12 @@ namespace ipl {
void Address::set_err_msg(wchar_t* errMsg, u32 errMsgLen, NWC24Err err) {
memset(errMsg, 0, errMsgLen * sizeof(wchar_t));
wcsncat(errMsg, System::getMessage(MESG_ERROR_CODE), errMsgLen - wcslen(errMsg));
u32 msgId = MESG_ERROR_CODE;
union MessageValue {
const wchar_t* text;
u32 id;
} message;
message.text = System::getMessage(MESG_ERROR_CODE);
wcsncat(errMsg, message.text, errMsgLen - wcslen(errMsg));
wchar_t errCode[32];
memset(errCode, 0, sizeof(errCode));
@@ -1617,17 +1621,22 @@ namespace ipl {
switch (err) {
case NWC24_ERR_NETWORK: {
msgId = MESG_ERROR_NWC24_NETWORK;
message.id = MESG_ERROR_NWC24_NETWORK;
break;
}
case NWC24_ERR_SERVER:
case NWC24_ERR_FULL: {
msgId = MESG_ERROR_NWC24_SERVER;
message.id = MESG_ERROR_NWC24_SERVER;
break;
}
default: {
message.id = reinterpret_cast<u32>(message.text);
break;
}
}
wcsncat(errMsg, System::getMessage(msgId), errMsgLen - wcslen(errMsg));
message.text = System::getMessage(message.id);
wcsncat(errMsg, message.text, errMsgLen - wcslen(errMsg));
}
void Address::entry_friend() {

View File

@@ -1704,6 +1704,9 @@ void ipl::scene::AddressEdit::stt_wait_btn_fadein() {
}
void ipl::scene::AddressEdit::stt_wait_btn_fadeout() {
nw4r::lyt::Pane* label;
const wchar_t* message;
ipl::utility::FrameController* animator;
bool friendFinished;
if (mpFriendCache->getInfo(mSelectedFriend).attr.status == 2) {
friendFinished = !mpCodeLayout->getAnim(0x15)->isPlaying();
@@ -1715,11 +1718,11 @@ void ipl::scene::AddressEdit::stt_wait_btn_fadeout() {
friendFinished &= !mpCodeLayout->getAnim(0x17)->isPlaying();
if (friendFinished) {
nw4r::lyt::Pane* label = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true);
const wchar_t* message = ipl::System::getMessage(0x30);
label = mpCodeLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_card_msg_00", true);
message = ipl::System::getMessage(0x30);
set_textbox(label, message);
ipl::System::getDialog()->callS2Btn2(0x142, 0x141, true);
ipl::layout::Animator* animator = mpCodeLayout->getAnim(0x1c);
animator = mpCodeLayout->getAnim(0x1c);
animator->initFrame();
animator->restart();
mState = 4;
@@ -2122,6 +2125,8 @@ state0:
goto state0Common;
case 3:
goto state0Button3;
case 4:
goto done;
default:
goto done;
}
@@ -2153,11 +2158,14 @@ state0Button3: {
nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true);
ipl::math::VEC3 position(0.0f, 0.0f, 0.0f);
PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast<Vec*>(&position), reinterpret_cast<Vec*>(&position));
f32 xOffset = 15.0f;
f32 height = 50.0f;
f32 scale = 0.5f;
f32 xOffset;
f32 scale;
f32 height;
xOffset = 15.0f;
height = 50.0f;
scale = 0.5f;
position.x = position.x + xOffset;
position.y = position.y + scale * height;
position.y = position.y + height * scale;
(mpBalloon)
->setPos(position, false, 1);
(mpBalloon)->fadein();
@@ -2194,11 +2202,14 @@ state22Button3:
nw4r::lyt::Pane* pane = layout->getNW4RLyt()->GetRootPane()->FindPaneByName(paneName, true);
ipl::math::VEC3 position(0.0f, 0.0f, 0.0f);
PSMTXMultVec(pane->GetGlobalMtx(), reinterpret_cast<Vec*>(&position), reinterpret_cast<Vec*>(&position));
f32 xOffset = 15.0f;
f32 height = 50.0f;
f32 scale = 0.5f;
f32 xOffset;
f32 scale;
f32 height;
xOffset = 15.0f;
height = 50.0f;
scale = 0.5f;
position.x = position.x + xOffset;
position.y = position.y + scale * height;
position.y = position.y + height * scale;
(mpBalloon)
->setPos(position, false, 1);
(mpBalloon)->fadein();
@@ -2247,6 +2258,8 @@ void ipl::scene::AddressEdit::start_left_event(const char* paneName) {
}
break;
}
case 4:
break;
default:
break;
}

View File

@@ -429,32 +429,38 @@ namespace ipl {
}
BOOL Board::appendRecord(CDBRecord* record) {
CDBRecordKey recordKey;
utility::Date recordDate;
int recordDay;
int recordMin;
int recordHour;
u32 recordGC = 0;
struct RecordReadState {
BOOL recordInterrupts;
u32 dataSize;
BOOL waitInterrupts;
BOOL slotInterrupts;
int recordSecond;
int recordMin;
int recordHour;
u32 recordGC;
CDBId cdbId;
char recordType[8];
utility::Date recordDate;
CDBRecordKey recordKey;
} state;
state.recordGC = 0;
cdb::Manager* cdbManager = System::getCdbManager();
struct InterruptState {
BOOL first;
BOOL second;
BOOL third;
BOOL result;
} interrupts;
interrupts.result = TRUE;
char recordType[8] = "";
BOOL result = TRUE;
state.recordType[0] = 0;
state.recordType[1] = 0;
state.recordType[2] = 0;
state.recordType[3] = 0;
state.recordType[4] = 0;
state.recordType[5] = 0;
state.recordType[6] = 0;
state.recordType[7] = 0;
// Get record metadata
CDBRecordGetCalendarTimeForce(record, &recordDate.year, &recordDate.month, &recordDate.day, &recordHour, &recordMin, &recordDay);
CDBRecordGetKeyForce(record, &recordKey);
CDBRecordGetTypeForce(record, recordType);
CDBRecordGetGameCodeForce(record, (char*)&recordGC);
CDBRecordGetCalendarTimeForce(record, &state.recordDate.year, &state.recordDate.month, &state.recordDate.day,
&state.recordHour, &state.recordMin, &state.recordSecond);
CDBRecordGetKeyForce(record, &state.recordKey);
CDBRecordGetTypeForce(record, state.recordType);
CDBRecordGetGameCodeForce(record, (char*)&state.recordGC);
if (mbReading == true && mSearchRecord_Prev.created) {
mbReading = false;
@@ -462,34 +468,34 @@ namespace ipl {
}
// Verify record
if (!cdbManager->isValidType(recordType)) {
if (!cdbManager->isValidType(state.recordType)) {
return TRUE;
}
if (is_already_read(recordKey.keyString)) {
if (is_already_read(state.recordKey.keyString)) {
return TRUE;
}
if (is_exist_keytbl(recordKey.keyString)) {
if (is_exist_keytbl(state.recordKey.keyString)) {
return TRUE;
}
recordDate.month++;
if (!(recordDate == mCurrentDate)) {
state.recordDate.month++;
if (!(state.recordDate == mCurrentDate)) {
goto error;
}
// Find any free space to put the object on screen
interrupts.first = OSDisableInterrupts();
state.slotInterrupts = OSDisableInterrupts();
BOOL exist = is_exist_diff_date();
BoardObject* obj = mObjList.getNextFree();
OSRestoreInterrupts(interrupts.first);
OSRestoreInterrupts(state.slotInterrupts);
if (obj == NULL && exist) {
while (obj == NULL) {
OSSleepMilliseconds((OSTime)1);
interrupts.second = OSDisableInterrupts();
state.waitInterrupts = OSDisableInterrupts();
obj = mObjList.getNextFree();
OSRestoreInterrupts(interrupts.second);
OSRestoreInterrupts(state.waitInterrupts);
}
}
@@ -506,61 +512,59 @@ namespace ipl {
// Get CDB metadata
u32 dataSize;
if (!cdbManager->getDataSize(record, &dataSize)) {
if (!cdbManager->getDataSize(record, &state.dataSize)) {
return TRUE;
}
if (dataSize > 0x32000) {
if (state.dataSize > 0x32000) {
return TRUE;
}
CDBId cdbId;
if (!System::getCdbManager()->getCDBId(record, &cdbId)) {
if (!System::getCdbManager()->getCDBId(record, &state.cdbId)) {
return TRUE;
}
// Read CDB metadata
u8* rbrData = new (obj->mpHeap, DEFAULT_ALIGN) u8[dataSize];
u8* rbrData = new (obj->mpHeap, DEFAULT_ALIGN) u8[state.dataSize];
if (rbrData == NULL) {
return FALSE;
}
if (!cdbManager->read(record, rbrData, dataSize)) {
if (!cdbManager->read(record, rbrData, state.dataSize)) {
delete[] rbrData;
goto close;
}
interrupts.result = TRUE;
result = TRUE;
if (((RBRHeader*)rbrData)->magic == RBR_MAGIC && cdbManager->isValidHeader((RBRHeader*)rbrData)) {
interrupts.third = OSDisableInterrupts();
state.recordInterrupts = OSDisableInterrupts();
if (recordDate == mCurrentDate) {
if (state.recordDate == mCurrentDate) {
if (mbReading == true && mSearchRecord_Prev.created) {
mbReading = false;
delete[] rbrData;
OSRestoreInterrupts(interrupts.third);
OSRestoreInterrupts(state.recordInterrupts);
return FALSE;
}
// Create on screen object
obj->create(mpLayoutFile, rbrData, recordGC, cdbId, recordKey, recordDate);
obj->create(mpLayoutFile, rbrData, state.recordGC, state.cdbId, state.recordKey, state.recordDate);
mObjList.append(obj);
CDBRecordGetCalendarTimeForce(record, &mSearchRecord_Next.year, &mSearchRecord_Next.month, &mSearchRecord_Next.day,
&mSearchRecord_Next.hour, &mSearchRecord_Next.min, &mSearchRecord_Next.sec);
memcpy(&mSearchRecord_Next.key, &recordKey, sizeof(CDBRecordKey));
memcpy(&mSearchRecord_Next.key, &state.recordKey, sizeof(CDBRecordKey));
mSearchRecord_Next.created = true;
if (mSearchRecord_Prev.created == false) {
memcpy(&mSearchRecord_Prev, &mSearchRecord_Next, sizeof(SearchRecord));
}
} else {
interrupts.result = FALSE;
result = FALSE;
delete[] rbrData;
}
OSRestoreInterrupts(interrupts.third);
OSRestoreInterrupts(state.recordInterrupts);
} else {
delete[] rbrData;
}
@@ -584,13 +588,13 @@ namespace ipl {
show_ricon();
}
interrupts.result = FALSE;
result = FALSE;
goto out;
error:
interrupts.result = FALSE;
result = FALSE;
out:
return interrupts.result;
return result;
}
void Board::stt_wait_cdb_init() {

View File

@@ -1,3 +1,4 @@
#define IPL_FOCUS_OBJECT_CPP
#include "scene/board/iplFocusObject.h"
#include "scene/parentalDialog/iplParentalDialog.h"
@@ -11,6 +12,28 @@
#include <revolution/cx.h>
#include <revolution/enc.h>
extern char scPaneName_B_Stop[];
namespace ipl {
namespace math {
static inline VEC3 addWeightedVectors(const VEC3& start, const VEC3& end) {
VEC3 sum;
nw4r::math::VEC3Add(&sum, &start, &end);
return sum;
}
static inline void normalizeVector(nw4r::math::VEC3* result, const VEC3& sum, f32 frames) {
nw4r::math::VEC3Scale(result, &sum, 1.0f / frames);
}
template <>
VEC3 LinearIntp<VEC3>::get() const {
nw4r::math::VEC3 result;
VEC3 sum = addWeightedVectors(mStart * (mMaxFrame - mFrame), mEnd * getCurrentFrame());
normalizeVector(&result, sum, getMaxFrame());
return result;
}
}
}
namespace ipl {
namespace scene {
// clang-format off
@@ -337,6 +360,13 @@ namespace ipl {
}
}
}
namespace math {
inline VEC3 VEC3::operator*(f32 val) const {
return VEC3(x * val, y * val, z * val);
}
}
namespace scene {
void focus_object::stt_normal() {
Button* button = get_button();
@@ -2091,7 +2121,7 @@ namespace ipl {
if (event == ::gui::EventHandler::ON_TRIG) {
if (con->downTrg(controller::BTN_INTERACT)) {
if (strcmp(paneName, "B_Stop") == 0) {
if (strcmp(paneName, scPaneName_B_Stop) == 0) {
if (mpInstance->mState == focus_object::STATE_NORMAL) {
focus_object::get_button()->animation(Button::IDANIM_OPTOUT_SELECT);
@@ -2112,3 +2142,24 @@ namespace ipl {
}
} // namespace scene
} // namespace ipl
char scPaneName_B_Stop[] = "B_Stop";
BOOL ipl::scene::scroller::calc(bool canScroll) {
BOOL result = FALSE;
if (canScroll) {
if (mBScroller.calc()) {
result = TRUE;
}
}
mScroller.calc();
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
mScroller.addScroll(movable);
mBScroller.addSoundFreq(movable);
return result;
}

View File

@@ -795,9 +795,8 @@ iconSpeedDone:
break;
case 0: {
paletteSize = 0;
u8* iconPalette =
&sThread->icons[slot][fileNo].iconFmt[iconCount];
*iconPalette = iconPalette[-1];
sThread->icons[slot][fileNo].iconFmt[iconCount] =
sThread->icons[slot][fileNo].iconFmt[iconCount - 1];
break;
}
default:

View File

@@ -328,7 +328,7 @@ namespace ipl {
return isSceneCreated();
}
void SDButton::setEventHandler(::gui::EventHandler* event, ::gui::EventHandler* optOutEvent) {
void SDButton::setEventHandler(::gui::EventHandler* event) {
mpGui->setEventHandler(event);
}

View File

@@ -1,3 +1,4 @@
#define IPL_SD_CHANNEL_MEMORY_CPP
#define IPL_SDMEMORY_TITLE_CACHE_ACCESS
#define IPL_SDMEMORY_SCROLLER_INIT_OUT_OF_LINE
#define IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE
@@ -33,17 +34,6 @@ extern "C" bool iplSDChannelSelect_813DDB74(ipl::scene::SDChannelSelect* channel
ipl::scene::SDMemory::TitleRange* sdTitles,
ESTitleId* titleIds, wchar_t* titleNames, u32* titleCount,
s32 state);
extern "C" bool iplSDChannelSelect_813DB5EC(ipl::scene::SDChannelSelect* channelSelect,
ESTitleId titleId);
extern "C" bool iplSDChannelSelect_813DB4D4(ipl::scene::SDChannelSelect* channelSelect,
ESTitleId titleId, u32 flags);
extern "C" bool iplSDChannelSelect_813DB530(ipl::scene::SDChannelSelect* channelSelect,
ESTitleId** titleNames, ESTitleId** secondaryTitles);
extern "C" bool iplSDChannelSelect_813DB478(ipl::scene::SDChannelSelect* channelSelect,
ESTitleId titleId);
extern "C" bool iplSDChannelSelect_813DB58C(ipl::scene::SDChannelSelect* channelSelect,
ESTitleId** titles, ESTitleId** secondaryTitles,
ESTitleId** names);
namespace ipl {
namespace scene {
@@ -69,6 +59,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 +86,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 +140,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 +150,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 +194,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 +209,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 +217,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 +232,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);
@@ -913,8 +912,8 @@ namespace ipl {
return;
}
if (iplSDChannelSelect_813DB530(mpSDChannelSelect, &mTitleListState.mpNames,
&mTitleListState.mpSecondaryTitles)) {
if (mpSDChannelSelect->enqueueErrorNotice(&mTitleListState.mpNames,
&mTitleListState.mpSecondaryTitles)) {
mDialogState = 19;
mCurrentTitleName[0] = L'\0';
mCurrentTitle = 0;
@@ -987,7 +986,7 @@ namespace ipl {
if (iplSDMemory_containsTitleId(this, mTitleIds[mCurrentTitle], mSDTitleIds, mTitleNameCount) ||
iplSDMemory_containsTitleId(this, mTitleIds[mCurrentTitle], mNandTitleIds, mNandTitleCount)) {
ESTitleId titleId = mTitleIds[mCurrentTitle];
if (iplSDChannelSelect_813DB478(mpSDChannelSelect, titleId)) {
if (mpSDChannelSelect->enqueueMoveNotice(titleId)) {
mDialogState = 14;
} else {
System::getDialog()->terminate();
@@ -1037,7 +1036,7 @@ namespace ipl {
void SDMemory::onDialogState16() {
if (mTitleCount > mCurrentTitle && System::isReceiveScheduleStopped()) {
if (iplSDChannelSelect_813DB4D4(mpSDChannelSelect, mTitleIds[mCurrentTitle], 0)) {
if (mpSDChannelSelect->enqueueStateNotice(mTitleIds[mCurrentTitle], 0)) {
mDialogState = 16;
} else {
System::getDialog()->terminate();
@@ -1092,7 +1091,7 @@ namespace ipl {
System::getDialog()->setTitleForSDMemory(mCurrentTitleName);
const ESTitleId titleId = mTitleIds[mCurrentTitle];
if (iplSDChannelSelect_813DB5EC(mpSDChannelSelect, titleId)) {
if (mpSDChannelSelect->enqueueDeleteNotice(titleId)) {
mDialogState = 18;
} else {
System::getDialog()->terminate();
@@ -1670,10 +1669,9 @@ namespace ipl {
mTitleListState.mSecondaryCount = 0;
mTitleListState.mpNames = mSDTitleIds;
mTitleListState.mNameCount = 0;
iplSDChannelSelect_813DB58C(mpSDChannelSelect,
&mTitleListState.mpTitles,
&mTitleListState.mpSecondaryTitles,
&mTitleListState.mpNames);
mpSDChannelSelect->enqueueCommandNotice(&mTitleListState.mpTitles,
&mTitleListState.mpSecondaryTitles,
&mTitleListState.mpNames);
}
if (paneIndex == 4) {

View File

@@ -66,7 +66,7 @@ namespace ipl {
extern "C" void iplSDChannelObj_playPageHide(SDChannelObj* channel) NO_INLINE;
extern "C" void iplSDChannelObj_resetPageAnim(SDChannelObj* channel, int request) NO_INLINE;
extern "C" void iplSDChannelObj_resetDialogAnim(SDChannelObj* channel, bool request) NO_INLINE;
extern "C" void iplSDChannelObj_applyLanguageGroups(const layout::Object* layout) NO_INLINE;
extern "C" void iplSDChannelObj_applyLanguageGroups(layout::Object* layout) NO_INLINE;
extern "C" void iplSDChannelObj_createBaseLayout(SDChannelObj* channel) NO_INLINE;
extern "C" f32 iplSDChannelObj_createIconLayout(SDChannelObj* channel) NO_INLINE;
extern "C" f32 iplSDChannelObj_createMenuLayout(SDChannelObj* channel) NO_INLINE;
@@ -255,15 +255,15 @@ namespace ipl {
}
}
extern "C" void iplSDChannelObj_applyLanguageGroups(const layout::Object* layout) {
extern "C" void iplSDChannelObj_applyLanguageGroups(layout::Object* layout) {
int lang = System::getLanguage();
const char* langGroup = scLangGroups[lang];
char availableLanguages[10][4] = {};
bool languageFound = false;
for (nw4r::lyt::GroupList::Iterator it = layout->GetGroupList().GetBeginIter();
it != layout->GetGroupList().GetEndIter(); it++) {
for (nw4r::lyt::GroupList::Iterator it = layout->getNW4RLyt()->GetGroupContainer()->GetGroupList().GetBeginIter();
it != layout->getNW4RLyt()->GetGroupContainer()->GetGroupList().GetEndIter(); it++) {
if (strcmp(it->GetName(), langGroup) == 0) {
languageFound = true;
} else {
@@ -295,7 +295,7 @@ namespace ipl {
}
if (languageFound) {
nw4r::lyt::Group* group = layout->FindGroupByName(langGroup);
nw4r::lyt::Group* group = layout->getNW4RLyt()->GetGroupContainer()->FindGroupByName(langGroup);
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter();
it != group->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);
@@ -305,7 +305,7 @@ namespace ipl {
for (int i = 0; i < channel::MAX_ANIMS; i++) {
if (scRegionGroups[region][i] != NULL) {
if (strcmp(scRegionGroups[region][i], availableLanguages[scLangLookup[region][i]]) == 0) {
nw4r::lyt::Group* group = layout->FindGroupByName(scRegionGroups[region][i]);
nw4r::lyt::Group* group = layout->getNW4RLyt()->GetGroupContainer()->FindGroupByName(scRegionGroups[region][i]);
for (nw4r::lyt::PaneLinkList::Iterator it = group->GetPaneList().GetBeginIter();
it != group->GetPaneList().GetEndIter(); it++) {
it->mTarget->SetVisible(true);

View File

@@ -335,7 +335,7 @@ namespace ipl {
return true;
}
bool SDChannelSelect::enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value) {
bool SDChannelSelect::enqueueChannelNotice(u64 titleId, u32 value) {
if (mCurrentSDState != 6) {
return false;
}
@@ -344,12 +344,12 @@ namespace ipl {
command.type = 10;
command.arguments.values[0] = value;
command.arguments.values[1] = (u32)&mFirstTitleCount;
command.titleId = ((u64)page << 32) | index;
command.titleId = titleId;
mCommandQueue.push(command);
return true;
}
bool SDChannelSelect::enqueueMoveNotice(u32 controller, u32 page, u32 index) {
bool SDChannelSelect::enqueueMoveNotice(u64 titleId) {
if (mCurrentSDState != 6) {
return false;
}
@@ -358,12 +358,12 @@ namespace ipl {
command.type = 6;
command.arguments.values[0] = 0;
command.arguments.values[1] = 0;
command.titleId = ((u64)page << 32) | index;
command.titleId = titleId;
mCommandQueue.push(command);
return true;
}
bool SDChannelSelect::enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state) {
bool SDChannelSelect::enqueueStateNotice(u64 titleId, u32 state) {
if (mCurrentSDState != 6) {
return false;
}
@@ -372,41 +372,41 @@ namespace ipl {
command.type = 7;
command.arguments.values[0] = state;
command.arguments.values[1] = 0;
command.titleId = ((u64)page << 32) | index;
command.titleId = titleId;
mCommandQueue.push(command);
return true;
}
bool SDChannelSelect::enqueueErrorNotice(u32 page, u32 index) {
bool SDChannelSelect::enqueueErrorNotice(ESTitleId** titleIds, ESTitleId** secondaryTitles) {
if (mCurrentSDState != 6) {
return false;
}
SDChannelSelectCommand command;
command.type = 11;
command.arguments.values[0] = page;
command.arguments.values[1] = index;
command.arguments.values[0] = reinterpret_cast<u32>(titleIds);
command.arguments.values[1] = reinterpret_cast<u32>(secondaryTitles);
command.titleId = 0;
mCommandQueue.push(command);
return true;
}
bool SDChannelSelect::enqueueCommandNotice(u32 page, u32 index, u32 commandType) {
bool SDChannelSelect::enqueueCommandNotice(ESTitleId** titles, ESTitleId** secondaryTitles, ESTitleId** names) {
if (mCurrentSDState != 6) {
return false;
}
SDChannelSelectCommand command;
command.arguments.values[0] = page;
command.arguments.values[0] = reinterpret_cast<u32>(titles);
command.type = 12;
command.arguments.values[1] = index;
command.arguments.values[2] = commandType;
command.arguments.values[1] = reinterpret_cast<u32>(secondaryTitles);
command.arguments.values[2] = reinterpret_cast<u32>(names);
command.titleId = 0;
mCommandQueue.push(command);
return true;
}
bool SDChannelSelect::enqueueDeleteNotice(u32 controller, u32 page, u32 index) {
bool SDChannelSelect::enqueueDeleteNotice(u64 titleId) {
if (mCurrentSDState != 6) {
return false;
}
@@ -416,7 +416,7 @@ namespace ipl {
command.arguments.values[0] = 0;
command.arguments.values[1] = 0;
command.arguments.values[2] = 0;
command.titleId = ((u64)page << 32) | index;
command.titleId = titleId;
mCommandQueue.push(command);
return true;
}
@@ -3458,7 +3458,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 +3508,6 @@ namespace ipl {
}
}
}
} else {
return;
}
}

View File

@@ -3,6 +3,11 @@
#define IPL_SDMEMORY_DIALOG_STATE_ACCESSOR
#define IPL_SDMEMORY_COMPLETION_PCT_ACCESSOR
#define IPL_CHANNEL_TITLE_NOVTABLE
#include "math/iplInterporation.h"
#pragma dont_instantiate ipl::math::HermiteIntp<float>
#undef IPL_CHANNEL_TITLE_NOVTABLE
#include "scene/sdChannelTitle/iplSDChannelTitle.h"
#include "scene/sdChannelSelect/iplSDChannelSelect.h"
#include "system/iplSystem.h"
@@ -86,17 +91,17 @@ static inline void setMemoryTitleLists(SDMemory* memory, SDMemory::TitleRange sd
memory->setTitleLists(sdRange, nandRange);
}
static const char* sButtonNames[2] = {"B_BtnA", "B_BtnB"};
const char* sButtonNames[2] = {"B_BtnA", "B_BtnB"};
static const int sCaptureSizes[2][2] = {{128, 96}, {176, 96}};
extern const int sCaptureSizes[2][2] = {{128, 96}, {176, 96}};
static const wchar_t sMissingTitle[] = L"???";
extern const wchar_t sMissingTitle[] = L"???";
static const char* sButtonGroups[7] = {
const char* sButtonGroups[7] = {
"G_FocusBtnA", "G_FocusBtnB", "G_SelectBtnA", "G_SelectBtnB",
"G_OnOffBtnA", "G_OnOffBtnB", "G_OutBtn"
};
static const char* sButtonAnimationNames[6] = {
const char* sButtonAnimationNames[6] = {
"mn_SdcardMenuBanner_bc_FocusBtnA_off.brlan",
"mn_SdcardMenuBanner_bc_FocusBtn_on.brlan",
"mn_SdcardMenuBanner_bc_SelectBtn_Ac.brlan",
@@ -104,15 +109,15 @@ static const char* sButtonAnimationNames[6] = {
"mn_SdcardMenuBanner_bc_OnBtn.brlan",
"mn_SdcardMenuBanner_bc_OutBtn.brlan"
};
static const char* sBannerAnimationNames[3] = {
const char* sBannerAnimationNames[3] = {
"banner.brlan", "banner_Start.brlan", "banner_Loop.brlan"
};
static const char* sTexturePaneNames[3][4] = {
const char* sTexturePaneNames[3][4] = {
{"Fre_a", "Fre_d", "Fre_i", "Fre_l"},
{"Fre_e", "Fre_f", "Fre_g", "Fre_h"},
{"Fre_b", "Fre_c", "Fre_j", "Fre_k"}
};
static const char* sTextNames[2] = {"T_BtnA", "T_BtnB"};
const char* sTextNames[2] = {"T_BtnA", "T_BtnB"};
class SDTitlePaneEventHandler : public ::gui::EventHandler {
public:
@@ -282,7 +287,7 @@ FaderSceneCommand SDChannelTitle::calcFadein() {
if (!mpFade->isPlaying()) {
iplSDChannelTitle_playBannerIntro(this);
SDButton* button = static_cast<SDButton*>(System::getScene(0x24));
button->setEventHandler(mpButtonEventHandler, NULL);
button->setEventHandler(mpButtonEventHandler);
button->animation(13);
button->animation(14);
mState = 1;
@@ -344,7 +349,7 @@ void SDChannelTitle::initCalcFadeout() {
button->animation(15);
button->animation(16);
}
button->setEventHandler(NULL, NULL);
button->setEventHandler(NULL);
}
FaderSceneCommand SDChannelTitle::calcFadeout() {
@@ -736,8 +741,7 @@ extern "C" void iplSDChannelTitle_startCopyProgress(SDChannelTitle* scene) {
if (channel->mStateFlags == 3) {
scene->mState = 26;
scene->mErrorMessage = 0xaf;
} else if (scene->mpChannelSelect->enqueueChannelNotice(0, static_cast<u32>(scene->mTitleId >> 32),
static_cast<u32>(scene->mTitleId), reinterpret_cast<u32>(&scene->mTitleRange))) {
} else if (scene->mpChannelSelect->enqueueChannelNotice(scene->mTitleId, reinterpret_cast<u32>(&scene->mTitleRange))) {
scene->mState = 20;
} else {
scene->mState = 26;
@@ -826,8 +830,7 @@ extern "C" void iplSDChannelTitle_updateCopyStart(SDChannelTitle* scene) {
ESTitleId temporaryTitle = SCGetTmpTitleID();
if (temporaryTitle && scene->mTitleId != temporaryTitle) {
if (System::isReceiveScheduleStopped()) {
if (scene->mpChannelSelect->enqueueStateNotice(0, static_cast<u32>(temporaryTitle >> 32),
static_cast<u32>(temporaryTitle), 1)) {
if (scene->mpChannelSelect->enqueueStateNotice(temporaryTitle, 1)) {
scene->mState = 16;
} else {
scene->mState = 26;
@@ -1465,8 +1468,9 @@ extern "C" BOOL iplSDChannelTitle_passesParentalCheck(SDChannelTitle* scene, EST
return TRUE;
}
extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* handler, u32 component,
u32 event, const controller::Interface* controller) {
void SDTitlePaneEventHandler::onEvent(u32 component, u32 event, void* data) {
SDTitlePaneEventHandler* handler = this;
const controller::Interface* controller = static_cast<const controller::Interface*>(data);
const char* paneName = handler->getPane(component)->GetName();
switch (event) {
case ::gui::EventHandler::ON_TRIG: {
@@ -1524,8 +1528,8 @@ extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* hand
}
}
extern "C" void iplSDChannelTitle_onTitleButtonEvent(SDTitleButtonEventHandler* handler, u32 component,
u32 event, const controller::Interface* controller) {
void SDTitleButtonEventHandler::onEventDerived(u32 component, u32 event, const controller::Interface* controller) {
SDTitleButtonEventHandler* handler = this;
const char* name = handler->getPane(component)->GetName();
switch (event) {
case 0:
@@ -1555,12 +1559,14 @@ void SDChannelTitle::startResetting() {
snd::getSystem()->resetAllSound();
}
void SDTitleButtonEventHandler::onEventDerived(u32 component, u32 event, const controller::Interface* controller) {
iplSDChannelTitle_onTitleButtonEvent(this, component, event, controller);
extern "C" void iplSDChannelTitle_onTitleButtonEvent(SDTitleButtonEventHandler* handler, u32 component,
u32 event, const controller::Interface* controller) {
handler->onEventDerived(component, event, controller);
}
void SDTitlePaneEventHandler::onEvent(u32 component, u32 event, void* data) {
iplSDChannelTitle_onTitlePaneEvent(this, component, event, static_cast<const controller::Interface*>(data));
extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* handler, u32 component,
u32 event, const controller::Interface* controller) {
handler->onEvent(component, event, const_cast<controller::Interface*>(controller));
}
}

View File

@@ -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;
}

View File

@@ -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;
@@ -1870,13 +1871,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,7 +1896,7 @@ 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;

View File

@@ -3,7 +3,7 @@
#include "utility/iplCharacterCode.h"
extern "C" {
BOOL USBAPStartRegistration(void*, void*, u32, u32, void*, void (*)(int), u16*, u8*);
BOOL USBAPStartRegistration(u64, u32, u32, void*, void (*)(int), u16*, u8*);
BOOL USBAPCancelRegistration();
BOOL USBAPIsThreadTerminated();
}
@@ -40,7 +40,7 @@ void USBAPRegisterCallback(int result) {
void USBAPThread::Init(unsigned short* buffer, unsigned char* accessPoints) {
int priority = OSGetThreadPriority(OSGetCurrentThread()) + 1;
if (USBAPStartRegistration(NULL, NULL, priority,
if (USBAPStartRegistration(0, priority,
0, this, USBAPRegisterCallback, buffer, accessPoints) == 1) {
OSReport("Registration started\n");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -265,3 +265,125 @@ GATE PASS
```
Accepted improvement commits: 2348596d (real float-reference setter), fff3e072 (Color ownership), 8532b7bf (DestructorChain ownership).
## High continuation: name/extent pairing (new origin/main branch)
Starting data: tiInputForm 1036/3772, tiKeyboard 12/2708, MyTiManager 148/1132. Instruction-exact counts 216/221, 62/62, 91/91. Fetched origin before unit work; owned source equals origin/main and the full baseline quick gate passes. Prior three distinct attempts for each open tiInputForm function are retained above. User explicitly permits proven real-object extent corrections, leaving alignment bytes unowned without changing addresses, split ranges or section totals. Earlier claims that extra weak tables inherently prevented data matching were premature; rechecking symbol pairing with this new evidence.
tiKeyboard pool identical (8 strings); source unchanged on origin/main after fetch.
- 0x8165FA88 signwindow::Sample vtable extent 272 -> 268: source class compiler table is 268 bytes; all 61 outgoing virtual/thunk relocations agree at their relative offsets, and target's final four bytes are zero alignment without a relocation; the next table still begins at 0x8165FB98.
- 0x8165FC78 predictlang::Base vtable extent 40 -> 36: compiler table is the two header words plus seven real virtual slots (36 bytes); all seven target relocations agree, and trailing four bytes are zero alignment; the next table remains 0x8165FCA0.
- 0x81698D20 lbl_81698D20 -> defaultEventObserver__9textinput, same 4-byte extent: constructor loads this singleton when observer is NULL, and static init stores the allocated EventObserver pointer through the same target address; source loads/stores defaultEventObserver__9textinput.
The extent-only trial passed with no regression but .data stayed 99.117645% because all eight pooled literals still had anonymous extraction names instead of actual compiler literal symbols. Each verified literal is now named with its actual compiler-owned name; future compiler numbering may change, but objdiff matches compiler-generated literals by bytes/relocations, not the numeric counter.
- 0x8165F8F0 lbl_8165F8F0 -> @8031, same 13 bytes: compiler-pooled literal b'T_title_text'; target references setTitleText__Q29textinput7ManagerFPw .text+0x117A, setTitleText__Q29textinput7ManagerFPw .text+0x1192; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F900 lbl_8165F900 -> @8076, same 27 bytes: compiler-pooled literal b'fs_VK_ascii_keytop_a.brlyt'; target references createPCTypeKeyboard__Q29textinput7ManagerFv .text+0x147E, createPCTypeKeyboard__Q29textinput7ManagerFv .text+0x148E; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F920 lbl_8165F920 -> @8086, same 24 bytes: compiler-pooled literal b'fs_VK_cellPhone_a.brlyt'; target references createCellPhoneTypeKeyboard__Q29textinput7ManagerFv .text+0x15C6, createCellPhoneTypeKeyboard__Q29textinput7ManagerFv .text+0x15D2; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F938 lbl_8165F938 -> @8090, same 22 bytes: compiler-pooled literal b'fs_VK_textBox_a.brlyt'; target references createInputForm__Q29textinput7ManagerFv .text+0x1652, createInputForm__Q29textinput7ManagerFv .text+0x1662; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F950 lbl_8165F950 -> @8115, same 27 bytes: compiler-pooled literal b'fs_VK_predictInput_a.brlyt'; target references createCandidateBox__Q29textinput7ManagerFv .text+0x16F2, createCandidateBox__Q29textinput7ManagerFv .text+0x1702; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F96C lbl_8165F96C -> @8148, same 22 bytes: compiler-pooled literal b'fs_VK_toolbar_a.brlyt'; target references createToolBar__Q29textinput7ManagerFv .text+0x1886, createToolBar__Q29textinput7ManagerFv .text+0x1896; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F988 lbl_8165F988 -> @8156, same 24 bytes: compiler-pooled literal b'fs_prdicSelWidw_a.brlyt'; target references createPredictLanguageDialog__Q29textinput7ManagerFv .text+0x1932, createPredictLanguageDialog__Q29textinput7ManagerFv .text+0x1942; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
- 0x8165F9A0 lbl_8165F9A0 -> @8168, same 22 bytes: compiler-pooled literal b'fs_signWindow_a.brlyt'; target references createSignWindow__Q29textinput7ManagerFv .text+0x1A36, createSignWindow__Q29textinput7ManagerFv .text+0x1A42; source same-offset literal has these identical bytes. Compiler-generated names remain compiler-owned; no new source labels or string blob.
tiKeyboard all-unit quick gate PASS: matched_data 12 -> 2708/2708, every owned non-text section 100%, instruction-exact 62/62 unchanged; zero regressions, correct retail DOL hash. Actual pooled literal identities plus proven vtable extents resolve pairing; extra compiler-emitted weak tables do not prevent the named-symbol route from reaching 100%.
tiInputForm pool identical (20 strings), fetched origin and confirmed owned source unchanged. Symbol pairing corrections, all within its .data split 0x8165C820..0x8165D2D0; every address and section/split total remains unchanged:
- 0x8165C990 jumptable_8165C990 -> @13162, extent 160 -> 160: 40-entry real switch table, all 40 outgoing relocation targets and addends agree with the source compiler table; references ToIndependentClass__Q39textinput9inputform13DeadKeyStreamFw .text+0x4F2 -> data+0x170; ToIndependentClass__Q39textinput9inputform13DeadKeyStreamFw .text+0x4FA -> data+0x170.
- 0x8165CA30 jumptable_8165CA30 -> @13178, extent 40 -> 40: 10-entry real switch table, all 10 outgoing relocation targets and addends agree with the source compiler table; references setLanguage__Q39textinput9inputform4BaseFQ29textinput8Language .text+0xBFA -> data+0x210; setLanguage__Q39textinput9inputform4BaseFQ29textinput8Language .text+0xC02 -> data+0x210.
- 0x8165CA58 jumptable_8165CA58 -> @13457, extent 52 -> 52: 13-entry real switch table, all 13 outgoing relocation targets and addends agree with the source compiler table; references onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0x28D2 -> data+0x238; onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0x28DA -> data+0x238.
- 0x8165CA8C jumptable_8165CA8C -> @13456, extent 192 -> 192: 48-entry real switch table, all 48 outgoing relocation targets and addends agree with the source compiler table; references onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0xEB2 -> data+0x26C; onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0xEBA -> data+0x26C.
- 0x8165CB4C jumptable_8165CB4C -> @13510, extent 148 -> 148: 37-entry real switch table, all 37 outgoing relocation targets and addends agree with the source compiler table; references onHKBCtrlCode__Q39textinput9inputform4BaseFQ29textinput7HVKCodeUl .text+0x65B2 -> data+0x32C; onHKBCtrlCode__Q39textinput9inputform4BaseFQ29textinput7HVKCodeUl .text+0x65BA -> data+0x32C.
- 0x8165CC5C jumptable_8165CC5C -> @14933, extent 28 -> 28: 7-entry real switch table, all 7 outgoing relocation targets and addends agree with the source compiler table; references onAnmEvent__Q39textinput9inputform19NormalButtonAnmPaneFQ49textinput11nw4rmanager7AnmPane12AnmPaneEvent .text+0xC09A -> data+0x43C; onAnmEvent__Q39textinput9inputform19NormalButtonAnmPaneFQ49textinput11nw4rmanager7AnmPane12AnmPaneEvent .text+0xC0A2 -> data+0x43C.
- 0x8165C840 lbl_8165C840 -> csButtonAnimations__Q29textinput9inputform, extent 128 -> 128: two ButtonAnimations structs (64 bytes each), exact bytes and 18 outgoing relocations to pane names and animation-file objects; references __sinit_\tiInputForm_cpp .text+0xC50A -> data+0x20; __sinit_\tiInputForm_cpp .text+0xC512 -> data+0x20.
- 0x8165C970 lbl_8165C970 -> @6599, extent 32 -> 32: compiler-owned constant b'\x00\xa4\x00\xac\x00\xaf\x00\xb2\x00\xb3\x00\xb6\x00\xb8\x00\xb9\x00\xbc\x00\xbd\x00\xbe\x00\xd0\x00\xde\x00\xf0\x00\xfe\x00\x00', exact 32 bytes; references onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0xFF2 -> data+0x150; onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0xFFA -> data+0x150; onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0x1436 -> data+0x150; onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv .text+0x143E -> data+0x150; onSpaceKeyHWKB__Q39textinput9inputform4BaseFUl .text+0x965A -> data+0x150; onSpaceKeyHWKB__Q39textinput9inputform4BaseFUl .text+0x9662 -> data+0x150; onSpaceKeyHWKB__Q39textinput9inputform4BaseFUl .text+0x97C2 -> data+0x150; onSpaceKeyHWKB__Q39textinput9inputform4BaseFUl .text+0x97CA -> data+0x150.
- 0x8165CBE0 lbl_8165CBE0 -> @13512, extent 52 -> 13: compiler-owned constant b'T_2l_TextBox\x00', exact 13 bytes; references __ct__Q39textinput9inputform12LayoutByNW4RFPQ29textinput7ManagerPQ34nw4r3lyt24MultiArcResourceAccessorPCcPQ29textinput13EventObserverPCc .text+0x9A3E -> data+0x3C0; __ct__Q39textinput9inputform12LayoutByNW4RFPQ29textinput7ManagerPQ34nw4r3lyt24MultiArcResourceAccessorPCcPQ29textinput13EventObserverPCc .text+0x9A56 -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xA9BA -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xA9BE -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xA9C2 -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xA9CA -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xA9E2 -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAA26 -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAA2A -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAB1A -> data+0x3C0; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAB1E -> data+0x3C0.
- 0x8165CBF0 recover @13580, 34 bytes previously absorbed into lbl_8165CBE0: separate compiler literal b'RevoIpl_RodinNTLGProM_32_I4.brfnt\x00'; references none in this unit.
- 0x8165CC14 lbl_8165CC14 -> @13639, extent 14 -> 14: compiler-owned constant b'P_txtScrll_UP\x00', exact 14 bytes; references init__Q39textinput9inputform12LayoutByNW4RFv .text+0xA22A -> data+0x3F4; init__Q39textinput9inputform12LayoutByNW4RFv .text+0xA236 -> data+0x3F4.
- 0x8165CC28 lbl_8165CC28 -> @13640, extent 36 -> 16: compiler-owned constant b'P_txtScrll_DOWN\x00', exact 16 bytes; references init__Q39textinput9inputform12LayoutByNW4RFv .text+0xA25A -> data+0x408; init__Q39textinput9inputform12LayoutByNW4RFv .text+0xA266 -> data+0x408.
- 0x8165CC38 recover @13654, 17 bytes previously absorbed into lbl_8165CC28: separate compiler literal b'N_separateBarAll\x00'; references none in this unit.
- 0x8165CC4C lbl_8165CC4C -> @13724, extent 13 -> 13: compiler-owned constant b'T_title_text\x00', exact 13 bytes; references setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAB6E -> data+0x42C; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAB7A -> data+0x42C; setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language .text+0xAB96 -> data+0x42C.
- 0x8165D0D8 __vt__Q39textinput9inputform10EditBuffer -> __vt__Q39textinput9inputform10EditBuffer, extent 16 -> 12: real compiler vtable is 12 bytes, 1 method/thunk relocation slots; target trailing 4 bytes are zero and contain no relocation; references __dt__Q39textinput9inputform10EditBufferFv .text+0x2A -> data+0x8B8; __dt__Q39textinput9inputform10EditBufferFv .text+0x2E -> data+0x8B8.
- 0x8165D228 __vt__Q29textinput4Base -> __vt__Q29textinput4Base, extent 48 -> 20: real compiler vtable is 20 bytes, 3 method/thunk relocation slots; target trailing 28 bytes are zero and contain no relocation; references none in this unit.
- 0x8165D27C lbl_8165D258 -> @STRING@onOutOfLength__Q29textinput13EventObserverFv, extent 13 -> 13: function-generated string b'OutOfLength\n', actual literal extent 13, target final 0 bytes zero alignment; references none in this unit.
- 0x8165D28C @STRING@GetTextColor__Q34nw4r3lyt7TextBoxCFUl -> @STRING@GetTextColor__Q34nw4r3lyt7TextBoxCFUl, extent 68 -> 65: function-generated string b'Error#004\nAn error has occurred.\nThe system files are corrupted.', actual literal extent 65, target final 3 bytes zero alignment; references none in this unit.
Initial tiInputForm name-pairing trial reached data 3772/3772 but the gate rejected its DOL hash. Isolated the cause to making the duplicate OutOfLength literal globally visible under the inline function-generated name: iplSystem already owns a global literal under that exact name at 0x81634699. Restoring only the old literal name restored the retail hash, proving the other changes preserve it. The source inline literal is translation-unit compiler-owned data; extract this duplicate as scope:local with its actual source symbol name to preserve the existing global literal's binding. All 43U object symbol tables were checked: no other unit refers to the old lbl_8165D258 symbol. No address/extent/content changes; no real function or public API scope changed.
Neighbour-literal relocation/type proofs strengthened by target disassembly: LayoutByNW4R::create establishes r30 from the .data base relocation, then instruction .text+0x9D6C passes r30+0x3D0 to the resource accessor to load RevoIpl_RodinNTLGProM_32_I4.brfnt; this independently proves the 34-byte literal at 0x8165CBF0 rather than relying on byte similarity alone. LayoutByNW4R::calc at .text+0xA6BC passes the .data base+0x418 to its virtual setVisible for N_separateBarAll, proving the distinct 17-byte object at 0x8165CC38. Both remain ordinary compiler-pooled source literals.
tiInputForm corrected local-string trial passes the all-unit quick gate: every non-text section 100%, matched_data 1036 -> 3772/3772, instruction-exact 216/221 unchanged, no regressions, correct retail DOL hash. All extra weak tables remain genuine compiler output and require no suppression.
MyTiManager: fetched origin, owned source unchanged; pool identical (7 strings). Recover each compiler literal identity, preserving all extents:
- 0x81667E38 lbl_81667E38 -> @8346, same 25 bytes: compiler literal b'WiiBitmapFontType2.brfnt\x00'; relocation loads createMemoInputForm__Q49textinput6extend4memo7ManagerFv .text+0x9BA, createMemoInputForm__Q49textinput6extend4memo7ManagerFv .text+0x9CE, createLetterInputForm__Q49textinput6extend4memo7ManagerFv .text+0xAE2, createLetterInputForm__Q49textinput6extend4memo7ManagerFv .text+0xAF6, __sinit_\MyTiManager_cpp .text+0x4E22, __sinit_\MyTiManager_cpp .text+0x4E26.
- 0x81667E58 lbl_81667E58 -> @8347, same 16 bytes: compiler literal b'my_Memo_a.brlyt\x00'; relocation loads createMemoInputForm__Q49textinput6extend4memo7ManagerFv .text+0x9BE, createMemoInputForm__Q49textinput6extend4memo7ManagerFv .text+0x9D2.
- 0x81667E68 lbl_81667E68 -> @8369, same 17 bytes: compiler literal b'my_LetterL.brlyt\x00'; relocation loads createLetterInputForm__Q49textinput6extend4memo7ManagerFv .text+0xAE6, createLetterInputForm__Q49textinput6extend4memo7ManagerFv .text+0xAFA.
- 0x81667E7C lbl_81667E7C -> @8385, same 22 bytes: compiler literal b'fs_VK_textBox_a.brlyt\x00'; relocation loads createInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC22, createInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC36.
- 0x81667E94 lbl_81667E94 -> @8386, same 25 bytes: compiler literal b'WiiBitmapFontType1.brfnt\x00'; relocation loads createInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC26, createInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC3A, createBigTextInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC82, createBigTextInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC96.
- 0x81667EB0 lbl_81667EB0 -> @8402, same 22 bytes: compiler literal b'fs_VK_textBox_b.brlyt\x00'; relocation loads createBigTextInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC7E, createBigTextInputForm__Q49textinput6extend4memo7ManagerFv .text+0xC92.
- 0x81667EC8 lbl_81667EC8 -> @8410, same 17 bytes: compiler literal b'fs_VK_bg_a.brlyt\x00'; relocation loads createBG__Q49textinput6extend4memo7ManagerFv .text+0xCF2, createBG__Q49textinput6extend4memo7ManagerFv .text+0xCFA.
MyTiManager literal identities pass the all-unit quick gate with no regressions and preserved DOL hash. All seven genuine pooled literal objects now pair by compiler identity, while every retained vtable has the real exact method slots. Unit matched_data remains 148/1132 because the target-only lbl_816681E8 object is still unpaired. It is 40 zero bytes at 0x816681E8..0x81668210, after the 320-byte Manager vtable; source .data ends at offset 0x3B0. No incoming relocation in any original 43U object and no outgoing relocation prove a real type or name for those bytes. No source object was fabricated, no hidden flag added, no zero-size annotation or symbol deletion used to force the score. Remaining extent/ownership is explicitly uncertain. This commit improves real symbol pairing, not the unit's aggregate data measure.
Advisory literal_reference_diff.py over all three units, --all-functions: 35 arguments checked in 373 analyzed functions, no candidates/errors; LayoutByNW4R::create skipped because source/target function sizes differ. This is additional literal evidence, not proof for the unknown zero tail.
## Continuation final verification
Final full gate ran without --quick and rebuilt from a clean 43U build. tiInputForm data 1036 -> 3772/3772 and tiKeyboard 12 -> 2708/2708 now reach the entire data goal; MyTiManager remains 148/1132, with .data 97.92531% and only the unpaired 40-byte tail requiring ownership/type evidence. No code bodies were changed in this continuation. Instruction-exact counts remain 216/221, 62/62 and 91/91; code bytes remain 46980/50656, 8368/8368 and 20196/20196. Checked every changed symbols.txt annotation: all 70 removed/added lines belong to the three assigned split ranges. All section totals stay unchanged.
Open-function completeness audit: calcCursorPos, LayoutByNW4R::create and LayoutByNW4R::setLanguage each have the three distinct source-level attempts recorded earlier in this same log; all were restored and remain open only for code work. Every function in tiKeyboard and MyTiManager is already exact. The two additional objdiff-100% tiInputForm functions excluded from instruction-exact counts are unchanged, preserving the baseline definition.
Tool-source evidence for the pairing method: the installed objdiff-cli is v3.4.5. Its official [find_symbol implementation](https://github.com/encounter/objdiff/blob/v3.4.5/objdiff-core/src/diff/mod.rs#L690) pairs compiler-generated literal/table symbols by exact bytes and relocations, independent of their numeric counters. [diff_generic_section](https://github.com/encounter/objdiff/blob/v3.4.5/objdiff-core/src/diff/data.rs#L511) requires every target-owned symbol to pair at 100%; extra source weak symbols do not prevent this route. The seven now-paired MyTiManager literals and every genuine retained vtable are exact, but the unknown target-owned 40-byte object is still unpaired; it was left intact.
Accepted commits: a6c8a274 (tiKeyboard data 100%), 4ba13948 (tiInputForm data 100%), 78403153 (MyTiManager's seven compiler literal identities, without an aggregate gain).
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/keyboard/tiInputForm] pool: IDENTICAL
[src/keyboard/tiInputForm] objdiff: code 46980/50656 data 3772/3772 functions 218/221 fuzzy 99.5781 linked code 0
[src/keyboard/tiInputForm] instruction-exact functions: 216/221
[src/keyboard/tiInputForm] section .bss size 96 match 100.0
[src/keyboard/tiInputForm] section .ctors size 4 match 100.0
[src/keyboard/tiInputForm] section .data size 2736 match 100.0
[src/keyboard/tiInputForm] section .rodata size 760 match 100.0
[src/keyboard/tiInputForm] section .sbss size 32 match 100.0
[src/keyboard/tiInputForm] section .sdata size 40 match 100.0
[src/keyboard/tiInputForm] section .sdata2 size 104 match 100.0
[src/keyboard/tiInputForm] section .text size 50656 match 99.578094
[src/keyboard/tiInputForm] below 100: calcCursorPos__Q39textinput9inputform4BaseFff 91.622696
[src/keyboard/tiInputForm] below 100: create__Q39textinput9inputform12LayoutByNW4RFP12MEMAllocatorPQ39textinput9inputform10EditBuffer 95.02809
[src/keyboard/tiInputForm] below 100: setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language 96.44726
[src/keyboard/tiInputForm] baseline: code 46980/50656 data 1036 functions 218 fuzzy 99.5781
[src/keyboard/tiKeyboard] pool: IDENTICAL
[src/keyboard/tiKeyboard] objdiff: code 8368/8368 data 2708/2708 functions 62/62 fuzzy 100.0000 linked code 8368
[src/keyboard/tiKeyboard] instruction-exact functions: 62/62
[src/keyboard/tiKeyboard] section .ctors size 4 match 100.0
[src/keyboard/tiKeyboard] section .data size 2696 match 100.0
[src/keyboard/tiKeyboard] section .sbss size 8 match 100.0
[src/keyboard/tiKeyboard] section .text size 8368 match 100.0
[src/keyboard/tiKeyboard] baseline: code 8368/8368 data 12 functions 62 fuzzy 100.0000
[src/keyboard/MyTiManager] pool: IDENTICAL
[src/keyboard/MyTiManager] objdiff: code 20196/20196 data 148/1132 functions 91/91 fuzzy 100.0000 linked code 0
[src/keyboard/MyTiManager] instruction-exact functions: 91/91
[src/keyboard/MyTiManager] section .bss size 72 match 100.0
[src/keyboard/MyTiManager] section .ctors size 4 match 100.0
[src/keyboard/MyTiManager] section .data size 984 match 97.92531
[src/keyboard/MyTiManager] section .sbss size 16 match 100.0
[src/keyboard/MyTiManager] section .sdata size 24 match 100.0
[src/keyboard/MyTiManager] section .sdata2 size 32 match 100.0
[src/keyboard/MyTiManager] section .text size 20196 match 100.0
[src/keyboard/MyTiManager] baseline: code 20196/20196 data 148 functions 91 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 88.70241 -> 88.70241
global fuzzy_match_percent: 99.47499 -> 99.47499
global complete_code_percent: 63.21193 -> 63.54459
global matched_data_percent: 98.77142 -> 99.06781
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
note: no baseline for merge-base 6ebe56bc; compared against nearest snapshotted ancestor 69c235ff (1 commits back)
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS
```

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,69 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] below 100: FAAttach 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code None/500 data 240 functions 0 fuzzy 99.3600
[src/bannerSound/AxAdpcmPlayer] pool: IDENTICAL
[src/bannerSound/AxAdpcmPlayer] objdiff: code 3088/3088 data 6476/6476 functions 13/13 fuzzy 100.0000 linked code 3088
[src/bannerSound/AxAdpcmPlayer] instruction-exact functions: 12/13
[src/bannerSound/AxAdpcmPlayer] section .bss size 6400 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .ctors size 4 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .data size 32 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sbss size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata size 8 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata2 size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .text size 3088 match 100.0
[src/bannerSound/AxAdpcmPlayer] baseline: code 3088/3088 data 6476 functions 13 fuzzy 100.0000
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .data size 40 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.65385
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extab size 56 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extabindex size 84 match 97.61904
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_8148302C 99.49152
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483264 98.902435
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483308 99.13793
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814833F0 99.04256
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814834AC 99.3586
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8GetKOcandidates 97.96712
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 96 functions 1 fuzzy 98.6539
[src/scene/board/iplFocusObject] pool: IDENTICAL
[src/scene/board/iplFocusObject] objdiff: code 20332/20332 data 2576/2576 functions 89/89 fuzzy 100.0000 linked code 0
[src/scene/board/iplFocusObject] instruction-exact functions: 89/89
[src/scene/board/iplFocusObject] section .data size 2168 match 100.0
[src/scene/board/iplFocusObject] section .rodata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata2 size 56 match 100.0
[src/scene/board/iplFocusObject] section .text size 20332 match 100.0
[src/scene/board/iplFocusObject] baseline: code 19772/20332 data 2576 functions 88 fuzzy 99.6471
[src/system/iplKeyboard] pool: IDENTICAL
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/system/iplKeyboard] section .data size 1168 match 100.0
[src/system/iplKeyboard] section .sdata size 8 match 100.0
[src/system/iplKeyboard] section .sdata2 size 8 match 100.0
[src/system/iplKeyboard] section .text size 6024 match 98.73506
[src/system/iplKeyboard] below 100: create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap 94.00944
[src/system/iplKeyboard] baseline: code 4752/6024 data 1184 functions 31 fuzzy 98.7351
[libs/RVL_SDK/src/fa/pf_dir] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_dir] objdiff: code 18976/18976 data 40/40 functions 38/38 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/pf_dir] instruction-exact functions: 38/38
[libs/RVL_SDK/src/fa/pf_dir] section .sdata size 32 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .sdata2 size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .text size 18976 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] baseline: code 11704/18976 data 40 functions 35 fuzzy 99.5432
regressions vs baseline: 0
global matched_code_percent: 88.93407 -> 89.19556
global fuzzy_match_percent: 99.50078 -> 99.50607
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.07044 -> 99.07044
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS

View File

@@ -0,0 +1,126 @@
# Fuzzy lane continuation
Baseline: `711ee737f98c1febb2e3d9580bec9be423fd3b19`. Four new exact functions; AxAdpcmPlayer was already matched and linked after origin/main #774.
| Unit | Instruction-exact before → after | Objdiff functions before → after | Code bytes before → after / total | Data bytes before → after / total |
| --- | --- | --- | --- | --- |
| `libs/RVL_SDK/src/fa/api/FAAttach` | 0/1 → 0/1 | 0/1 → 0/1 | 0 → 0 / 500 | 240 → 240 / 240 |
| `src/bannerSound/AxAdpcmPlayer` | 12/13 → 12/13 | 13/13 → 13/13 | 3088 → 3088 / 3088 | 6476 → 6476 / 6476 |
| `libs/RVLMiddleware/eZiText/src/clib/zkokeyp` | 1/7 → 1/7 | 1/7 → 1/7 | 332 → 332 / 5200 | 96 → 96 / 180 |
| `src/scene/board/iplFocusObject` | 88/89 → 89/89 | 88/89 → 89/89 | 19772 → 20332 / 20332 | 2576 → 2576 / 2576 |
| `src/system/iplKeyboard` | 31/32 → 31/32 | 31/32 → 31/32 | 4752 → 4752 / 6024 | 1184 → 1184 / 1184 |
| `libs/RVL_SDK/src/fa/pf_dir` | 35/38 → 38/38 | 35/38 → 38/38 | 11704 → 18976 / 18976 | 40 → 40 / 40 |
Instruction-exact counts above reproduce the gate. Ax reports 12/13 there despite objdiff 13/13; the existing CR1 branch-disassembly normalization issue is independently proven: `checkFile__19AxAdpcmSimplePlayerFPvUl` has all 372 encoded function bytes identical, while odiff displays two different CR1 branch targets. It contributes no new gain.
## Remaining functions
- `FAAttach` 99.36% — 125/125 instructions; ten index/scaled-index/table-base register differences. 3 distinct compiled source forms; attempts lines 3166–3168.
- `Zi8_8148302C` 99.49152% — 59/59 instructions; six work-pointer/value register differences. 4 distinct compiled source forms; attempts lines 3173–3176.
- `Zi8_81483264` 98.902435% — 41/41 instructions; eight metadata/index register differences. 9 distinct compiled source forms; attempts lines 3180–3190.
- `Zi8_81483308` 99.13793% — 58/58 instructions; nine count-pointer/index register differences. 7 distinct compiled source forms; attempts lines 3194–3200.
- `Zi8_814833F0` 99.04256% — 47/47 instructions; eight key/index register differences. 5 distinct compiled source forms; attempts lines 3205–3209.
- `Zi8_814834AC` 99.3586% — 344/343 instructions; extra narrowing in initialized-byte chain, operand scheduling and register differences. 21 distinct compiled source forms; attempts lines 3213–3235.
- `Zi8GetKOcandidates` 97.96712% — 673/669 instructions; extra zero load, helper-return narrowing, final postincrement copy, addressing/condition scheduling. 14 distinct compiled source forms; attempts lines 3241–3257.
- `create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap` 94.00944% — 318/318 instructions; allocation-result moves across null constructors, dictionary index scheduling and MemoSetting stack-temporary order. 24 distinct compiled source forms; attempts lines 3293–3318.
## Matched functions and source review
`focus_object::cmn_calc`: added a real VEC3 sum and result temporary, with reciprocal evaluation inside normalization; frame 0x60 → 0x70, 140/140 instructions, zero differences.
`PFDIR_p_move`: corrected the six-argument entry-search prototype, used the matching table entry as the current-directory base, moved the actual cluster read inside that helper, separated LFN traversal lifetimes; 631/631 instructions, zero differences.
`PFDIR_p_rename`: shared the typed filename cursor and separated the file, retreat and remaining-LFN counters; corrected error-return branches and count mask; 625/625 instructions, zero differences.
`PFDIR_p_mkdir`: ordinary 11-byte short-name loop and full real scalar declaration order, preserving addressable local order; 562/562 instructions, zero differences.
## Data proof
FAAttach 240/240, Ax 6476/6476, focus 2576/2576, keyboard 1184/1184, PF 40/40 already have all data matched. No config/symbol rename or extent edit was justified.
zkokeyp .data 40-byte ten-entry switch table is byte-identical and each relocation names the exact Zi8_81483118 at the same offset/addend. extab 56 bytes match. extabindex 84 bytes differ only at length words offset64 (1376 versus1372 for Zi8_814834AC) and offset76 (2692 versus2676 for Zi8GetKOcandidates). Exception relocations resolve to identical extab offsets0,8,16,24,32,40,48; anonymous compiler symbol names differ as expected. The candidate function begins four bytes later in our .text because the previous function has an extra instruction. The remaining data differences follow these two code lengths.
## Files and local commits
- `libs/RVL_SDK/src/fa/pf_dir.c`
- `src/scene/board/iplFocusObject.cpp`
- `tools/decomp-assist/fz1.attempts.md`
- `tools/decomp-assist/fz1.next.final-gate.txt`
- `tools/decomp-assist/fz1.next.report.md`
- d4976af8 match focus vector interpolation
- 0035e899 match directory move and correct entry prototype
- d5de7189 match directory rename traversal
- 9170cd3e match directory creation locals
The final evidence commit is identified in the final reply. Matching phase only; the gate retains the existing linked status.
## Final clean gate, verbatim
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] below 100: FAAttach 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code None/500 data 240 functions 0 fuzzy 99.3600
[src/bannerSound/AxAdpcmPlayer] pool: IDENTICAL
[src/bannerSound/AxAdpcmPlayer] objdiff: code 3088/3088 data 6476/6476 functions 13/13 fuzzy 100.0000 linked code 3088
[src/bannerSound/AxAdpcmPlayer] instruction-exact functions: 12/13
[src/bannerSound/AxAdpcmPlayer] section .bss size 6400 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .ctors size 4 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .data size 32 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sbss size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata size 8 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .sdata2 size 16 match 100.0
[src/bannerSound/AxAdpcmPlayer] section .text size 3088 match 100.0
[src/bannerSound/AxAdpcmPlayer] baseline: code 3088/3088 data 6476 functions 13 fuzzy 100.0000
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .data size 40 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.65385
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extab size 56 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extabindex size 84 match 97.61904
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_8148302C 99.49152
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483264 98.902435
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483308 99.13793
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814833F0 99.04256
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814834AC 99.3586
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8GetKOcandidates 97.96712
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 96 functions 1 fuzzy 98.6539
[src/scene/board/iplFocusObject] pool: IDENTICAL
[src/scene/board/iplFocusObject] objdiff: code 20332/20332 data 2576/2576 functions 89/89 fuzzy 100.0000 linked code 0
[src/scene/board/iplFocusObject] instruction-exact functions: 89/89
[src/scene/board/iplFocusObject] section .data size 2168 match 100.0
[src/scene/board/iplFocusObject] section .rodata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata size 176 match 100.0
[src/scene/board/iplFocusObject] section .sdata2 size 56 match 100.0
[src/scene/board/iplFocusObject] section .text size 20332 match 100.0
[src/scene/board/iplFocusObject] baseline: code 19772/20332 data 2576 functions 88 fuzzy 99.6471
[src/system/iplKeyboard] pool: IDENTICAL
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/system/iplKeyboard] section .data size 1168 match 100.0
[src/system/iplKeyboard] section .sdata size 8 match 100.0
[src/system/iplKeyboard] section .sdata2 size 8 match 100.0
[src/system/iplKeyboard] section .text size 6024 match 98.73506
[src/system/iplKeyboard] below 100: create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap 94.00944
[src/system/iplKeyboard] baseline: code 4752/6024 data 1184 functions 31 fuzzy 98.7351
[libs/RVL_SDK/src/fa/pf_dir] pool: IDENTICAL
[libs/RVL_SDK/src/fa/pf_dir] objdiff: code 18976/18976 data 40/40 functions 38/38 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/pf_dir] instruction-exact functions: 38/38
[libs/RVL_SDK/src/fa/pf_dir] section .sdata size 32 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .sdata2 size 8 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] section .text size 18976 match 100.0
[libs/RVL_SDK/src/fa/pf_dir] baseline: code 11704/18976 data 40 functions 35 fuzzy 99.5432
regressions vs baseline: 0
global matched_code_percent: 88.93407 -> 89.19556
global fuzzy_match_percent: 99.50078 -> 99.50607
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.07044 -> 99.07044
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,107 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] pool: IDENTICAL
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/api/FAAttach] section .bss size 208 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .data size 24 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/api/FAAttach] section .text size 500 match 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] below 100: FAAttach 99.36
[libs/RVL_SDK/src/fa/api/FAAttach] baseline: code None/500 data 240 functions 0 fuzzy 99.3600
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .data size 40 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.65385
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extab size 56 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section extabindex size 84 match 97.61904
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_8148302C 99.49152
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483264 98.902435
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_81483308 99.13793
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814833F0 99.04256
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8_814834AC 99.3586
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] below 100: Zi8GetKOcandidates 97.96712
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 96 functions 1 fuzzy 98.6539
[src/system/iplKeyboard] pool: IDENTICAL
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/system/iplKeyboard] section .data size 1168 match 100.0
[src/system/iplKeyboard] section .sdata size 8 match 100.0
[src/system/iplKeyboard] section .sdata2 size 8 match 100.0
[src/system/iplKeyboard] section .text size 6024 match 98.73506
[src/system/iplKeyboard] below 100: create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap 94.00944
[src/system/iplKeyboard] baseline: code 4752/6024 data 1184 functions 31 fuzzy 98.7351
[src/BS2/BS2Update] pool: IDENTICAL
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 94.2300 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 9/10
[src/BS2/BS2Update] section .bss size 9056 match 100.0
[src/BS2/BS2Update] section .data size 1328 match 100.0
[src/BS2/BS2Update] section .sbss size 80 match 100.0
[src/BS2/BS2Update] section .sdata size 24 match 100.0
[src/BS2/BS2Update] section .text size 4052 match 94.23001
[src/BS2/BS2Update] below 100: UpdateThread 93.59803
[src/BS2/BS2Update] baseline: code 112/4052 data 10488 functions 8 fuzzy 91.6604
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 37608/53564 data 6904/6904 functions 221/233 fuzzy 99.3644 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 221/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.364426
[src/channelScript/CHANSVm] below 100: CHANSVmConvertToFloatFromStr 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVmFormatString 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.625984
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.46608
[src/channelScript/CHANSVm] baseline: code 37608/53564 data 6904 functions 221 fuzzy 99.3644
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.1595 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 24/29
[src/BS2/BS2Mach] section .bss size 155232 match 100.0
[src/BS2/BS2Mach] section .data size 3024 match None
[src/BS2/BS2Mach] section .sbss size 240 match 100.0
[src/BS2/BS2Mach] section .sdata size 32 match 100.0
[src/BS2/BS2Mach] section .text size 16980 match 98.159485
[src/BS2/BS2Mach] below 100: Run 16.744186
[src/BS2/BS2Mach] below 100: BS2StartGame 98.72774
[src/BS2/BS2Mach] below 100: BS2StartGCGame 99.5614
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 99.50739
[src/BS2/BS2Mach] below 100: BS2Tick 98.230415
[src/BS2/BS2Mach] baseline: code 4940/16980 data 155504 functions 24 fuzzy 97.8276
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 96.7779 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 100.0
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 96.777916
[src/scene/setting/AOSS] below 100: AOSS_Init_old 93.78725
[src/scene/setting/AOSS] below 100: AOSSDecryptMessage 97.74143
[src/scene/setting/AOSS] below 100: AOSSApplyAuthOptions 98.77193
[src/scene/setting/AOSS] below 100: AOSSSendHelloRequest 92.190475
[src/scene/setting/AOSS] below 100: AOSSXorBufferWithKey 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3928 functions 16 fuzzy 96.7779
regressions vs baseline: 0
global matched_code_percent: 89.64909 -> 89.65871
global fuzzy_match_percent: 99.53278 -> 99.53815
global complete_code_percent: 67.39544 -> 67.39544
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
review note: libs/RVL_SDK/include/revolution/dvd.h: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. volatile s32 state;
review note: src/BS2/BS2Mach.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. vu32 LowReadResult = 0;
review note: src/BS2/BS2Update.c: volatile object declaration (orchestrator checks the target really re-reads it) (+1 net), e.g. static volatile s32 rc = 0;
note: config touched: config/43U/symbols.txt (orchestrator reviews every config/symbols change)
GATE PASS

View File

@@ -0,0 +1,129 @@
# Fuzzy lane round 2, final verified handoff
One new exact function: `BS2UpdateInit`. Two additional target-proven volatile/poll corrections improve fuzzy code, and remain non-matching. All 31 remaining functions have at least three distinct successfully compiled source forms logged; build failures do not count.
Final full gate (no `--quick`; clean build):
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/api/FAAttach] objdiff: code None/500 data 240/240 functions 0/1 fuzzy 99.3600 linked code 0
[libs/RVL_SDK/src/fa/api/FAAttach] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 96/180 functions 1/7 fuzzy 98.6539 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[src/system/iplKeyboard] objdiff: code 4752/6024 data 1184/1184 functions 31/32 fuzzy 98.7351 linked code 0
[src/system/iplKeyboard] instruction-exact functions: 31/32
[src/BS2/BS2Update] objdiff: code 400/4052 data 10488/10488 functions 9/10 fuzzy 94.2300 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 9/10
[src/channelScript/CHANSVm] objdiff: code 37608/53564 data 6904/6904 functions 221/233 fuzzy 99.3644 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 221/233
[src/BS2/BS2Mach] objdiff: code 4940/16980 data 155504/158528 functions 24/29 fuzzy 98.1595 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 24/29
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3928/3928 functions 16/21 fuzzy 96.7779 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
regressions vs baseline: 0
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Before -> after (matched code/data bytes; denominators unchanged):
| Unit | Raw gate exact functions | Objdiff exact functions | Code bytes | Data bytes |
|---|---|---|---|---|
| `libs/RVL_SDK/src/fa/api/FAAttach` | 0/1 -> 0/1 | 0/1 -> 0/1 | 0 -> 0 / 500 | 240 -> 240 / 240 |
| `libs/RVLMiddleware/eZiText/src/clib/zkokeyp` | 1/7 -> 1/7 | 1/7 -> 1/7 | 332 -> 332 / 5200 | 96 -> 96 / 180 |
| `src/system/iplKeyboard` | 31/32 -> 31/32 | 31/32 -> 31/32 | 4752 -> 4752 / 6024 | 1184 -> 1184 / 1184 |
| `src/BS2/BS2Update` | 8/10 -> 9/10 | 8/10 -> 9/10 | 112 -> 400 / 4052 | 10488 -> 10488 / 10488 |
| `src/channelScript/CHANSVm` | 221/233 -> 221/233 | 221/233 -> 221/233 | 37608 -> 37608 / 53564 | 6904 -> 6904 / 6904 |
| `src/BS2/BS2Mach` | 24/29 -> 24/29 | 24/29 -> 24/29 | 4940 -> 4940 / 16980 | 155504 -> 155504 / 158528 |
| `src/scene/setting/AOSS` | 15/21 -> 15/21 | 16/21 -> 16/21 | 6436 -> 6436 / 16192 | 3928 -> 3928 / 3928 |
Remaining functions (one line each; successful distinct source forms are additional to declaration permutations):
- `libs/RVL_SDK/src/fa/api/FAAttach::FAAttach` — 99.36%; Drive index narrowing and attached-table base register allocation; 125/125 instructions. 9 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_8148302C` — 99.49152%; Work pointer and key-table value registers exchange; 59/59. 5 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_81483264` — 98.902435%; Parameter/metadata and byte iteration index registers exchange; 41/41. 6 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_81483308` — 99.13793%; Count pointer and running counter registers exchange; 58/58. 5 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_814833F0` — 99.04256%; Metadata pointer and candidate index registers exchange; 47/47. 5 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8_814834AC` — 99.3586%; Zero initialization chain emits an extra clrlwi; addressing/register operands also differ; 344/343. 8 source forms.
- `libs/RVLMiddleware/eZiText/src/clib/zkokeyp::Zi8GetKOcandidates` — 97.96712%; Candidate loop boundaries, helper return narrowing and temporary scheduling; 673/669. 6 source forms.
- `src/system/iplKeyboard::create__Q33ipl8keyboard7ManagerFPQ33ipl4nand4FilePQ23EGG4Heap` — 94.00944%; Inline resource-node constructor boundary, OEM dictionary index and MemoSetting stack copy order; 318/318. 7 source forms.
- `src/BS2/BS2Update::UpdateThread` — 93.59803%; Import/scan branch and store scheduling, common bases and temporaries; proven rc reloads restored, nine target instructions still absent; 904/913. 10 source forms.
- `src/channelScript/CHANSVm::CHANSVmConvertToFloatFromStr` — 97.59036%; End pointer initialization store and object-type compare occur in opposite order; 83/83. 6 source forms.
- `src/channelScript/CHANSVm::VmDateDtor` — 94.96703%; Variadic date argument and year stack-store scheduling; 91/91. 4 source forms.
- `src/channelScript/CHANSVm::VmStringReplace` — 97.878784%; Search/replacement lengths and live cursor register allocation; 132/132. 3 source forms.
- `src/channelScript/CHANSVm::VmStringSplit` — 98.04054%; Delimiter/parent cursor and result array register allocation; 222/222. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmFormatString` — 99.84919%; Two temporary object/string-length registers exchange late in the formatter; 431/431. 6 source forms.
- `src/channelScript/CHANSVm::VmBlobGetHexString` — 98.71951%; Output offset and decoded hex digit registers exchange; 82/82. 4 source forms.
- `src/channelScript/CHANSVm::VmBlobPackCommon` — 97.949104%; Packing mode, format and copy-loop temporary register allocation; 668/668. 4 source forms.
- `src/channelScript/CHANSVm::VmBlobUnpack` — 98.452614%; Two-pass format parser and blob cursor/count register allocation; 517/517. 5 source forms.
- `src/channelScript/CHANSVm::VmWinEmuWrite` — 99.62687%; String object and total byte-length registers exchange; 67/67. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmAddExe` — 99.625984%; Module header and executable type argument registers exchange, plus address operand order; 254/254. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmLinkModules` — 98.677246%; Dispatch/module/index and global-list pointer registers exchange; 189/189. 4 source forms.
- `src/channelScript/CHANSVm::CHANSVmStep` — 96.46608%; Default step count and loop-entry branch form, floating constant bases and opcode temporaries; 1253/1253. 5 source forms.
- `src/BS2/BS2Mach::Run` — 16.744186%; Target explicitly clears fixed GPRs and the stack pointer and enters via LR; ordinary C cache-loop/callback forms cannot encode that handoff under the no-asm constraint; 11/43. 3 source forms.
- `src/BS2/BS2Mach::BS2StartGame` — 98.72774%; Five initial base/store scheduling operands and five legacy DI address/value register operands remain after fixing all polling loops; 393/393. 17 source forms.
- `src/BS2/BS2Mach::BS2StartGCGame` — 99.5614%; External DVD getter call versus inline state load, and wide tick multiplication operand allocation; 228/228. 8 source forms.
- `src/BS2/BS2Mach::CheckBS2CommandStatus` — 99.50739%; Partition-count slwi and CacheCommandComplete store occur in opposite order; 406/406. 13 source forms.
- `src/BS2/BS2Mach::BS2Tick` — 98.230415%; Boot/hardware address-base sharing, progress-store scheduling and loader output scope; six target instructions absent; 1934/1940. 4 source forms.
- `src/scene/setting/AOSS::AOSS_Init_old` — 93.78725%; Timeout default loads share an array base instead of independent references; local/global allocation and initialization/branch scheduling also differ; 1575/1584. 7 source forms.
- `src/scene/setting/AOSS::AOSSDecryptMessage` — 97.74143%; Checksum and key schedule/state/input/output cursor registers exchange; 321/321. 4 source forms.
- `src/scene/setting/AOSS::AOSSApplyAuthOptions` — 98.77193%; Authentication flags and configuration subrecord pointers use different registers; 114/114. 4 source forms.
- `src/scene/setting/AOSS::AOSSSendHelloRequest` — 92.190475%; Common CRC/key-state base hoisting and packet/key/socket local boundaries differ; 271/273. 8 source forms.
- `src/scene/setting/AOSS::AOSSXorBufferWithKey` — 98.605446%; Unrolled XOR result ownership and packet/mask address register allocation; 147/147. 21 source forms.
Data proof and limits:
- `BS2Update`: `Thread` at 0x810B2580 is an OSThread of size 0x318; target OSCreateThread uses a separate 4096-byte stack starting at thread+0x318. Corrected only the data extent from 0x1318 to 0x318, kept the address and full .bss section size 9056, and left stack bytes unowned. Separate real, initialized thread/stack objects produce 72/72 identical Init instructions and preserve data 10488/10488.
- `zkokeyp`: .data and .extab bytes match. .extabindex has two differing real function-size words (1376/1372 and 2692/2676), corresponding to the two remaining functions with extra instructions. No data rename/extent fix can legitimately conceal that.
- `BS2Mach`: the first 3020 .data bytes are identical, followed by four zero alignment bytes in the target. Anonymous string/table symbols have no authorized real source object name to pair. Two jump table relocation sets also refer into non-matching functions. Data remains 155504/158528; no invented names, pinned literals or padding objects were added.
- Other owned units retain 100% objdiff data. No weak inline/vtable data was suppressed. No other symbol rename or extent correction was made.
Target proof for qualifiers:
- DVD state field: repeated target CoverBlock.state reads at 0xDE0 with a back edge from 0xDE8 and no call. Qualification is guarded by BS2_MACH_VOLATILE_DVD_STATE, defined only by BS2Mach.c; all other translation units compile the original header field.
- LowReadResult: empty repeated polls at 0x1130/0x117C/0x1290/0x12E8, with further loads at 0x113C/0x129C immediately after poll exits. The previous interrupt calls were absent from target code.
- Static signed rc: target store at 0xD5C followed by load at 0xD64, and store at 0xE48 followed by load at 0xE50, with no intervening call. Signed volatile restores two real reads. No use-site volatile cast was added.
Uncertainties:
- AOSSParseNetworkSettings is objdiff 100%, byte-identical, and declaration-tool score (0,0). The gate uses odiff, which incorrectly rebases its CR1 conditional branches by the 36-byte function-position delta. The raw gate consequently prints 15/21, while objdiff and bytes prove 16/21. Raw output is preserved verbatim above; source/metadata were not changed to manipulate this metric.
- Remaining allocation/scheduling causes are hypotheses supported by target diffs and unsuccessful source experiments, not claims that the original source is known.
- Run needs the fixed-register handoff described above; no forbidden assembly or fabricated match was attempted.
Files changed and source commits:
```text
fcbd5a298408059adaf22d29cecb21b9a9cfa301
match update thread creation and object extent
config/43U/symbols.txt
src/BS2/BS2Update.c
tools/decomp-assist/fz1.attempts.md
```
```text
9ab3eb8183594c3a940d7bbb147de7e3c085bca0
restore dvd callback polling
libs/RVL_SDK/include/revolution/dvd.h
src/BS2/BS2Mach.c
tools/decomp-assist/fz1.attempts.md
```
```text
ce9cff4fa6c2d03310c780b1592d02c49bc6c367
preserve update result reloads
src/BS2/BS2Update.c
tools/decomp-assist/fz1.attempts.md
```
Verification artifacts:
- `tools/decomp-assist/fz1.attempts.md` — structural diagnoses, source variant hashes/results, proofs and final all-open audit.
- `tools/decomp-assist/fz1.r2.final-gate.txt` — complete final clean gate output.
- `tools/decomp-assist/fz1.r2.report.md` — this report.
No push, PR, branch switch, rebase, other worktree mutation or subagent was used. Earlier untracked artifacts were left untouched.

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

View File

@@ -556,3 +556,362 @@ Before -> after instruction-exact functions / objdiff code bytes / matched data
- iplBoard: 93/94 -> 93/94; 19144 -> 19144; 896 -> 896.
- lyt_window: 20/21 -> 20/21; 9848 -> 9848; 268 -> 268.
Final full gate passes, correct DOL SHA1, zero regressions, zero net forbidden patterns and zero readability warnings. NHTTPi_SocSend_sub has 102/102 instructions and ctxdiff diffs0 after the clean build. Remaining compiler allocation/local layout fixes and the lyt_window duplicate-constant emission are unresolved. Only NHTTP_socket_RVL.c and this attempts log differ from round3 baseline; source improvement commit bf69c042.
# Round 4
Baseline 950bb0dda6ba1980970a54d6f575670f4e07aee8; fetch origin/main b84b3c0d; all six owned sources unchanged remotely.
- libs/RevoEX/src/nhttp/NHTTP_socket_RVL: POOL IDENTICAL up to 0 (mine=0 base=0)
- src/scene/channelSelect/iplChannelObj: POOL IDENTICAL up to 20 (mine=20 base=20)
- src/scene/board/iplBoard: POOL IDENTICAL up to 18 (mine=18 base=18)
- libs/NW4R/src/lyt/lyt_window: POOL IDENTICAL up to 1 (mine=1 base=1)
- libs/RVLMiddleware/eZiText/src/clib/zmtkey: POOL IDENTICAL up to 0 (mine=0 base=0)
- libs/RVLMiddleware/eZiText/src/clib/zconvert: POOL IDENTICAL up to 0 (mine=0 base=0)
- Recv_sub structural diagnosis: 67/67, same0x20 frame/branches, only source-offset load and memcpy argument moves reordered at37..40; last-round temporaries did not help. This round probes operand expression and helper argument boundaries.
- NHTTPi_SocRecv_sub / r4 array subscript address for buffered source: 67/67 instructions; structural 0, positional differences 4
- NHTTPi_SocRecv_sub / r4 copy helper evaluates offset before destination: 67/67 instructions; structural 0, positional differences 4
- NHTTPi_SocRecv_sub / r4 copy helper size-first parameter ordering: 67/67 instructions; structural 0, positional differences 4
- setLangPane diagnosis:195/195; initial structural fixes are four-byte records, eight-byte name capacity and terminating fallback table/first match. Last round narrowed to four pointer-register differences. Reconstruct that candidate to inspect further loop scopes.
- Send diagnosis:43/43,0x10 frame identical; early SSL-id load scheduled after save/copy instead of before. Probe expression branch, const local and helper boundary before register search.
- NHTTPi_SocSend / r4 conditional operator chooses socket writer: 43/43 instructions; structural 2, positional differences 3
- NHTTPi_SocSend / r4 const saved SSL identifier: 43/43 instructions; structural 2, positional differences 3
- NHTTPi_SocSend / r4 inline SSL identifier accessor: 43/43 instructions; structural 2, positional differences 3
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r4 structural candidate with distinct group pointer names: 195/195 instructions; structural 0, positional differences 4
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r4 explicit pane loop scopes: 195/195 instructions; structural 0, positional differences 4
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r4 range group pointer initialized through iterator dereference type: 195/195 instructions; structural 0, positional differences 4
- appendRecord structural diagnosis:283/283, frame0x90 vs0xa0; target three interruption saves spill beside metadata. Prior read-state groups forced spills but slots differ. Probe contiguous metadata state with explicit real type-array initialization and scoped status locals.
- appendRecord__Q33ipl5scene5BoardFP10_CDBRecord / r4 metadata state type bytes explicitly cleared: 283/283 instructions; structural 12, positional differences 8
- appendRecord__Q33ipl5scene5BoardFP10_CDBRecord / r4 reverse loop clearing metadata type bytes: 284/283 instructions; structural 23, positional differences 249
- appendRecord__Q33ipl5scene5BoardFP10_CDBRecord / r4 interrupt states declared at each disabling call: 283/283 instructions; structural 52, positional differences 57
- lyt_window extent proof: scLytFatalColorA at0x81695553 is source extern C const u8 (size1) and GetFrameMaterial loads it with lbz before assembling GXColor RGBA; target recorded size5 includes four trailing section-alignment bytes. Correct size5->1; address and .sdata2 section total remain unchanged, four padding bytes unowned.
- appendRecord__Q33ipl5scene5BoardFP10_CDBRecord / r4 metadata type bytes initialized ascending: 283/283 instructions; structural 0, positional differences 0; EXACT candidate retained
- appendRecord__Q33ipl5scene5BoardFP10_CDBRecord / r4 metadata type chained assignments reversed: 283/283 instructions; structural 0, positional differences 0; EXACT candidate retained
- DrawFrame diagnosis:376/376, frame0xe0 identical; all119 surviving differences are register coloring including static flip table r31/r21 and subsequent temporary allocation. Probe geometry/quad storage boundaries before final declaration search.
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r4 quad texture coordinates passed by first element address: 376/376 instructions; structural 0, positional differences 119
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r4 geometry aggregated into local quad state: 376/376 instructions; structural 23, positional differences 142
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r4 material kept as meaningful local before texture check: 375/376 instructions; structural 8, positional differences 364
- appendRecord exact result: one RecordReadState groups all real metadata and three saved interruption flags; address-taken metadata causes the target stack storage rather than promotion. Target offsets relative to sp: third8,dataSize0xc,second0x10,first0x14,second-of-minute0x18,minute0x1c,hour0x20,gameCode0x24,CDBId0x28,type0x30,Date0x38,key0x48. All fields are consumed by real metadata/restore calls. Clearing the real eight-byte type buffer in ascending byte order reproduces target stores; no padding or dummy objects. Final readable candidate uses separate byte assignments, recordSecond name, 283/283 and ctxdiff diffs0.
### First round4 gate
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/board/iplBoard] pool: IDENTICAL
[src/scene/board/iplBoard] objdiff: code 20276/20276 data 896/896 functions 94/94 fuzzy 100.0000 linked code 0
[src/scene/board/iplBoard] instruction-exact functions: 94/94
[src/scene/board/iplBoard] section .data size 744 match 100.0
[src/scene/board/iplBoard] section .rodata size 104 match 100.0
[src/scene/board/iplBoard] section .sdata size 40 match 100.0
[src/scene/board/iplBoard] section .sdata2 size 8 match 100.0
[src/scene/board/iplBoard] section .text size 20276 match 100.0
[src/scene/board/iplBoard] baseline: code 19144/20276 data 896 functions 93 fuzzy 99.8765
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 268/316 functions 20/21 fuzzy 99.7586 linked code 0
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 70.588234
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 268 functions 20 fuzzy 99.7586
regressions vs baseline: 0
global matched_code_percent: 88.74257 -> 88.78037
global fuzzy_match_percent: 99.47580 -> 99.47663
global complete_code_percent: 64.69724 -> 64.69724
global matched_data_percent: 98.77142 -> 98.77142
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
```
- Zi8getKeyLayout diagnosis:182/182, frame/branches/operand order identical; r26/r27 language/count still exchanged. Probe char-count assignment boundary, custom-key copy loop and pointer offset decomposition before declaration search.
- Zi8getKeyLayout / r4 character count assigned before emptiness branch: 182/182 instructions; structural 1, positional differences 17
- Zi8getKeyLayout / r4 custom-key copy as while loop: 182/182 instructions; structural 0, positional differences 16
- Zi8getKeyLayout / r4 separate skip key header and character offset: 182/182 instructions; structural 2, positional differences 20
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r4 const node iterators for visibility loops: 195/195 instructions; structural 0, positional differences 4
- Zi8ConvertUC2Key diagnosis:207/207, frame and branch skeleton identical; work/key r27/r28 exchanged. Probe mapped table addressing and valid-character loop forms before declaration search.
- Zi8ConvertUC2Key / r4 mapped character table explicit subscript address: 207/207 instructions; structural 0, positional differences 18
- Zi8ConvertUC2Key / r4 single-range exit uses explicit braces: 207/207 instructions; structural 0, positional differences 18
- Zi8ConvertUC2Key / r4 character invalid range expressed as negated valid range: 207/207 instructions; structural 0, positional differences 18
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r4 found language exits before fallback block: 195/195 instructions; structural 0, positional differences 4
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r4 explicit language fallback control labels: 195/195 instructions; structural 0, positional differences 4
### Round4 final open-function and data audit
- Recv_sub: three successful source variants, final declaration search two orders best(0,4); restored baseline, scheduling unchanged.
- Send: three successful source variants, final declaration search two orders best(2,3); restored baseline, scheduling unchanged.
- setLangPane: six successful variants after reconstructing last-round structural fix; final leading declaration search23 orders best(0,4); all fuzzy candidates restored. Original stays97.18974%, candidate's only four differences are r28/r30 group pointers. No exact result claimed. calcCursorAnim remains objdiff100; instruction counter's54/56 remains the previously documented conditional-branch normalization artifact.
- DrawFrame: three successful variants; final declaration search52 orders best(0,119); restored baseline. Texture flip/argument coloring remains unresolved.
- Zi8getKeyLayout: three successful variants; declaration search52 orders best(0,16); restored baseline.
- Zi8ConvertUC2Key: three successful variants; correct six-declaration search36 orders best(0,18); restored baseline.
- appendRecord now exact: readable interrupt field names slotInterrupts/waitInterrupts/recordInterrupts preserve283/283 and ctxdiff diffs0. No declaration search needed after resolving the structural stack layout.
- Successful-attempt audit: NHTTPi_SocRecv_sub=3, NHTTPi_SocSend=3, setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object=6, appendRecord__Q33ipl5scene5BoardFP10_CDBRecord=5, DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc=3, Zi8getKeyLayout=3, Zi8ConvertUC2Key=3. All remaining objdiff-open functions have at least three distinct successful source-level attempts this round.
- Data ownership: NHTTP has no data symbols; ChannelObj, Board, zmtkey and zconvert retain100% data, no supported rename/extent correction found. lyt_window .data/vtables are100%; .sdata2 target48 bytes vs source24 reflects16 bytes of duplicated fatal RGBA constants plus trailing alignment. Target unnamed quartets have no distinct real source objects to pair by name, so no renames justified. Four trailing bytes of scLytFatalColorA's old extent were corrected to unowned padding with the relocation/type proof above. Section addresses/totals remain unchanged. No weak vtables suppressed.
- Final advisory literal-reference audit:183 matched functions,86 arguments checked, no candidates/errors/skips. Final formatting cleanup removed a whitespace-only line and wrapped metadata call; ctxdiff remains283/283,diffs0.
## Round4 final full gate over all units
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] pool: IDENTICAL
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] objdiff: code 1700/2140 data None/None functions 8/10 fuzzy 99.5701 linked code 0
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] instruction-exact functions: 8/10
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] section .text size 2140 match 99.57009
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] below 100: NHTTPi_SocRecv_sub 99.55224
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] below 100: NHTTPi_SocSend 95.34884
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] baseline: code 1700/2140 data None functions 8 fuzzy 99.5701
[src/scene/channelSelect/iplChannelObj] pool: IDENTICAL
[src/scene/channelSelect/iplChannelObj] objdiff: code 10144/10924 data 2216/2216 functions 55/56 fuzzy 99.7993 linked code 0
[src/scene/channelSelect/iplChannelObj] instruction-exact functions: 54/56
[src/scene/channelSelect/iplChannelObj] section .data size 1240 match 100.0
[src/scene/channelSelect/iplChannelObj] section .rodata size 784 match 100.0
[src/scene/channelSelect/iplChannelObj] section .sdata size 120 match 100.0
[src/scene/channelSelect/iplChannelObj] section .sdata2 size 72 match 100.0
[src/scene/channelSelect/iplChannelObj] section .text size 10924 match 99.79934
[src/scene/channelSelect/iplChannelObj] below 100: setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object 97.18974
[src/scene/channelSelect/iplChannelObj] baseline: code 10144/10924 data 2216 functions 55 fuzzy 99.7993
[src/scene/board/iplBoard] pool: IDENTICAL
[src/scene/board/iplBoard] objdiff: code 20276/20276 data 896/896 functions 94/94 fuzzy 100.0000 linked code 0
[src/scene/board/iplBoard] instruction-exact functions: 94/94
[src/scene/board/iplBoard] section .data size 744 match 100.0
[src/scene/board/iplBoard] section .rodata size 104 match 100.0
[src/scene/board/iplBoard] section .sdata size 40 match 100.0
[src/scene/board/iplBoard] section .sdata2 size 8 match 100.0
[src/scene/board/iplBoard] section .text size 20276 match 100.0
[src/scene/board/iplBoard] baseline: code 19144/20276 data 896 functions 93 fuzzy 99.8765
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 268/316 functions 20/21 fuzzy 99.7586 linked code 0
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 70.588234
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 268 functions 20 fuzzy 99.7586
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] objdiff: code 1488/2216 data 60/60 functions 3/4 fuzzy 99.8466 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] instruction-exact functions: 3/4
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section .text size 2216 match 99.84657
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section extab size 24 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section extabindex size 36 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] below 100: Zi8getKeyLayout 99.53297
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] baseline: code 1488/2216 data 60 functions 3 fuzzy 99.8466
[libs/RVLMiddleware/eZiText/src/clib/zconvert] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zconvert] objdiff: code 1380/2208 data 112/112 functions 3/4 fuzzy 99.8370 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] instruction-exact functions: 3/4
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section .rodata size 32 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section .text size 2208 match 99.83696
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section extab size 32 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section extabindex size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] below 100: Zi8ConvertUC2Key 99.565216
[libs/RVLMiddleware/eZiText/src/clib/zconvert] baseline: code 1380/2208 data 112 functions 3 fuzzy 99.8370
regressions vs baseline: 0
global matched_code_percent: 88.74257 -> 88.78037
global fuzzy_match_percent: 99.47580 -> 99.47663
global complete_code_percent: 64.69724 -> 64.69724
global matched_data_percent: 98.77142 -> 98.77142
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
```
Before -> after instruction-exact functions / objdiff matched code bytes / matched data bytes:
- NHTTP_socket_RVL:8/10->8/10 /1700->1700 /no data symbols.
- iplChannelObj:54/56->54/56 raw instruction counter,55/56->55/56 objdiff;10144->10144 /2216->2216. The calcCursorAnim counter discrepancy is unchanged.
- iplBoard:93/94->94/94 /19144->20276 /896->896. All code/data sections100%.
- lyt_window:20/21->20/21 /9848->9848 /268->268; scLytFatalColorA extent5->1, target section size48 unchanged.
- zmtkey:3/4->3/4 /1488->1488 /60->60.
- zconvert:3/4->3/4 /1380->1380 /112->112.
Remaining objdiff-open functions: NHTTPi_SocRecv_sub99.55224% scheduling;NHTTPi_SocSend95.34884% scheduling;setLangPane97.18974% original stack/branch structure (structurally corrected candidate remains four register differences);DrawFrame98.17819% coloring;Zi8getKeyLayout99.53297% language/count coloring;Zi8ConvertUC2Key99.565216% work/key coloring. All at least three successful distinct attempts this round, restored. Unresolved data emission:lyt_window16 duplicated fatal-color bytes; no evidence justifying data symbol renames.
Changed paths:src/scene/board/iplBoard.cpp,config/43U/symbols.txt,tools/decomp-assist/fz2.attempts.md. Source/extent improvement committed f70c5ddc; final descriptive field names and audit are committed separately after final GATE PASS. No untried remaining functions.
# Round 5 HIGH
Baseline 2039813ccf1a57829b76afc10f721440f09eee58; fresh fetch confirms no owned-source change in origin/main.
- libs/RevoEX/src/nhttp/NHTTP_socket_RVL: POOL IDENTICAL up to 0 (mine=0 base=0)
- src/scene/channelSelect/iplChannelObj: POOL IDENTICAL up to 20 (mine=20 base=20)
- libs/NW4R/src/lyt/lyt_window: POOL IDENTICAL up to 1 (mine=1 base=1)
- libs/RVLMiddleware/eZiText/src/clib/zmtkey: POOL IDENTICAL up to 0 (mine=0 base=0)
- libs/RVLMiddleware/eZiText/src/clib/zconvert: POOL IDENTICAL up to 0 (mine=0 base=0)
- Recv_sub diagnosis:67/67,same0x20 frame/branches, only four scheduling differences around NHTTPi_memcpy. Previous statement and wrapper boundaries exhausted; inspect buffer pointer type and integer width before declaration order.
- NHTTPi_SocRecv_sub / r5 signed character receive buffer pointer: 67/67 instructions; structural 0, positional differences 4
- NHTTPi_SocRecv_sub / r5 copy arguments expressed as byte pointers and unsigned size: 67/67 instructions; structural 0, positional differences 4
- NHTTPi_SocRecv_sub / r5 buffer offset converted to signed byte displacement: 67/67 instructions; structural 0, positional differences 4
- Send diagnosis:43/43,same0x10 frame; target SSL field load occurs before r31 save, ours after. Explore field-address/const-view/structured transfer state before allocation search.
- NHTTPi_SocSend / r5 saved SSL field address: 43/43 instructions; structural 2, positional differences 3
- NHTTPi_SocSend / r5 const request view: 43/43 instructions; structural 2, positional differences 3
- NHTTPi_SocSend / r5 SSL id and result in transfer state: 43/43 instructions; structural 2, positional differences 3
- setLangPane diagnosis:195/195, original array/branch errors fixed by last-round ten four-byte records, eight-byte RSO buffer and first-match/null termination. Corrected candidate differs only group-pointer r28/r30. Probe a meaningful language selection state with different member lifetimes before register search.
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 selection state fields const char* name;,bool found;,nw4r::lyt::Group* group;: 197/195 instructions; structural 9, positional differences 99
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 selection state fields const char* name;,nw4r::lyt::Group* group;,bool found;: 197/195 instructions; structural 9, positional differences 99
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 selection state fields bool found;,const char* name;,nw4r::lyt::Group* group;: 197/195 instructions; structural 9, positional differences 99
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 selection state fields bool found;,nw4r::lyt::Group* group;,const char* name;: 197/195 instructions; structural 9, positional differences 99
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 selection state fields nw4r::lyt::Group* group;,const char* name;,bool found;: 195/195 instructions; structural 0, positional differences 31
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 selection state fields nw4r::lyt::Group* group;,bool found;,const char* name;: 195/195 instructions; structural 0, positional differences 31
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 group and numeric language state: 195/195 instructions; structural 0, positional differences 4
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 group and language name state: 195/195 instructions; structural 0, positional differences 28
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 group and found flag state: 195/195 instructions; structural 0, positional differences 31
- DrawFrame diagnosis:376/376,same0xe0 frame,float schedule and branch skeleton; flip-table pointer consumes r31 in ours and r21 in target, shifting saved arguments. Explore texture helper formal-parameter/declaration boundaries before register-only order search.
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 texture size copy before flip info: 376/376 instructions; structural 0, positional differences 119
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 groups use scalar name lookup before visibility branch: 195/195 instructions; structural 2, positional differences 6
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 group pointer recovered from reference expression: 195/195 instructions; structural 0, positional differences 4
- setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object / r5 explicit bool for fallback string comparison: 195/195 instructions; structural 0, positional differences 4
- Zi8getKeyLayout diagnosis:182/182,same stack,temporaries,branches and operands; language/tableCount exchanged between r26/r27. Explore read-only parameter qualifiers and a coherent table-read state; actual unit -O flags verified.
- Zi8getKeyLayout / r5 read-only language parameter: 182/182 instructions; structural 0, positional differences 16
- Zi8getKeyLayout / r5 read-only work pointer parameter: 182/182 instructions; structural 0, positional differences 16
- Zi8getKeyLayout / r5 table count and data address in read state: 190/182 instructions; structural 34, positional differences 156
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 texture helper flip second formal argument: 376/376 instructions; structural 0, positional differences 119
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 texture helper flip first formal argument: 376/376 instructions; structural 0, positional differences 119
- Zi8ConvertUC2Key diagnosis:207/207,same frame/control flow; work pointer and key swapped between r27/r28. Probe qualified parameters, semantic return-key type and an explicit work-context local before declaration search.
- Zi8ConvertUC2Key / r5 read-only language and work parameters: 207/207 instructions; structural 0, positional differences 18
- Zi8ConvertUC2Key / r5 key uses return-character typedef: 207/207 instructions; structural 0, positional differences 18
- Zi8ConvertUC2Key / r5 explicit work-context local for conversion calls: 213/207 instructions; structural 26, positional differences 206
- NHTTPi_SocRecv_sub / r5 buffer source derived directly from connection field: 68/67 instructions; structural 5, positional differences 35
- NHTTPi_SocRecv_sub / r5 clamp copy length through conditional expression: 67/67 instructions; structural 0, positional differences 0; EXACT candidate retained
- NHTTPi_SocRecv_sub / r5 received count assigned while selecting copy size: 67/67 instructions; structural 2, positional differences 28
- NHTTPi_SocRecv_sub / r5 receive buffer pointer const-qualified: 67/67 instructions; structural 0, positional differences 4
- Recv_sub exact: replacing the imperative clamp with a conditional assignment preserves67/67 and all branches, while changing expression scheduling to the target load/move order. No pointer alias, padding, assembly or qualifiers retained. Quick gate reports9/10, no regressions/forbidden/readability findings.
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] pool: IDENTICAL
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] objdiff: code 1968/2140 data None/None functions 9/10 fuzzy 99.6262 linked code 0
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] instruction-exact functions: 9/10
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] section .text size 2140 match 99.62617
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] below 100: NHTTPi_SocSend 95.34884
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] baseline: code 1700/2140 data None functions 8 fuzzy 99.5701
regressions vs baseline: 0
global matched_code_percent: 88.92459 -> 88.93354
global fuzzy_match_percent: 99.48913 -> 99.48917
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.06781 -> 99.06781
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
- NHTTPi_SocSend / r5 post-call request alias saved after SSL id load: 43/43 instructions; structural 2, positional differences 3
- NHTTPi_SocSend / r5 post-call errors classified with switch: 45/43 instructions; structural 10, positional differences 23
- NHTTPi_SocSend / r5 SSL retry errors expressed as bounded range: 44/43 instructions; structural 8, positional differences 22
- NHTTPi_SocSend / r5 error classifier inline helper boundary: 43/43 instructions; structural 2, positional differences 3
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 ordinary SDK fatal-color initializer emission: 376/376 instructions; structural 0, positional differences 119
- Data emission diagnostic: standard SDK assertion emits .sdata2 44 bytes: ffffff00ffffff00ffffff00ffffff00ffffff000000000043300000000000004330000080000000ffffff00; temporary object retained only in /tmp, original source restored.
- lyt_window emission proof: target GetVtxColorElement,SetVtxColorElement,DrawFrame4/8,GetVtxColor,SetVtxColor load five distinct literal RGBA quartets at.sdata2 offsets0,4,8,12,16; GetFrameMaterial loads named scLytFatalColorR/G/B/A at40..43. Ordinary SDK GXColor literal initializers reproduce the five anonymous quartets; named channels remain used by GetFrameMaterial and their definitions follow that use, reproducing offset40. The original global-assert body is preserved; no volatile cast added and none of its original cast lines changed. No new named objects, labels, padding or metadata changes. All first44 data bytes now equal target; target's four trailing unowned alignment bytes remain unowned (extent fixed last round). Source section44 vs target48 remains natural compiler/extraction alignment, objdiff now316/316 data.
- Standard SDK assertion alone reproduces all anonymous data and20 instruction-exact functions, but removes target's named-channel relocation identities. A named-channel initializer without the existing assert body folds into immediates and regresses GetFrameMaterial. Retained variant uses literal asserts for ordinary getters/helpers and the existing global assert only for GetFrameMaterial, as target relocations prove. Code/data names remain consistent and gate has zero regressions.
### lyt_window data gate
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 316/316 functions 20/21 fuzzy 99.7586 linked code 0
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 268 functions 20 fuzzy 99.7586
regressions vs baseline: 0
global matched_code_percent: 88.92459 -> 88.93354
global fuzzy_match_percent: 99.48913 -> 99.48917
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.06781 -> 99.07044
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 vertex-color setup flag type bool: 376/376 instructions; structural 0, positional differences 119
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 vertex-color setup flag type const u8: 379/376 instructions; structural 5, positional differences 356
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 vertex-color setup flag type const u32: 379/376 instructions; structural 4, positional differences 357
- NHTTPi_SocSend / r5 socket first SSL writer else branch: 43/43 instructions; structural 6, positional differences 11
- NHTTPi_SocSend / r5 negative error returned by conditional expression: 52/43 instructions; structural 24, positional differences 36
- NHTTPi_SocSend / r5 SSL enabled flag controls writer selection: 43/43 instructions; structural 2, positional differences 3
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 default color elements explicitly constructed: 376/376 instructions; structural 0, positional differences 119
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 white color elements initialized from packed RGBA: 376/376 instructions; structural 0, positional differences 119
- DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc / r5 white color elements initialized from channels: 384/376 instructions; structural 90, positional differences 383
- Zi8getKeyLayout / r5 semantic local names {'language': 'languageIndex'}: 182/182 instructions; structural 0, positional differences 16
- Zi8getKeyLayout / r5 semantic local names {'tableCount': 'characterTotal'}: 182/182 instructions; structural 0, positional differences 16
- Zi8getKeyLayout / r5 semantic local names {'language': 'languageIndex', 'tableCount': 'characterTotal'}: 182/182 instructions; structural 0, positional differences 16
- Zi8ConvertUC2Key / r5 semantic local names {'language': 'languageIndex'}: 207/207 instructions; structural 0, positional differences 18
- Zi8ConvertUC2Key / r5 semantic local names {'key': 'resultKey'}: 207/207 instructions; structural 0, positional differences 18
- Zi8ConvertUC2Key / r5 semantic local names {'key': 'resultKey', 'entry': 'conversionEntry'}: 207/207 instructions; structural 0, positional differences 18
### HIGH final open-function audit
- NHTTPi_SocRecv_sub now100%,67/67,ctxdiff diffs0; no register search needed after expression-level clamp solved scheduling.
- NHTTPi_SocSend:10 distinct successful source variants this round; error-control flow, typed views, helper boundary, field address and deferred pointer alias fail to move the SSL load. Last declsearch two orders best(2,3), restored.43/43,0x10 frame,three scheduling differences.
- setLangPane:12 successful source variants; coherent selection-state members change colors/temporaries but do not reach target. Last corrected structural candidate declaration search23 orders best(0,4), original source restored; original remains97.18974%, structural candidate has only four group-pointer register differences. calcCursorAnim alreadyobjdiff100 is excluded from open functions; raw instruction-count discrepancy54 vs55 is the known branch normalization artifact.
- DrawFrame:10 successful variants of helper parameters, member declarations, flag types and palette construction; last declsearch52 orders best(0,119), restored preserving accepted data emission.376/376,0xe0 frame,register coloring remains.
- Zi8getKeyLayout:6 successful variants of qualifiers/state/local identifiers; last declsearch52 orders best(0,16), restored.182/182,only language/count coloring.
- Zi8ConvertUC2Key:6 successful variants of qualifiers/key type/work context/local identifiers; last correct six-declaration search36 orders best(0,18), restored.207/207,only work/key coloring.
- All remaining functions have at least three distinct successful attempts. No new symbol renames or extents in this round: all five owned units now have100% data; lyt_window anonymous literal and named-component relocation proof is recorded above. Weak inline/vtable objects left alone; no source suppressions or shared-header edits.
- Final advisory string-reference audit:90 matched functions,57 corresponding literal arguments checked, no candidates/errors/skips. Focused source diff passes whitespace check. No config or header edits in HIGH round.
## HIGH final full gate over all five units
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] pool: IDENTICAL
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] objdiff: code 1968/2140 data None/None functions 9/10 fuzzy 99.6262 linked code 0
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] instruction-exact functions: 9/10
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] section .text size 2140 match 99.62617
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] below 100: NHTTPi_SocSend 95.34884
[libs/RevoEX/src/nhttp/NHTTP_socket_RVL] baseline: code 1700/2140 data None functions 8 fuzzy 99.5701
[src/scene/channelSelect/iplChannelObj] pool: IDENTICAL
[src/scene/channelSelect/iplChannelObj] objdiff: code 10144/10924 data 2216/2216 functions 55/56 fuzzy 99.7993 linked code 0
[src/scene/channelSelect/iplChannelObj] instruction-exact functions: 54/56
[src/scene/channelSelect/iplChannelObj] section .data size 1240 match 100.0
[src/scene/channelSelect/iplChannelObj] section .rodata size 784 match 100.0
[src/scene/channelSelect/iplChannelObj] section .sdata size 120 match 100.0
[src/scene/channelSelect/iplChannelObj] section .sdata2 size 72 match 100.0
[src/scene/channelSelect/iplChannelObj] section .text size 10924 match 99.79934
[src/scene/channelSelect/iplChannelObj] below 100: setLangPane__Q33ipl5scene10ChannelObjFPCQ33ipl6layout6Object 97.18974
[src/scene/channelSelect/iplChannelObj] baseline: code 10144/10924 data 2216 functions 55 fuzzy 99.7993
[libs/NW4R/src/lyt/lyt_window] pool: IDENTICAL
[libs/NW4R/src/lyt/lyt_window] objdiff: code 9848/11352 data 316/316 functions 20/21 fuzzy 99.7586 linked code 0
[libs/NW4R/src/lyt/lyt_window] instruction-exact functions: 20/21
[libs/NW4R/src/lyt/lyt_window] section .ctors size 4 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .data size 256 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sbss size 8 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .sdata2 size 48 match 100.0
[libs/NW4R/src/lyt/lyt_window] section .text size 11352 match 99.75864
[libs/NW4R/src/lyt/lyt_window] below 100: DrawFrame__Q34nw4r3lyt6WindowFRCQ34nw4r4math4VEC2RCQ44nw4r3lyt6Window5FrameRCQ34nw4r3lyt15WindowFrameSizeUc 98.17819
[libs/NW4R/src/lyt/lyt_window] baseline: code 9848/11352 data 268 functions 20 fuzzy 99.7586
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] objdiff: code 1488/2216 data 60/60 functions 3/4 fuzzy 99.8466 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] instruction-exact functions: 3/4
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section .text size 2216 match 99.84657
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section extab size 24 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section extabindex size 36 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] below 100: Zi8getKeyLayout 99.53297
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] baseline: code 1488/2216 data 60 functions 3 fuzzy 99.8466
[libs/RVLMiddleware/eZiText/src/clib/zconvert] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zconvert] objdiff: code 1380/2208 data 112/112 functions 3/4 fuzzy 99.8370 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] instruction-exact functions: 3/4
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section .rodata size 32 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section .text size 2208 match 99.83696
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section extab size 32 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section extabindex size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] below 100: Zi8ConvertUC2Key 99.565216
[libs/RVLMiddleware/eZiText/src/clib/zconvert] baseline: code 1380/2208 data 112 functions 3 fuzzy 99.8370
regressions vs baseline: 0
global matched_code_percent: 88.92459 -> 88.93354
global fuzzy_match_percent: 99.48913 -> 99.48917
global complete_code_percent: 65.19670 -> 65.19670
global matched_data_percent: 99.06781 -> 99.07044
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Before -> after instruction-exact functions / objdiff matched code bytes / matched data bytes:
- NHTTP_socket_RVL:8/10->9/10 /1700->1968 /no data symbols. Clean rebuild Recv_sub67/67,ctxdiff diffs0.
- iplChannelObj:54/56->54/56 raw instruction counter (55/56->55/56 objdiff) /10144->10144 /2216->2216.
- lyt_window:20/21->20/21 /9848->9848 /268->316. All owned data now100%; first44 literal/named-channel bytes exactly match target, trailing target alignment remains unowned.
- zmtkey:3/4->3/4 /1488->1488 /60->60.
- zconvert:3/4->3/4 /1380->1380 /112->112.
Remaining: NHTTPi_SocSend95.34884%,SSL-load scheduling; setLangPane97.18974%,original structural mismatch with corrected candidate still four pointer-register differences; DrawFrame98.17819%,119 register differences; Zi8getKeyLayout99.53297%,language/count register swap; Zi8ConvertUC2Key99.565216%,work/key register swap. All have at least three distinct successful source attempts logged in HIGH round. None of the fuzzy-only experiments retained. No unsupported symbol-name/type changes, unused objects or shared-header effects.
Changed source paths:libs/RevoEX/src/nhttp/NHTTP_socket_RVL.c (c1b4f01d),libs/NW4R/src/lyt/lyt_window.cpp (218a0d5d),plus tools/decomp-assist/fz2.attempts.md. Both source improvements were committed after their quick GATE PASS; this final full gate independently verifies all five units, zero regressions, correct DOL hash, zero forbidden patterns and zero readability warnings. Remaining compiler coloring/scheduling solutions are unknown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,457 @@
# fz21, zi8cgetc
Baseline source equals fetched origin/main at start. Object build succeeded; pool_diff reports identical empty narrow-string pools. Fresh objdiff: 5/8 exact functions, code 4168/47816, data 144/536. Open functions in address order: ZiMatchZHSpelling, zi8InternalGetZH, Zi8GetElementCount.
Structural diagnosis: ZiMatchZHSpelling 121/121 instructions, same frame/branches/stack offsets, 29 register-only differences. Zi8GetElementCount 115/115 instructions, same frame/branches/stack offsets, 13 register-only differences. Engine has matching instruction count but displaced control flow and stack/local differences; inspect the first structural divergence before allocation.
Data audit: named ziTones/ziPuncts/zi8tones already pair exactly, 24/24 bytes. extab/extabindex pair exactly, 120/120 bytes. Remaining 392 bytes are four compiler-generated switch tables, source @2795/@2794/@2793/@2792 at offsets 0/44/88/248, target jumptable_8166AA88/8166AAB4/8166AAE0/8166AB80 with sizes 44/44/160/144. No extent error or user-defined symbol rename exists; generated table labels are unstable compiler internals and entries relocate into the unmatched engine. No symbols.txt changes justified.
- s01 ZiMatchZHSpelling: scope result and candidate length as named match state; insns 126/121, structural/exact diffs (27, 117), fuzzy 93.380165, data 24. Restored pending gates.
- s02 ZiMatchZHSpelling: count candidate before initializing result; insns 121/121, structural/exact diffs (2, 30), fuzzy 97.19009, data 144. Restored pending gates.
- s03 ZiMatchZHSpelling: make leading spelling scan pointer-based; insns 124/121, structural/exact diffs (35, 113), fuzzy 87.75207, data 24. Restored pending gates.
- s04 ZiMatchZHSpelling: declare incoming candidate pointer immutable; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, data 144. Restored pending gates.
- s05 ZiMatchZHSpelling: initialize both spaced buffers through one chained assignment; insns 120/121, structural/exact diffs (5, 96), fuzzy 97.95868, data 72. Restored pending gates.
- s06 ZiMatchZHSpelling: test spellingLength before candidate pointer; insns 121/121, structural/exact diffs (4, 31), fuzzy 97.14876, data 144. Restored pending gates.
- s07 ZiMatchZHSpelling: keep candidate length in a named single-field state; insns 122/121, structural/exact diffs (22, 85), fuzzy 97.66942, data 24. Restored pending gates.
- s08 ZiMatchZHSpelling: keep match result in a named single-field state; insns 125/121, structural/exact diffs (31, 119), fuzzy 94.900826, data 24. Restored pending gates.
- s09 ZiMatchZHSpelling: use one spelling-buffer aggregate; insns 121/121, structural/exact diffs (33, 40), fuzzy 98.71075, data 144. Restored pending gates.
- s10 ZiMatchZHSpelling: scope candidate character count initialization in declaration; insns 121/121, structural/exact diffs (2, 30), fuzzy 97.19009, data 144. Restored pending gates.
- s11 ZiMatchZHSpelling: set mismatch result through conditional expression; insns 124/121, structural/exact diffs (16, 116), fuzzy 95.6033, data 24. Restored pending gates.
- s12 ZiMatchZHSpelling: return successful constant after successful phonetic traversal; insns 120/121, structural/exact diffs (7, 53), fuzzy 96.07438, data 72. Restored pending gates.
- g01 zi8InternalGetZH: split charset helper into scoped byte local after short-circuit input test; insns 10679/10676, structural/exact diffs (10275, 10604), fuzzy 93.25862, data 24. Restored pending gates.
- g02 zi8InternalGetZH: use explicit else-if charset helper branch; insns 10675/10676, structural/exact diffs (7283, 9381), fuzzy 95.689865, data 72. Restored pending gates.
- g03 zi8InternalGetZH: test charset mask through a switch; insns 10676/10676, structural/exact diffs (8992, 10094), fuzzy 95.6805, data 144. Restored pending gates.
- g04 zi8InternalGetZH: use readonly options view for engine input; BUILD FAIL put, work)) goto engine_finish;
# Error: ^
# (10209) illegal implicit conversion from 'const struct *' to
# 'struct *'
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
. Restored pending gates.
- g05 zi8InternalGetZH: make table-count presence comparisons explicit; insns 10676/10676, structural/exact diffs (9080, 10068), fuzzy 95.99054, data 144. Restored pending gates.
- c01 Zi8GetElementCount: use integer result count until byte return; insns 115/115, structural/exact diffs (2, 13), fuzzy 98.391304, data 144. Restored pending gates.
- c02 Zi8GetElementCount: test definition-level volatile separator hypothesis, rejected: target only saves across a helper call, so immediate reload evidence is absent; insns 117/115, structural/exact diffs (4, 107), fuzzy 97.608696, data 72. Restored pending gates.
- c03 Zi8GetElementCount: initialize result count before cursors as separate statements; insns 115/115, structural/exact diffs (2, 14), fuzzy 98.347824, data 144. Restored pending gates.
- c04 Zi8GetElementCount: group element indices as named cursor state; insns 138/115, structural/exact diffs (56, 136), fuzzy 69.791306, data 24. Restored pending gates.
- c05 Zi8GetElementCount: use unsigned integer element count parameter; BUILD FAIL 3) identifier 'Zi8GetElementCount(unsigned short *, unsigned char,
# unsigned char, void *)' redeclared as 'unsigned char (unsigned short *,
# unsigned int, unsigned char, void *)'
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
. Restored pending gates.
- c06 Zi8GetElementCount: use immutable input view for character reads; insns 116/115, structural/exact diffs (1, 109), fuzzy 98.391304, data 24. Restored pending gates.
- c07 Zi8GetElementCount: fold equal latin bound into range expression; insns 111/115, structural/exact diffs (10, 93), fuzzy 94.64348, data 72. Restored pending gates.
- c08 Zi8GetElementCount: count each consumed input at a common block before the branch; insns 115/115, structural/exact diffs (0, 14), fuzzy 99.26087, data 144. Restored pending gates.
- c09 Zi8GetElementCount: save separator in a one-element character array; insns 115/115, structural/exact diffs (0, 13), fuzzy 99.347824, data 144. Restored pending gates.
- c10 Zi8GetElementCount: save separator in a union field; insns 115/115, structural/exact diffs (0, 13), fuzzy 99.347824, data 144. Restored pending gates.
- c11 Zi8GetElementCount: use separate zero initialization in cursor traversal order; insns 115/115, structural/exact diffs (2, 14), fuzzy 98.347824, data 144. Restored pending gates.
- c12 Zi8GetElementCount: scan next spaced element with continue; insns 116/115, structural/exact diffs (8, 55), fuzzy 98.347824, data 72. Restored pending gates.
- c13 Zi8GetElementCount: retain byte result via explicit cast from integer count; insns 115/115, structural/exact diffs (2, 13), fuzzy 98.391304, data 144. Restored pending gates.
- c14 Zi8GetElementCount: use preincrement results consistently for input and result advances; insns 115/115, structural/exact diffs (0, 13), fuzzy 99.347824, data 144. Restored pending gates.
- s13 ZiMatchZHSpelling: use readonly spelling view in prefix comparison; insns 122/121, structural/exact diffs (7, 120), fuzzy 97.71901, data 24. Restored pending gates.
- s14 ZiMatchZHSpelling: use countdown prefix loop with independent byte index; insns 126/121, structural/exact diffs (32, 118), fuzzy 93.33058, data 72. Restored pending gates.
- s15 ZiMatchZHSpelling: place match result initialization next to its declaration; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, data 144. Restored pending gates.
- s16 ZiMatchZHSpelling: reverse operand order of prefix equality; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, data 144. Restored pending gates.
- s17 ZiMatchZHSpelling: use explicit unsigned phonetic index decrement; insns 122/121, structural/exact diffs (8, 69), fuzzy 97.80991, data 72. Restored pending gates.
- s18 ZiMatchZHSpelling: use early match return before phonetic fallback; insns 123/121, structural/exact diffs (4, 98), fuzzy 97.06612, data 72. Restored pending gates.
- g06 zi8InternalGetZH: use const options view in both private matching helpers; insns 10676/10676, structural/exact diffs (9080, 10068), fuzzy 95.99054, data 144. Restored pending gates.
- g07 zi8InternalGetZH: use unsigned sublanguage value for traditional-mask expression; insns 10676/10676, structural/exact diffs (9080, 10068), fuzzy 95.99054, data 144. Restored pending gates.
- g08 zi8InternalGetZH: initialize match aggregate explicitly before local engine initialization; insns 10669/10676, structural/exact diffs (10210, 10645), fuzzy 95.679375, data 72. Restored pending gates.
- g09 zi8InternalGetZH: separate phrase mask and value array initialization; insns 10694/10676, structural/exact diffs (10404, 10657), fuzzy 94.52595, data 24. Restored pending gates.
Declaration-order searches after structural diagnosis: ZiMatchZHSpelling, 52 built orders, best structural/exact (0,29); Zi8GetElementCount, 13 built orders, best (0,13). Neither kept source changes.
Coverage audit: all three remaining functions have at least three distinct successfully compiled source-level trials in this run. ZiMatchZHSpelling s01-s18, 18 compiled; zi8InternalGetZH g01-g03/g05-g09, 8 compiled plus rejected compile failure g04; Zi8GetElementCount c01-c04/c06-c14, 13 compiled plus rejected compile failure c05. All restored. Source byte-identical to the initial checkout; no gate-passing improvement or new exact function found. No source commit warranted.
Engine first instruction-count displacement is after traditional charset helper: source emits an extra mr before return-byte conversion in the case-2 branch. Scoped temporary, split branch and switch expression each worsened overall code or data. Const view did not change the output when propagated consistently. The target function extent ends precisely at Zi8NewMatchPhonetic; no overlap correction is justified.
Final full clean gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] objdiff: code 4168/47816 data 144/536 functions 5/8 fuzzy 96.4008 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] instruction-exact functions: 5/8
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .data size 392 match None
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .sbss2 size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .sdata2 size 16 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .text size 47816 match 96.40079
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section extab size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section extabindex size 72 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] below 100: ZiMatchZHSpelling 98.80165
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] below 100: zi8InternalGetZH 95.99054
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] below 100: Zi8GetElementCount 99.347824
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] baseline: code 4168/47816 data 144 functions 5 fuzzy 96.4008
regressions vs baseline: 0
global matched_code_percent: 89.97868 -> 89.97868
global fuzzy_match_percent: 99.54133 -> 99.54133
global complete_code_percent: 69.30851 -> 69.30851
global matched_data_percent: 99.36508 -> 99.36508
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Instruction-exact functions 5/8 -> 5/8; matched code 4168/47816 -> 4168/47816; matched data 144/536 -> 144/536. Full build and target DOL SHA1 pass; zero regressions and zero forbidden/readability additions. Exact-count increase and unit completion remain unmet. No commits. Only this attempts log changed.
# HIGH continuation, four units
Fresh origin fetch and object builds: owned sources equal origin/main. zi8cgetc exact 5/8, code 4168/47816, data 144/536; zmtkey 3/4, code 1488/2216, data 60/60; zconvert 3/4, code 1380/2208, data 112/112; tiPcKeyboard 140/141, code 28064/28484, data 18548/18564. Every unit's pool_diff passed before source work.
Structural diagnosis: getKeyLayout 182/182 instructions, language and tableCount r26/r27 swap only, 16 diffs; ConvertUC2Key 207/207, work/key r27/r28 swap only, 18 diffs. setTranslateMode has one extra initialization move, 106/105, otherwise identical operations. Target leaves its mapped-mode register undefined for out-of-enum inputs. Uninitialized values are forbidden, so retain defined behavior in every experiment. No definition-level volatile evidence in these three target functions. Symbol extents stop at their neighbours, no function-size correction justified.
- HIGH m01 Zi8getKeyLayout: declare builtin data as pointer to const; insns 182/182, structural/exact diffs (0, 16), fuzzy 99.53297, code 1488, data 60. Restored pending gates.
- HIGH m02 Zi8getKeyLayout: declare custom table as pointer to const; insns 182/182, structural/exact diffs (0, 16), fuzzy 99.53297, code 1488, data 60. Restored pending gates.
- HIGH m03 Zi8getKeyLayout: declare copied custom characters as pointer to const; insns 183/182, structural/exact diffs (5, 140), fuzzy 98.81868, code 1488, data 24. Restored pending gates.
- HIGH m04 Zi8getKeyLayout: use all three readonly table views; insns 183/182, structural/exact diffs (5, 140), fuzzy 98.81868, code 1488, data 24. Restored pending gates.
- HIGH m05 Zi8getKeyLayout: decode high byte before low byte in table output; insns 182/182, structural/exact diffs (6, 24), fuzzy 96.84066, code 1488, data 60. Restored pending gates.
- HIGH m06 Zi8getKeyLayout: place count and index in a single declaration; insns 182/182, structural/exact diffs (0, 16), fuzzy 99.53297, code 1488, data 60. Restored pending gates.
- HIGH m07 Zi8getKeyLayout: use explicit independent total for builtin character summation; insns 182/182, structural/exact diffs (2, 4), fuzzy 99.28571, code 1488, data 60. Restored pending gates.
- HIGH m08 Zi8getKeyLayout: read char count through a const local value; insns 181/182, structural/exact diffs (6, 63), fuzzy 98.65385, code 1488, data 24. Restored pending gates.
- HIGH v01 Zi8ConvertUC2Key: use const conversion range view; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH v02 Zi8ConvertUC2Key: use const conversion-entry view throughout table walk; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH v03 Zi8ConvertUC2Key: use const conversion table view; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH v04 Zi8ConvertUC2Key: use readonly mapped character array; insns 208/207, structural/exact diffs (13, 53), fuzzy 99.08212, code 1380, data 64. Restored pending gates.
- HIGH v05 Zi8ConvertUC2Key: use readonly views for all conversion inputs; insns 208/207, structural/exact diffs (13, 53), fuzzy 99.08212, code 1380, data 64. Restored pending gates.
- HIGH v06 Zi8ConvertUC2Key: use named key-result structure; BUILD FAIL are/eZiText/src/clib && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zconvert.d build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zconvert.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\eZiText\src\clib\zconvert.c # ------------------------------------------------------- # 129: ziU16 index, count, first, last; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. . Restored pending gates.
- HIGH v07 Zi8ConvertUC2Key: decode mapped key through independent const entry bytes; BUILD FAIL .py build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zconvert.d build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zconvert.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\eZiText\src\clib\zconvert.c # ------------------------------------------------------- # 157: const ziU8* keyBytes = (const ziU8*)table + key + (character - first) * 2 + 8; # Error: ^^^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. . Restored pending gates.
- HIGH v08 Zi8ConvertUC2Key: initialize key in fallback branches rather than before calls; insns 207/207, structural/exact diffs (4, 35), fuzzy 98.62319, code 1380, data 112. Restored pending gates.
- HIGH m09 Zi8getKeyLayout: use char-count storage for lookup validation before summation; insns 182/182, structural/exact diffs (2, 4), fuzzy 99.28571, code 1488, data 60. Restored pending gates.
- HIGH m10 Zi8getKeyLayout: test table availability directly, retain tableCount only for summation; insns 180/182, structural/exact diffs (6, 111), fuzzy 98.84615, code 1488, data 24. Restored pending gates.
- HIGH m11 Zi8getKeyLayout: initialize character total before loop then start key index independently; insns 182/182, structural/exact diffs (1, 16), fuzzy 99.23077, code 1488, data 60. Restored pending gates.
- HIGH m12 Zi8getKeyLayout: use lookup count storage with independent result sum and grouped locals; insns 182/182, structural/exact diffs (2, 4), fuzzy 99.28571, code 1488, data 60. Restored pending gates.
- HIGH m13 Zi8getKeyLayout: load lookup table count before conditional path selection; insns 182/182, structural/exact diffs (0, 22), fuzzy 99.36813, code 1488, data 60. Restored pending gates.
- HIGH m14 Zi8getKeyLayout: use signed halfword lookup and sum with unsigned reads; insns 182/182, structural/exact diffs (3, 16), fuzzy 98.62637, code 1488, data 60. Restored pending gates.
- HIGH k01 setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: map translation through a const input parameter; insns 106/105, structural/exact diffs (1, 99), fuzzy 99.04762, code 28064, data 18548. Restored pending gates.
- HIGH k02 setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: map mode with an inline lambda-free typed helper returning defined fallback; insns 107/105, structural/exact diffs (6, 89), fuzzy 98.0, code 27408, data 18548. Restored pending gates.
- HIGH k03 setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: initialize mapped mode to direct before explicit valid switch; insns 106/105, structural/exact diffs (1, 101), fuzzy 99.04762, code 28064, data 18548. Restored pending gates.
- HIGH k04 setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: select current ABC state as a defined invalid-input fallback; insns 106/105, structural/exact diffs (5, 97), fuzzy 95.2381, code 28064, data 18548. Restored pending gates.
- HIGH k05 setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: use signed mapped mode, preserve comparison conversion; insns 106/105, structural/exact diffs (1, 99), fuzzy 99.04762, code 28064, data 18548. Restored pending gates.
- HIGH k06 setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode: scope mapping and command input in an initialized mode-state aggregate; insns 106/105, structural/exact diffs (23, 101), fuzzy 87.48572, code 28064, data 18548. Restored pending gates.
- HIGH sH01 ZiMatchZHSpelling: initialize result before const candidate-length declaration; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, code 4168, data 144. Restored pending gates.
- HIGH sH02 ZiMatchZHSpelling: initialize result and candidate length in declaration order without const; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, code 4168, data 144. Restored pending gates.
- HIGH sH03 ZiMatchZHSpelling: declare function work pointer immutable; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, code 4168, data 144. Restored pending gates.
- HIGH sH04 ZiMatchZHSpelling: choose mismatch through a single equality after terminator guard; insns 123/121, structural/exact diffs (6, 109), fuzzy 97.06612, code 4168, data 72. Restored pending gates.
- HIGH sH05 ZiMatchZHSpelling: scope prefix scan index to the scan; insns 124/121, structural/exact diffs (10, 122), fuzzy 92.85124, code 4168, data 24. Restored pending gates.
- HIGH sH06 ZiMatchZHSpelling: short-circuit matching work after explicit prefix-success check; insns 121/121, structural/exact diffs (0, 29), fuzzy 98.80165, code 4168, data 144. Restored pending gates.
- HIGH v09 Zi8ConvertUC2Key: keep key in named initialized conversion result; BUILD FAIL b && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zconvert.d build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zconvert.d ### mwcceppc.exe Compiler: # File: libs\RVLMiddleware\eZiText\src\clib\zconvert.c # ------------------------------------------------------- # 133: result.result.key = 0; # Error: ^ # (10393) 'result' is not a member of class 'struct ' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed. . Restored pending gates.
- HIGH v10 Zi8ConvertUC2Key: read direct table character through separate readonly byte view; insns 213/207, structural/exact diffs (23, 207), fuzzy 93.87923, code 1380, data 32. Restored pending gates.
- HIGH v11 Zi8ConvertUC2Key: change key storage to unsigned int while retaining narrow uses; insns 205/207, structural/exact diffs (11, 130), fuzzy 98.333336, code 1380, data 64. Restored pending gates.
- HIGH v12 Zi8ConvertUC2Key: use signed key storage while retaining narrow uses; insns 205/207, structural/exact diffs (11, 130), fuzzy 98.333336, code 1380, data 64. Restored pending gates.
- HIGH v13 Zi8ConvertUC2Key: read big-endian key low byte before high byte; insns 207/207, structural/exact diffs (2, 22), fuzzy 98.54589, code 1380, data 112. Restored pending gates.
- HIGH v14 Zi8ConvertUC2Key: combine the two address steps for the table-selected key; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH v15 Zi8ConvertUC2Key: initialize result to key-not-found only in table paths; insns 208/207, structural/exact diffs (10, 139), fuzzy 98.115944, code 1380, data 64. Restored pending gates.
- HIGH cH01 Zi8GetElementCount: use unsigned-short result count with explicit byte read; insns 115/115, structural/exact diffs (2, 13), fuzzy 98.391304, code 4168, data 144. Restored pending gates.
- HIGH cH02 Zi8GetElementCount: preserve count as signed byte converted for return; insns 115/115, structural/exact diffs (2, 13), fuzzy 98.391304, code 4168, data 144. Restored pending gates.
- HIGH cH03 Zi8GetElementCount: use a const element-count input parameter; insns 115/115, structural/exact diffs (2, 13), fuzzy 98.391304, code 3548, data 72. Restored pending gates.
- HIGH cH04 Zi8GetElementCount: initialize result and spaced index as declarations before starting Latin scan; insns 115/115, structural/exact diffs (4, 57), fuzzy 97.565216, code 4168, data 144. Restored pending gates.
- HIGH cH05 Zi8GetElementCount: assign result count from completed element index at return; insns 115/115, structural/exact diffs (0, 1), fuzzy 99.95652, code 4168, data 144. Restored pending gates.
- HIGH cH06 Zi8GetElementCount: put spaced-character range test before decrement decision; insns 115/115, structural/exact diffs (4, 17), fuzzy 99.24348, code 4168, data 144. Restored pending gates.
- HIGH cH07 Zi8GetElementCount: count consumed inputs using a single increment at the common path; insns 114/115, structural/exact diffs (11, 32), fuzzy 97.91304, code 4168, data 72. Restored pending gates.
- HIGH vA01 Zi8ConvertUC2Key: name function work context as local view before calls; insns 213/207, structural/exact diffs (26, 206), fuzzy 95.019325, code 1380, data 64. Restored pending gates.
- HIGH vA02 Zi8ConvertUC2Key: make local context pointer immutable; insns 213/207, structural/exact diffs (26, 206), fuzzy 95.019325, code 1380, data 64. Restored pending gates.
- HIGH vA03 Zi8ConvertUC2Key: use local language identifier view before helper calls; insns 214/207, structural/exact diffs (70, 202), fuzzy 91.68116, code 1380, data 32. Restored pending gates.
- HIGH mA01 Zi8getKeyLayout: name function work context as local view before calls; insns 186/182, structural/exact diffs (10, 176), fuzzy 97.10439, code 1488, data 24. Restored pending gates.
- HIGH mA02 Zi8getKeyLayout: make local context pointer immutable; insns 186/182, structural/exact diffs (10, 176), fuzzy 97.10439, code 1488, data 24. Restored pending gates.
- HIGH mA03 Zi8getKeyLayout: use local language identifier view before helper calls; insns 186/182, structural/exact diffs (34, 180), fuzzy 97.2033, code 1488, data None. Restored pending gates.
- HIGH cH08 Zi8GetElementCount: return result count through byte conversion; insns 115/115, structural/exact diffs (1, 13), fuzzy 98.86957, code 4168, data 144. Restored pending gates.
- HIGH cH09 Zi8GetElementCount: return result count through a wider character conversion; insns 115/115, structural/exact diffs (1, 13), fuzzy 98.86957, code 4168, data 144. Restored pending gates.
- HIGH cH10 Zi8GetElementCount: use result count for remaining input loop bound; insns 115/115, structural/exact diffs (0, 14), fuzzy 99.304344, code 4168, data 144. Restored pending gates.
- HIGH cH11 Zi8GetElementCount: start the result count from the initialized element index; insns 115/115, structural/exact diffs (0, 14), fuzzy 99.304344, code 4168, data 144. Restored pending gates.
- HIGH cH12 Zi8GetElementCount: group element index and count initialization first; insns 115/115, structural/exact diffs (1, 14), fuzzy 98.82609, code 4168, data 144. Restored pending gates.
- HIGH cH13 Zi8GetElementCount: return explicit conditional count when input traversal completed; insns 121/115, structural/exact diffs (8, 27), fuzzy 94.13043, code 4168, data 72. Restored pending gates.
- HIGH cH14 Zi8GetElementCount: scope result count only around the spaced traversal; insns 119/115, structural/exact diffs (9, 114), fuzzy 91.9913, code 4168, data 24. Restored pending gates.
HIGH data audit: zmtkey and zconvert already 100% data. tiPcKeyboard has 16 unpaired .bss bytes: target lbl_810C6580 versus compiler-generated source @6381, source size 12. Relocations from sendInputWChar/onPressedCaps/onKey/updateInput/refreshState all pass this object as the third argument to __register_global_object. Runtime NMWException.h proves DestructorChain is three pointers, 12 bytes; target 16-byte extent includes four alignment bytes before layoutGatherDestructorRecord at 810C6590. The source symbol is a compiler-generated ordinal, not a real source-defined mangled name. No name change is justified under the allowed rename policy. Addresses and section totals remain untouched. Existing data/rodata/sdata/sdata2/sbss already match fully. zi8cgetc's remaining four switch tables target unmatched engine destinations; named ordinary data and exception tables pair fully.
- HIGH vV01 Zi8ConvertUC2Key: define table pointer volatile, target stw/lwz at 5b4/5b8 proves stack reload; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH vV02 Zi8ConvertUC2Key: define mapped pointer volatile, target stw/lwz at 7b8/7bc proves stack reload; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH vV03 Zi8ConvertUC2Key: define both proven stack-reloaded pointer locals volatile; insns 207/207, structural/exact diffs (0, 18), fuzzy 99.565216, code 1380, data 112. Restored pending gates.
- HIGH vV04 Zi8ConvertUC2Key: combine const mapped data view with proven volatile pointer storage; insns 208/207, structural/exact diffs (13, 53), fuzzy 99.08212, code 1380, data 64. Restored pending gates.
- HIGH mW01 Zi8getKeyLayout: store lookup/total as ziU32 with explicit original halfword reads; insns 180/182, structural/exact diffs (7, 116), fuzzy 98.07692, code 1488, data 24. Restored pending gates.
- HIGH mW02 Zi8getKeyLayout: store lookup/total as ziS32 with explicit original halfword reads; insns 180/182, structural/exact diffs (7, 116), fuzzy 98.07692, code 1488, data 24. Restored pending gates.
- HIGH mW03 Zi8getKeyLayout: store lookup/total as unsigned long with explicit original halfword reads; insns 180/182, structural/exact diffs (7, 116), fuzzy 98.07692, code 1488, data 24. Restored pending gates.
- HIGH mW04 Zi8getKeyLayout: store lookup/total as ziS16 with explicit original halfword reads; insns 182/182, structural/exact diffs (3, 16), fuzzy 98.62637, code 1488, data 60. Restored pending gates.
- HIGH mW05 Zi8getKeyLayout: use key-character count as unsigned int with narrow loop-bound read; insns 182/182, structural/exact diffs (6, 46), fuzzy 97.77473, code 1488, data 60. Restored pending gates.
- HIGH mW06 Zi8getKeyLayout: decode output as a const dictionary word pointer; insns 186/182, structural/exact diffs (12, 181), fuzzy 94.33517, code 1488, data None. Restored pending gates.
- HIGH gH01 zi8InternalGetZH: read traditional charset mask as a byte-valued result; insns 10676/10676, structural/exact diffs (9079, 10068), fuzzy 95.98117, code 4168, data 144. Restored pending gates.
- HIGH gH02 zi8InternalGetZH: express simplified charset flag test as two explicit early decisions; insns 10675/10676, structural/exact diffs (9194, 10136), fuzzy 95.68893, code 4168, data 72. Restored pending gates.
- HIGH gH03 zi8InternalGetZH: preserve charset masks using a scoped readonly helper result; insns 10679/10676, structural/exact diffs (10275, 10604), fuzzy 93.25862, code 4168, data 24. Restored pending gates.
- HIGH gH04 zi8InternalGetZH: use readonly charset lookup-table views; insns 10676/10676, structural/exact diffs (9080, 10068), fuzzy 95.99054, code 4168, data 144. Restored pending gates.
- HIGH gH05 zi8InternalGetZH: use unsigned ordinal table-count test; insns 10676/10676, structural/exact diffs (9080, 10068), fuzzy 95.99054, code 4168, data 144. Restored pending gates.
- HIGH gH06 zi8InternalGetZH: initialize first-pass phase flags adjacent to declarations; insns 10667/10676, structural/exact diffs (9769, 10419), fuzzy 95.17272, code 4168, data 24. Restored pending gates.
- HIGH gH07 zi8InternalGetZH: initialize only entry phase flags at their declaration, preserve every retry reset; insns 10676/10676, structural/exact diffs (9142, 10097), fuzzy 95.85847, code 4168, data 144. Restored pending gates.
- HIGH v16 Zi8ConvertUC2Key: use a named result field initialized after declarations; insns 212/207, structural/exact diffs (31, 206), fuzzy 95.521736, code 1380, data 32. Restored pending gates.
HIGH audit corrections: gH06 incorrectly removed later retry resets as well as entry assignments, so its measurement is invalid and excluded from distinct-attempt counts. gH07 repeats the intended change while preserving every later reset. v06/v07/v09 were compiler-rejected transformations; v16 corrects the result-field transformation. mW06 scoped the actual custom character pointer but left an unnecessary outer initialized pointer; restored and excluded, no such object retained.
cH05 increases fuzzy to 99.95652% and fixes the register allocation of the counters but returns elementIndex rather than count, leaving the count calculation dead. It still differs at its return instruction and would retain dead arithmetic solely for codegen. Rejected under source-quality requirements; not a candidate for a commit. The truthful source retains its returned count.
Proven volatile check revised: ConvertUC2Key does have immediate table-pointer and mapped-pointer store/reload pairs at target 5b4/5b8 and 7b8/7bc. Source already emits both. vV01-vV03 applied definition-level volatile only to those proven pointer objects; output remained 207/207 with the same 18 register differences. The const-data/volatile-pointer combination added an instruction and was restored.
HIGH declaration-order search Zi8GetElementCount:
```
declaration block:
ziU8 spacedIndex;
ziU8 elementIndex;
ziU8 count;
ziWChar spacedElements[256];
struct { ziWChar separator; } savedState;
start (0, 13)
best (0, 13) after 23 builds; source restored; best order was:
ziU8 spacedIndex;
ziU8 elementIndex;
ziU8 count;
ziWChar spacedElements[256];
struct { ziWChar separator; } savedState;
```
HIGH declaration-order search ZiMatchZHSpelling:
```
declaration block:
ziWChar* candidateCursor;
ziWChar* spellingCursor;
int index;
int matches;
int candidateLength;
ziWChar spacedSpelling[64];
ziWChar spacedCandidate[64];
start (0, 29)
best (0, 29) after 52 builds; source restored; best order was:
ziWChar* candidateCursor;
ziWChar* spellingCursor;
int index;
int matches;
int candidateLength;
ziWChar spacedSpelling[64];
ziWChar spacedCandidate[64];
```
HIGH declaration-order search Zi8getKeyLayout:
```
declaration block:
ziU16 tableCount;
ziU8 numKeys;
ziU8* dataAddress;
ziUserKeyMap* customTable;
ziU16 charCount;
ziU16 keyIndex;
ziWChar* keyChars;
start (0, 16)
best (0, 16) after 52 builds; source restored; best order was:
ziU16 tableCount;
ziU8 numKeys;
ziU8* dataAddress;
ziUserKeyMap* customTable;
ziU16 charCount;
ziU16 keyIndex;
ziWChar* keyChars;
```
HIGH declaration-order search Zi8ConvertUC2Key:
```
declaration block:
ziU16 key = 0;
ziU16 index, count, first, last;
ziConversionTable* table;
ziWChar* mapped;
ziConversionRange* ranges;
ziConversionEntry* entry;
start (0, 18)
best (0, 18) after 36 builds; source restored; best order was:
ziU16 key = 0;
ziU16 index, count, first, last;
ziConversionTable* table;
ziWChar* mapped;
ziConversionRange* ranges;
ziConversionEntry* entry;
```
HIGH data extent correction: lbl_810C6580 is the third argument to __register_global_object in six matched keyboard functions; Runtime/include/NMWException.h defines DestructorChain as three 4-byte pointers, so its real size is 12 bytes, not 16. Corrected only size 0x10 -> 0xC, same .bss address 810C6580, no name change. The following layoutGatherDestructorRecord remains at 810C6590. Four trailing alignment bytes stay unowned; validate that .bss section size remains 16. This is a type correction, not a function extent change or a match claim.
HIGH corrected extent verification: fresh extraction now records lbl_810C6580 size 12, .bss size still 16. tiPcKeyboard matched data increases 18548/18564 -> 18564/18564, all other section totals unchanged, code remains 28064/28484 and exact functions 140/141. No symbol rename or source trick was needed. This is the sole retained improvement.
HIGH completion audit: all six open functions received at least three distinct successfully compiled source trials. Every code candidate was restored. Four declaration-order searches covered 23/52/52/36 orders for GetElementCount/MatchZHSpelling/getKeyLayout/ConvertUC2Key, with no accepted ordering. The invalid gH06 transformation and mW06 unnecessary outer pointer are excluded. Compiler-rejected candidates are excluded. None of the six code functions became exact; all remain open. setTranslateMode cannot match this target using the tested defined fallbacks; target behavior for invalid enums remains unspecified, and no uninitialized source was introduced.
HIGH final full clean gate over all four units:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] objdiff: code 4168/47816 data 144/536 functions 5/8 fuzzy 96.4008 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] instruction-exact functions: 5/8
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .data size 392 match None
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .sbss2 size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .sdata2 size 16 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section .text size 47816 match 96.40079
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section extab size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] section extabindex size 72 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] below 100: ZiMatchZHSpelling 98.80165
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] below 100: zi8InternalGetZH 95.99054
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] below 100: Zi8GetElementCount 99.347824
[libs/RVLMiddleware/eZiText/src/clib/zi8cgetc] baseline: code 4168/47816 data 144 functions 5 fuzzy 96.4008
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] objdiff: code 1488/2216 data 60/60 functions 3/4 fuzzy 99.8466 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] instruction-exact functions: 3/4
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section .text size 2216 match 99.84657
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section extab size 24 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] section extabindex size 36 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] below 100: Zi8getKeyLayout 99.53297
[libs/RVLMiddleware/eZiText/src/clib/zmtkey] baseline: code 1488/2216 data 60 functions 3 fuzzy 99.8466
[libs/RVLMiddleware/eZiText/src/clib/zconvert] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zconvert] objdiff: code 1380/2208 data 112/112 functions 3/4 fuzzy 99.8370 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] instruction-exact functions: 3/4
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section .rodata size 32 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section .text size 2208 match 99.83696
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section extab size 32 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] section extabindex size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zconvert] below 100: Zi8ConvertUC2Key 99.565216
[libs/RVLMiddleware/eZiText/src/clib/zconvert] baseline: code 1380/2208 data 112 functions 3 fuzzy 99.8370
[src/keyboard/tiPcKeyboard] pool: IDENTICAL
[src/keyboard/tiPcKeyboard] objdiff: code 28064/28484 data 18564/18564 functions 140/141 fuzzy 99.9860 linked code 0
[src/keyboard/tiPcKeyboard] instruction-exact functions: 140/141
[src/keyboard/tiPcKeyboard] section .bss size 16 match 100.0
[src/keyboard/tiPcKeyboard] section .ctors size 4 match 100.0
[src/keyboard/tiPcKeyboard] section .data size 12576 match 100.0
[src/keyboard/tiPcKeyboard] section .rodata size 5816 match 100.0
[src/keyboard/tiPcKeyboard] section .sbss size 8 match 100.0
[src/keyboard/tiPcKeyboard] section .sdata size 136 match 100.0
[src/keyboard/tiPcKeyboard] section .sdata2 size 8 match 100.0
[src/keyboard/tiPcKeyboard] section .text size 28484 match 99.985954
[src/keyboard/tiPcKeyboard] below 100: setTranslateMode__Q49textinput8keyboard6pctype4BaseFQ59textinput8keyboard6pctype4Base13TranslateMode 99.04762
[src/keyboard/tiPcKeyboard] baseline: code 28064/28484 data 18548 functions 140 fuzzy 99.9860
regressions vs baseline: 0
global matched_code_percent: 90.32564 -> 90.32564
global fuzzy_match_percent: 99.55189 -> 99.55189
global complete_code_percent: 69.30851 -> 69.30851
global matched_data_percent: 99.36508 -> 99.36596
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
```
HIGH before -> after, instruction-exact/code/data bytes: zi8cgetc 5/4168/144 -> 5/4168/144; zmtkey 3/1488/60 -> 3/1488/60; zconvert 3/1380/112 -> 3/1380/112; tiPcKeyboard 140/28064/18548 -> 140/28064/18564. The gate passes, DOL SHA1 is exact, no regressions. The required instruction-exact count increase is still unmet. The retained data correction makes keyboard data 100% without changing section size or any code.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,537 @@
# fz8 attempts
Baseline a4c84cbf537becd2cf9931d2406601a18312d0c5
All owned data already exact; no symbol changes required.
libs/RevoEX/src/net/hmac POOL IDENTICAL up to 3 (mine=3 base=3)
libs/RevoEX/src/so/SOInformation POOL IDENTICAL up to 0 (mine=0 base=0)
libs/NW4R/src/ut/ut_ArchiveFontBase POOL IDENTICAL up to 0 (mine=0 base=0)
src/scene/setting/iplRakuRakuThread POOL IDENTICAL up to 1 (mine=1 base=1)
## NETHMACInit / NETHMACGetDigest
Diagnosis: same 0x60 Init frame; GetDigest target 105 instructions vs 102. Target makes a second context pointer at pad initialization, proving an inline helper boundary. Both loops otherwise have the same unroll and branch structure.
Attempt 1: shared BeginDigest inline helper owns its key buffer and context pointer. GetDigest reaches diffs 0, Init falls from 78 diffs to 2 literal offsets.
Attempt 2: inline WarnInterface parameter emits function-name literal first, fixes pool; leaves two swapped argument setup instructions.
Attempt 3: warning format temporary gives no scheduling change.
Attempt 4: scoped function-name temporary gives no scheduling change.
Attempt 5: use MWCC __FUNCTION__ for diagnostic name. Pool identical, Init 143/143 diffs 0; GetDigest 105/105 diffs 0.
## SOGetHostByName
Diagnosis: frames 0x30 and 80/80 instructions match; remaining initial 17 diffs are registers only. Length and result share a register in target.
Attempt 1: leading declaration search, 70 builds, reduces 17 diffs to 11.
Attempt 2: coalesce length and result source variable, remains 11 diffs.
Attempt 3: scoped request/reply declarations, 28 diffs; restored.
Attempt 4: inline GetHostReply helper isolates request bookkeeping. Passing rm by value adds an early load and saved register, 81/80; pointer parameter restores 80/80.
Attempt 5: declaration search over helper locals, 16 builds, reaches 80/80 diffs 0.
## SOGetAddrInfo
Diagnosis: frame 0x40 matches, 183/185 instructions. Null branches go the opposite direction, name length helpers and evaluation order differ; request/reply registers also swapped.
Attempt 1: null-aware NameSize, NameLength, ServiceSize helpers, 185/185 with 62 diffs.
Attempt 2: explicit null-first if/else and service evaluation first, 185/185 with 28 diffs.
Attempt 3: separate serviceLength/nodeLength before alignment expression, 185/185 with 24 register-only diffs.
Attempt 4: leading declaration search, 118 builds, no improvement at 24 diffs.
Attempt 5: inline GetAddressReply helper isolates allocation bookkeeping; 185/185 with 31 register-only diffs. Helper-local declaration search follows.
Attempt 6, SOGetAddrInfo: helper declaration search, 39 builds, reaches 185/185 diffs 0. Preserves retail service-size behavior using node strlen under service null check.
## RakuRakuThread::start / finish
Diagnosis: start 97/96, finish 135/133 with 0x20/0x30 frames. Target uses one BSS base for allocator, status, queue; ours loads separate addresses. Shared globals have correct names, offsets, extents and 456/456 exact data; no rename justified.
Attempt 1, both functions: define C-linkage objects directly instead of prior extern declarations. No instruction change; restored.
Attempt 2, both functions: explicit zero initialization on those objects. No instruction change; restored.
Attempt 3, both functions: file-local C-linkage objects. No instruction change; restored.
Attempt 4, finish: positive state-range if/else instead of early return. Correct branch direction, but 136/133 and BSS-base/frame differences remain; restored.
Additional start attempt: cache allocator pointer before state check; 98/96 instructions, structural/exact (8, 65); restored.
Additional start attempt: separate created heap local from member assignment; 97/96 instructions, structural/exact (13, 88); restored.
Additional start attempt: declare socket configuration before interrupt and time locals; 97/96 instructions, structural/exact (13, 88); restored.
Additional finish attempt: cache status pointer before state check; 132/133 instructions, structural/exact (19, 75); restored.
Additional finish attempt: explicit two-state comparison rather than range subtraction; 138/133 instructions, structural/exact (38, 133); restored.
Additional finish attempt: equality-bound key loops instead of less-than loops; 135/133 instructions, structural/exact (34, 127); restored.
## Owned data audit
libs/RevoEX/src/net/hmac: baseline matched_data 104 / 104; sections .data 100.0, .sdata 100.0. No unpaired owned data symbol; no rename or extent edit.
libs/RevoEX/src/so/SOInformation: baseline matched_data 0 / 0; sections . No unpaired owned data symbol; no rename or extent edit.
libs/NW4R/src/ut/ut_ArchiveFontBase: baseline matched_data 96 / 96; sections .data 100.0, .sbss2 100.0. No unpaired owned data symbol; no rename or extent edit.
src/scene/setting/iplRakuRakuThread: baseline matched_data 456 / 456; sections .bss 100.0, .data 100.0, .sbss 100.0, .sdata 100.0. No unpaired owned data symbol; no rename or extent edit.
Latest fetched origin/main b84b3c0d579c520be71051ce33d22965cab6965d.
libs/RevoEX/src/net/hmac.c: origin/main source unchanged from initial baseline = True.
libs/RevoEX/src/so/SOInformation.c: origin/main source unchanged from initial baseline = True.
libs/NW4R/src/ut/ut_ArchiveFontBase.cpp: origin/main source unchanged from initial baseline = True.
src/scene/setting/iplRakuRakuThread.cpp: origin/main source unchanged from initial baseline = True.
## ConstructOpAnalyzeGLGR
Diagnosis: 239/239 instructions, same frame and loop/branch forms. Offset calculation scheduling differs at instructions 109-147; later register and pointer-add operand order differences. All 96 data bytes already exact.
Attempt 1: inline analyzeGroups helper around second phase; 238/239 until local pGlgr recomputation restored 239/239, structural 22 / exact 120, rejected.
Attempt 2: inline getOffsetSize scratch allocator; 239/239 structural 22 / exact 104, rejected.
Attempt 3: leading local declaration search; first 13 builds unchanged, then moved metadata locals to top and searched. No structural improvement.
Attempt 4: permute independent metadata, scratch and flags calculation statement blocks to diagnose scheduling.
Calculation order ('blocks', 'glyphs', 'scratch', 'step', 'flags'): 239/239, structural/exact (22, 99).
Calculation order ('blocks', 'glyphs', 'step', 'scratch', 'flags'): 239/239, structural/exact (19, 99).
Attempt 3 completed 577 declaration builds; best structural/exact 22/73, restored. Attempt 4 completed 120 statement orders; best 19/99, not exact.
Attempt 5 variant cache workspace before metadata: 239/239, structural/exact (25, 99).
Attempt 5 variant cache workspace after count: 239/239, structural/exact (25, 99).
Attempt 5 variant cache workspace before scratch: 239/239, structural/exact (19, 99).
Attempt 5 variant reverse commutative pointer operands: 239/239, structural/exact (19, 99).
Attempt 5 variant size flags before scratch declaration set 0: 239/239, structural/exact (19, 99).
Attempt 5 variant offset flags before scratch declaration set 0: 239/239, structural/exact (19, 99).
Attempt 5 variant size flags before scratch declaration set 1: 239/239, structural/exact (19, 72).
All ArchiveFontBase experiments restored. No additional instruction-exact function; remaining scheduling differences are structural, not solely register names.
## Completion audit before final gate
NETHMACInit and NETHMACGetDigest exact, 143/143 and 105/105 with diffs 0.
SOGetHostByName and SOGetAddrInfo exact, 80/80 and 185/185 with diffs 0.
Remaining ConstructOpAnalyzeGLGR has five logged experiment groups, including inline boundaries, scratch allocation, 577 declaration builds, 120 statement orders, workspace caches and operand reversals.
Remaining RakuRakuThread::start has six distinct logged source attempts. Remaining finish has seven. No function remains untried.
Only hmac.c, SOInformation.c and this attempts log retained changes. No configure.py, shared header or symbol changes.
## Final full gate
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/net/hmac] pool: IDENTICAL
[libs/RevoEX/src/net/hmac] objdiff: code 1008/1008 data 104/104 functions 3/3 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/net/hmac] instruction-exact functions: 3/3
[libs/RevoEX/src/net/hmac] section .data size 88 match 100.0
[libs/RevoEX/src/net/hmac] section .sdata size 16 match 100.0
[libs/RevoEX/src/net/hmac] section .text size 1008 match 100.0
[libs/RevoEX/src/net/hmac] baseline: code 16/1008 data 104 functions 1 fuzzy 91.6984
[libs/RevoEX/src/so/SOInformation] pool: IDENTICAL
[libs/RevoEX/src/so/SOInformation] objdiff: code 1280/1280 data None/None functions 4/4 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/so/SOInformation] instruction-exact functions: 4/4
[libs/RevoEX/src/so/SOInformation] section .text size 1280 match 100.0
[libs/RevoEX/src/so/SOInformation] baseline: code 220/1280 data None functions 2 fuzzy 92.9969
[libs/NW4R/src/ut/ut_ArchiveFontBase] pool: IDENTICAL
[libs/NW4R/src/ut/ut_ArchiveFontBase] objdiff: code 4164/5120 data 96/96 functions 22/23 fuzzy 98.1398 linked code 0
[libs/NW4R/src/ut/ut_ArchiveFontBase] instruction-exact functions: 22/23
[libs/NW4R/src/ut/ut_ArchiveFontBase] section .data size 88 match 100.0
[libs/NW4R/src/ut/ut_ArchiveFontBase] section .sbss2 size 8 match 100.0
[libs/NW4R/src/ut/ut_ArchiveFontBase] section .text size 5120 match 98.13985
[libs/NW4R/src/ut/ut_ArchiveFontBase] below 100: ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader 90.03766
[libs/NW4R/src/ut/ut_ArchiveFontBase] baseline: code 4164/5120 data 96 functions 22 fuzzy 98.1398
[src/scene/setting/iplRakuRakuThread] pool: IDENTICAL
[src/scene/setting/iplRakuRakuThread] objdiff: code 1252/2168 data 456/456 functions 12/14 fuzzy 94.6900 linked code 0
[src/scene/setting/iplRakuRakuThread] instruction-exact functions: 12/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 94.69004
[src/scene/setting/iplRakuRakuThread] below 100: start__Q33ipl5scene14RakuRakuThreadFv 88.635414
[src/scene/setting/iplRakuRakuThread] below 100: finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi 86.56391
[src/scene/setting/iplRakuRakuThread] baseline: code 1252/2168 data 456 functions 12 fuzzy 94.6900
regressions vs baseline: 0
global matched_code_percent: 88.70241 -> 88.77092
global fuzzy_match_percent: 99.47499 -> 99.48078
global complete_code_percent: 63.54459 -> 63.54459
global matched_data_percent: 98.77142 -> 98.77142
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
libs/RevoEX/src/net/hmac: matched_functions 1 -> 3, matched_code 16 -> 1008, matched_data 104 -> 104
libs/RevoEX/src/so/SOInformation: matched_functions 2 -> 4, matched_code 220 -> 1280, matched_data 0 -> 0
libs/NW4R/src/ut/ut_ArchiveFontBase: matched_functions 22 -> 22, matched_code 4164 -> 4164, matched_data 96 -> 96
src/scene/setting/iplRakuRakuThread: matched_functions 12 -> 12, matched_code 1252 -> 1252, matched_data 456 -> 456
NETHMACInit src 0x23c base 0x23c insns 143/143; diffs 0: [];
NETHMACGetDigest src 0x1a4 base 0x1a4 insns 105/105; diffs 0: [];
SOGetHostByName src 0x140 base 0x140 insns 80/80; diffs 0: [];
SOGetAddrInfo src 0x2e4 base 0x2e4 insns 185/185; diffs 0: [];
Final gate PASS; zero regressions, zero net forbidden patterns, zero readability warnings. Full DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
# fz8 followup round
Baseline 2cc9824045aee4d546a31b5859a7cfe480d8c75e
libs/NW4R/src/ut/ut_ArchiveFontBase POOL IDENTICAL up to 0 (mine=0 base=0)
src/scene/setting/iplRakuRakuThread POOL IDENTICAL up to 1 (mine=1 base=1)
libs/RVL_SDK/src/fa/pf_cluster POOL IDENTICAL up to 0 (mine=0 base=0)
libs/RevoEX/src/nhttp/NHTTP_thread POOL IDENTICAL up to 8 (mine=8 base=8)
libs/MSL/src/MSL_Common/wprintf POOL IDENTICAL up to 0 (mine=0 base=0)
libs/RevoEX/src/cdb/CDBRecord FIRST DIVERGENCE at index 10
8 mine=0x1b0 base=0x1b0
M "can't get file size of the record ; the record is closed\n"
B "can't get file size of the record ; the record is closed\n"
9 mine=0x1ec base=0x1ec
M "can't get data size of the record ; the record is closed\n"
B "can't get data size of the record ; the record is closed\n"
* 10 mine=0x228 base=0x228
M "can't remove the record ; the record is opened\n"
B "can't reduce file size of the record ; the record is closed\n"
* 11 mine=0x258 base=0x268
M "can't remove the record ; permission denied\n"
B "can't reduce file size of the record ; the record is opened as READONL"
* 12 mine=0x288 base=0x2b8
M "can't get CDBId of the record ; the record is closed\n"
B "can't reduce file size of the record ; file size must be over %d bytes"
* 13 mine=0x2c0 base=0x300
M "can't get maker code of the record ; the record is closed\n"
B "can't reduce data size of the record ; the record is closed\n"
* 14 mine=0x2fc base=0x340
M "can't set modified time of the record; the database is opened as READO"
B "can't reduce data size of the record ; the record is opened as READONL"
mine has 19 strings, base has 47
## Followup PFCLUSTER_DeleteCluster
Pool empty, 108/108 and same frame, normalized structural 0. Remaining 35 differences are register choices. Declaration search 71 builds unchanged.
Attempt 2: real inline deleteCluster helper, permuting helper argument declaration and call order together while preserving public ABI.
Helper argument order ('p_iter', 'p_ent', 'cluster_index', 'num_clusters', 'p_deleted_clusters'): 108/108, structural/exact (11, 53)
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | socket allocator aggregate initialization | 95/96 instructions, structural/exact (17, 87) | restored
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | restore interrupts through success branch | 97/96 instructions, structural/exact (18, 90) | restored
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | time sampled before interrupt local initialized | 97/96 instructions, structural/exact (13, 88) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | separate deleted byte count from cluster-count argument | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | typed iterator and entry aliases | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | local rounded deleted-cluster count before output store | 107/108 instructions, structural/exact (8, 49) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | long conversion-length local rather than int | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | separate narrow string-length local from wide output length | 593/593 instructions, structural/exact (2, 170) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | count-output pointer has independent scope | 593/593 instructions, structural/exact (0, 98) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | configuration switch instead of security if ladder | 138/133 instructions, structural/exact (53, 130) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | share key-loop index across security branches | 135/133 instructions, structural/exact (34, 127) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | inline configuration-copy boundary | 134/133 instructions, structural/exact (41, 98) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | read group metadata through parsed header pointer | 239/239 instructions, structural/exact (32, 98) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | typed end and start pointers for scratch allocation | 239/239 instructions, structural/exact (22, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | sheet-flag helper takes stride before flag pointer | 239/239 instructions, structural/exact (22, 99) | restored
## Followup CDB data and code
First pool divergence at 0x228 is missing ReduceFileSize diagnostics. Target 47 strings vs source 19; existing target .data total 2496 retained. Missing strings come from dead-stripped reduction, setter/getter, duplication and owner functions, not misnamed equivalent objects. No surviving reduction body or backing truncation API located. No rename/extent change justified. CDBCryptBuffer has only three literal offsets different; source experiments below cannot fill the missing earlier pool.
libs/RevoEX/src/cdb/CDBRecord CDBCryptBuffer | for-loop owns chunk offset advancement | 119/119 instructions, structural/exact (3, 3) | restored
libs/RevoEX/src/cdb/CDBRecord CDBCryptBuffer | name the AES operation success result | 119/119 instructions, structural/exact (3, 3) | restored
libs/RevoEX/src/cdb/CDBRecord CDBCryptBuffer | typed chunk pointer shared by input and output copies | 120/119 instructions, structural/exact (10, 76) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | declare data size before file size to match target stack slots | 283/284 instructions, structural/exact (21, 89) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | save tell position only on successful tell result | 283/284 instructions, structural/exact (24, 92) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | cache authenticated byte count before SHA interface call | 284/284 instructions, structural/exact (9, 53) | restored
## Followup NHTTPi_ThreadParseHeaderProc
Pool identical 504/504 data. Same frame and 191/191 initially; the sole structural difference is zero held in a saved register across Keep-Alive comparison. Request/base registers differ too.
Attempt 1: local keepAlive initialized false, conditional assignment and shared store: 189/191, rejected.
Attempt 2: local false only in false branch: identical 191/191, 20 diffs, rejected.
Attempt 3: local boolean through complete length branch: 186/191, comparison lowered to cntlzw, rejected.
Attempt 4: leading locals separated from initialization; declaration search 71 builds, structural/exact 3/20 unchanged.
Attempt 5: real inline connection-header parser: 196/191, additional success-result branches, rejected.
## Followup __wpformatter
Pool identical 836/836 data. Same frame and 593/593, structural 0; 98 register differences, including num_chars, write callback/data, constant bases and count-output pointer.
Attempt 1: independent count destination scope: unchanged 98 diffs.
Attempt 2: split leading locals and declaration search, 71 builds: unchanged 98 diffs.
Attempt 3: conversion length long instead of int: unchanged 98 diffs.
Attempt 4: separate narrow string conversion length: structural/exact 2/170, rejected.
Attempt 5: count destination declared at function entry: unchanged 98 diffs.
Attempt 6: inline count-output store helper: unchanged 98 diffs.
CDBRecordEncrypt combined stack-slot, successful tell assignment and cached authenticated length: 284/284 instructions, structural/exact 0/44. Leading declaration search 71 builds unchanged; remaining differences are registers.
CDBRecordEncrypt genuine encryptRecord inline helper; 1 parameter-order variants; best structural/exact (0, 44); restored combined structural candidate
encryptRecord helper first invocation selected a forward declaration and failed compilation; corrected definition extraction before testing.
CDBRecordEncrypt genuine encryptRecord inline helper; 120 parameter-order variants; best structural/exact (0, 44); restored combined structural candidate
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | inline Keep-Alive token boolean return | 189/191 instructions, structural/exact (16, 72) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | initialize fallback before comparison: BOOL keepAlive = FALSE | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | initialize fallback before comparison: BOOL keepAlive | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline attribute helpers (0,) | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline attribute helpers (1,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline attribute helpers (2,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline attribute helpers (0, 1, 2) | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attribute pointer lifetime variant 0 | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attribute pointer lifetime variant 1 | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attribute pointer lifetime variant 2 | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline file-operation boundaries (0,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline file-operation boundaries (1,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline file-operation boundaries (2,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline file-operation boundaries (3,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline file-operation boundaries (4,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | inline file-operation boundaries (0, 1, 2, 3, 4) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | structural named diagnostic pointers (0,) entry | 285/284 instructions, structural/exact (5, 276) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | structural named diagnostic pointers (0,) after_file | compile failed (C89 declaration after statement); restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | structural named diagnostic pointers (1,) entry | 285/284 instructions, structural/exact (5, 276) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | structural named diagnostic pointers (1,) after_file | compile failed (C89 declaration after statement); restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | structural named diagnostic pointers (0, 1) entry | 286/284 instructions, structural/exact (6, 270) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | structural named diagnostic pointers (0, 1) after_file | compile failed (C89 declaration after statement); restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attrhelper named diagnostic pointers (0,) entry | 285/284 instructions, structural/exact (5, 276) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attrhelper named diagnostic pointers (0,) after_file | compile failed (C89 declaration after statement); restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attrhelper named diagnostic pointers (1,) entry | 285/284 instructions, structural/exact (5, 276) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attrhelper named diagnostic pointers (1,) after_file | compile failed (C89 declaration after statement); restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attrhelper named diagnostic pointers (0, 1) entry | 286/284 instructions, structural/exact (6, 270) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | attrhelper named diagnostic pointers (0, 1) after_file | compile failed (C89 declaration after statement); restored
Final candidate keeps only three structural corrections in CDBRecordEncrypt (stack slots, tell success lifetime, HMAC input length evaluated before interface getter). Normalized instruction structure now identical, 44 register differences; helper variants were reverted to keep the source diff small. Exact-function count has not increased.
CDB quick gate: PASS; fuzzy code 97.19718% -> 99.19014% for Encrypt; 27/29 instruction-exact unchanged, data 144/2640 unchanged, regressions/forbidden/readability all zero.
## Followup completion audit
All eight open functions have at least three distinct, built source attempts above; no untried function remains.
Archive ConstructOpAnalyzeGLGR: parsed metadata, typed scratch bounds, helper argument boundary; remains structural 22 and total positional 99 differences.
Raku start: allocator aggregate, positive success branch, interrupt/time local ordering; finish: security switch, shared key-loop index, inline configuration boundary. Both retain shared target BSS addressing differences; finish additionally has a frame-size difference.
PFCLUSTER_DeleteCluster: separate deleted-byte count, typed aliases, rounded output local; 108/108, structural 0, register 35 differences.
NHTTP parse: initialized/shared boolean, false-branch local, full branch boolean; additional declaration/helper attempts. 191/191; zero's lifetime across comparison and base/request registers remain.
__wpformatter: count destination scope, declaration splitting/search, long length, independent narrow length, count-store helper; 593/593, structural 0, register 98 differences.
CDBCryptBuffer: for loop, named AES success, typed chunk pointer; 119/119, only three diagnostic literal offsets remain.
CDBRecordEncrypt: data/file local order, successful tell assignment, pre-call authenticated length; combined kept after quick gate. 284/284, structural 0, register 44 differences. Additional 120 helper argument orders and file/attribute helper boundaries did not match.
Owned data: Archive 96/96; Raku 456/456 including correctly named and sized BSS objects; cluster has no data; NHTTP 504/504; wprintf 836/836. CDB 144/2640: missing diagnostic pool from dead-stripped functions, not unpaired equivalent named symbols. No symbol rename or extent change justified; config unchanged.
No exact-function gain in this followup; retained structural CDB improvement remains fuzzy. Definition of done is not achieved.
## Final full gate and open-function re-list
ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader: 90.03766% open; 3 distinct compiled source attempts; src 0x3bc base 0x3bc insns 239/239
start__Q33ipl5scene14RakuRakuThreadFv: 88.635414% open; 3 distinct compiled source attempts; src 0x184 base 0x180 insns 97/96
finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi: 86.56391% open; 3 distinct compiled source attempts; src 0x21c base 0x214 insns 135/133
PFCLUSTER_DeleteCluster: 98.19444% open; 3 distinct compiled source attempts; src 0x1b0 base 0x1b0 insns 108/108
NHTTPi_ThreadParseHeaderProc: 98.58639% open; 3 distinct compiled source attempts; src 0x2fc base 0x2fc insns 191/191
__wpformatter: 99.13997% open; 3 distinct compiled source attempts; src 0x944 base 0x944 insns 593/593
CDBCryptBuffer: 99.97479% open; 3 distinct compiled source attempts; src 0x1dc base 0x1dc insns 119/119
CDBRecordEncrypt: 99.19014% open; 22 distinct compiled source attempts; src 0x470 base 0x470 insns 284/284
Final full gate (non --quick), all six units:
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/NW4R/src/ut/ut_ArchiveFontBase] objdiff: code 4164/5120 data 96/96 functions 22/23 fuzzy 98.1398 linked code 0
[src/scene/setting/iplRakuRakuThread] objdiff: code 1252/2168 data 456/456 functions 12/14 fuzzy 94.6900 linked code 0
[libs/RVL_SDK/src/fa/pf_cluster] objdiff: code 4120/4552 data None/None functions 7/8 fuzzy 99.8286 linked code 0
[libs/RevoEX/src/nhttp/NHTTP_thread] objdiff: code 10528/11292 data 504/504 functions 25/26 fuzzy 99.9044 linked code 0
[libs/MSL/src/MSL_Common/wprintf] objdiff: code 6264/8636 data 836/836 functions 8/9 fuzzy 99.7638 linked code 0
[libs/RevoEX/src/cdb/CDBRecord] objdiff: code 5464/7076 data 144/2640 functions 27/29 fuzzy 99.8683 linked code 0
regressions vs baseline: 0
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
Before -> after: exact counts and objdiff matched code/data bytes unchanged for every unit; Encrypt fuzzy 97.19718 -> 99.19014. No new exact match; data pool reconstruction remains uncertain without stripped function bodies.
## HIGH round
Same branch; medium structural CDB improvement retained. No new source changes in owned NHTTP unit on fetched origin/main. Pool identical (8 strings), 191/191, frame 0x30; target initializes zero before Keep-Alive comparison and reuses request register, ours initializes zero after. Main difference is boolean-expression/inline boundary before register allocation.
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH ternary bool | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH comparison bool | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH logical and length first | 190/191 instructions, structural/exact (19, 77) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH logical and compare first | 191/191 instructions, structural/exact (4, 15) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH logical or constant false | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH boolean helper argument | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH explicit bool cast | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH invert comparison branches | 191/191 instructions, structural/exact (5, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH local compare and separate assignment | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH unsigned comparison zero | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH branch on logical NOT | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH nested bool branch | 195/191 instructions, structural/exact (19, 76) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH logical AND true conditional | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH logical OR false conditional | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH ternary local then branch | 192/191 instructions, structural/exact (19, 74) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH nested ternary store | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH bool compare zero reuse | 191/191 instructions, structural/exact (3, 20) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH branch boolean result against true | 193/191 instructions, structural/exact (19, 77) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH signed nonpositive comparison | 197/191 instructions, structural/exact (24, 78) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH token equality inline helper 0 | 195/191 instructions, structural/exact (19, 76) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH token equality inline helper 1 | 195/191 instructions, structural/exact (19, 76) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH token equality inline helper 2 | 195/191 instructions, structural/exact (19, 76) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH token equality inline helper 3 | 195/191 instructions, structural/exact (19, 76) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH token equality inline helper 4 | 192/191 instructions, structural/exact (19, 74) | restored
HIGH PFCLUSTER_DeleteCluster: fetched origin/main; source unchanged upstream. Empty pool, frame 0x40 and 108/108 instructions, normalized structural zero. Target maps delete bytes r24, byte position r25, cluster size r26, iterator r27, entry r28, index r29, output r30, volume r31. Source has all eight lifetimes but different coloring. Diagnose temp/inline ownership before another register search.
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialize geometry locals | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH separate delete size and original count | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH signed cluster count local | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH operator assignment for bytes | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH divide result before output store | 108/108 instructions, structural/exact (0, 32) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH error assignments folded into conditions | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH byte position operand order | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH delete size operand order | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH geometry through explicit ushort casts | 108/108 instructions, structural/exact (0, 35) | restored
HIGH __wpformatter: fetched origin/main, source unchanged; empty narrow-string pool and 593/593, same frame. Operand relationship matters despite normalized register score 0: target narrow alternate string path loads length from r25, while narrow source pointer lives in r24. Target r25 is the previous output pointer or narrow-length temporary; source loads the current narrow pointer. This may be a genuine SDK stale-pointer bug rather than a register tie-break. Do not add an uninitialized pointer read to force this register pattern. Test honest pointer-lifetime changes and record unresolved semantics.
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH reuse output pointer for wide source | compile failed | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH distinct narrow character count | compile failed | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH narrow char pointer mutable | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH wide source pointer hoisted | compile failed | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH count destination shares string-end pointer | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH wide input independent unsigned length | 581/593 instructions, structural/exact (50, 564) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH reuse output pointer for wide source | 593/593 instructions, structural/exact (0, 120) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH distinct narrow character count | 593/593 instructions, structural/exact (2, 170) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH narrow char pointer mutable | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH wide source pointer hoisted | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH count destination shares string-end pointer | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH wide input independent unsigned length | 593/593 instructions, structural/exact (1, 67) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH inline geometry/entry/count boundaries 0 | 108/108 instructions, structural/exact (0, 32) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH inline geometry/entry/count boundaries 1 | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH inline geometry/entry/count boundaries 2 | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH inline geometry/entry/count boundaries 3 | 108/108 instructions, structural/exact (0, 32) | restored
HIGH CDBRecordEncrypt: fetch checked; only owned medium changes differ from origin/main. Pool still diverges first at reduction diagnostics; all literals used by Encrypt are before divergence and correct. Medium has same frame/slots, 284/284, normalized structure zero. Test realistic wrapper and diagnostic inline boundaries to place key and first-file pointer lifetimes, then register search.
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH first attribute inline helper temp/result lifetime 0 | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH first attribute inline helper temp/result lifetime 1 | 284/284 instructions, structural/exact (4, 57) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH first attribute inline helper temp/result lifetime 2 | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH first attribute inline helper temp/result lifetime 3 | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH first attribute inline helper temp/result lifetime 4 | 284/284 instructions, structural/exact (0, 42) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH inline closed diagnostic reports (0,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH inline closed diagnostic reports (1,) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH inline closed diagnostic reports (0, 1) | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH leading geometry/error/position declaration 0 | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH leading geometry/error/position declaration 1 | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH leading geometry/error/position declaration 2 | 284/284 instructions, structural/exact (0, 44) | restored
HIGH PFCLUSTER_DeleteCluster declaration search after output-count lifetime split: 93 builds, best structural/exact 0/32 unchanged. Restored original rather than retaining a register-only fuzzy experiment.
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH store false before conditional | 190/191 instructions, structural/exact (20, 78) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH false initialized before ternary | 187/191 instructions, structural/exact (19, 75) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH result initially true | 189/191 instructions, structural/exact (18, 99) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH conditional default using byte | 191/191 instructions, structural/exact (3, 20) | restored
HIGH ConstructOpAnalyzeGLGR: origin/main fetch verified owned source unchanged; pool empty and all 96 data bytes exact. Same 239/239 frame/branches. Remaining calculation schedule interleaves name-count, sheet-count, context workspace and glyph-count differently. Target forms byte-aligned flag pointer by adding font after alignment. Test offset-expression tree and scratch helper boundaries before any register search.
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH explicit nested offset calculation | 239/239 instructions, structural/exact (22, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH sequential flag offsets | 239/239 instructions, structural/exact (21, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH named glyph-group counts | 239/239 instructions, structural/exact (22, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH scratch size through SDK helper | 239/239 instructions, structural/exact (22, 104) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH byte flags pointer aligned offset | 239/239 instructions, structural/exact (22, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH full group span named local | 239/239 instructions, structural/exact (22, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH scratch metadata inline helper with typed references | 239/239 instructions, structural/exact (22, 104) | restored
HIGH Raku start/finish: origin/main checked unchanged; string pool identical, 456/456 data and named BSS extents already correct. Target start retains allocator base through status initialization. Target finish saves 7 registers in frame 0x30 and explicitly carries WEP source/destination strides plus loop index; ours uses smaller frame and direct indexed arrays. No fake aggregate data or offset aliases added.
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | HIGH heap allocator initialized through saved heap handle | 97/96 instructions, structural/exact (13, 88) | restored
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | HIGH zero progress through aggregate assignment | 99/96 instructions, structural/exact (22, 92) | restored
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | HIGH initialize socket callbacks in declaration | 95/96 instructions, structural/exact (17, 87) | restored
src/scene/setting/iplRakuRakuThread start__Q33ipl5scene14RakuRakuThreadFv | HIGH named start priority | 97/96 instructions, structural/exact (13, 88) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | HIGH explicit WEP source and destination strides 0 | 136/133 instructions, structural/exact (43, 127) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | HIGH explicit WEP source and destination strides 1 | 136/133 instructions, structural/exact (43, 126) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | HIGH explicit WEP source and destination strides 2 | 136/133 instructions, structural/exact (35, 127) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH header token out-parameter boundary 0 | 189/191 instructions, structural/exact (16, 99) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH header token out-parameter boundary 1 | 187/191 instructions, structural/exact (19, 75) | restored
src/scene/setting/iplRakuRakuThread finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi | HIGH explicit WEP source and destination strides 3 | 136/133 instructions, structural/exact (43, 126) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH header token out-parameter boundary 2 | 189/191 instructions, structural/exact (16, 72) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH header token out-parameter boundary 3 | 190/191 instructions, structural/exact (18, 78) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH header token out-parameter boundary 4 | 195/191 instructions, structural/exact (19, 76) | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH header token out-parameter boundary 5 | 189/191 instructions, structural/exact (16, 99) | restored
libs/RevoEX/src/cdb/CDBRecord CDBCryptBuffer | HIGH increment output count after selecting chunk length | 119/119 instructions, structural/exact (13, 18) | restored
libs/RevoEX/src/cdb/CDBRecord CDBCryptBuffer | HIGH explicit output pointer null comparisons | 120/119 instructions, structural/exact (10, 93) | restored
libs/RevoEX/src/cdb/CDBRecord CDBCryptBuffer | HIGH loop remainder local | 119/119 instructions, structural/exact (6, 8) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH HMAC lifetime and inline boundary 0 | 284/284 instructions, structural/exact (3, 52) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH HMAC lifetime and inline boundary 1 | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH HMAC lifetime and inline boundary 2 | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH HMAC lifetime and inline boundary 3 | 285/284 instructions, structural/exact (15, 102) | restored
HIGH __wpformatter leading declaration search: 71 builds after split scalar declarations; unchanged 593/593 structural/exact 0/98. Original source restored. Target narrow-alternate load reads r25 while input pointer is r24; proof is at target 0x1d54 versus 0x1d74. No stale/uninitialized pointer read introduced.
HIGH NHTTP final declaration search after initialized-getter statements split: 71 builds, best structural/exact 3/20 unchanged. Reverted split.
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH fallback token-match struct | 191/191 instructions, structural/exact (0, 0) | kept candidate
HIGH NHTTP exact gain: initialized token-match aggregate holds the fallback FALSE across comparison, while success stores TRUE. No new global data, inline assembly, volatile, uninitialized value or symbol edit. Same 191/191, ctxdiff 0, objdiff 100%, pool identical, data 504/504. Quick gate PASS, zero regressions/forbidden/readability; DOL hash correct.
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0,) reversed False | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0,) reversed True | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 2) reversed False | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 2) reversed True | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 1, 2) reversed False | 108/108 instructions, structural/exact (0, 14) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 1, 2) reversed True | 108/108 instructions, structural/exact (0, 14) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (1, 2) reversed False | 108/108 instructions, structural/exact (0, 32) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (1, 2) reversed True | 108/108 instructions, structural/exact (0, 32) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 5) reversed False | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 5) reversed True | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (3, 4) reversed False | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (3, 4) reversed True | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (3, 4, 5, 6) reversed False | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (3, 4, 5, 6) reversed True | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 3, 4, 5, 6) reversed False | 108/108 instructions, structural/exact (0, 35) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH cluster-deletion aggregate (0, 3, 4, 5, 6) reversed True | 108/108 instructions, structural/exact (0, 35) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (2,) reversed False | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (2,) reversed True | 284/284 instructions, structural/exact (0, 44) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (0, 2) reversed False | 287/284 instructions, structural/exact (35, 250) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (0, 2) reversed True | 288/284 instructions, structural/exact (34, 255) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (0, 1) reversed False | 291/284 instructions, structural/exact (55, 262) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (0, 1) reversed True | 292/284 instructions, structural/exact (53, 254) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (1, 3, 4) reversed False | 291/284 instructions, structural/exact (42, 264) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (1, 3, 4) reversed True | 291/284 instructions, structural/exact (42, 264) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (0, 1, 2, 3, 4) reversed False | 298/284 instructions, structural/exact (89, 278) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate (0, 1, 2, 3, 4) reversed True | 299/284 instructions, structural/exact (88, 285) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('length', 'cluster_size', 'position') entry_values | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('length', 'cluster_size', 'position') zero_values | 118/108 instructions, structural/exact (29, 106) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('length', 'cluster_size', 'position') length_only | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('length', 'position', 'cluster_size') entry_values | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('length', 'position', 'cluster_size') zero_values | 118/108 instructions, structural/exact (29, 106) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('length', 'position', 'cluster_size') length_only | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('cluster_size', 'length', 'position') entry_values | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('cluster_size', 'length', 'position') zero_values | 118/108 instructions, structural/exact (29, 106) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('cluster_size', 'position', 'length') entry_values | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('cluster_size', 'position', 'length') zero_values | 118/108 instructions, structural/exact (29, 106) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('position', 'length', 'cluster_size') entry_values | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('position', 'length', 'cluster_size') zero_values | 118/108 instructions, structural/exact (29, 106) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('position', 'cluster_size', 'length') entry_values | compile failed | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH initialized deletion geometry ('position', 'cluster_size', 'length') zero_values | 118/108 instructions, structural/exact (29, 106) | restored
First CDB input-aggregate rewrite accidentally replaced identifier words inside two diagnostic literals in some variants; those variants were reverted and excluded as pool-invalid. Re-run shields string tokens.
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (0, 2) reversed False | 287/284 instructions, structural/exact (33, 250) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (0, 2) reversed True | 288/284 instructions, structural/exact (32, 255) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (0, 1) reversed False | 291/284 instructions, structural/exact (53, 262) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (0, 1) reversed True | 292/284 instructions, structural/exact (51, 254) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (1, 3, 4) reversed False | 291/284 instructions, structural/exact (41, 264) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (1, 3, 4) reversed True | 291/284 instructions, structural/exact (41, 264) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (0, 1, 2, 3, 4) reversed False | 298/284 instructions, structural/exact (87, 278) | restored
libs/RevoEX/src/cdb/CDBRecord CDBRecordEncrypt | HIGH encryption input aggregate preserving literals (0, 1, 2, 3, 4) reversed True | 299/284 instructions, structural/exact (86, 285) | restored
libs/RVL_SDK/src/fa/pf_cluster PFCLUSTER_DeleteCluster | HIGH separate immutable input count from byte length | 108/108 instructions, structural/exact (0, 0) | kept candidate
HIGH PFCLUSTER exact gain: ClusterDeletion owns byte position, cluster size and deleted byte length; the incoming cluster count stays immutable until byte conversion after the first trace. This separates count and byte lifetimes instead of overloading the argument. Same 108/108, ctxdiff 0, objdiff 100%, empty pool. Quick gate PASS, zero regressions/forbidden/readability, DOL hash correct. All fields initialized before use; no extra data object or symbol edit.
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0,) reversed False | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0,) reversed True | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1) reversed False | compile failed | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1) reversed True | compile failed | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 2) reversed False | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 2) reversed True | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1, 2) reversed False | compile failed | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1, 2) reversed True | compile failed | restored
libs/RevoEX/src/nhttp/NHTTP_thread NHTTPi_ThreadParseHeaderProc | HIGH fill token match result before storing successful connection state | 191/191 instructions, structural/exact (0, 0) | kept candidate
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2) reversed False | compile failed | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2) reversed True | compile failed | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (3, 4, 5) reversed False | 239/239 instructions, structural/exact (22, 103) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (3, 4, 5) reversed True | 239/239 instructions, structural/exact (22, 103) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 3, 5) reversed False | 239/239 instructions, structural/exact (22, 88) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 3, 5) reversed True | 239/239 instructions, structural/exact (22, 88) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2, 3, 4, 5, 6) reversed False | compile failed | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2, 3, 4, 5, 6) reversed True | compile failed | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2) reversed False | 239/239 instructions, structural/exact (22, 89) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2) reversed True | 239/239 instructions, structural/exact (22, 99) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (3, 4, 5) reversed False | 239/239 instructions, structural/exact (22, 103) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (3, 4, 5) reversed True | 239/239 instructions, structural/exact (22, 103) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 3, 5) reversed False | 239/239 instructions, structural/exact (22, 88) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 3, 5) reversed True | 239/239 instructions, structural/exact (22, 88) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2, 3, 4, 5, 6) reversed False | 239/239 instructions, structural/exact (22, 109) | restored
libs/NW4R/src/ut/ut_ArchiveFontBase ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader | HIGH glyph sheet layout aggregate (0, 1, 2, 3, 4, 5, 6) reversed True | 239/239 instructions, structural/exact (22, 109) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0,) reversed False | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0,) reversed True | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1) reversed False | 593/593 instructions, structural/exact (0, 117) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1) reversed True | 593/593 instructions, structural/exact (0, 117) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 2) reversed False | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 2) reversed True | 593/593 instructions, structural/exact (0, 98) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1, 2) reversed False | 593/593 instructions, structural/exact (0, 117) | restored
libs/MSL/src/MSL_Common/wprintf __wpformatter | HIGH format output aggregate (0, 1, 2) reversed True | 593/593 instructions, structural/exact (0, 117) | restored
## HIGH completion audit
libs/NW4R/src/ut/ut_ArchiveFontBase: origin/main source unchanged from initial owned baseline = True.
src/scene/setting/iplRakuRakuThread: origin/main source unchanged from initial owned baseline = True.
libs/RVL_SDK/src/fa/pf_cluster: origin/main source unchanged from initial owned baseline = True.
libs/RevoEX/src/nhttp/NHTTP_thread: origin/main source unchanged from initial owned baseline = True.
libs/MSL/src/MSL_Common/wprintf: origin/main source unchanged from initial owned baseline = True.
libs/RevoEX/src/cdb/CDBRecord: origin/main source unchanged from initial owned baseline = True.
NHTTPi_ThreadParseHeaderProc exact 191/191, ctxdiff 0; genuine TokenMatch tracks FALSE fallback and TRUE match before assigning keepAlive. All unit code/data 100%.
PFCLUSTER_DeleteCluster exact 108/108, ctxdiff 0; byte geometry object separates immutable requested count from byte position/cluster size/deletion length. All unit code 100%; no data section.
All six remaining open functions have at least three distinct compiled HIGH source attempts, excluding failed compilations and token-rewrite mistakes.
Archive: offset expression tree, sequential offsets, metadata locals, scratch helper and layout aggregates; remaining 22 normalized structural differences, 99 total positional differences.
Raku start: heap handle, progress aggregate, socket callback initialization, named priority. Finish: explicit WEP source/destination strides, independent index and zero lifetime; shared BSS base and frame/branch schedule still differ.
wprintf: pointer reuse/hoisting, independent wide/narrow lengths, count destination scope, output aggregates, 71 declaration builds. Target narrow alternate load has a stale-pointer operand relationship; no uninitialized read added to force it.
CDB Encrypt: first attribute wrapper lifetimes, closed diagnostic wrappers, HMAC helper/input lifetimes, protected-literal input aggregates; 284/284, normalized structure zero, 44 register differences. Medium 99.19014% retained.
CDB Crypt: output count scheduling, explicit null comparison, loop remainder; original 119/119 has only three wrong literal offsets from missing earlier diagnostics.
All rejected source variations restored. Local initialized result/range types emit no new global data. No data-symbol rename or extent correction justified; owned data scores unchanged, config untouched.
HIGH gains: NHTTP exact 25 -> 26 and code 10528 -> 11292; cluster exact 7 -> 8 and code 4120 -> 4552. Other exact/code/data counts unchanged. No linking/configure change.
## HIGH final full gate and open-function re-list
ConstructOpAnalyzeGLGR__Q44nw4r2ut6detail15ArchiveFontBaseFPQ54nw4r2ut6detail15ArchiveFontBase16ConstructContextPQ54nw4r2ut6detail15ArchiveFontBase18CachedStreamReader: 90.03766% open; 19 compiled HIGH attempts; src 0x3bc base 0x3bc insns 239/239
libs/NW4R/src/ut/ut_ArchiveFontBase matched_functions: 22 -> 22
libs/NW4R/src/ut/ut_ArchiveFontBase matched_code: 4164 -> 4164
libs/NW4R/src/ut/ut_ArchiveFontBase matched_data: 96 -> 96
start__Q33ipl5scene14RakuRakuThreadFv: 88.635414% open; 4 compiled HIGH attempts; src 0x184 base 0x180 insns 97/96
finish__Q33ipl5scene14RakuRakuThreadFP11NCDApConfigPi: 86.56391% open; 4 compiled HIGH attempts; src 0x21c base 0x214 insns 135/133
src/scene/setting/iplRakuRakuThread matched_functions: 12 -> 12
src/scene/setting/iplRakuRakuThread matched_code: 1252 -> 1252
src/scene/setting/iplRakuRakuThread matched_data: 456 -> 456
libs/RVL_SDK/src/fa/pf_cluster matched_functions: 7 -> 8
libs/RVL_SDK/src/fa/pf_cluster matched_code: 4120 -> 4552
libs/RVL_SDK/src/fa/pf_cluster matched_data: 0 -> 0
libs/RevoEX/src/nhttp/NHTTP_thread matched_functions: 25 -> 26
libs/RevoEX/src/nhttp/NHTTP_thread matched_code: 10528 -> 11292
libs/RevoEX/src/nhttp/NHTTP_thread matched_data: 504 -> 504
__wpformatter: 99.13997% open; 21 compiled HIGH attempts; src 0x944 base 0x944 insns 593/593
libs/MSL/src/MSL_Common/wprintf matched_functions: 8 -> 8
libs/MSL/src/MSL_Common/wprintf matched_code: 6264 -> 6264
libs/MSL/src/MSL_Common/wprintf matched_data: 836 -> 836
CDBCryptBuffer: 99.97479% open; 3 compiled HIGH attempts; src 0x1dc base 0x1dc insns 119/119
CDBRecordEncrypt: 99.19014% open; 25 valid compiled HIGH attempts (8 accidental literal-rewrite variants excluded); src 0x470 base 0x470 insns 284/284
libs/RevoEX/src/cdb/CDBRecord matched_functions: 27 -> 27
libs/RevoEX/src/cdb/CDBRecord matched_code: 5464 -> 5464
libs/RevoEX/src/cdb/CDBRecord matched_data: 144 -> 144
NHTTPi_ThreadParseHeaderProc final src 0x2fc base 0x2fc insns 191/191; diffs 0: []
PFCLUSTER_DeleteCluster final src 0x1b0 base 0x1b0 insns 108/108; diffs 0: []
Final full gate (non --quick) over all six owned units:
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/NW4R/src/ut/ut_ArchiveFontBase] objdiff: code 4164/5120 data 96/96 functions 22/23 fuzzy 98.1398 linked code 0
[src/scene/setting/iplRakuRakuThread] objdiff: code 1252/2168 data 456/456 functions 12/14 fuzzy 94.6900 linked code 0
[libs/RVL_SDK/src/fa/pf_cluster] objdiff: code 4552/4552 data None/None functions 8/8 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nhttp/NHTTP_thread] objdiff: code 11292/11292 data 504/504 functions 26/26 fuzzy 100.0000 linked code 0
[libs/MSL/src/MSL_Common/wprintf] objdiff: code 6264/8636 data 836/836 functions 8/9 fuzzy 99.7638 linked code 0
[libs/RevoEX/src/cdb/CDBRecord] objdiff: code 5464/7076 data 144/2640 functions 27/29 fuzzy 99.8683 linked code 0
regressions vs baseline: 0
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
Remaining CDB pool reconstruction and wprintf alternate-string pointer semantics remain unresolved; no unsupported data rename/extent change or uninitialized read retained.

View File

@@ -0,0 +1,215 @@
# mslmisc leaf attempts
Owned units: `src/scene/sdChannelTitle/iplSDChannelTitle.cpp`, `libs/NW4R/src/ut/ut_ArchiveFontBase.cpp`.
MSL checked via live report: only `MSL_Common/wprintf` incomplete — stays in misc1b's notes.
## DECODE: SDButton::setEventHandler retail dead-param (SOLVED)
orig's real decl was **1-arg** `setEventHandler(EventHandler*)`. Evidence:
- Every orig call site (title ×2, select ×4) emits a bare `bl` with only r3/r4 — never `li r5,0`.
- The 5-insn DEF (`lwz r3,0x60; lwz r12,0; lwz r12,0x38; mtctr; bctr`) forwards to `Manager::setEventHandler`, a 1-arg weak virtual — `optOut` was never consumed.
- `Button::setEventHandler` (a DIFFERENT class, genuine 2-arg impl at 0x8139C93C) DOES emit `li r5,0` in iplFocusObject — MWCC materializes default args, so SDButton's missing r5 means the decl never had it.
- The 2-arg mangle in symbols.txt was an author mislabel inherited from `Button`'s real 2-arg.
Fix (all kept): `iplSDButton.h` decl → `void setEventHandler(::gui::EventHandler* event);`; `iplSDButton.cpp` def → 1-arg; call sites in sdChannelTitle/sdChannelSelect → 1-arg; `config/43U/symbols.txt` line 4817 renamed `...8SDButtonFPQ23gui12EventHandlerPQ23gui12EventHandler` → `...8SDButtonFPQ23gui12EventHandler`. Flipped 5 fns to instruction-identical + all sdChannelTitle data sections to 100%.
Mechanism note: renaming a `.text` address in symbols.txt propagates through the splitter into orig's DEF name AND every caller's UND reloc name — the legit rename lever.
## DECODE: enqueue*Notice u64/pointer signatures (SOLVED — r4 anomaly was MWCC u64 marshaling)
The "dead leading arg" was wrong: MWCC lands a **u64 arg only in ALIGNED register pairs**
(r3:r4, r5:r6, r7:r8). For a member fn (this=r3) a u64 first param goes to r5:r6 and **r4 is
never materialized** — no dead param at all.
Verified signatures from orig def bodies (which arg regs get stored into the command struct):
- `enqueueChannelNotice(u64 titleId, u32 value)` — def stores r5:r6→titleId, r7→values[0]
- `enqueueMoveNotice(u64 titleId)` — def stores r5:r6 only
- `enqueueStateNotice(u64 titleId, u32 state)` — r5:r6 + r7
- `enqueueDeleteNotice(u64 titleId)` — r5:r6 only
- `enqueueErrorNotice(ESTitleId** titleIds, ESTitleId** secondaryTitles)` — stores r4,r5
- `enqueueCommandNotice(ESTitleId**,ESTitleId**,ESTitleId**)` — stores r4,r5,r6
- `enqueueNotice(u32,u32,u32)` — stores r4,r5,r6 — unchanged, verified correct
- `enqueueResultNotice(u32)` — stores r4 — unchanged
Orig callers confirm: iplSDMemory's onDialogState14/16/18 load `lwz r5,0x80(r4); lwz r6,0x84(r4)`
(a u64 member `mTitleIds[i]`) directly into r5:r6 — never touching r4.
Fix (all kept): header decls + defs + symbols.txt mangles (`FUxUl`/`FUx`/`FPPUxPPUx`/`FPPUxPPUxPPUx`);
sdChannelTitle call sites pass `scene->mTitleId`/`temporaryTitle` directly (dropped the
`((u64)page<<32)|index` synthesize). All defs + all callers now instruction-identical.
Access cleanup: orig callers called these as private members — extended the header's existing
`#if defined(...CPP) public:` gate with `IPL_SD_CHANNEL_MEMORY_CPP` (defined at the top of
iplSDMemory.cpp), letting the 5 banned `extern "C" iplSDChannelSelect_813DXXXX` stubs in
iplSDMemory.cpp be deleted and replaced with real member calls (insn-identical, UND names
now match orig's re-split relocs).
Result: sdChannelTitle fuzzy 99.98883 (+648B matched code; both enqueue call sites 100%),
sdChannelSelect defs all instruction-identical, sdChannelMemory callers insn-identical.
## TIE: flushSaveBeforeExit eval-order (98.59)
Insn+reloc-identical except a 6-word window: orig `lis r3` (smArg base→r3), `lwz r4,0x94` (stw-mgr),
`stw`, `lwz r4,0x28` (heap), `lwz r3,0x94` (flush receiver — reloaded LAST). Mine: base→r4,
receiver-load before heap-load. Orig evaluated the `flushAsync` ARG before the receiver reload.
Tried: `saveHeap` local (before/after stw, decl-init, separate assign — emits at-birth or at-use,
never between), `saveData`/`mgr` local (caches receiver → 5-insn form, wrong), nested
`flushAsync(System::getMem2App())` (same as original), explicit `manager` receiver temp born
between `saveHeap` and the call (identical — remat'd at use). All ~6-word identical or regression.
Precise residual: mine emits `recv lwz r3,0x94` before `arg lwz r4,0x28`; orig swaps them —
receiver-first vs arg-first marshal order, scheduler tie-break on two independent remat loads.
## TIE: ConstructOpAnalyzeGLGR 20-diff window (91.79)
239/239 insns — orig interleaves `lhz r31,0x1c` (sheetGlyphCount) + `lhz r23,0xe` (dataBlockCount)
mid-flag-chain (issued at birth, deep-callee homes); mine emits both at-use (`lhz r26/r25`,
~8 insns later). Same callee-web rotation family. Kept: flags-first reorder (24→20 diffs) +
the second `pGlgr = &font->glgr` assignment (removing it = 113 diffs). Decl-init variant no-op.
Round-2 decode of the window: both sides interleave the same inlined helper tree
(CalcSizeFlagSet + CalcOffsetSheetFlags + ROUNDUP chains + the 0x1c/0xe ctx loads) — only the
issue ORDER inside the ready-set differs. Orig issues `lhz r26,0x1c`/`lhz r25,0xe` ~10 insns
later in the chain than mine. Tried: stepSheetFlags-after-flagsSheetsOff reorder (97.94,
regression) and inlining both into use sites (96.99, regression) — committed form stands.
## ARTIFACT: .sbss2 8B vs 1B (ut_ArchiveFontBase) — splitter extent attribution
orig's `.sbss2` = 8B: `LOAD_GLYPH_ALL` (1B) + 7 anonymous tail bytes. Not a missing object —
symbols.txt shows `DefaultBlackColor` at 0x81696010 (8-aligned): the 7B is the DOL's alignment
padding absorbed into this TU's reconstructed extent. Same pattern (sbss2=8) across many orig
.o files (zi8getc2, sha1, lyt_material, ...). No legitimate source lever — adding a second
unnamed/anonymous object is banned; no static-local evidence in ghidra decomp.
## ARTIFACT: .sdata2 weak-emission literals (iplSDChannelTitle)
Mine emits `2.0f`/`3.0f` inside weak `HermiteIntp<f32>::get` (TU runs
`new math::HermiteIntp<f32>()` at line 227); orig's .o shows all-UND for the weak emission —
splitter weak-dedup artifact. .sdata2 byte-content + fuzzy already 100; only the @literal
OBJECT granularity differs (orig merges, mine carves) — no source lever found that suppresses
the weak emission without changing semantics.
## Status
- iplSDChannelTitle: fuzzy 99.98883, code 18476/18624, data 1976/1976 (all data 100%).
Only flushSaveBeforeExit 98.59 — the eval-order tie above. Remaining granularity = weak-emission
literal artifact.
- ut_ArchiveFontBase: fuzzy 98.468, code 4164/5120, data 96/96. Only ConstructOpAnalyzeGLGR 91.79
(20-diff scheduler window) + .sbss2 extent artifact.
- DOL sha1 `26116613f624061ba99c8d1a299aaa6efa85670d` verified. No shims; both units stay NonMatching.
## DECODE (round 3): HermiteIntp<f32> weak-UND parity — RESOLVED
Orig's .o UND-references all three `HermiteIntp<f32>` weak fns (__ct__/__dt__/init via
iplUtility.o GLOBAL ownership; `get` via iplChannelTitle.o GLOBAL at 0x813B5C60). Reproduced
by: `IPL_CHANNEL_TITLE_NOVTABLE` gate scoped around `#include "math/iplInterporation.h"` +
`#pragma dont_instantiate ipl::math::HermiteIntp<float>` + `#undef` (narrow scope — wider
scope UNDs the gui vtables that orig's TU DID emit, shrinking .data to 0x5c8 vs orig 0x6a0),
plus the out-of-line `HermiteIntp<f32>::get` def added to iplChannelTitle.cpp between
draw/destroy (orig's own emission site — iplChannelTitle now fully 100%). UND set now matches
orig for the whole HermiteIntp family; .sdata2 bytes identical (36B both).
## DECODE (round 3): DynamicCast gate
`IPL_SD_CHANNEL_TITLE_CPP` added to the `RuntimeTypeInfo.h` declared-only gate (with
IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST / IPL_MEMORYCARD_BASE_CPP) — orig UNDs
`DynamicCast<Pane*,TextBox>`; previously emitted weak + pulled `typeInfo` UND extras.
## DECODE (round 3): named-array binding
8 file-scope arrays changed `static const` → `extern const`/`const` (sButtonNames,
sCaptureSizes, sMissingTitle, sButtonGroups, sButtonAnimationNames, sBannerAnimationNames,
sTexturePaneNames, sTextNames) — `const` alone leaves namespace-scope arrays internal in C++;
`extern const` gives STB_GLOBAL matching orig's decls.
## WALL: .data tail 0x44 = __vt__Q23gui7Manager emission
orig's reconstructed .data tail (0x5c8-0x6a0) holds 4 gui vtables: ipl::gui::PaneManager
(0x5C) + gui::EventHandler (0x18) + gui::Interface (0x20) + gui::Manager (0x44). Mine emits
the first three (dedup'd differently) but NOT Manager vt: `new gui::PaneManager(...)` at
~L218 resolves to `ipl::gui::PaneManager`; the ctor chain fully inlines → base-class
`__vt__Q23gui7Manager` store DCE'd. Orig's TU emitted the ipl ctor standalone (weak) →
gui::PaneManager ctor → Manager ctor → Manager vt. `IPL_GCW_PANEMANAGER_CTOR_OUT_OF_LINE`
exists (NO_INLINE decl) but declaring-only UNDs the ctor — no TU defines it out-of-line, and
orig's own .o shows the ctor as UND too (dedup'd; emission happened on ANOTHER TU). No
source-level lever to force "call but emit locally"; section bytes .data now 0x65c vs 0x6a0
(all sections still 100% fuzzy).
## TIE: flushSaveBeforeExit 98.59 — refined to base-reg choice
Remaining 2-insn diff is actually the &smArg materialization register: orig materializes
`lis/addi` smArg into r3 → store-mgr in r4 (scratch) → heap→r4 → recv→r3 (chain). Mine puts
smArg in r4/r5 → store-mgr in r3 → recv-first order. The reg choice is MWCC's web-home
internal; it shifts with every source-form change (saveMgr-local, nested, saveHeap-early,
mixed — 8+ variants total across sessions) but never lands r3. Same allocator-tie family as
the leaf's other walls.
## Status (round 3)
- iplSDChannelTitle: fuzzy 99.98883, code 18476/18624, data 1976/1976. Only
flushSaveBeforeExit 98.59 (base-reg tie) + Manager-vt emission artifact.
- ut_ArchiveFontBase: fuzzy 98.468, code 4164/5120, data 96/96. GLGR 91.79 (issue-order tie)
+ .sbss2 extent artifact.
- DOL sha1 `26116613f624061ba99c8d1a299aaa6efa85670d` verified. No shims; both stay
NonMatching.
## mcard2 rotation (leaf extended: iplMemoryCardManager + iplCardSequence)
Reverted linkgap-owned files (iplChannelTitle.cpp, iplInterporation.h) per orchestrator —
HermiteIntp<f32>::get re-emits weak until the linkgap gate lands on main.
Landings:
- symbols.txt: `lbl_81696CF8` → `sCardSlotName__Q23ipl10memorycard` (.sdata 3B "AB") —
pairs orig's anonymous slot-name object.
- loadCardFileIcons case-0 arm: `iconFmt[iconCount] = iconFmt[iconCount-1]` (plain array
index, semantic match for orig's `[-1]/[0]` copy) — fn 508→507 insns (orig 512),
fuzzy 97.199→97.221.
Walls verified (allocator/scheduler tie family throughout):
- isMoveEnable/isCopyEnable (99.83 both): 2x `add` operand-order at `&dirs[slot][file]`
sites — MWCC canonicalizes commutative add operands by web internals, not parse order
(`file + dirs[slot]`, `dirs[slot] + file`, cast forms all emit identically).
- update_file_array (99.72): 4-line global-base reg choice (r3 vs r4 smArg base).
- getComment (98.94): ~33-pair callee rotation — comment-ptr CSE web claims r26 vs orig
r30; `dst` local reshape regressed (232).
- create_banner/_create_icon (90.4/87.6): callee-window rotation (dirState r25 vs r30,
icon-product webs shallow vs deep); `icon` local + `icon->` consistency regressed (213).
- cardThreadMain (97.94): ~79 rotation + rlwimi in-place vs copy-then-insert shape.
- runCardMoveOrCopy (97.80): ~575 regname rotation; real diffs = 3x `extsh` s16-marshal
(orig re-extends per marshal site — per-use conversion nodes; mine normalized once),
1x `li` hoist position. Addressing decomposition: orig sums var parts then folds const
into index (`sThread + (idx + 0x10000 - 0x6fb4)`), mine `(sThread + 0x10000) + idx_parts`
— MWCC member-chain association; ptr-local/array-index forms don't regroup.
## Status (mcard2)
- iplMemoryCardManager: fuzzy 97.88, code 2572/5396, data 100%. 8 sub-100 fns, all tie-class.
- iplCardSequence: fuzzy 97.22, code 4168/9852, data 1496/1496 (100%). 3 sub-100 fns.
- DOL sha1 `26116613f624061ba99c8d1a299aaa6efa85670d` verified. No shims; all stay NonMatching.
## mcard2 round 2 — normalized-diff verification
Verified every sub-100 fn via stripped-normalized diff (regs/addrs/immediates removed):
- update_file_array, isMoveEnable, isCopyEnable, getComment: norm-diff 0 —
instruction-identical modulo register names. Pure allocator homes.
- getBlocks (92.0), isBannerEnable (92.3): identical insns except ONE `addi r11,r1,0x20`
(_restgpr_29 frame base) hoisted into the index chain in orig vs emitted right
before the call in mine. Scheduler placement, no source lever.
- _create_icon (87.55): rotation + `(base + fieldconst) + var` vs `(base + var) +
fieldconst` addressing regroup on mFileCell chains — same wall as loadCardFileIcons.
`MCFileCell* cell = mFileCell[slot]` row-ptr variant regressed (MWCC split
0xfe8+0x124), reverted.
- create_banner (90.43): same regroup — orig CSEs `mFileCell[slot] + 0x110c`
(row+field) then adds file*0x15c per use; mine CSEs full element addr. `cell`
row-ptr local regressed.
- runCardMoveOrCopy (97.80): 8 norm-diffs = 3x `extsh r4,r30` vs `mr r4,r25` on the
s16 `destinationFileNo` PHI web (identical def set both sides: li -1, extsh x2,
li -0x80 — MWCC extension-proof boundary differs) + 1 `li` hoist position.
- cardThreadMain (97.94): 2 norm-diffs = `mr r4,r19; rlwimi` vs `rlwimi in-place` —
orig CSEs `slot<<16` message-base across inlined sendCardSlotState sites (copy then
insert), mine rematerializes per site (in-place legal since web dead-after).
- loadCardFileIcons (90.45): ~45 norm-diffs. Orig splits member-access as
`elem_base + (i*scale + fieldconst)` with indexed lwzx/stwx (iconOffset[iconCount+1]
= addi+slwi+stwx); mine folds index into base + offset loads. Tried named index
local (lwzux, +0 diffs), u32* array-ptr local (regressed 438) — MWCC
addressing-canonicalization picks its own regroup.