Compare commits
1 Commits
cleanup/se
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd1ccff17c |
@@ -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)
|
||||
|
||||
195
tools/decomp-assist/fz10.attempts.md
Normal file
195
tools/decomp-assist/fz10.attempts.md
Normal file
@@ -0,0 +1,195 @@
|
||||
# fz10 attempts
|
||||
|
||||
Baseline HEAD 0978b074. Origin fetched before investigation. Work confined to five assigned units, their proven data symbols, and this log.
|
||||
|
||||
## src/keyboard/MyTiManager
|
||||
POOL IDENTICAL up to 7 (mine=7 base=7)
|
||||
|
||||
## libs/RVLMiddleware/eZiText/src/clib/zi8dawg
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
|
||||
## src/iplwww/www_wiisetting
|
||||
POOL IDENTICAL up to 72 (mine=72 base=72)
|
||||
|
||||
## libs/RVLMiddleware/eZiText/src/clib/zi8getc2
|
||||
POOL IDENTICAL up to 0 (mine=0 base=0)
|
||||
|
||||
## libs/RVL_SDK/src/vi/vi
|
||||
POOL IDENTICAL up to 7 (mine=7 base=7)
|
||||
|
||||
Zi8GetDataSignature | destination local alias | 70/69 instructions, structural/exact differences (4, 64)
|
||||
|
||||
Zi8GetDataSignature | separate table selector and length | 69/69 instructions, structural/exact differences (0, 13)
|
||||
|
||||
Zi8GetDataSignature | delay pointer declaration to table query | BUILD FAILED ZiText/src/clib/zi8getc2.c -o build/43U/src/libs/RVLMiddleware/eZiText/src/clib && "/usr/bin/python3" tools/transform_dep.py build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.d build/43U/src/libs/RVLMiddleware/eZiText/src/clib/zi8getc2.d
|
||||
### mwcceppc.exe Compiler:
|
||||
# File: libs\RVLMiddleware\eZiText\src\clib\zi8getc2.c
|
||||
# -------------------------------------------------------
|
||||
# 77: ziU8* signature = (ziU8*)Zi8GetTableAddress(language, (ziU8)length, work);
|
||||
# Error: ^^^^
|
||||
# (10141) expression syntax error
|
||||
# Too many errors printed, aborting program
|
||||
|
||||
User break, cancelled...
|
||||
ninja: build stopped: subcommand failed.
|
||||
|
||||
|
||||
Zi8GetDataSignature | table address in loop block | 69/69 instructions, structural/exact differences (0, 9)
|
||||
|
||||
Zi8IsDupWChar | character local copy | 64/63 instructions, structural/exact differences (8, 61)
|
||||
|
||||
Zi8IsDupWChar | duplicate initialized declaration | 63/63 instructions, structural/exact differences (0, 8)
|
||||
|
||||
Zi8IsDupWChar | buffer declared with initializer | 63/63 instructions, structural/exact differences (2, 9)
|
||||
|
||||
Zi8IsDupWChar | loop conditional flag instead of break | 65/63 instructions, structural/exact differences (8, 42)
|
||||
|
||||
Zi8MatchROMdata1 | group cursor separate from input index | 129/128 instructions, structural/exact differences (11, 122)
|
||||
|
||||
Zi8MatchROMdata1 | declare table address at lookup | 131/128 instructions, structural/exact differences (13, 129)
|
||||
|
||||
Zi8MatchROMdata1 | result initialized at declaration | 128/128 instructions, structural/exact differences (0, 5)
|
||||
|
||||
Zi8MatchROMdata1 | while group traversal with bottom decrement | 128/128 instructions, structural/exact differences (0, 5)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | security buffer pointer after loop index | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | country index declared before keyboard language | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | one getter loop index for both cases | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | security for body performs append | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
__VIRetraceHandler | position horizontal declared first | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
__VIRetraceHandler | position vertical declared first | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
__VIRetraceHandler | position stable sample for loop | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
VIInit | init declaration order bootrom before display config | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
VIInit | init local value before display config | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
VIInit | init timing extent named | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
VIInit | init tv conditional explicit branch | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Zi8GetDataSignature | signature pointer as lookup state | 73/69 instructions, structural/exact differences (14, 72)
|
||||
|
||||
Zi8GetDataSignature | capacity copied after lookup pointer | 70/69 instructions, structural/exact differences (2, 63)
|
||||
|
||||
Zi8GetDataSignature | separate address and typed pointer | 69/69 instructions, structural/exact differences (0, 9)
|
||||
|
||||
Zi8IsDupWChar | duplicate and character grouped state | 73/63 instructions, structural/exact differences (22, 70)
|
||||
|
||||
Zi8IsDupWChar | buffer before duplicate initialization | 63/63 instructions, structural/exact differences (2, 9)
|
||||
|
||||
Zi8IsDupWChar | counted backward for loop | 63/63 instructions, structural/exact differences (0, 8)
|
||||
|
||||
__VIRetraceHandler | position quotient before vertical factor | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
__VIRetraceHandler | position explicit horizontal quotient local | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
__VIRetraceHandler | position counts decremented before halfline | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
Zi8IsDupWChar | duplicate flag int | 63/63 instructions, structural/exact differences (1, 8)
|
||||
|
||||
Zi8IsDupWChar | duplicate flag unsigned int | 63/63 instructions, structural/exact differences (1, 8)
|
||||
|
||||
Zi8IsDupWChar | duplicate flag ziS16 | 63/63 instructions, structural/exact differences (1, 8)
|
||||
|
||||
Zi8IsDupWChar | duplicate flag ziU16 | 63/63 instructions, structural/exact differences (1, 8)
|
||||
|
||||
Zi8MatchROMdata1 | group index ziU8 | 130/128 instructions, structural/exact differences (7, 84)
|
||||
|
||||
Zi8MatchROMdata1 | group index ziU16 | 130/128 instructions, structural/exact differences (7, 84)
|
||||
|
||||
Zi8MatchROMdata1 | group index ziS32 | 128/128 instructions, structural/exact differences (0, 5)
|
||||
|
||||
__VIRetraceHandler | halfline vertical factor before quotient | 516/516 instructions, structural/exact differences (2, 9)
|
||||
|
||||
__VIRetraceHandler | halfline vertical local first | 516/516 instructions, structural/exact differences (0, 13)
|
||||
|
||||
__VIRetraceHandler | halfline vertical-first named result | 516/516 instructions, structural/exact differences (2, 11)
|
||||
|
||||
VIInit | adjust active extent named before clipping | 338/338 instructions, structural/exact differences (27, 89)
|
||||
|
||||
VIInit | adjust clipping overscan named | 334/338 instructions, structural/exact differences (28, 165)
|
||||
|
||||
VIInit | adjust swap fraction coefficient assignments | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
__VIRetraceHandler | halfline declaration order u32 horizontalCount;,u32 verticalCount;,u32 previousVerticalCount; | 516/516 instructions, structural/exact differences (0, 13)
|
||||
|
||||
__VIRetraceHandler | halfline declaration order u32 previousVerticalCount;,u32 horizontalCount;,u32 verticalCount; | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
__VIRetraceHandler | halfline declaration order u32 previousVerticalCount;,u32 verticalCount;,u32 horizontalCount; | 516/516 instructions, structural/exact differences (0, 11)
|
||||
|
||||
__VIRetraceHandler | halfline declaration order u32 verticalCount;,u32 horizontalCount;,u32 previousVerticalCount; | 516/516 instructions, structural/exact differences (0, 13)
|
||||
|
||||
__VIRetraceHandler | halfline declaration order u32 verticalCount;,u32 previousVerticalCount;,u32 horizontalCount; | 516/516 instructions, structural/exact differences (0, 13)
|
||||
|
||||
__VIRetraceHandler | vertical-first halfline order u32 horizontalCount;,u32 previousVerticalCount;,u32 verticalCount; | 516/516 instructions, structural/exact differences (2, 9)
|
||||
|
||||
__VIRetraceHandler | vertical-first halfline order u32 horizontalCount;,u32 verticalCount;,u32 previousVerticalCount; | 516/516 instructions, structural/exact differences (2, 11)
|
||||
|
||||
__VIRetraceHandler | vertical-first halfline order u32 previousVerticalCount;,u32 horizontalCount;,u32 verticalCount; | 516/516 instructions, structural/exact differences (2, 11)
|
||||
|
||||
__VIRetraceHandler | vertical-first halfline order u32 previousVerticalCount;,u32 verticalCount;,u32 horizontalCount; | 516/516 instructions, structural/exact differences (0, 8)
|
||||
|
||||
__VIRetraceHandler | vertical-first halfline order u32 verticalCount;,u32 horizontalCount;,u32 previousVerticalCount; | 516/516 instructions, structural/exact differences (2, 9)
|
||||
|
||||
__VIRetraceHandler | vertical-first halfline order u32 verticalCount;,u32 previousVerticalCount;,u32 horizontalCount; | 516/516 instructions, structural/exact differences (0, 0)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | country loop reuse property index | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | security index unsigned | 609/609 instructions, structural/exact differences (1, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | security pointer function scoped | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | security use cached key pointer | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
## Structural diagnosis and data audit
|
||||
|
||||
Origin was fetched before the function batch; git diff HEAD origin/main for the four code leaves was empty. Initial ctxdiff results: Zi8MatchROMdata1 128/128 instructions, 5 differences, only r26/r27 allocation; Zi8GetDataSignature 69/69, 9 differences, destination/language/signature saved registers; Zi8IsDupWChar 63/63, 8 differences, character/duplicate allocation; Getter_ 609/609, 14 differences, security-buffer/index and country-loop registers; VIInit 338/338, 14 differences in inlined AdjustPosition and the shared zero constant; __VIRetraceHandler 516/516, 11 differences in inlined getCurrentHalfLine. Stack frames, branches, and helper boundaries agree in all six baseline functions. Initial position-callback experiments in retrace changed the wrong inline region and were discarded; target disassembly localized the difference to VISetRegs -> getCurrentFieldEvenOdd -> getCurrentHalfLine.
|
||||
|
||||
Declaration searches: zi8dawg leading locals, 2 builds, best 0 structural/5 exact differences; signature leading locals, 2 builds, best 0/9; duplicate leading locals, 6 builds, best 0/8; VIInit leading locals, 36 builds, best 0/14. No changes retained.
|
||||
|
||||
MyTiManager data: all 91 functions are already exact. Target .data 984 bytes, compiled .data 944 bytes. Every named vtable has the same offset, size and relocation sequence; Manager is 320 bytes at 0x270, final entries at 0x3a0, 0x3a4, 0x3a8, 0x3ac relocate to createMemoInputForm/createLetterInputForm/createBigTextInputForm/createBG. Target lbl_816681E8 is 40 zero bytes beginning at 0x3b0, without relocations, after that table. No type or incoming relocation proves a real owner, so neither its extent nor the split boundary is changed. Target .sdata positions at 0, 8, 16 correspond to source hidden/appearing/letter VEC2 constants, but .sdata already scores 100 and renaming adds no match. No speculative rename. .bss, .ctors, .sbss, .sdata, .sdata2 already score 100. Other four owned units already have 100 percent data, including exception tables, switch tables and literal pools; no data metadata changes are needed.
|
||||
|
||||
Accepted retrace candidate: getCurrentHalfLine declares verticalCount, previousVerticalCount, horizontalCount, and sums the vertical factor before the horizontal quotient. This produces 516/516 instructions, ctxdiff 0. Quick full build/DOL gate passed; vi improves 28 -> 29 instruction-exact functions, code 7880 -> 9944, data stays 1944; zero regressions and zero forbidden/readability findings. Clean full gate pending before commit.
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | country loop reuse byte-property index | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | dummy security index reuse property index | 609/609 instructions, structural/exact differences (0, 14)
|
||||
|
||||
Getter___Q23www10wiisettingFP14WWWJSPluginObjPCcP16WWWJSPluginValue | security buf assigned before strlen | 610/609 instructions, structural/exact differences (30, 379)
|
||||
|
||||
Zi8GetDataSignature | signature table selector byte with length unsigned | 66/69 instructions, structural/exact differences (8, 42)
|
||||
|
||||
Zi8GetDataSignature | signature pointer scoped to successful branch | 73/69 instructions, structural/exact differences (9, 68)
|
||||
|
||||
Zi8GetDataSignature | signature combined pointer length declaration block | 69/69 instructions, structural/exact differences (7, 16)
|
||||
|
||||
Zi8IsDupWChar | duplicate buffer append explicit count update | 64/63 instructions, structural/exact differences (4, 31)
|
||||
|
||||
Zi8IsDupWChar | duplicate pointer and result together scoped | 63/63 instructions, structural/exact differences (0, 8)
|
||||
|
||||
Zi8IsDupWChar | duplicate loop count signed | 63/63 instructions, structural/exact differences (0, 8)
|
||||
|
||||
VIInit | adjust fractional field unsigned byte | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
VIInit | adjust fractional field signed halfword | 339/338 instructions, structural/exact differences (7, 160)
|
||||
|
||||
VIInit | adjust coefficient signed halfword | 339/338 instructions, structural/exact differences (8, 157)
|
||||
|
||||
VIInit | adjust fraction declared before coefficient | 338/338 instructions, structural/exact differences (0, 14)
|
||||
|
||||
## Final open-function audit
|
||||
|
||||
The first clean full gate over all five leaves passed, with the retail DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d, zero regressions, zero forbidden additions, and zero readability findings. Commit 72f78211 preserves the exact retrace result and the initial attempts record. Later trials retained no additional source changes.
|
||||
|
||||
Every remaining function has at least three distinct executed source-level attempts in this log: Zi8MatchROMdata1 7, Zi8GetDataSignature 10, Zi8IsDupWChar 14, Getter_ 11, VIInit 11. The failed C89 mid-block declaration is included in the record but is not needed to meet that minimum. Declaration-order trials and helper-boundary trials are separate from type, expression and control-flow changes. All unsuccessful source variants were restored, and all build products will be recreated by the final clean gate.
|
||||
|
||||
Remaining: Zi8MatchROMdata1 99.765625%, 128/128 instructions, 5 saved-register differences; Zi8GetDataSignature 99.347824%, 69/69, 9 saved-register differences; Zi8IsDupWChar 99.36508%, 63/63, 8 character/duplicate register differences; Getter_ 99.86043%, 609/609, 14 security-buffer/country-index register differences; VIInit 99.7929%, 338/338, 14 inline clipping/shared-zero register differences. No fuzzy-only source experiment is retained. MyTiManager's 40-byte relocation-free zero tail remains unproven; no padding, forced object, speculative data label or section boundary change was added.
|
||||
|
||||
Final clean full gate: GATE PASS. All five unit pools IDENTICAL. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Zero regressions, forbidden additions and readability findings. Instruction-exact counts MyTiManager 91 -> 91, zi8dawg 5 -> 5, www_wiisetting 20 -> 20, zi8getc2 15 -> 15, vi 28 -> 29. Matched code bytes 20196 -> 20196, 4356 -> 4356, 3740 -> 3740, 6360 -> 6360, 7880 -> 9944; matched data bytes unchanged 148, 120, 3856, 332, 1944 respectively.
|
||||
Reference in New Issue
Block a user