Compare commits

...

28 Commits

Author SHA1 Message Date
Devin AI
e10ff76a51 Link 28 fa tail units; flatten MBR_WORD assoc for scheduling
- 26 units already 100% baseline: pdm_api, pdm_bpb, pf_filelock,
  pf_stub_standard, pf_stub_unicode + all 21 pfs_*
- pdm_disk + pf_system .text byte-identical (orig symbol-name/extent
  artifacts only) -> flipped to Matching, DOL hash verified
- pdm_partition MBR_WORD flattened to b3<<24+b2<<16+b1<<8+b0 (46 diffs,
  was 58); remaining are batch-scheduling/regalloc ties

Co-Authored-By: wch <usernamecole7@gmail.com>
2026-09-30 21:49:57 +00:00
github-actions[bot]
1d5184b30e docs: update progress [skip ci] 2026-09-30 21:38:54 +00:00
devin-ai-integration[bot]
a27b6aa96e Link 47 fa units (finfo..xdivide + pf_w_* batch) (#414)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-09-30 21:38:17 +00:00
coah
112149c8e5 KPAD 18/29 (fuzzy 84 -> 98.5) (worker e7585e33) (#413) 2026-09-30 16:09:46 -05:00
coah
45a6d499ec pfd_cmn 1/1, sd_drv 15/26 (worker 64325785) (#412) 2026-09-30 16:06:22 -05:00
github-actions[bot]
813110e681 docs: update progress [skip ci] 2026-09-30 20:40:48 +00:00
devin-ai-integration[bot]
f4a48bd996 Link 15 fa pf units (cdelete..fconcat) (#411)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-09-30 20:40:01 +00:00
coah
f1590c832e wad 27/40 (fuzzy 86 -> 92) (worker c964c352) (#410) 2026-09-30 15:30:30 -05:00
coah
d6cafeab4d zi8cgetc: GetZH closer, data 24 -> 72 (worker bb87205d) (#409) 2026-09-30 15:18:11 -05:00
coah
c047b544c1 nand_drv 18/18, sd_drv 13/26 (no volatile casts) (worker 26ae07cf) (#408) 2026-09-30 15:16:57 -05:00
coah
82dbaac35d CHANSVm: CHANSVmStep 96.4% (worker 87e5a30c) (#407) 2026-09-30 14:46:29 -05:00
coah
e8d4107b11 BS2Mach/BS2Update: closer (fuzzy only) (worker fb7be869) (#406) 2026-09-30 14:33:27 -05:00
coah
1b96b3956b tiInputForm: fuzzy 97 -> 99.5, 3 more asm bodies to C (worker d126d226) (#405) 2026-09-30 14:30:55 -05:00
github-actions[bot]
81c36c4db0 docs: update progress [skip ci] 2026-09-30 19:12:04 +00:00
devin-ai-integration[bot]
355564cd77 Link pf_fat32, pf_sector, pf_volume_apiadd, pf_buffering (#404)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-09-30 19:11:15 +00:00
coah
17b5d5946b Texture_MCUtoY8U8V8: nine functions ~50% -> 99% (registers only) (worker b2970e86) (#403) 2026-09-30 13:55:41 -05:00
github-actions[bot]
ed5a62397d docs: update progress [skip ci] 2026-09-30 18:50:46 +00:00
coah
2a34d3703b Revert "Link fa/driver nand_drv + msc_drv (#400)" (#402)
This reverts commit 787aa9d334.
2026-09-30 13:50:09 -05:00
coah
3f5248be4c CHANSVm: data 100%, all 121 jump-table relocations match (worker 7c42cd13) (#401) 2026-09-30 13:48:47 -05:00
github-actions[bot]
59e127f89a docs: update progress [skip ci] 2026-09-30 18:41:42 +00:00
devin-ai-integration[bot]
787aa9d334 Link fa/driver nand_drv + msc_drv (#400)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-09-30 18:41:06 +00:00
coah
30809a5b05 BS2Mach: BS2Tick 77 -> 98% (worker 86b254ad) (#399) 2026-09-30 13:34:56 -05:00
coah
c21ae517d5 fix: replace lbl_ string pin in FAInit with a literal (#398) 2026-09-30 13:19:03 -05:00
coah
5c7d7ca74a zi8match 8/10 (data 100%) (worker 5d91f712) (#397) 2026-09-30 13:17:06 -05:00
github-actions[bot]
7a94e90a6e docs: update progress [skip ci] 2026-09-30 18:11:32 +00:00
devin-ai-integration[bot]
cec99e3cf8 Link vi/i2c + vi3in1 (#396)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-09-30 18:10:55 +00:00
github-actions[bot]
6172b57647 docs: update progress [skip ci] 2026-09-30 18:10:40 +00:00
devin-ai-integration[bot]
bed8e32e57 Link 18 fa/api units (#395)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-09-30 18:10:01 +00:00
35 changed files with 9726 additions and 3223 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 98.16% | 84.94% | 59.34% | 90.44% |
| 98.66% | 85.78% | 59.99% | 90.87% |
units 785/1027 complete, functions 12075/12563 matched.
units 871/1027 complete, functions 12108/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

@@ -1389,8 +1389,8 @@ config.libs = [
),
RVLSDKLib("vi", [
Object(NonMatching, "vi/vi.c"),
Object(NonMatching, "vi/i2c.c"),
Object(NonMatching, "vi/vi3in1.c"),
Object(Matching, "vi/i2c.c"),
Object(Matching, "vi/vi3in1.c"),
]
),
RVLSDKLib("mtx", [
@@ -1687,9 +1687,9 @@ config.libs = [
Object(Matching, "fa/pf_service.c"),
Object(Matching, "fa/pf_str.c"),
Object(Matching, "fa/pf_driver.c"),
Object(NonMatching, "fa/pdm_api.c"),
Object(NonMatching, "fa/pdm_bpb.c"),
Object(NonMatching, "fa/pdm_disk.c"),
Object(Matching, "fa/pdm_api.c"),
Object(Matching, "fa/pdm_bpb.c"),
Object(Matching, "fa/pdm_disk.c"),
Object(NonMatching, "fa/pdm_partition.c"),
Object(NonMatching, "fa/pf_cache.c"),
Object(NonMatching, "fa/pf_cluster.c"),
@@ -1699,157 +1699,157 @@ config.libs = [
Object(NonMatching, "fa/pf_fat.c"),
Object(NonMatching, "fa/pf_fat12.c"),
Object(NonMatching, "fa/pf_fat16.c"),
Object(NonMatching, "fa/pf_fat32.c"),
Object(Matching, "fa/pf_fat32.c"),
Object(Matching, "fa/pf_fatfs.c"),
Object(NonMatching, "fa/pf_file.c"),
Object(NonMatching, "fa/pf_path.c"),
Object(NonMatching, "fa/pf_sector.c"),
Object(Matching, "fa/pf_sector.c"),
Object(NonMatching, "fa/pf_volume.c"),
Object(NonMatching, "fa/pf_volume_apiadd.c"),
Object(Matching, "fa/pf_volume_apiadd.c"),
Object(NonMatching, "fa/pf_cp932.c"),
Object(Matching, "fa/pf_api_util.c"),
Object(Matching, "fa/pf_attach.c"),
Object(NonMatching, "fa/pf_buffering.c"),
Object(NonMatching, "fa/pf_cdelete.c"),
Object(NonMatching, "fa/pf_chdir.c"),
Object(NonMatching, "fa/pf_chdmod.c"),
Object(NonMatching, "fa/pf_chmod.c"),
Object(NonMatching, "fa/pf_cinsert.c"),
Object(Matching, "fa/pf_buffering.c"),
Object(Matching, "fa/pf_cdelete.c"),
Object(Matching, "fa/pf_chdir.c"),
Object(Matching, "fa/pf_chdmod.c"),
Object(Matching, "fa/pf_chmod.c"),
Object(Matching, "fa/pf_cinsert.c"),
Object(Matching, "fa/pf_closedir.c"),
Object(NonMatching, "fa/pf_combine.c"),
Object(NonMatching, "fa/pf_create.c"),
Object(NonMatching, "fa/pf_createdir.c"),
Object(NonMatching, "fa/pf_cut.c"),
Object(NonMatching, "fa/pf_derrnum.c"),
Object(Matching, "fa/pf_combine.c"),
Object(Matching, "fa/pf_create.c"),
Object(Matching, "fa/pf_createdir.c"),
Object(Matching, "fa/pf_cut.c"),
Object(Matching, "fa/pf_derrnum.c"),
Object(Matching, "fa/pf_detach.c"),
Object(NonMatching, "fa/pf_divide.c"),
Object(Matching, "fa/pf_divide.c"),
Object(Matching, "fa/pf_errnum.c"),
Object(NonMatching, "fa/pf_fadjust.c"),
Object(NonMatching, "fa/pf_fappend.c"),
Object(NonMatching, "fa/pf_fchdir.c"),
Object(Matching, "fa/pf_fadjust.c"),
Object(Matching, "fa/pf_fappend.c"),
Object(Matching, "fa/pf_fchdir.c"),
Object(Matching, "fa/pf_fclose.c"),
Object(NonMatching, "fa/pf_fconcat.c"),
Object(Matching, "fa/pf_fconcat.c"),
Object(Matching, "fa/pf_feof.c"),
Object(Matching, "fa/pf_ferror.c"),
Object(NonMatching, "fa/pf_finfo.c"),
Object(Matching, "fa/pf_finfo.c"),
Object(Matching, "fa/pf_flock.c"),
Object(Matching, "fa/pf_fopen.c"),
Object(NonMatching, "fa/pf_format.c"),
Object(Matching, "fa/pf_format.c"),
Object(Matching, "fa/pf_fread.c"),
Object(Matching, "fa/pf_fseek.c"),
Object(NonMatching, "fa/pf_fsetclstlink.c"),
Object(NonMatching, "fa/pf_fsexec.c"),
Object(Matching, "fa/pf_fsetclstlink.c"),
Object(Matching, "fa/pf_fsexec.c"),
Object(Matching, "fa/pf_fsfirst.c"),
Object(Matching, "fa/pf_fsnext.c"),
Object(Matching, "fa/pf_fstat.c"),
Object(Matching, "fa/pf_fsync.c"),
Object(Matching, "fa/pf_fwrite.c"),
Object(NonMatching, "fa/pf_getdev.c"),
Object(NonMatching, "fa/pf_getvol.c"),
Object(NonMatching, "fa/pf_getvolcfg.c"),
Object(NonMatching, "fa/pf_init_prfile2.c"),
Object(NonMatching, "fa/pf_insert.c"),
Object(NonMatching, "fa/pf_iswriteprotected.c"),
Object(Matching, "fa/pf_getdev.c"),
Object(Matching, "fa/pf_getvol.c"),
Object(Matching, "fa/pf_getvolcfg.c"),
Object(Matching, "fa/pf_init_prfile2.c"),
Object(Matching, "fa/pf_insert.c"),
Object(Matching, "fa/pf_iswriteprotected.c"),
Object(Matching, "fa/pf_mkdir.c"),
Object(Matching, "fa/pf_mount.c"),
Object(NonMatching, "fa/pf_move.c"),
Object(Matching, "fa/pf_move.c"),
Object(Matching, "fa/pf_opendir.c"),
Object(Matching, "fa/pf_readdir.c"),
Object(NonMatching, "fa/pf_regctx.c"),
Object(Matching, "fa/pf_regctx.c"),
Object(Matching, "fa/pf_remove.c"),
Object(Matching, "fa/pf_rename.c"),
Object(Matching, "fa/pf_rewinddir.c"),
Object(Matching, "fa/pf_rmdir.c"),
Object(NonMatching, "fa/pf_rmvvol.c"),
Object(Matching, "fa/pf_rmvvol.c"),
Object(Matching, "fa/pf_seekdir.c"),
Object(NonMatching, "fa/pf_setclstlink.c"),
Object(NonMatching, "fa/pf_setcode.c"),
Object(NonMatching, "fa/pf_setencode.c"),
Object(NonMatching, "fa/pf_settailbuf.c"),
Object(NonMatching, "fa/pf_setupfsi.c"),
Object(NonMatching, "fa/pf_setvol.c"),
Object(NonMatching, "fa/pf_setvolcfg.c"),
Object(NonMatching, "fa/pf_sync.c"),
Object(Matching, "fa/pf_setclstlink.c"),
Object(Matching, "fa/pf_setcode.c"),
Object(Matching, "fa/pf_setencode.c"),
Object(Matching, "fa/pf_settailbuf.c"),
Object(Matching, "fa/pf_setupfsi.c"),
Object(Matching, "fa/pf_setvol.c"),
Object(Matching, "fa/pf_setvolcfg.c"),
Object(Matching, "fa/pf_sync.c"),
Object(Matching, "fa/pf_telldir.c"),
Object(Matching, "fa/pf_unmount.c"),
Object(NonMatching, "fa/pf_unregctx.c"),
Object(NonMatching, "fa/pf_xdivide.c"),
Object(Matching, "fa/pf_unregctx.c"),
Object(Matching, "fa/pf_xdivide.c"),
Object(Matching, "fa/pf_w_api_util.c"),
Object(NonMatching, "fa/pf_w_cdelete.c"),
Object(NonMatching, "fa/pf_w_chdir.c"),
Object(NonMatching, "fa/pf_w_chdmod.c"),
Object(NonMatching, "fa/pf_w_chmod.c"),
Object(NonMatching, "fa/pf_w_cinsert.c"),
Object(NonMatching, "fa/pf_w_combine.c"),
Object(NonMatching, "fa/pf_w_create.c"),
Object(NonMatching, "fa/pf_w_createdir.c"),
Object(NonMatching, "fa/pf_w_cut.c"),
Object(NonMatching, "fa/pf_w_divide.c"),
Object(NonMatching, "fa/pf_w_fconcat.c"),
Object(NonMatching, "fa/pf_w_fopen.c"),
Object(NonMatching, "fa/pf_w_fsexec.c"),
Object(NonMatching, "fa/pf_w_fsfirst.c"),
Object(NonMatching, "fa/pf_w_fsnext.c"),
Object(NonMatching, "fa/pf_w_fstat.c"),
Object(NonMatching, "fa/pf_w_insert.c"),
Object(NonMatching, "fa/pf_w_mkdir.c"),
Object(NonMatching, "fa/pf_w_move.c"),
Object(NonMatching, "fa/pf_w_opendir.c"),
Object(NonMatching, "fa/pf_w_remove.c"),
Object(NonMatching, "fa/pf_w_rename.c"),
Object(NonMatching, "fa/pf_w_rmdir.c"),
Object(NonMatching, "fa/pf_w_xdivide.c"),
Object(NonMatching, "fa/pf_filelock.c"),
Object(Matching, "fa/pf_w_cdelete.c"),
Object(Matching, "fa/pf_w_chdir.c"),
Object(Matching, "fa/pf_w_chdmod.c"),
Object(Matching, "fa/pf_w_chmod.c"),
Object(Matching, "fa/pf_w_cinsert.c"),
Object(Matching, "fa/pf_w_combine.c"),
Object(Matching, "fa/pf_w_create.c"),
Object(Matching, "fa/pf_w_createdir.c"),
Object(Matching, "fa/pf_w_cut.c"),
Object(Matching, "fa/pf_w_divide.c"),
Object(Matching, "fa/pf_w_fconcat.c"),
Object(Matching, "fa/pf_w_fopen.c"),
Object(Matching, "fa/pf_w_fsexec.c"),
Object(Matching, "fa/pf_w_fsfirst.c"),
Object(Matching, "fa/pf_w_fsnext.c"),
Object(Matching, "fa/pf_w_fstat.c"),
Object(Matching, "fa/pf_w_insert.c"),
Object(Matching, "fa/pf_w_mkdir.c"),
Object(Matching, "fa/pf_w_move.c"),
Object(Matching, "fa/pf_w_opendir.c"),
Object(Matching, "fa/pf_w_remove.c"),
Object(Matching, "fa/pf_w_rename.c"),
Object(Matching, "fa/pf_w_rmdir.c"),
Object(Matching, "fa/pf_w_xdivide.c"),
Object(Matching, "fa/pf_filelock.c"),
Object(NonMatching, "fa/pf_stub.c"),
Object(NonMatching, "fa/pf_system.c"),
Object(NonMatching, "fa/pf_stub_standard.c"),
Object(NonMatching, "fa/pfs_attach.c"),
Object(NonMatching, "fa/pfs_buffering.c"),
Object(NonMatching, "fa/pfs_create.c"),
Object(NonMatching, "fa/pfs_createdir.c"),
Object(NonMatching, "fa/pfs_detach.c"),
Object(NonMatching, "fa/pfs_errnum.c"),
Object(NonMatching, "fa/pfs_fclose.c"),
Object(NonMatching, "fa/pfs_finfot.c"),
Object(NonMatching, "fa/pfs_fopen.c"),
Object(NonMatching, "fa/pfs_format.c"),
Object(NonMatching, "fa/pfs_fread.c"),
Object(NonMatching, "fa/pfs_fseek.c"),
Object(NonMatching, "fa/pfs_fsfirst.c"),
Object(NonMatching, "fa/pfs_fsnext.c"),
Object(NonMatching, "fa/pfs_fstat.c"),
Object(NonMatching, "fa/pfs_fwrite.c"),
Object(NonMatching, "fa/pfs_getdev.c"),
Object(NonMatching, "fa/pfs_init_prfile2.c"),
Object(NonMatching, "fa/pfs_mount.c"),
Object(NonMatching, "fa/pfs_remove.c"),
Object(NonMatching, "fa/pfs_unmount.c"),
Object(NonMatching, "fa/pf_stub_unicode.c"),
Object(Matching, "fa/pf_system.c"),
Object(Matching, "fa/pf_stub_standard.c"),
Object(Matching, "fa/pfs_attach.c"),
Object(Matching, "fa/pfs_buffering.c"),
Object(Matching, "fa/pfs_create.c"),
Object(Matching, "fa/pfs_createdir.c"),
Object(Matching, "fa/pfs_detach.c"),
Object(Matching, "fa/pfs_errnum.c"),
Object(Matching, "fa/pfs_fclose.c"),
Object(Matching, "fa/pfs_finfot.c"),
Object(Matching, "fa/pfs_fopen.c"),
Object(Matching, "fa/pfs_format.c"),
Object(Matching, "fa/pfs_fread.c"),
Object(Matching, "fa/pfs_fseek.c"),
Object(Matching, "fa/pfs_fsfirst.c"),
Object(Matching, "fa/pfs_fsnext.c"),
Object(Matching, "fa/pfs_fstat.c"),
Object(Matching, "fa/pfs_fwrite.c"),
Object(Matching, "fa/pfs_getdev.c"),
Object(Matching, "fa/pfs_init_prfile2.c"),
Object(Matching, "fa/pfs_mount.c"),
Object(Matching, "fa/pfs_remove.c"),
Object(Matching, "fa/pfs_unmount.c"),
Object(Matching, "fa/pf_stub_unicode.c"),
Object(NonMatching, "fa/api/FAAttach.c"),
Object(NonMatching, "fa/api/FABuffering.c"),
Object(NonMatching, "fa/api/FACreate.c"),
Object(NonMatching, "fa/api/FACreatedir.c"),
Object(NonMatching, "fa/api/FADetach.c"),
Object(NonMatching, "fa/api/FAErrnum.c"),
Object(Matching, "fa/api/FABuffering.c"),
Object(Matching, "fa/api/FACreate.c"),
Object(Matching, "fa/api/FACreatedir.c"),
Object(Matching, "fa/api/FADetach.c"),
Object(Matching, "fa/api/FAErrnum.c"),
Object(Matching, "fa/api/FAFclose.c"),
Object(Matching, "fa/api/FAFinfo.c"),
Object(NonMatching, "fa/api/FAFopen.c"),
Object(NonMatching, "fa/api/FAFormat.c"),
Object(Matching, "fa/api/FAFopen.c"),
Object(Matching, "fa/api/FAFormat.c"),
Object(Matching, "fa/api/FAFread.c"),
Object(NonMatching, "fa/api/FAFseek.c"),
Object(NonMatching, "fa/api/FAFsfirst.c"),
Object(NonMatching, "fa/api/FAFsnext.c"),
Object(NonMatching, "fa/api/FAFstat.c"),
Object(Matching, "fa/api/FAFseek.c"),
Object(Matching, "fa/api/FAFsfirst.c"),
Object(Matching, "fa/api/FAFsnext.c"),
Object(Matching, "fa/api/FAFstat.c"),
Object(Matching, "fa/api/FAFwrite.c"),
Object(NonMatching, "fa/api/FAGetdev.c"),
Object(NonMatching, "fa/api/FAInit.c"),
Object(Matching, "fa/api/FAGetdev.c"),
Object(Matching, "fa/api/FAInit.c"),
Object(Matching, "fa/api/FAInitDiskManager.c"),
Object(NonMatching, "fa/api/FAMount.c"),
Object(NonMatching, "fa/api/FARegistCB.c"),
Object(NonMatching, "fa/api/FARemove.c"),
Object(NonMatching, "fa/api/FASetThreadPriority.c"),
Object(NonMatching, "fa/api/FAUnmount.c"),
Object(Matching, "fa/api/FAMount.c"),
Object(Matching, "fa/api/FARegistCB.c"),
Object(Matching, "fa/api/FARemove.c"),
Object(Matching, "fa/api/FASetThreadPriority.c"),
Object(Matching, "fa/api/FAUnmount.c"),
Object(NonMatching, "fa/kernel/pfk_api.c"),

View File

@@ -415,7 +415,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
break;
}
if (rangeIndex) {
rangeIndex = (ziU16)Zi8GetTableCount(1, 27, work);
rangeIndex = Zi8GetTableCount(1, 27, work);
if (rangeIndex) componentCharsetTable = (ziU8*)Zi8GetTableAddress(1, 27, work);
charsetTable = (ziU8*)Zi8GetTableAddress(1, 21, work);
}
@@ -690,7 +690,7 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
rangeIndex = match.phon[match.nCand - 1] & 0xFFF8;
rangeCount = match.phon2[match.nCand - 1] & 0xFFF8;
for (index = 0; index < ordinalIndex; ++index) {
phraseOrdinal = phoneticTable[index * 2] | (phoneticTable[index * 2 + 1] << 8);
phraseOrdinal = phoneticTable[index * 2] | ((ziU16)phoneticTable[index * 2 + 1] << 8);
if (rangeCount == (phraseOrdinal & rangeIndex)) break;
}
if (index == ordinalIndex) goto engine_finish;
@@ -1168,7 +1168,7 @@ context_word_lookup:
do {
--remainingWordLength;
if (!remainingWordLength) break;
candidateOrdinal = phoneticGroups[1] << 8 | phoneticGroups[0];
candidateOrdinal = (ziU16)phoneticGroups[1] << 8 | phoneticGroups[0];
phoneticGroups += 2;
if (phoneticGroups[-1] & 0x80) break;
character = Zi8Ord2Uni(candidateOrdinal, work);
@@ -1176,7 +1176,7 @@ context_word_lookup:
if (*currentWord != character) break;
} while (1);
if (remainingWordLength) goto context_phrase_next;
candidateOrdinal = phoneticGroups[1] << 8 | phoneticGroups[0];
candidateOrdinal = (ziU16)phoneticGroups[1] << 8 | phoneticGroups[0];
frequencyTable = phoneticGroups;
phoneticGroups += 2;
character = candidateOrdinal & 0x7FFF;
@@ -1185,7 +1185,7 @@ context_word_lookup:
else {
candidateStatus = 0;
record = records + character * 12;
isFirstCandidate = record[6] * 256 + record[7];
isFirstCandidate = ((ziU16)record[6] << 8) + record[7];
switch (getMode) {
case 7: case 8:
phraseEntry = phraseTable + ((record[9] & 15) << 16 | record[11] | record[10] << 8);
@@ -1227,7 +1227,7 @@ context_phrase_match:
++duplicateIndex;
if (duplicateIndex >= match.nSeg) break;
if (candidateOrdinal & 0x8000) { candidateStatus = 0; break; }
candidateOrdinal = phoneticGroups[1] << 8 | phoneticGroups[0];
candidateOrdinal = (ziU16)phoneticGroups[1] << 8 | phoneticGroups[0];
phoneticGroups += 2;
relatedOrdinal = candidateOrdinal & 0x7FFF;
}
@@ -1247,7 +1247,7 @@ context_phrase_match:
++duplicateIndex;
if (duplicateIndex >= match.nCand) break;
if (candidateOrdinal & 0x8000) { candidateStatus = 0; break; }
candidateOrdinal = phoneticGroups[1] << 8 | phoneticGroups[0];
candidateOrdinal = (ziU16)phoneticGroups[1] << 8 | phoneticGroups[0];
phoneticGroups += 2;
relatedOrdinal = candidateOrdinal & 0x7FFF;
}
@@ -1262,7 +1262,7 @@ context_phrase_match:
if (charsetTable) {
index = 0;
while (1) {
isFirstCandidate = frequencyTable[index * 2 + 1] << 8 | frequencyTable[index * 2];
isFirstCandidate = (ziU16)frequencyTable[index * 2 + 1] << 8 | frequencyTable[index * 2];
charsetEntry = charsetTable + (isFirstCandidate & 0x7FFF);
if (!(charsetEntry[0] & charsetFilter)) { isFirstCandidate = 0; break; }
if (frequencyTable[index * 2 + 1] & 0x80) break;
@@ -1276,7 +1276,7 @@ context_phrase_match:
} else {
emittedWords = 0;
do {
character = frequencyTable[1] << 8 | frequencyTable[0];
character = (ziU16)frequencyTable[1] << 8 | frequencyTable[0];
frequencyTable += 2;
output[outputIndex + emittedWords] = Zi8Ord2Uni(character & 0x7FFF, work);
++emittedWords;
@@ -1344,7 +1344,7 @@ dictionary_search:
for (rangeIndex = 0; rangeIndex < rangeCount; ++rangeIndex) {
if (lastCharHigh == phoneticGroups[0] && lastCharLow == phoneticGroups[1]) {
for (rangeIndex = 0; rangeIndex < 4; ++rangeIndex) {
character = phoneticGroups[2] * 256 + phoneticGroups[3];
character = ((ziU16)phoneticGroups[2] << 8) + phoneticGroups[3];
if (!character) goto numeric_setup;
if (!emitWords) {
for (index = 0; index < emittedCount && character != output[index]; ++index) {}
@@ -1393,7 +1393,7 @@ numeric_setup:
candidate_dictionary_search:
if (!options->countOnly && ordinalCount && (getMode == 7 || getMode == 8 || getMode == 9)) {
for (ordinalIndex = 0; ordinalIndex < ordinalCount; ++ordinalIndex) {
candidateOrdinal = ordinalTable[ordinalIndex * 2] * 256 + ordinalTable[ordinalIndex * 2 + 1];
candidateOrdinal = ((ziU16)ordinalTable[ordinalIndex * 2] << 8) + ordinalTable[ordinalIndex * 2 + 1];
record = records + candidateOrdinal * 12;
if (!(record[0] & charset)) continue;
phraseEntry = phraseTable + ((record[9] & 15) << 16 | record[11] | record[10] << 8);
@@ -1480,9 +1480,9 @@ character_range_start:
break;
case 2: rangeIndex = 4; rangeCount = 6; phase = 0xFF; break;
}
firstOrdinal = phoneticGroups[rangeIndex + 1] << 8 | phoneticGroups[rangeIndex];
firstOrdinal = (ziU16)phoneticGroups[rangeIndex + 1] << 8 | phoneticGroups[rangeIndex];
record += firstOrdinal * 12;
candidateCount = (phoneticGroups[rangeCount + 1] << 8 | phoneticGroups[rangeCount]) - firstOrdinal;
candidateCount = ((ziU16)phoneticGroups[rangeCount + 1] << 8 | phoneticGroups[rangeCount]) - firstOrdinal;
}
remainingOrdinals = candidateCount;
while (1) {
@@ -1540,7 +1540,7 @@ character_range_done:
if (!options->countOnly && phoneticRetry && ordinalCount && getMode != 5) {
tableIndex = 0;
while (tableIndex < ordinalCount) {
phraseOrdinal = ordinalTable[tableIndex * 2] * 256 + ordinalTable[tableIndex * 2 + 1];
phraseOrdinal = ((ziU16)ordinalTable[tableIndex * 2] << 8) + ordinalTable[tableIndex * 2 + 1];
record = records + phraseOrdinal * 12;
candidateCount = 1;
if (exactPhrase) {
@@ -1610,7 +1610,7 @@ ordinal_next:
phoneticMatch = 0x10;
phonetic_ordinal_search:
for (tableIndex = 0; tableIndex < ordinalCount; ++tableIndex) {
phraseOrdinal = ordinalTable[tableIndex * 2] * 256 + ordinalTable[tableIndex * 2 + 1];
phraseOrdinal = ((ziU16)ordinalTable[tableIndex * 2] << 8) + ordinalTable[tableIndex * 2 + 1];
record = records + phraseOrdinal * 12;
candidateCount = 0;
phoneticGroups = 0;
@@ -1765,7 +1765,7 @@ user_character_search:
candidateOrdinal = (userEntries[1] & 0x7F) << 8 | userEntries[2];
record = records + candidateOrdinal * 12;
if (!(record[0] & charset)) goto user_character_next;
character = record[6] * 256 + record[7];
character = ((ziU16)record[6] << 8) + record[7];
candidateStatus = 0;
switch (getMode) {
case 7: case 8:
@@ -1851,7 +1851,7 @@ global_character_loop:
charsetEntry = charsetTable + ordinalIndex;
if (!(charsetEntry[0] & charsetFilter)) goto global_character_next;
}
character = record[6] * 256 + record[7];
character = ((ziU16)record[6] << 8) + record[7];
((ZiChineseWork*)work)->duplicateOrdinals[((ZiChineseWork*)work)->duplicateIndex] = ordinalIndex;
((ZiChineseWork*)work)->duplicateCharacters[((ZiChineseWork*)work)->duplicateIndex] = character;
if (character == previousOrdinal) goto global_character_next;
@@ -1941,9 +1941,9 @@ cangjie_components:
break;
case 2: rangeIndex = 4; rangeCount = 6; phase = 0xFF; break;
}
firstOrdinal = phoneticGroups[rangeIndex + 1] << 8 | phoneticGroups[rangeIndex];
firstOrdinal = (ziU16)phoneticGroups[rangeIndex + 1] << 8 | phoneticGroups[rangeIndex];
record += firstOrdinal * 12;
candidateCount = (phoneticGroups[rangeCount + 1] << 8 | phoneticGroups[rangeCount]) - firstOrdinal;
candidateCount = ((ziU16)phoneticGroups[rangeCount + 1] << 8 | phoneticGroups[rangeCount]) - firstOrdinal;
}
component_retry:
remainingOrdinals = candidateCount;
@@ -1997,7 +1997,7 @@ component_retry:
}
}
for (; groupCount; --groupCount) {
candidateOrdinal = phoneticGroups[1] << 8 | phoneticGroups[0];
candidateOrdinal = (ziU16)phoneticGroups[1] << 8 | phoneticGroups[0];
frequencyTable = phoneticGroups;
duplicateIndex = 1;
component_phrase_word:
@@ -2008,7 +2008,7 @@ component_phrase_word:
match.segsD[duplicateIndex * 12 + 1] != (relatedRecord[1] & match.segs1[duplicateIndex * 12 + 1]) ||
match.segsD[duplicateIndex * 12 + 2] != (relatedRecord[2] & match.segs1[duplicateIndex * 12 + 2]) ||
match.segsD[duplicateIndex * 12 + 3] != (relatedRecord[3] & match.segs1[duplicateIndex * 12 + 3]))) goto component_phrase_next;
currentSpelling[duplicateIndex] = relatedRecord[6] * 256 + relatedRecord[7];
currentSpelling[duplicateIndex] = ((ziU16)relatedRecord[6] << 8) + relatedRecord[7];
++duplicateIndex;
if (duplicateIndex < match.nSeg) {
if (candidateOrdinal & 0x8000) goto component_phrase_next;
@@ -2019,7 +2019,7 @@ component_phrase_word:
if (prefixSearch) goto component_phrase_charset;
component_phrase_continue:
if (candidateOrdinal & 0x8000) goto component_phrase_charset;
candidateOrdinal = phoneticGroups[1] << 8 | phoneticGroups[0];
candidateOrdinal = (ziU16)phoneticGroups[1] << 8 | phoneticGroups[0];
goto component_phrase_word;
}
if (!(candidateOrdinal & 0x8000)) goto component_phrase_next;
@@ -2027,7 +2027,7 @@ component_phrase_charset:
if (charsetTable) {
index = 0;
while (1) {
isFirstCandidate = frequencyTable[index * 2 + 1] << 8 | frequencyTable[index * 2];
isFirstCandidate = (ziU16)frequencyTable[index * 2 + 1] << 8 | frequencyTable[index * 2];
charsetEntry = charsetTable + (isFirstCandidate & 0x7FFF);
if (!(charsetEntry[0] & charsetFilter)) { isFirstCandidate = 0; break; }
if (frequencyTable[index * 2 + 1] & 0x80) break;
@@ -2116,7 +2116,7 @@ frequency_range_retry:
if (Zi8SecMatchComp(componentCursor, &match, componentTable, work) &&
(!componentCharsetTable || (charsetFilter & componentCharsetTable[componentCount - componentIndex]))) {
ordinalIndex = (componentCount - componentIndex) * 2;
alternateCharacter = componentOrdinals[ordinalIndex + 1] << 8 | componentOrdinals[ordinalIndex];
alternateCharacter = (ziU16)componentOrdinals[ordinalIndex + 1] << 8 | componentOrdinals[ordinalIndex];
firstPhoneticPass = 0;
componentFrequency = (componentCursor[6] & 0xFC) >> 2;
}
@@ -2341,7 +2341,7 @@ phonetic_ordinals:
if (phoneticGroups) {
index = 0;
while (1) {
isFirstCandidate = phoneticGroups[index * 2 + 1] << 8 | phoneticGroups[index * 2];
isFirstCandidate = (ziU16)phoneticGroups[index * 2 + 1] << 8 | phoneticGroups[index * 2];
charsetEntry = charsetTable + (isFirstCandidate & 0x7FFF);
if (!(charsetEntry[0] & charsetFilter)) { isFirstCandidate = 0; break; }
if (phoneticGroups[index * 2 + 1] & 0x80) break;
@@ -2360,7 +2360,7 @@ phonetic_ordinals:
emittedWords = 1;
if (match.nCand > 1) {
do {
character = frequencyTable[1] << 8 | frequencyTable[0];
character = (ziU16)frequencyTable[1] << 8 | frequencyTable[0];
frequencyTable += 2;
output[outputIndex + emittedWords] = Zi8Ord2Uni(character & 0x7FFF, work);
++emittedWords;
@@ -2465,9 +2465,9 @@ filtered_search:
rangeCount = 0;
currentWord = request->currentWord;
for (; rangeCount < rangeIndex; ++rangeCount) {
character = frequencyTable[rangeCount * 2] + frequencyTable[rangeCount * 2 + 1] * 256;
character = frequencyTable[rangeCount * 2] + ((ziU16)frequencyTable[rangeCount * 2 + 1] << 8);
record = records + character * 12;
candidateOrdinal = record[6] * 256 + record[7];
candidateOrdinal = ((ziU16)record[6] << 8) + record[7];
if (candidateOrdinal != *currentWord++) goto filtered_next;
}
} else if (filteringMode == 2 || filteringMode == 3) {
@@ -2477,9 +2477,9 @@ filtered_search:
if (index < match.nSeg || (singleCharacterPass && index != match.nSeg) ||
(!singleCharacterPass && index <= match.nSeg)) goto filtered_next;
}
ordinalIndex = frequencyTable[rangeIndex * 2] + frequencyTable[rangeIndex * 2 + 1] * 256;
ordinalIndex = frequencyTable[rangeIndex * 2] + ((ziU16)frequencyTable[rangeIndex * 2 + 1] << 8);
record = records + ordinalIndex * 12;
candidateOrdinal = record[6] * 256 + record[7];
candidateOrdinal = ((ziU16)record[6] << 8) + record[7];
if (request->elementCount) {
if (getMode < 7) {
if (getMode == 0) {
@@ -2489,8 +2489,8 @@ filtered_search:
match.arrD[1] != (record[1] & match.arr1[1]))) ||
!(ziU8)Zi8SecMatchChar(record, componentTable, &match, 0, work)) goto filtered_next;
for (rangeCount = 1; rangeCount < match.nSeg; ++rangeCount) {
record = records + frequencyTable[(rangeIndex + rangeCount) * 2 + 1] * 3072 +
frequencyTable[(rangeIndex + rangeCount) * 2] * 12;
record = records + (ziU16)frequencyTable[(rangeIndex + rangeCount) * 2] * 12 +
((ziU16)frequencyTable[(rangeIndex + rangeCount) * 2 + 1] << 8) * 12;
if (match.segsD[rangeCount * 12] != (record[0] & match.segs1[rangeCount * 12]) ||
match.segsD[rangeCount * 12 + 1] != (record[1] & match.segs1[rangeCount * 12 + 1]) ||
match.segsD[rangeCount * 12 + 2] != (record[2] & match.segs1[rangeCount * 12 + 2]) ||
@@ -2500,7 +2500,7 @@ filtered_search:
phoneticGroups = frequencyTable + (index + rangeIndex) * 2;
for (rangeCount = 0; rangeCount < match.nCand; ++rangeCount) {
if (match.phon2[rangeCount] !=
(match.phon[rangeCount] & (phoneticGroups[0] + phoneticGroups[1] * 256))) goto filtered_next;
(match.phon[rangeCount] & (phoneticGroups[0] + ((ziU16)phoneticGroups[1] << 8)))) goto filtered_next;
phoneticGroups += 2;
}
}
@@ -2528,7 +2528,7 @@ filtered_accept:
((ZiChineseWork*)work)->duplicateCharacters[((ZiChineseWork*)work)->duplicateIndex] = candidateOrdinal;
if (charsetTable) {
for (rangeCount = rangeIndex; rangeCount < index; ++rangeCount) {
character = frequencyTable[rangeCount * 2] + frequencyTable[rangeCount * 2 + 1] * 256;
character = frequencyTable[rangeCount * 2] + ((ziU16)frequencyTable[rangeCount * 2 + 1] << 8);
charsetEntry = charsetTable + character;
if (!(charsetEntry[0] & charsetFilter)) goto filtered_next;
}
@@ -2543,9 +2543,9 @@ filtered_accept:
} else {
for (rangeCount = 0; rangeCount < index - rangeIndex; ++rangeCount) {
character = frequencyTable[(rangeCount + rangeIndex) * 2] +
frequencyTable[(rangeCount + rangeIndex) * 2 + 1] * 256;
((ziU16)frequencyTable[(rangeCount + rangeIndex) * 2 + 1] << 8);
record = records + character * 12;
output[outputIndex + rangeCount] = record[6] * 256 + record[7];
output[outputIndex + rangeCount] = ((ziU16)record[6] << 8) + record[7];
}
if (prefixSearch || filteringMode == 4) {
if (!request->elementCount) rangeCount = 1;

View File

@@ -289,7 +289,7 @@ ziBool Zi8SecMatchComp(ziPtr nodeAddress, ziMatchParam* matchAddress, ziPtr dict
extern ziU16 Zi8MatchAltSound(ziPtr soundTable, ziU16 soundCode, ziPtr pCodeTable, ziU16 index, ziU16 mask, ziU16 value, ziU8 flag ZI_NEED_WORK);
ziU16 Zi8GetPCode(ziU8* table, ziU8* node);
ziBool Zi8MatchPhonetic(ziPtr pCodeTable, ziPtr dictionary, ziPtr soundTable, ziU16 soundCode, ziU32 tableAddress, ziU8* node, ziU16* masks, ziU16* values, ziU16* count, ziU8** resultNode, ziU8** stringOffset, ziU8 partialMode, ziU8 strictMode, ziU8 numParts, ziU16 partMask, ziU16 partValue, ziU8 flag, ziU8 altMode, ziU16 initialCode, ziU16* resultCode, ziU8 lastMode ZI_NEED_WORK) {
ziBool Zi8MatchPhonetic(ziPtr pCodeTable, ziU8* dictionary, ziPtr soundTable, ziU16 soundCode, ziU32 tableAddress, ziU8* node, ziU16* masks, ziU16* values, ziU16* count, ziU8** resultNode, ziU8** stringOffset, ziU8 partialMode, ziU8 strictMode, ziU8 numParts, ziU16 partMask, ziU16 partValue, ziU8 flag, ziU8 altMode, ziU16 initialCode, ziU16* resultCode, ziU8 lastMode ZI_NEED_WORK) {
struct {
ziBool hasString;
ziU8 partIndex;
@@ -345,7 +345,7 @@ match_code:
} else {
traversal.soundIndex = initialCode;
}
sound = (ziU8*)(tableAddress + node[0xA] * 0x100 + ((node[9] & 0xF) * 0x10000 + node[0xB]));
sound = (ziU8*)(tableAddress + ((node[9] & 0xF) * 0x10000 + (node[0xB] + node[0xA] * 0x100)));
if (ZI_WORK->unk_0x16 != 0) {
switch (sound[0] & 7) {
case 2:
@@ -374,7 +374,8 @@ match_code:
*count = traversal.remaining;
return 1;
}
do {
next_group:
{
traversal.nextCode = *sound++;
traversal.partCount = traversal.nextCode & 0xF;
if ((traversal.nextCode & flag) == 0) {
@@ -398,8 +399,8 @@ match_code:
if (traversal.hasString) {
goto phonetic_skip;
}
traversal.code = Zi8GetPCode((ziU8*)pCodeTable, (ziU8*)&((DictionaryNode*)dictionary)[traversal.dictionaryIndex & 0x7FFF]);
if (((traversal.code & masks[traversal.partIndex]) != values[traversal.partIndex]) && (altMode == 0) && (((DictionaryNode*)dictionary)[traversal.dictionaryIndex & 0x7FFF].header & 0x80) != 0) {
traversal.code = Zi8GetPCode((ziU8*)pCodeTable, dictionary + (traversal.dictionaryIndex & 0x7FFF) * sizeof(DictionaryNode));
if (((traversal.code & masks[traversal.partIndex]) != values[traversal.partIndex]) && (altMode == 0) && (dictionary[(traversal.dictionaryIndex & 0x7FFF) * sizeof(DictionaryNode)] & 0x80) != 0) {
traversal.code = Zi8MatchAltSound(soundTable, soundCode, pCodeTable, traversal.dictionaryIndex & 0x7FFF, masks[traversal.partIndex], values[traversal.partIndex], flag, ZI_WORK);
}
if ((traversal.code & masks[traversal.partIndex]) == values[traversal.partIndex]) {
@@ -427,9 +428,9 @@ phonetic_matched:
}
} while ((traversal.dictionaryIndex & 0x8000) == 0);
}
} while ((traversal.nextCode & 0x80) == 0);
goto next_node;
}
if ((traversal.nextCode & 0x80) != 0) goto next_node;
goto next_group;
check_code:
if (*values == (traversal.code & *masks)) goto match_code;
goto next_node;
@@ -478,7 +479,7 @@ ziU8 Zi8GetPyPhonetic(ziWChar* text, ziU8 count, ziU16* initial, ziU16* final, z
outputIndex = 0;
*bestInitial = 0;
*bestFinal = 0;
while ((outputIndex <= 0xf) && (count != 0)) {
while (count != 0) {
initial[outputIndex] = 0;
final[outputIndex] = 0;
value = *current;
@@ -705,6 +706,7 @@ finish_final:
}
}
outputIndex++;
if (outputIndex > 0xf) break;
}
if ((result > 1) && (text[*resultCount - 1] >= 0xF341) && (text[*resultCount - 1] <= 0xF35A)) {
*resultCount = *resultCount - 1;

View File

@@ -458,7 +458,7 @@ search_table:
if (1 < param->elementCount) {
for (search.keyByte = 0;
(ziS32)search.keyByte < (int)param->elementCount / 2;
search.keyByte = search.keyByte + 1) {
search.keyByte++) {
if (search.packedKeys.bytes[search.keyByte] != search.entry->keyBytes[search.keyByte]) {
search.matches = ZI8_FALSE;
break;

View File

@@ -219,7 +219,7 @@ ziBool Zi8PrepareMatch(ziGetParam* request, ziMatchParam* match, ziU8 skipMode Z
Zi8Memcpy((ziU8 (*)[12])match->segs1 + match->nSeg,buffers.masks,0xc);
Zi8Memcpy((ziU8 (*)[12])match->segsD + match->nSeg,buffers.strokes,0xc);
match->nSeg++;
if (((stroke != 0xff) || (elementCount <= elementIndex)) || (0xf < match->nSeg)) goto complete;
if (stroke != 0xff || elementIndex >= elementCount || match->nSeg >= 0x10) goto complete;
Zi8Memset(buffers.masks,0,0xc);
Zi8Memset(buffers.strokes,0,0xc);
buffers.masks[0] = match->arr1[0] & 0xf0;
@@ -289,7 +289,7 @@ savePhonetic:
if (match->nCand == 1) {
request->count = phoneticLength - 1;
}
buffers.phoneticInput += phoneticLength - 1;
buffers.phoneticInput = buffers.phoneticInput + phoneticLength - 1;
phoneticLength = 0;
index--;
}

View File

@@ -1,9 +1,9 @@
#include <revolution/fa.h>
#include <revolution/os.h>
char* __FAVersion = "<< RVL_SDK - FA \trelease build: Apr 20 2010 11:20:14 (0x4199_60831) >>";
s32 FAFileSysInitialized;
char* __FAVersion[2] = {"<< RVL_SDK - FA \trelease build: Apr 20 2010 11:20:14 (0x4199_60831) >>", NULL};
s32 FAInInitializing;
s32 FAFileSysInitialized;
extern s32 FADiskInitialized;
extern s32 pdm_init_diskmanager(s32 config, void* parameter);
extern s32 pfstub_init_prfile2(s32 config, void* parameter);
@@ -31,6 +31,6 @@ FAError FAInit(int flag) {
}
}
FAInInitializing = 0;
OSRegisterVersion(__FAVersion);
OSRegisterVersion(__FAVersion[0]);
return 0;
}

View File

@@ -169,13 +169,14 @@ static s32 fa_nanddrv_ParseCreateNANDFile(NAND_DISK_INFO* info) {
if (error == 0 || error == -6 || error == -1) {
error = NANDChangeDir(name);
if (error != 0) { return error; }
path++;
pf_memset(name, 0, 16);
next = name;
length = 0;
break;
} else {
return error;
}
return error;
path++;
pf_memset(name, 0, 16);
next = name;
length = 0;
break;
case 0:
if (length > 12) { return -20; }
error = NANDCreate(name, 0x30, 0);
@@ -403,8 +404,8 @@ s32 fa_nanddrv_init_drv_tbl(PDM_DISK_TBL* table, u32 extension) {
return 0;
}
s32 fa_nanddrv_NotifyNANDFile(const char* path, u32 size) {
NAND_DISK_INFO* info;
u16 index;
if (pf_strlen(path) >= 76) { return -20; }
if (Nanddisk_Internal_Info_Init == 0) {
pf_memset(nanddisk_info, 0, sizeof(nanddisk_info));
@@ -416,10 +417,9 @@ s32 fa_nanddrv_NotifyNANDFile(const char* path, u32 size) {
if (fa_nanad_semid == 0) { return -21; }
}
for (index = 0; index < 23; index++) {
info = &nanddisk_info[index];
if (pf_strcmp(info->path, path) == 0) { return 0; }
if (pf_strcmp(nanddisk_info[index].path, path) == 0) { return 0; }
if (nanddisk_info[index].disk == 0) {
pf_strcpy(info->path, path);
pf_strcpy(nanddisk_info[index].path, path);
nanddisk_info[index].file_size = size;
break;
}
@@ -481,15 +481,15 @@ static s32 fa_nanddrv_physical_read(u32 count, u8* buf, u32 block, u32 bps, u32*
return error;
}
static s32 fa_nanddrv_physical_write(u32 count, const u8* buf, u32 block, u32 bps, u32* success, PDM_DISK* disk) {
u32 remaining;
u32 wanted;
u32 file_size;
NAND_DISK_INFO* info = 0;
u32 wanted;
u32 remaining;
u16 index;
u32 offset;
u32 position;
s32 error;
u8 work[512] __attribute__((aligned(32)));
NAND_DISK_INFO* info = 0;
for (index = 0; index < 23; index++) {
if (nanddisk_info[index].disk == disk) { info = &nanddisk_info[index]; break; }
}

View File

@@ -6,11 +6,11 @@ extern pf_s32 pdm_part_is_attached_partition(PDM_PARTITION* partition);
pf_u8 pfd_get_media_drv_char(PDM_DISK* disk, pf_s8* drives, pf_u32 capacity) {
pf_u32 partition_index;
PDM_PARTITION* partition;
PF_VOLUME* volume;
pf_u8 count;
pf_s8* next_drive;
pf_u32 volume_index;
PDM_PARTITION* partition;
pf_u16 volume_index;
PF_VOLUME* volume;
if (drives == NULL || capacity == 0) {
return 0;
}
@@ -20,8 +20,7 @@ pf_u8 pfd_get_media_drv_char(PDM_DISK* disk, pf_s8* drives, pf_u32 capacity) {
for (partition_index = 0; partition_index < 26; partition_index++, partition++) {
if (pdm_part_is_attached_partition(partition) && partition->p_disk == disk) {
volume = pf_vol_set.volumes;
for (volume_index = 0; volume_index < 26; volume++) {
volume_index++;
for (volume_index = 0; volume_index < 26; volume_index++, volume++) {
if (volume->p_part == partition) {
count++;
*next_drive++ = volume->drv_char;

View File

@@ -1,3 +1,4 @@
#include <stddef.h>
#include <revolution/fa/types.h>
#include <revolution/os.h>
#include <revolution/sdi.h>
@@ -135,17 +136,17 @@ typedef union PFD_SDDRV_U16_BYTES {
u8 bytes[2];
} PFD_SDDRV_U16_BYTES;
#define pfd_sddrv_store_le16(field, value) \
#define pfd_sddrv_store_le16(buffer, field, offset, value) \
do { \
if (((u32)(field) & 1) != 0) { \
(field)[0] = (u8)(value); \
(field)[1] = (u8)((value) >> 8); \
} else { \
*(u16*)(field) = (((value) & 0xff) << 8) | (((value) & 0xff00) >> 8); \
((u16*)(buffer))[(offset) / 2 + (offset) % 2] = (((value) & 0xff) << 8) | (((value) & 0xff00) >> 8); \
} \
} while (0)
#define pfd_sddrv_store_le32(field, value) \
#define pfd_sddrv_store_le32(buffer, field, offset, value) \
do { \
if (((u32)(field) & 3) != 0) { \
(field)[0] = (u8)(value); \
@@ -153,7 +154,7 @@ typedef union PFD_SDDRV_U16_BYTES {
(field)[2] = (u8)((value) >> 16); \
(field)[3] = (u8)((value) >> 24); \
} else { \
*(u32*)(field) = (((value) & 0xff) << 24 | ((value) & 0xff00) << 8) | \
((u32*)(buffer))[(offset) / 4 + (offset) % 4] = (((value) & 0xff) << 24 | ((value) & 0xff00) << 8) | \
(((value) & 0xff000000) >> 24 | ((value) & 0xff0000) >> 8); \
} \
} while (0)
@@ -740,20 +741,27 @@ s32 pfd_sddrv_get_total_sectors(u32* sectors, u16* bytes_per_sector) {
return 0;
}
static inline u32 pfd_sddrv_encode_serial(s32 year, s32 month, s32 day, s32 hour, s32 minute, s32 second) {
u32 date;
u32 time;
date = (day & 0x1f) | ((month & 0xf) << 5) | (((year - 1900) & 0x7f) << 9);
time = (second & 0x1f) | ((minute & 0x3f) << 5) | ((hour & 0x1f) << 11);
return (date << 16) + time;
}
s32 pfd_sddrv_calc_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
const PFD_SDDRV_SIZE_DEPEND* size_entry;
PFD_SDDRV_SIZE_SETTINGS settings;
u32 entry_index;
u32 requested_sectors;
u32 fat_entry_bits;
u32 fat_sectors;
u32 next_fat_sectors;
u32 total_sectors;
u8 sectors_per_cluster;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
u32 current_start;
u32 reserved_sectors;
u32 total_sectors;
u32 fat_sectors;
u32 fat_entry_bits;
u32 fixed_sectors;
u32 start_sector;
u32 current_start;
u32 next_fat_sectors;
u32 clusters;
u32 candidate_fat_sectors;
u32 reserve_count;
@@ -781,10 +789,9 @@ s32 pfd_sddrv_calc_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
OSReport("ERR Failed to get values with total sectors. pfd_sddrv_get_value_with_total_sectors()\n");
return result;
}
sectors_per_cluster = settings.sectors_per_cluster;
format_data->sectors_per_cluster = sectors_per_cluster;
format_data->sectors_per_cluster = settings.sectors_per_cluster;
total_sectors = format_data->total_sectors;
clusters = total_sectors / sectors_per_cluster;
clusters = total_sectors / format_data->sectors_per_cluster;
if (clusters < 0x1005) {
fat_entry_bits = 12;
} else if (clusters < 0xfff5) {
@@ -792,7 +799,7 @@ s32 pfd_sddrv_calc_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
} else {
return -31;
}
if (total_sectors % sectors_per_cluster != 0) {
if (total_sectors % format_data->sectors_per_cluster != 0) {
clusters++;
}
candidate_fat_sectors = clusters * fat_entry_bits;
@@ -819,7 +826,7 @@ s32 pfd_sddrv_calc_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
start_sector += reserved_sectors;
}
moved_start = 0;
clusters = (total_sectors - start_sector - fixed_sectors) / sectors_per_cluster + 1;
clusters = (total_sectors - start_sector - fixed_sectors) / format_data->sectors_per_cluster + 1;
if (clusters >= 0xfe5 && clusters < 0x1005) {
current_start += reserved_sectors;
start_sector = current_start - fixed_sectors;
@@ -844,7 +851,7 @@ s32 pfd_sddrv_calc_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
format_data->sectors_per_fat = fat_sectors;
format_data->partition_start_sector = start_sector;
format_data->partition_sector_count = format_data->total_sectors - start_sector;
clusters = (format_data->partition_sector_count - (fat_sectors * 2 + 0x21)) / format_data->sectors_per_cluster + 1;
clusters = (format_data->partition_sector_count - (format_data->sectors_per_fat * 2 + 0x21)) / format_data->sectors_per_cluster + 1;
if (clusters < 0xff5) {
format_data->fat_type = 0;
} else if (clusters >= 0xff5) {
@@ -853,22 +860,18 @@ s32 pfd_sddrv_calc_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
return -31;
}
OSTicksToCalendarTime(OSGetTime(), &current_time);
format_data->volume_serial_number = ((((current_time.year - 1900) & 0x7f) << 9) |
((current_time.mon & 0xf) << 5) |
(current_time.mday & 0x1f)) * 0x10000 +
(((current_time.hour & 0x1f) << 11) |
((current_time.min & 0x3f) << 5) |
(current_time.sec & 0x1f));
format_data->volume_serial_number = pfd_sddrv_encode_serial(current_time.year, current_time.mon, current_time.mday,
current_time.hour, current_time.min, current_time.sec);
return 0;
}
s32 pfd_sddrv_store_bpb_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffer) {
const PFD_SDDRV_SIZE_DEPEND* size_entry;
PFD_SDDRV_SIZE_SETTINGS settings;
PFD_SDDRV_BPB* boot_sector;
u32 entry_index;
u32 requested_sectors;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
u16 sectors_16;
s32 result;
u32 sectors_32;
@@ -914,42 +917,42 @@ s32 pfd_sddrv_store_bpb_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffe
boot_sector->jump[0] = 0xeb;
boot_sector->jump[1] = 0;
boot_sector->jump[2] = 0x90;
pfd_sddrv_store_le16(boot_sector->bytes_per_sector, 0x200);
pfd_sddrv_store_le16(sector_buffer, boot_sector->bytes_per_sector, offsetof(PFD_SDDRV_BPB, bytes_per_sector), 0x200);
boot_sector->sectors_per_cluster = format_data->sectors_per_cluster;
pfd_sddrv_store_le16(boot_sector->reserved_sector_count, 1);
pfd_sddrv_store_le16(sector_buffer, boot_sector->reserved_sector_count, offsetof(PFD_SDDRV_BPB, reserved_sector_count), 1);
boot_sector->fat_count = 2;
pfd_sddrv_store_le16(boot_sector->root_entry_count, 0x200);
pfd_sddrv_store_le16(boot_sector->total_sectors_16, (u16)sectors_16);
pfd_sddrv_store_le16(sector_buffer, boot_sector->root_entry_count, offsetof(PFD_SDDRV_BPB, root_entry_count), 0x200);
pfd_sddrv_store_le16(sector_buffer, boot_sector->total_sectors_16, offsetof(PFD_SDDRV_BPB, total_sectors_16), (u16)sectors_16);
boot_sector->media_descriptor = 0xf8;
pfd_sddrv_store_le16(boot_sector->sectors_per_fat_16, (u16)format_data->sectors_per_fat);
pfd_sddrv_store_le16(boot_sector->sectors_per_track, (u16)settings.root_entries);
pfd_sddrv_store_le16(boot_sector->heads, (u16)settings.fat_copies);
pfd_sddrv_store_le32(boot_sector->hidden_sectors, format_data->partition_start_sector);
pfd_sddrv_store_le32(boot_sector->total_sectors_32, sectors_32);
pfd_sddrv_store_le16(sector_buffer, boot_sector->sectors_per_fat_16, offsetof(PFD_SDDRV_BPB, sectors_per_fat_16), (u16)format_data->sectors_per_fat);
pfd_sddrv_store_le16(sector_buffer, boot_sector->sectors_per_track, offsetof(PFD_SDDRV_BPB, sectors_per_track), (u16)settings.root_entries);
pfd_sddrv_store_le16(sector_buffer, boot_sector->heads, offsetof(PFD_SDDRV_BPB, heads), (u16)settings.fat_copies);
pfd_sddrv_store_le32(sector_buffer, boot_sector->hidden_sectors, offsetof(PFD_SDDRV_BPB, hidden_sectors), format_data->partition_start_sector);
pfd_sddrv_store_le32(sector_buffer, boot_sector->total_sectors_32, offsetof(PFD_SDDRV_BPB, total_sectors_32), sectors_32);
boot_sector->drive_number = 0x80;
boot_sector->extended_signature = 0x29;
pfd_sddrv_store_le32(boot_sector->volume_serial_number, format_data->volume_serial_number);
pfd_sddrv_store_le32(sector_buffer, boot_sector->volume_serial_number, offsetof(PFD_SDDRV_BPB, volume_serial_number), format_data->volume_serial_number);
boot_sector->signature[0] = 0x55;
boot_sector->signature[1] = 0xaa;
return 0;
}
s32 pfd_sddrv_store_mbr_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffer) {
const PFD_SDDRV_SIZE_DEPEND* size_entry;
PFD_SDDRV_SIZE_SETTINGS settings;
PFD_SDDRV_MBR* master_boot_record;
PFD_SDDRV_PARTITION_ENTRY* partition;
u32 entry_index;
u32 requested_sectors;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
s32 result;
u8 start_head;
u8 end_head;
u8 partition_type;
u32 sectors_per_cylinder;
u16 start_cylinder;
u16 end_cylinder;
u8 start_head;
u16 start_sector;
u16 start_cylinder;
u8 end_head;
u16 end_sector;
u16 end_cylinder;
u32 sectors_per_cylinder;
if (format_data == 0) {
return -30;
@@ -993,14 +996,14 @@ s32 pfd_sddrv_store_mbr_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffe
partition = &master_boot_record->partitions[0];
partition->boot_indicator = 0;
partition->start_head = start_head;
pfd_sddrv_store_le16(partition->start_sector_cylinder,
pfd_sddrv_store_le16(sector_buffer, partition->start_sector_cylinder, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, start_sector_cylinder),
((start_cylinder & 0xff) << 8) + ((start_sector & 0x3f) | ((start_cylinder & 0x300) >> 2)));
partition->partition_type = partition_type;
partition->end_head = end_head;
pfd_sddrv_store_le16(partition->end_sector_cylinder,
pfd_sddrv_store_le16(sector_buffer, partition->end_sector_cylinder, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, end_sector_cylinder),
((end_cylinder & 0xff) << 8) + ((end_sector & 0x3f) | ((end_cylinder & 0x300) >> 2)));
pfd_sddrv_store_le32(partition->first_sector, format_data->partition_start_sector);
pfd_sddrv_store_le32(partition->sector_count, format_data->partition_sector_count);
pfd_sddrv_store_le32(sector_buffer, partition->first_sector, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, first_sector), format_data->partition_start_sector);
pfd_sddrv_store_le32(sector_buffer, partition->sector_count, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, sector_count), format_data->partition_sector_count);
master_boot_record->signature[0] = 0x55;
master_boot_record->signature[1] = 0xaa;
return 0;
@@ -1055,8 +1058,9 @@ s32 pfd_sddrv_build_mbr_bpb(u32 total_sectors) {
}
s32 pfd_sddrv_calc_fat32_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
u32 available_sectors;
u8 sectors_per_cluster;
u32 fat_sector_count;
u32 available_sectors;
u32 fat_sectors;
u32 cluster_count;
u32 entry_index;
@@ -1069,10 +1073,7 @@ s32 pfd_sddrv_calc_fat32_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
u32 attempts;
s32 result;
u32 next_data_region;
u32 date;
u32 time;
u32 total_sectors;
u8 sectors_per_cluster;
OSCalendarTime current_time;
if (format_data == 0) {
@@ -1148,37 +1149,32 @@ s32 pfd_sddrv_calc_fat32_mbr_bpb(PFD_SDDRV_FORMAT_DATA* format_data) {
format_data->sectors_per_fat = fat_sectors;
format_data->reserved_sectors = reserved_sectors;
format_data->partition_start_sector = 0x2000;
format_data->partition_sector_count = total_sectors - 0x2000;
format_data->partition_sector_count = format_data->total_sectors - 0x2000;
OSTicksToCalendarTime(OSGetTime(), &current_time);
time = ((current_time.hour & 0x1f) << 11) |
((current_time.min & 0x3f) << 5) |
(current_time.sec & 0x1f);
date = (((current_time.year - 1900) & 0x7f) << 9) |
((current_time.mon & 0xf) << 5) |
(current_time.mday & 0x1f);
format_data->volume_serial_number = time + date * 0x10000;
format_data->volume_serial_number = pfd_sddrv_encode_serial(current_time.year, current_time.mon, current_time.mday,
current_time.hour, current_time.min, current_time.sec);
return 0;
}
s32 pfd_sddrv_store_fat32_mbr_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffer) {
PFD_SDDRV_SIZE_SETTINGS settings;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
PFD_SDDRV_MBR* master_boot_record;
PFD_SDDRV_PARTITION_ENTRY* partition;
u32 entry_index;
u32 requested_sectors;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
s32 result;
u32 cylinder_size;
u16 start_cylinder;
u8 partition_type;
u8 start_head;
u16 start_sector;
u16 end_cylinder;
u16 start_cylinder;
u8 end_head;
u16 end_sector;
u16 end_cylinder;
u32 partition_end;
u8 partition_type;
if (format_data == 0) {
if (format_data == 0 || sector_buffer == 0) {
return -30;
}
pf_memset(&settings, 0, 0x10);
@@ -1198,42 +1194,42 @@ s32 pfd_sddrv_store_fat32_mbr_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector
OSReport("ERR Failed to get values with total sectors. pfd_sddrv_get_value_with_total_sectors()\n");
return result;
}
cylinder_size = settings.fat_copies * settings.root_entries;
partition_end = format_data->total_sectors - 1;
partition_type = 0x0b;
if (format_data->partition_start_sector <= 0xfb0400) {
start_cylinder = format_data->partition_start_sector / cylinder_size;
start_head = (format_data->partition_start_sector % cylinder_size) / settings.root_entries;
start_sector = format_data->partition_start_sector % settings.root_entries + 1;
} else {
start_cylinder = 0x3ff;
if (format_data->partition_start_sector > 0xfb0400) {
start_head = 0xfe;
start_sector = 0x3f;
}
if (partition_end <= 0xfb0400) {
end_cylinder = partition_end / cylinder_size;
end_head = (partition_end % cylinder_size) / settings.root_entries;
end_sector = partition_end % settings.root_entries + 1;
start_cylinder = 0x3ff;
} else {
end_cylinder = 0x3ff;
start_cylinder = format_data->partition_start_sector / (settings.fat_copies * settings.root_entries);
start_head = (format_data->partition_start_sector % (settings.fat_copies * settings.root_entries)) / settings.root_entries;
start_sector = format_data->partition_start_sector % settings.root_entries + 1;
}
if (format_data->total_sectors > 0xfb0400) {
end_head = 0xfe;
end_sector = 0x3f;
end_cylinder = 0x3ff;
partition_type = 0x0c;
} else {
partition_end = format_data->total_sectors - 1;
partition_type = 0x0b;
end_cylinder = partition_end / (settings.fat_copies * settings.root_entries);
end_head = (partition_end % (settings.fat_copies * settings.root_entries)) / settings.root_entries;
end_sector = partition_end % settings.root_entries + 1;
}
pf_memset(sector_buffer, 0, 0x200);
master_boot_record = (PFD_SDDRV_MBR*)sector_buffer;
partition = &master_boot_record->partitions[0];
partition->boot_indicator = 0;
partition->start_head = (u8)start_head;
pfd_sddrv_store_le16(partition->start_sector_cylinder,
pfd_sddrv_store_le16(sector_buffer, partition->start_sector_cylinder, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, start_sector_cylinder),
((start_cylinder & 0xff) << 8) + ((start_sector & 0x3f) | ((start_cylinder & 0x300) >> 2)));
partition->partition_type = partition_type;
partition->end_head = (u8)end_head;
pfd_sddrv_store_le16(partition->end_sector_cylinder,
pfd_sddrv_store_le16(sector_buffer, partition->end_sector_cylinder, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, end_sector_cylinder),
((end_cylinder & 0xff) << 8) + ((end_sector & 0x3f) | ((end_cylinder & 0x300) >> 2)));
pfd_sddrv_store_le32(partition->first_sector, format_data->partition_start_sector);
pfd_sddrv_store_le32(partition->sector_count, format_data->partition_sector_count);
pfd_sddrv_store_le16(master_boot_record->signature, 0xaa55);
pfd_sddrv_store_le32(sector_buffer, partition->first_sector, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, first_sector), format_data->partition_start_sector);
pfd_sddrv_store_le32(sector_buffer, partition->sector_count, offsetof(PFD_SDDRV_MBR, partitions) + offsetof(PFD_SDDRV_PARTITION_ENTRY, sector_count), format_data->partition_sector_count);
master_boot_record->signature[0] = 0x55;
master_boot_record->signature[1] = 0xaa;
return 0;
}
@@ -1287,13 +1283,13 @@ s32 pfd_sddrv_store_fat32_fsi_buf(u8* sector_buffer) NO_INLINE {
s32 pfd_sddrv_store_fat32_bpb_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector_buffer) {
PFD_SDDRV_SIZE_SETTINGS settings;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
PFD_SDDRV_FAT32_BPB* boot_sector;
u32 entry_index;
u32 requested_sectors;
const PFD_SDDRV_SIZE_DEPEND* size_entry;
s32 result;
if (format_data == 0) {
if (format_data == 0 || sector_buffer == 0) {
return -30;
}
pf_memset(&settings, 0, 0x10);
@@ -1321,33 +1317,29 @@ s32 pfd_sddrv_store_fat32_bpb_buf(PFD_SDDRV_FORMAT_DATA* format_data, u8* sector
boot_sector->jump[0] = 0xeb;
boot_sector->jump[1] = 0;
boot_sector->jump[2] = 0x90;
pfd_sddrv_store_le16(boot_sector->bytes_per_sector, 0x200);
pfd_sddrv_store_le16(sector_buffer, boot_sector->bytes_per_sector, offsetof(PFD_SDDRV_FAT32_BPB, bytes_per_sector), 0x200);
boot_sector->sectors_per_cluster = format_data->sectors_per_cluster;
pfd_sddrv_store_le16(boot_sector->reserved_sector_count, format_data->reserved_sectors);
pfd_sddrv_store_le16(sector_buffer, boot_sector->reserved_sector_count, offsetof(PFD_SDDRV_FAT32_BPB, reserved_sector_count), format_data->reserved_sectors);
boot_sector->fat_count = 2;
pfd_sddrv_store_le16(boot_sector->root_entry_count, 0);
pfd_sddrv_store_le16(boot_sector->total_sectors_16, 0);
pfd_sddrv_store_le16(sector_buffer, boot_sector->root_entry_count, offsetof(PFD_SDDRV_FAT32_BPB, root_entry_count), 0);
pfd_sddrv_store_le16(sector_buffer, boot_sector->total_sectors_16, offsetof(PFD_SDDRV_FAT32_BPB, total_sectors_16), 0);
boot_sector->media_descriptor = 0xf8;
pfd_sddrv_store_le16(boot_sector->sectors_per_fat_16, 0);
pfd_sddrv_store_le16(boot_sector->sectors_per_track, (u16)settings.root_entries);
pfd_sddrv_store_le16(boot_sector->heads, (u16)settings.fat_copies);
pfd_sddrv_store_le32(boot_sector->hidden_sectors, format_data->partition_start_sector);
pfd_sddrv_store_le32(boot_sector->total_sectors_32, format_data->partition_sector_count);
pfd_sddrv_store_le32(boot_sector->sectors_per_fat_32, format_data->sectors_per_fat);
pfd_sddrv_store_le16(boot_sector->ext_flags, 0);
pfd_sddrv_store_le16(boot_sector->filesystem_version, 0);
pfd_sddrv_store_le32(boot_sector->root_cluster, 2);
pfd_sddrv_store_le16(boot_sector->fsinfo_sector, 1);
pfd_sddrv_store_le16(boot_sector->backup_boot_sector, 6);
pfd_sddrv_store_le16(sector_buffer, boot_sector->sectors_per_fat_16, offsetof(PFD_SDDRV_FAT32_BPB, sectors_per_fat_16), 0);
pfd_sddrv_store_le16(sector_buffer, boot_sector->sectors_per_track, offsetof(PFD_SDDRV_FAT32_BPB, sectors_per_track), (u16)settings.root_entries);
pfd_sddrv_store_le16(sector_buffer, boot_sector->heads, offsetof(PFD_SDDRV_FAT32_BPB, heads), (u16)settings.fat_copies);
pfd_sddrv_store_le32(sector_buffer, boot_sector->hidden_sectors, offsetof(PFD_SDDRV_FAT32_BPB, hidden_sectors), format_data->partition_start_sector);
pfd_sddrv_store_le32(sector_buffer, boot_sector->total_sectors_32, offsetof(PFD_SDDRV_FAT32_BPB, total_sectors_32), format_data->partition_sector_count);
pfd_sddrv_store_le32(sector_buffer, boot_sector->sectors_per_fat_32, offsetof(PFD_SDDRV_FAT32_BPB, sectors_per_fat_32), format_data->sectors_per_fat);
pfd_sddrv_store_le16(sector_buffer, boot_sector->ext_flags, offsetof(PFD_SDDRV_FAT32_BPB, ext_flags), 0);
pfd_sddrv_store_le16(sector_buffer, boot_sector->filesystem_version, offsetof(PFD_SDDRV_FAT32_BPB, filesystem_version), 0);
pfd_sddrv_store_le32(sector_buffer, boot_sector->root_cluster, offsetof(PFD_SDDRV_FAT32_BPB, root_cluster), 2);
pfd_sddrv_store_le16(sector_buffer, boot_sector->fsinfo_sector, offsetof(PFD_SDDRV_FAT32_BPB, fsinfo_sector), 1);
pfd_sddrv_store_le16(sector_buffer, boot_sector->backup_boot_sector, offsetof(PFD_SDDRV_FAT32_BPB, backup_boot_sector), 6);
boot_sector->drive_number = 0x80;
boot_sector->extended_signature = 0x29;
pfd_sddrv_store_le32(boot_sector->volume_serial_number, format_data->volume_serial_number);
if (((u32)boot_sector->signature & 1) != 0) {
boot_sector->signature[0] = 0x55;
boot_sector->signature[1] = 0xaa;
} else {
*(u16*)boot_sector->signature = 0x55aa;
}
pfd_sddrv_store_le32(sector_buffer, boot_sector->volume_serial_number, offsetof(PFD_SDDRV_FAT32_BPB, volume_serial_number), format_data->volume_serial_number);
boot_sector->signature[0] = 0x55;
boot_sector->signature[1] = 0xaa;
return 0;
}

View File

@@ -1,6 +1,6 @@
#include <private/fa/pdm.h>
#include <revolution/types.h>
#define MBR_WORD(buf, offset) (((pf_u32)(buf)[(offset) + 2] << 16) + (buf)[offset] + (((pf_u32)(buf)[(offset) + 3] << 24) + ((pf_u32)(buf)[(offset) + 1] << 8)))
#define MBR_WORD(buf, offset) (((pf_u32)(buf)[(offset) + 3] << 24) + ((pf_u32)(buf)[(offset) + 2] << 16) + ((pf_u32)(buf)[(offset) + 1] << 8) + (buf)[offset])
static inline pf_u16 read_boot_u16(pf_u8* buf, pf_u32 offset) {
if ((pf_u32)&buf[offset] & 1) { return (buf[offset + 1] << 8) | buf[offset]; }
return PF_SWAP_16(*(pf_u16*)&buf[(offset + 1) & ~1]);

View File

@@ -347,7 +347,7 @@ pf_s32 PFENT_ITER_DoGetEntry(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent, PF_VOLU
if (err != 0) {
return err;
}
if (PFSTR_StrNumChar(p_path, 1) == 1 && (PFSTR_StrNCmp(p_path, (pf_s8*)"\0", 2, 0, 1) == 0)) {
if (PFSTR_StrNumChar(p_path, 1) == 1 && (PFSTR_StrNCmp(p_path, (pf_s8*)"\0\0\0", 2, 0, 1) == 0)) {
return 0;
}
} else {
@@ -366,7 +366,7 @@ pf_s32 PFENT_ITER_DoGetEntry(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent, PF_VOLU
if (err != 0) {
return err;
}
if (no_look_last_token != 0 && (PFSTR_StrNCmp(&token, (pf_s8*)"\0", 2, 0, 1) == 0)) {
if (no_look_last_token != 0 && (PFSTR_StrNCmp(&token, (pf_s8*)"\0\0\0", 2, 0, 1) == 0)) {
break;
}
@@ -424,7 +424,7 @@ pf_s32 PFENT_ITER_DoGetEntry(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent, PF_VOLU
}
if ((p_ent->attr & 0x10) == 0 || p_ent->short_name[0] != '.') {
p_ent->path_len = (PFSTR_StrNumChar(&token, 1) + 1) + p_ent->path_len;
if ((PFSTR_StrNCmp(&token, (pf_s8*)"\0", 2, 0, 1) != 0)) {
if ((PFSTR_StrNCmp(&token, (pf_s8*)"\0\0\0", 2, 0, 1) != 0)) {
p_ent->path_len -= PFSTR_StrNumChar(&token, 2);
}
}
@@ -689,7 +689,7 @@ pf_s32 PFENT_ITER_FindEntry(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent, PF_STR*
if (PFSTR_StrNCmp(p_pattern, (pf_s8*)"\\", 1, 0, 1) == 0 || PFSTR_StrNCmp(p_pattern, (pf_s8*)"/", 1, 0, 1) == 0) {
err = PFENT_GetRootDir(p_iter->p_vol, p_ent);
if (err != 0) return err;
if (PFSTR_StrNumChar(p_pattern, 1) == 1 && PFSTR_StrNCmp(p_pattern, (pf_s8*)"\0", 2, 0, 1) == 0) return 0;
if (PFSTR_StrNumChar(p_pattern, 1) == 1 && PFSTR_StrNCmp(p_pattern, (pf_s8*)"\0\0\0", 2, 0, 1) == 0) return 0;
} else {
err = PFVOL_GetCurrentDir(p_iter->p_vol, p_ent);
if (err != 0) return err;

View File

@@ -1852,13 +1852,15 @@ s32 PFFAT_RefreshFSINFO(PF_VOLUME* volume)
s32 alreadyAllocated;
u32 completedBytes;
s32 error;
s32 error2;
error = 0;
if ((volume->fsi_flag & 4) != 0) {
error = PFCACHE_AllocateDataPage(volume, -1, &page,
&alreadyAllocated);
if (error != 0) { goto finished; }
{
error2 = PFCACHE_AllocateDataPage(volume, -1, &page,
&alreadyAllocated);
if (error2 != 0) {
return error2;
} else {
error = PFSEC_ReadData(
volume, page->p_buf, volume->bpb.fs_info_sector, 0,
volume->bpb.bytes_per_sector, &completedBytes, 0);

View File

@@ -1014,7 +1014,7 @@ void PFPATH_SetSearchPattern(pf_s8* p_buf_local, pf_u16* p_buf_unicode, PF_STR*
pf_u32 PFPATH_CheckExtShortNameSignature(PF_STR* p_str) {
pf_u32 result = 0;
pf_s8 sig[2] = {1, 2};
pf_s8 sig[2] = "\x01\x02";
if (PFSTR_StrNCmp(p_str, sig, 1, 0, 2) == 0) {
result = 1;
@@ -1027,7 +1027,7 @@ pf_u32 PFPATH_CheckExtShortName(PF_STR* p_str, pf_u32 target, pf_bool wildcard)
pf_s16 i;
pf_s16 num;
pf_bool is_wildcard = PF_FALSE;
pf_s8 sig[2] = {1, 2};
pf_s8 sig[2] = "\x01\x02";
pf_s8* p_c;
pf_u16* p_wc;
@@ -1035,7 +1035,7 @@ pf_u32 PFPATH_CheckExtShortName(PF_STR* p_str, pf_u32 target, pf_bool wildcard)
(PFSTR_StrNCmp(p_str, (pf_s8*)"?", target, 0, 1) == 0 &&
(PFSTR_StrNCmp(p_str, (pf_s8*)"?", target, 1, 1) == 0 || PFSTR_StrNCmp(p_str, (pf_s8*)"*", target, 0, 1) == 0)) ||
PFSTR_StrNCmp(p_str, (pf_s8*)"*", target, 0, 1) == 0) {
for (i = 2; i < 8 && PF_IS_PATH_SEPERATOR(p_str, target, i) == PF_FALSE && PFSTR_StrNCmp(p_str, (pf_s8*)" ", target, i, 1) != 0 &&
for (i = 2; i < 8 && PF_IS_PATH_SEPERATOR(p_str, target, i) == PF_FALSE && PFSTR_StrNCmp(p_str, (pf_s8*)"\x20\0\0", target, i, 1) != 0 &&
PF_IS_PATH_NOT_NULL(p_str, target, i);
i++) {
if (PFSTR_GetCodeMode(p_str) == 1) {
@@ -1059,7 +1059,7 @@ pf_u32 PFPATH_CheckExtShortName(PF_STR* p_str, pf_u32 target, pf_bool wildcard)
}
}
if (i == 8 || is_wildcard == PF_TRUE) {
if (PFSTR_StrNCmp(p_str, (pf_s8*)" ", target, i, 1) == 0 || PF_IS_PATH_SEPERATOR(p_str, target, i) == 0 ||
if (PFSTR_StrNCmp(p_str, (pf_s8*)"\x20\0\0", target, i, 1) == 0 || PF_IS_PATH_SEPERATOR(p_str, target, i) == 0 ||
PF_IS_PATH_NULL(p_str, target, i)) {
result = i;
}
@@ -1073,7 +1073,7 @@ pf_u32 PFPATH_GetExtShortNameIndex(PF_STR* p_str, pf_u32* p_index) {
pf_s16 i;
pf_s16 num;
pf_u32 index;
pf_s8 sig[2] = {1, 2};
pf_s8 sig[2] = "\x01\x02";
pf_s8* p_c;
pf_u16* p_wc;

View File

@@ -224,6 +224,9 @@ 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);
@@ -370,12 +373,7 @@ static inline s32 finalize_volume(PFVOL_VOLUME* volume) {
return 0;
}
static inline s32 copy_codeset(const 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;
pf_vol_set.codeset = *code_set;
return 0;
}
s32 PFVOL_DoMountVolume(PFVOL_VOLUME* volume) {
@@ -500,7 +498,9 @@ s32 PFVOL_p_setvol(PFVOL_VOLUME* volume, const s8* label) {
s32 error;
error = PFENT_GetRootDir(volume, &root_entry);
if (error == 0) {
if (error != 0) {
return error;
} else {
PFFAT_InitFFD(&ffd, &hint, volume, &root_entry.start_cluster);
PFSTR_InitStr(&path, "*", 1);
PFSTR_SetLocalStr(&path, 0);
@@ -514,7 +514,7 @@ s32 PFVOL_p_setvol(PFVOL_VOLUME* volume, const s8* label) {
entry.start_cluster = 0;
}
} else {
PFSTR_InitStr(&path, "", 1);
PFSTR_InitStr(&path, "\0\0\0", 1);
PFSTR_SetLocalStr(&path, 0);
error = PFENT_allocateEntry(&entry, 1, &ffd, previous_cluster, &path);
if (error != 0) {
@@ -584,7 +584,7 @@ s32 PFVOL_p_rmvvol(PFVOL_VOLUME* volume) {
u32 logical_position;
u32 entry_position;
u32 processed;
u8 deleted = (u8)"\xE5"[0];
u8 deleted = deleted_entry_mark[0];
s32 error;
error = PFENT_GetRootDir(volume, &root_entry);
@@ -913,7 +913,7 @@ s32 PFVOL_getvol(s8 drive, PFVOL_VOLUME_INFO* volume_info) {
} else {
volume = &pf_vol_set.volumes[volume_index];
}
if (pf_memcmp(volume->label, "NO NAME ", 11) == 0) {
if (pf_memcmp(volume->label, default_volume_label, 11) == 0) {
pf_vol_set.last_error = 3;
volume->last_error = 3;
return 3;
@@ -945,7 +945,7 @@ s32 PFVOL_rmvvol(s8 drive) {
} else {
volume = &pf_vol_set.volumes[volume_index];
}
if (pf_memcmp(volume->label, "NO NAME ", 11) == 0) {
if (pf_memcmp(volume->label, default_volume_label, 11) == 0) {
pf_vol_set.last_error = 3;
volume->last_error = 3;
return 3;
@@ -956,7 +956,7 @@ s32 PFVOL_rmvvol(s8 drive) {
volume->last_error = error;
return error;
}
error = PFDRV_StoreVolumeLabelToBPB(volume, (const s8*)"NO NAME ");
error = PFDRV_StoreVolumeLabelToBPB(volume, default_volume_label);
if (error != 0) {
pf_vol_set.last_error = error;
volume->last_error = error;
@@ -1536,3 +1536,4 @@ s32 PFVOL_setencode(u32 mode) {
pf_vol_set.setting = pf_vol_set.setting & ~3 | mode;
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
#include <private/os/OSTime.h>
#include <private/bus.h>
static int __i2c_ident_flag = 1;
static volatile int __i2c_ident_flag = 1;
static u32 __i2c_ident_first;
#define I2C_OUT 0xCD8000C0

File diff suppressed because it is too large Load Diff

View File

@@ -138,7 +138,25 @@ static s32 Vdac_Flag_Region;
static s32 __type;
static s32 __gamma;
static s32 __level;
u32 Vdac_Flag_Changed_816991E0;
volatile u32 Vdac_Flag_Changed_816991E0;
static void __VISetCCSEL(u8 flag) {
u8 data[2];
data[0] = 0x6a;
data[1] = TRUE;
__VISendI2CData(0xe0, data, sizeof(data));
WaitMicroTime(2);
}
static void __VISetOverSampling(u8 flag) {
u8 data[2];
data[0] = 0x65;
data[1] = TRUE;
__VISendI2CData(0xe0, data, sizeof(data));
WaitMicroTime(2);
}
void __VISetVolume(u8 wd0, u8 wd1) {
u8 data[3];
@@ -233,36 +251,38 @@ void __VISetClosedCaption(void) {
WaitMicroTime(2);
}
typedef const u8* __VIMacrovisionImm;
static void __VISetMacrovisionImm(__VIMacrovisionImm macrovisionImm)
{
u8 data[0x1a + 1];
u8 i;
data[0] = 0x40;
for (i = 1; i < sizeof(data); i++) {
data[i] = macrovisionImm[i - 1];
}
__VISendI2CData(0xe0, data, sizeof(data));
WaitMicroTime(2);
}
void __VISetMacrovision(void) {
switch (__type) {
case 2:
switch (__tvType) {
case 0: {
u8 data[0x1b];
COPY_ACP(data, VINtscACPType1);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VINtscACPType1);
break;
}
case 1: {
u8 data[0x1b];
COPY_ACP(data, VIPalACPType1);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIPalACPType1);
break;
}
case 2: {
u8 data[0x1b];
COPY_ACP(data, VIMpalACPType1);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIMpalACPType1);
break;
}
case 5: {
u8 data[0x1b];
COPY_ACP(data, VIEurgb60ACPType1);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIEurgb60ACPType1);
break;
}
}
@@ -270,31 +290,19 @@ void __VISetMacrovision(void) {
case 3:
switch (__tvType) {
case 0: {
u8 data[0x1b];
COPY_ACP(data, VINtscACPType2);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VINtscACPType2);
break;
}
case 1: {
u8 data[0x1b];
COPY_ACP(data, VIPalACPType2);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIPalACPType2);
break;
}
case 2: {
u8 data[0x1b];
COPY_ACP(data, VIMpalACPType2);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIMpalACPType2);
break;
}
case 5: {
u8 data[0x1b];
COPY_ACP(data, VIEurgb60ACPType2);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIEurgb60ACPType2);
break;
}
}
@@ -302,103 +310,74 @@ void __VISetMacrovision(void) {
case 4:
switch (__tvType) {
case 0: {
u8 data[0x1b];
COPY_ACP(data, VINtscACPType3);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VINtscACPType3);
break;
}
case 1: {
u8 data[0x1b];
COPY_ACP(data, VIPalACPType3);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIPalACPType3);
break;
}
case 2: {
u8 data[0x1b];
COPY_ACP(data, VIMpalACPType3);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIMpalACPType3);
break;
}
case 5: {
u8 data[0x1b];
COPY_ACP(data, VIEurgb60ACPType3);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIEurgb60ACPType3);
break;
}
}
break;
case 1: {
u8 data[0x1b];
COPY_ACP(data, VIZeroACPType);
__VISendI2CData(0xe0, data, 0x1b);
WaitMicroTime(2);
__VISetMacrovisionImm(VIZeroACPType);
break;
}
}
}
void VISetMacrovision(s32 type) {
u8 oldType;
u8 oldWd2;
u8 oldWd0;
u8 mode;
u32 volume;
u8 newType;
u8 newWd2;
s32 tvFormat;
mode = 0;
volume = 0;
oldWd0 = __wd0;
oldType = __wd1;
oldWd2 = __wd2;
newType = oldType;
if (type == 3) {
goto type3;
}
if (type < 3) {
if (type == 1) {
goto type1;
} else if (type >= 1) {
goto type2;
}
goto done;
}
if (type >= 5) {
goto done;
}
goto type5;
type1:
mode = 0;
volume = 0;
goto done;
type2:
mode = 2;
volume = 3;
newType = 0;
goto done;
type3:
mode = 1;
volume = 3;
newType = 0;
goto done;
type5:
mode = 3;
volume = 3;
newType = 0;
done:
volume |= oldWd2 & 0xf0;
newWd2 = volume | mode << 2;
if ((oldType != newType) || (oldWd2 != newWd2)) {
__wd0 = oldWd0;
__wd1 = newType;
__wd2 = newWd2;
void VISetCGMS(u8 wd0, u8 wd1, u8 wd2) {
if (__wd0 != wd0 || __wd1 != wd1 || __wd2 != wd2) {
__wd0 = wd0;
__wd1 = wd1;
__wd2 = wd2;
Vdac_Flag_Changed_816991E0 |= 1;
}
}
void VISetMacrovision(s32 type) {
u32 tvFormat;
u8 mode = 0;
u8 volume = 0;
u8 wd0 = __wd0;
u8 wd1 = __wd1;
u8 wd2 = __wd2;
switch (type) {
case 1:
mode = 0;
volume = 0;
break;
case 2:
mode = 2;
volume = 3;
wd1 = 0;
break;
case 3:
mode = 1;
volume = 3;
wd1 = 0;
break;
case 4:
mode = 3;
volume = 3;
wd1 = 0;
break;
default:
break;
}
wd2 = wd2 & 0xF0;
wd2 = (wd2 | (mode << 2)) | volume;
VISetCGMS(wd0, wd1, wd2);
tvFormat = VIGetTvFormat();
if ((__type != type) || (__tvType != tvFormat)) {
__type = type;
@@ -578,101 +557,90 @@ void __VISetRevolutionMode(void) {
WaitMicroTime(2);
}
void __VISetRevolutionModeSimple(void) {
u32 i;
u8 powerCommand[2];
u8 clockCommand[2];
u8 outputCommand[2];
u8 volumeCommand[3];
u8 syncCommand[2];
u8 cgmsCommand[3];
u8 wssCommand[3];
u8 captionCommand[5];
u8 acpCommand[0x1c];
u8 driveCommand[2];
u8 filterCommand[2];
void __VISetTiming(s32 timing) {
u8 data[2];
powerCommand[0] = 0x6a;
powerCommand[1] = 1;
__VISendI2CData(0xe0, powerCommand, 2);
data[0] = 0;
data[1] = (u8)timing;
__VISendI2CData(0xe0, data, sizeof(data));
WaitMicroTime(2);
clockCommand[0] = 0x65;
clockCommand[1] = 1;
__VISendI2CData(0xe0, clockCommand, 2);
WaitMicroTime(2);
__VISetYUVSEL(VIGetDTVStatus());
outputCommand[0] = 0;
outputCommand[1] = 0;
__VISendI2CData(0xe0, outputCommand, 2);
WaitMicroTime(2);
volumeCommand[0] = 0x71;
volumeCommand[1] = 0x8e;
volumeCommand[2] = 0x8e;
__VISendI2CData(0xe0, volumeCommand, 3);
WaitMicroTime(2);
syncCommand[0] = 2;
syncCommand[1] = 7;
__VISendI2CData(0xe0, syncCommand, 2);
}
void __VISetVBICtrl(u8 arg0, u8 arg1, u8 arg2) {
u8 data[2];
data[0] = 2;
data[1] = (~arg2 & 1) | (((~arg1 & 1) << 2) | ((~arg0 & 1) << 1));
__VISendI2CData(0xe0, data, sizeof(data));
WaitMicroTime(2);
}
void __VISetCGMSClear(void) {
__wd0 = 0;
__wd1 = 0;
__wd2 = 0;
cgmsCommand[0] = 5;
cgmsCommand[1] = 0;
cgmsCommand[2] = 0;
__VISendI2CData(0xe0, cgmsCommand, 3);
WaitMicroTime(2);
if ((__gp1 != 0) || (__gp2 != 0) || (__gp3 != 0) || (__gp4 != 0)) {
__gp1 = 0;
__gp2 = 0;
__gp3 = 0;
__gp4 = 0;
__VISetCGMS();
}
void VISetWSS(u8 gp1, u8 gp2, u8 gp3, u8 gp4) {
if (__gp1 != gp1 || __gp2 != gp2 || __gp3 != gp3 || __gp4 != gp4) {
__gp1 = gp1;
__gp2 = gp2;
__gp3 = gp3;
__gp4 = gp4;
Vdac_Flag_Changed_816991E0 |= 2;
}
wssCommand[0] = 8;
wssCommand[1] = (__gp2 & 0xf) << 4 | __gp1 & 0xf;
wssCommand[2] = (__gp4 & 7) << 3 | __gp3 & 7;
__VISendI2CData(0xe0, wssCommand, 3);
WaitMicroTime(2);
if ((__cc1 != 0) || (__cc2 != 0) || (__cc3 != 0) || (__cc4 != 0)) {
__cc1 = 0;
__cc2 = 0;
__cc3 = 0;
__cc4 = 0;
}
void VISetClosedCaption(u8 cc1, u8 cc2, u8 cc3, u8 cc4) {
if (__cc1 != cc1 || __cc2 != cc2 || __cc3 != cc3 || __cc4 != cc4) {
__cc1 = cc1;
__cc2 = cc2;
__cc3 = cc3;
__cc4 = cc4;
Vdac_Flag_Changed_816991E0 |= 4;
}
captionCommand[0] = 0x7a;
captionCommand[1] = __cc1 & 0x7f;
captionCommand[2] = __cc2 & 0x7f;
captionCommand[3] = __cc3 & 0x7f;
captionCommand[4] = __cc4 & 0x7f;
__VISendI2CData(0xe0, captionCommand, 5);
WaitMicroTime(2);
for (i = 0; i < 0x1a; i++) {
acpCommand[i + 1] = VIZeroACPType[i];
}
acpCommand[0] = 0x40;
__VISendI2CData(0xe0, acpCommand, 0x1b);
WaitMicroTime(2);
if (__level != 0) {
__level = 0;
}
void VISetRGBOverDrive(s32 level) {
if (__level != level) {
__level = level;
Vdac_Flag_Changed_816991E0 |= 0x40;
}
if (Vdac_Flag_Region == 3) {
driveCommand[0] = 10;
driveCommand[1] = __level << 1 | 1;
__VISendI2CData(0xe0, driveCommand, 2);
WaitMicroTime(2);
}
void __VISetTrapFilterImm(u8 flag) {
u8 data[2];
data[0] = 3;
if (flag == TRUE) {
data[1] = 0;
} else {
driveCommand[0] = 10;
driveCommand[1] = 0;
__VISendI2CData(0xe0, driveCommand, 2);
WaitMicroTime(2);
data[1] = 1;
}
filterCommand[0] = 3;
filterCommand[1] = 1;
__VISendI2CData(0xe0, filterCommand, 2);
__VISendI2CData(0xe0, data, sizeof(data));
WaitMicroTime(2);
}
void __VISetRevolutionModeSimple(void) {
u32 dtvStatus;
__VISetCCSEL(TRUE);
__VISetOverSampling(TRUE);
dtvStatus = VIGetDTVStatus();
__VISetYUVSEL(dtvStatus);
__VISetTiming(0);
__VISetVolume(142, 142);
__VISetVBICtrl(0, 0, 0);
__VISetCGMSClear();
VISetWSS(0, 0, 0, 0);
__VISetWSS();
VISetClosedCaption(0, 0, 0, 0);
__VISetClosedCaption();
__VISetMacrovisionImm(VIZeroACPType);
VISetRGBOverDrive(0);
__VISetRGBOverDrive();
__VISetTrapFilterImm(0);
__VISetGammaImm(gammaSet[10]);
}

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,7 @@
#include <private/nand.h>
#include <private/os.h>
#include <private/vi.h>
#include <private/hollywood/flipper.h>
#include <private/es.h>
#include <private/fs.h>
@@ -295,8 +296,8 @@ extern vu32 __DVDLayoutFormat;
void Run(u32 entryPoint, void *start, u32 blockCount, u32 argument) {
u8 *block = start;
for (; blockCount != 0; --blockCount) {
DCZeroRange(block, 32);
DCFlushRange(block, 32);
__dcbz(block, 0);
__dcbf(block, 0);
block += 32;
}
((void (*)(u32))entryPoint)(argument);
@@ -938,7 +939,8 @@ void BS2StartGCGame() {
}
__OSClearRTCFlags();
*(u32 *)0xCC003024 |= 7;
PI_SET_REG_F(0x24, 7);
(void)PI_READ_REG(0x24);
ticketViews = TicketViews;
ticketCount = 1;
BS2Report(" sysVersion = %016llx\n", 0x0000000100000100ULL);
@@ -1043,8 +1045,8 @@ void BS2NANDDivideCallback(s32 result, NANDCommandBlock *block) {
} else if (result < 0) {
NandCompletion(result, block);
} else {
NandTransferred += result;
NandBuffer += result;
NandTransferred = NandTransferred + result;
NandBuffer = NandBuffer + result;
if (NandLength - NandTransferred > 0x40000) {
if (NandOperation == 1) {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, 0x40000);
@@ -1057,7 +1059,7 @@ void BS2NANDDivideCallback(s32 result, NANDCommandBlock *block) {
NandCompletion(ret, block);
}
} else {
if (NandLength - NandTransferred != 0) {
if (NandLength != NandTransferred) {
if (NandOperation == 1) {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, NandLength - NandTransferred);
ret = NANDWriteAsync(NandFile, (void *)NandBuffer, NandLength - NandTransferred, BS2NANDDivideCallback, block);
@@ -1082,12 +1084,17 @@ void BS2NANDDivideReadAsync(NANDFileInfo *info, void *buffer, u32 length, NANDCa
NandTransferred = 0;
NandFile = info;
NandBuffer = (u8 *)buffer;
if (NandLength > 0x40000) {
switch (NandLength > 0x40000) {
default: {
BS2Report("NANDReadAsync buf:0x%08X, length:0x%08X\n", NandBuffer, 0x40000);
NANDReadAsync(NandFile, (void *)NandBuffer, 0x40000, BS2NANDDivideCallback, block);
} else {
break;
}
case 0: {
BS2Report("NANDReadAsync buf:0x%08X, length:0x%08X\n", NandBuffer, NandLength);
NANDReadAsync(NandFile, (void *)NandBuffer, NandLength, BS2NANDDivideCallback, block);
break;
}
}
}
@@ -1098,18 +1105,21 @@ void BS2NANDDivideWriteAsync(NANDFileInfo *info, const void *buffer, u32 length,
NandTransferred = 0;
NandFile = info;
NandBuffer = (u8 *)buffer;
if (NandLength > 0x40000) {
switch (NandLength > 0x40000) {
default: {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, 0x40000);
NANDWriteAsync(NandFile, (void *)NandBuffer, 0x40000, BS2NANDDivideCallback, block);
} else {
break;
}
case 0: {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, NandLength);
NANDWriteAsync(NandFile, (void *)NandBuffer, NandLength, BS2NANDDivideCallback, block);
break;
}
}
}
BOOL CheckBS2CommandStatus() {
u32 partCount;
u32 chunkLength;
if (CheckDVDCommandStatus(&Block) == 0) {
BS2Report("DVD command is issuing\n");
return 0;
@@ -1192,16 +1202,13 @@ BOOL CheckBS2CommandStatus() {
if (BS2BootCaching != 0) {
BS2Report("Write partition ifno\n");
NandPending = 1;
partCount = ((DVDGameTOC *)DataToc)->partitionCount;
chunkLength = OSRoundUp32B(partCount * sizeof(DVDPartitionInfo)) + 32;
CacheCommandComplete = 1;
CacheLength = CacheLength + OSRoundUp32B(partCount * sizeof(DVDPartitionInfo));
CacheLength += 32;
CacheLength += OSRoundUp32B(((DVDGameTOC *)DataToc)->partitionCount * sizeof(DVDPartitionInfo)) + 32;
if ((unsigned int)CacheLength > 0xb00000) {
BS2NANDCallback(-1, NULL);
return 1;
} else {
BS2NANDDivideWriteAsync(&BS2CacheFileInfo, &PartitionInfoBuf, chunkLength, BS2NANDCallback, &BS2NandBlock);
BS2NANDDivideWriteAsync(&BS2CacheFileInfo, &PartitionInfoBuf, OSRoundUp32B(((DVDGameTOC *)DataToc)->partitionCount * sizeof(DVDPartitionInfo)) + 32, BS2NANDCallback, &BS2NandBlock);
return 0;
}
}
@@ -1339,15 +1346,20 @@ void BS2ReadDiskID(void *buffer, s32 length, u32 offset) {
BS2State BS2Tick() {
u32 interruptsEnabled = OSDisableInterrupts();
u32 titleCode, titlePrefix;
u32 titleCode;
s32 titlePrefix;
u8 titleCharacters[4];
u32 readOffset, readLength, readAddress;
struct {
u32 offset;
u32 length;
u32 address;
} loaderRead;
DVDFileInfo bannerFile;
s32 discRegion, status;
u32 discRegion;
s32 status;
u64 currentTime;
BOOL regionMatches;
char productRegion;
DVDPartitionInfo *partition;
u32 iosHigh;
char *ticketByte;
u32 entryCount;
@@ -1376,8 +1388,7 @@ BS2State BS2Tick() {
currentTime = __OSGetSystemTime();
ResetTime = currentTime;
if (BS2WaitSpinup != 0 && BS2BootFromCache == 0) {
currentTime = __OSGetSystemTime();
SpinupDeadline = (u64)((OS_BUS_CLOCK >> 2) * 5) + currentTime;
SpinupDeadline = __OSGetSystemTime() + OSSecondsToTicks(5);
} else {
currentTime = __OSGetSystemTime();
SpinupDeadline = currentTime;
@@ -1403,8 +1414,7 @@ BS2State BS2Tick() {
currentTime = __OSGetSystemTime();
SpinupDeadline = currentTime;
} else {
currentTime = __OSGetSystemTime();
SpinupDeadline = (u64)((OS_BUS_CLOCK >> 2) * 7) + currentTime;
SpinupDeadline = __OSGetSystemTime() + OSSecondsToTicks(7);
}
__OSClearRTCFlags();
DVDResetAsync(&Block, BS2DVDCallback);
@@ -1421,7 +1431,7 @@ BS2State BS2Tick() {
status = CheckDVDCommandStatus(&CoverBlock);
if (status != 0) {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
@@ -1434,12 +1444,12 @@ BS2State BS2Tick() {
if (status != 0) {
State = BS2_STT_4;
case 4:
if (BS2BootFromCache == 0)
DVDInquiryAsync(&Block, &DriveInfo, BS2DVDCallback);
else {
if (BS2BootFromCache != 0) {
BS2Report("Read drive info from cache.dat\n");
NandPending = 1;
BS2NANDDivideReadAsync(&BS2CacheFileInfo, &DriveInfo, 0x20, BS2NANDCallback, &BS2NandBlock);
} else {
DVDInquiryAsync(&Block, &DriveInfo, BS2DVDCallback);
}
State = BS2_STT_5;
}
@@ -1465,26 +1475,28 @@ BS2State BS2Tick() {
break;
State = BS2_STT_8;
case 8:
if (BS2BootFromCache == 0)
DVDReadDiskID(&Block, &DiskID, BS2DVDCallback);
else {
if (BS2BootFromCache != 0) {
BS2Report("Read disk id from cache.dat\n");
NandPending = 1;
BS2NANDDivideReadAsync(&BS2CacheFileInfo, &DiskID, 0x20, BS2NANDCallback, &BS2NandBlock);
} else {
DVDReadDiskID(&Block, &DiskID, BS2DVDCallback);
}
State = BS2_STT_9;
break;
case 9:
case 10:
case 10: {
DVDDiskID *bootDisc;
status = CheckBS2CommandStatus();
if (status == 0)
break;
memcpy((void *)0x80000000, &DiskID, 0x20);
if ((*(u32 *)0x80000018) == 0x5d1c9ea3) {
status = strncmp((char *)0x80000000, "RAAE", 4);
if (status == 0 || strncmp((char *)0x80000000, "408", 3) == 0 ||
strncmp((char *)0x80000000, "410", 3) == 0 ||
strncmp((char *)0x80000000, "410", 3) == 0)
memcpy((void *)0x80000000, &DiskID, sizeof(DVDDiskID));
bootDisc = (DVDDiskID *)0x80000000;
if (bootDisc->rvlMagic == 0x5d1c9ea3) {
status = strncmp((char *)bootDisc, "RAAE", 4);
if (status == 0 || strncmp((char *)bootDisc, "408", 3) == 0 ||
strncmp((char *)bootDisc, "410", 3) == 0 ||
strncmp((char *)bootDisc, "410", 3) == 0)
regionMatches = FALSE;
else
regionMatches = TRUE;
@@ -1495,31 +1507,33 @@ BS2State BS2Tick() {
break;
}
}
if ((*(u32 *)0x8000001c) == -0x3dcc60c3) {
if (bootDisc->gcMagic == -0x3dcc60c3) {
BS2Report("DOLPHIN LAYOUT FORMAT\n");
__DVDLayoutFormat = 2;
State = BS2_STT_11;
} else {
BS2Report("UNKNOWN\n");
State = BS2_STT_54;
break;
}
case 0xb:
productRegion = (*(u8 *)0x80000008);
State = BS2_STT_11;
}
case 0xb: {
DVDDiskID *bootDisc = (DVDDiskID *)0x80000000;
u32 audioBufferSize;
if (AudioBufferUnconfigured == 0) {
State = BS2_STT_GC_GAME;
break;
}
AudioBufferUnconfigured = 0;
if (productRegion == '\0')
if (bootDisc->streaming != 0) {
audioBufferSize = bootDisc->streamingBufSize;
audioBufferSize = audioBufferSize != 0 ? audioBufferSize : 10;
__DVDAudioBufferConfig(&Block, 1, audioBufferSize, BS2DVDCallback);
} else {
__DVDAudioBufferConfig(&Block, 0, 0, BS2DVDCallback);
else {
productRegion = (*(u8 *)0x80000009);
if (productRegion == '\0')
productRegion = '\n';
__DVDAudioBufferConfig(&Block, 1, productRegion, BS2DVDCallback);
}
State = BS2_STT_12;
}
case 0xc:
status = CheckDVDCommandStatus(&Block);
if (status == 0)
@@ -1530,28 +1544,35 @@ BS2State BS2Tick() {
State = BS2_STT_14;
case 0xe:
status = CheckDVDCommandStatus(&Block);
discRegion = bi2.countryCode;
if (status == 0)
break;
discRegion = bi2.countryCode;
productRegion = SCGetProductGameRegion();
switch (productRegion) {
case 0:
regionMatches = discRegion == 0;
if (discRegion != 0)
goto invalidGcRegion;
regionMatches = TRUE;
break;
case 1:
regionMatches = discRegion == 1;
if (discRegion != 1)
goto invalidGcRegion;
regionMatches = TRUE;
break;
case 2:
regionMatches = discRegion == 2;
if (discRegion != 2)
goto invalidGcRegion;
regionMatches = TRUE;
break;
default:
invalidGcRegion:
regionMatches = FALSE;
break;
}
if (regionMatches)
State = BS2_STT_GC_GAME;
else
if (!regionMatches)
State = BS2_STT_54;
else
State = BS2_STT_GC_GAME;
break;
case 0xf:
if (LoadingTitle != 0) {
@@ -1580,27 +1601,23 @@ BS2State BS2Tick() {
status = CheckBS2CommandStatus();
if (status == 0)
break;
partition = (DVDPartitionInfo *)PartitionInfoBuf;
PartitionCursor = (u32)&PartitionInfoBuf;
UpdatePartition = 0;
GamePartition = 0;
for (titleCode = 0; titleCode < (*(DVDGameTOC **)&GameToc)->partitionCount; titleCode = titleCode + 1) {
BS2Report("gamePartition ... 0x%08X\n", (u32)partition->partition);
BS2Report("gamePartition ... 0x%08X\n", (u32)((DVDPartitionInfo *)PartitionCursor)->partition);
BS2Report("type ... 0x%08X\n", ((DVDPartitionInfo *)PartitionCursor)->partitionType);
if (((DVDPartitionInfo *)PartitionCursor)->partitionType == 0)
GamePartition = PartitionCursor;
if (((DVDPartitionInfo *)PartitionCursor)->partitionType == 1)
UpdatePartition = PartitionCursor;
partition = (DVDPartitionInfo *)PartitionCursor + 1;
PartitionCursor = (u32)partition;
PartitionCursor = (u32)((DVDPartitionInfo *)PartitionCursor + 1);
}
partition = (DVDPartitionInfo *)PartitionInfoBuf + 4;
PartitionCursor = (u32)((DVDPartitionInfo *)PartitionInfoBuf + 4);
for (titleCode = 0; titleCode < ((DVDGameTOC *)DataToc)->partitionCount; titleCode = titleCode + 1) {
BS2Report("gamePartition ... 0x%08X\n", (u32)partition->partition);
BS2Report("gamePartition ... 0x%08X\n", (u32)((DVDPartitionInfo *)PartitionCursor)->partition);
BS2Report("type ... 0x%08X\n", ((DVDPartitionInfo *)PartitionCursor)->partitionType);
partition = (DVDPartitionInfo *)PartitionCursor + 1;
PartitionCursor = (u32)partition;
PartitionCursor = (u32)((DVDPartitionInfo *)PartitionCursor + 1);
}
State = BS2_STT_19;
}
@@ -1609,62 +1626,80 @@ BS2State BS2Tick() {
State = BS2_STT_20;
case 0x14:
status = CheckBS2CommandStatus();
discRegion = bi3.countryCode;
if (status == 0)
break;
if (bi3.magic != -0x3c07e572) {
State = BS2_STT_54;
break;
}
productRegion = SCGetProductGameRegion();
switch (productRegion) {
case 0:
regionMatches = discRegion == 0;
break;
case 1:
regionMatches = discRegion == 1;
break;
case 2:
regionMatches = discRegion == 2;
break;
case 4:
regionMatches = discRegion == 4;
break;
case 5:
regionMatches = discRegion == 5;
break;
default:
regionMatches = FALSE;
break;
}
if (regionMatches) {
status = BS2IsValidDisc();
if (status == 0)
if (bi3.magic == -0x3c07e572) {
discRegion = bi3.countryCode;
productRegion = SCGetProductGameRegion();
switch (productRegion) {
case 0:
if (discRegion != 0)
goto invalidRvlRegion;
regionMatches = TRUE;
break;
case 1:
if (discRegion != 1)
goto invalidRvlRegion;
regionMatches = TRUE;
break;
case 2:
if (discRegion != 2)
goto invalidRvlRegion;
regionMatches = TRUE;
break;
case 4:
if (discRegion != 4)
goto invalidRvlRegion;
regionMatches = TRUE;
break;
case 5:
if (discRegion != 5)
goto invalidRvlRegion;
regionMatches = TRUE;
break;
default:
invalidRvlRegion:
regionMatches = FALSE;
break;
}
if (!regionMatches) {
State = BS2_STT_54;
else if (BS2BootFromCache == 0) {
if (UpdatePartition == 0) {
if (GamePartition == 0)
State = BS2_STT_54;
else
State = BS2_STT_37;
} else {
State = BS2_STT_21;
case 0x15:
DVDOpenPartitionAsync(&Block, (void *)(u32)&PartitionParams.tmd, (u32)((DVDPartitionInfo *)UpdatePartition)->partition,
BS2DVDCallback);
PartitionOpen = 1;
State = BS2_STT_22;
}
} else
State = BS2_STT_37;
} else
break;
}
status = BS2IsValidDisc();
if (status == 0) {
State = BS2_STT_54;
break;
}
} else {
State = BS2_STT_54;
break;
}
if (BS2BootFromCache != 0) {
State = BS2_STT_37;
break;
}
if (UpdatePartition != 0)
State = BS2_STT_21;
else {
if (GamePartition != 0)
State = BS2_STT_37;
else
State = BS2_STT_54;
break;
}
case 0x15:
DVDOpenPartitionAsync(&Block, &PartitionParams.tmd,
(u32)((DVDPartitionInfo *)UpdatePartition)->partition,
BS2DVDCallback);
PartitionOpen = 1;
State = BS2_STT_22;
break;
case 0x16:
status = CheckDVDCommandStatus(&Block);
if (status != 0) {
CurrentTmd = (u32)&PartitionParams.tmd;
BS2Report("TMD ver ... 0x%02X\n", PartitionParams.tmd.head.version);
BS2Report("TMD ver ... 0x%02X\n", ((ESTitleMeta *)CurrentTmd)->head.version);
BS2Report("CA CRL ver ... 0x%02X\n", ((ESTitleMeta *)CurrentTmd)->head.caCrlVersion);
BS2Report("Signer CRL ver ... 0x%02X\n", ((ESTitleMeta *)CurrentTmd)->head.signerCrlVersion);
BS2Report("Req sys ver ... 0x%08X%08X\n", (u32)(((ESTitleMeta *)CurrentTmd)->head.sysVersion >> 32),
@@ -1682,11 +1717,12 @@ BS2State BS2Tick() {
status = CheckDVDCommandStatus(&Block);
if (status == 0)
break;
if (UpdateDiskID.rvlMagic != 0x5d1c9ea3) {
if (UpdateDiskID.rvlMagic == 0x5d1c9ea3)
State = BS2_STT_25;
else {
State = BS2_STT_35;
break;
}
State = BS2_STT_25;
case 0x19:
DVDReadAbsAsyncForBS(&Block, &AppLoaderHdr, 0x20, 0x910, BS2DVDCallback);
State = BS2_STT_26;
@@ -1711,22 +1747,20 @@ BS2State BS2Tick() {
((void (*)(void *))((*(void **)&LoaderInit)))((void *)BS2Report);
BS2Report("\nApploader Initialized\n");
State = BS2_STT_29;
break;
case 0x1d:
status = ((int (*)(u32 *, u32 *, u32 *))((*(void **)&LoaderMain)))(&readAddress, &readLength, &readOffset);
if (status == 0)
State = BS2_STT_31;
else {
BS2Report("Addr [0x%x] length [0x%x] offset [0x%x]\n", readAddress, readLength, readOffset);
status = ((int (*)(u32 *, u32 *, u32 *))((*(void **)&LoaderMain)))(&loaderRead.address, &loaderRead.length, &loaderRead.offset);
if (status != 0) {
BS2Report("Addr [0x%x] length [0x%x] offset [0x%x]\n", loaderRead.address, loaderRead.length, loaderRead.offset);
readInterruptsEnabled = OSDisableInterrupts();
DVDReadAbsAsyncForBS(&Block, (void *)readAddress, readLength, readOffset >> (__DVDLayoutFormat & 0x3f), BS2DVDCallback);
DVDReadAbsAsyncForBS(&Block, (void *)loaderRead.address, loaderRead.length, loaderRead.offset >> __DVDLayoutFormat, BS2DVDCallback);
if (*(s32 *)DvdProgress != 0) {
DvdReadPending = 1;
DvdTransferLength = readLength;
DvdTransferLength = loaderRead.length;
}
OSRestoreInterrupts(readInterruptsEnabled);
State = BS2_STT_30;
}
} else
State = BS2_STT_31;
break;
case 0x1e:
status = CheckDVDCommandStatus(&Block);
@@ -1750,11 +1784,11 @@ BS2State BS2Tick() {
}
} else {
status = BS2GetUpdateEntryNum();
if ((status != 0) && (status = BS2UpdateState(), status == 1)) {
if ((status != 0) && (BS2UpdateState() == 1)) {
entryCount = BS2GetUpdateEntryNum();
BS2Report("%d entries\n", entryCount);
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
@@ -1768,9 +1802,9 @@ BS2State BS2Tick() {
break;
case 0x21:
status = CheckDVDCommandStatus(&CoverBlock);
if ((status != 0) && (status = BS2UpdateState(), status == 1)) {
if ((status != 0) && (BS2UpdateState() == 1)) {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
@@ -1837,14 +1871,12 @@ BS2State BS2Tick() {
}
State = BS2_STT_37;
case 0x25:
if (BS2BootFromCache == 0)
DVDOpenPartitionAsync(&Block, (void *)(u32)&PartitionParams.tmd, (u32)((DVDPartitionInfo *)GamePartition)->partition,
BS2DVDCallback);
else {
if (BS2BootFromCache != 0) {
BS2Report("Open partition from cache.dat\n");
NandPending = 1;
BS2NANDDivideReadAsync(&BS2CacheFileInfo, (void *)(u32)&PartitionParams.tmd, 0x4a00, BS2NANDCallback, &BS2NandBlock);
}
BS2NANDDivideReadAsync(&BS2CacheFileInfo, &PartitionParams.tmd, 0x4a00, BS2NANDCallback, &BS2NandBlock);
} else
DVDOpenPartitionAsync(&Block, &PartitionParams.tmd, (u32)((DVDPartitionInfo *)GamePartition)->partition, BS2DVDCallback);
PartitionOpen = 1;
State = BS2_STT_38;
break;
@@ -1853,7 +1885,7 @@ BS2State BS2Tick() {
if (status == 0)
break;
CurrentTmd = (u32)&PartitionParams.tmd;
BS2Report("TMD ver ... 0x%02X\n", PartitionParams.tmd.head.version);
BS2Report("TMD ver ... 0x%02X\n", ((ESTitleMeta *)CurrentTmd)->head.version);
BS2Report("CA CRL ver ... 0x%02X\n", ((ESTitleMeta *)CurrentTmd)->head.caCrlVersion);
BS2Report("Signer CRL ver ... 0x%02X\n", ((ESTitleMeta *)CurrentTmd)->head.signerCrlVersion);
BS2Report("Req sys ver ... 0x%08X%08X\n", (u32)(((ESTitleMeta *)CurrentTmd)->head.sysVersion >> 32),
@@ -1865,7 +1897,7 @@ BS2State BS2Tick() {
RequiredIosHigh = iosHigh;
titleCode = (u32)((ESTitleMeta *)CurrentTmd)->head.titleId;
TitleCode = titleCode;
if ((u32)((ESTitleMeta *)CurrentTmd)->head.sysVersion == 0x10 && (u32)(((ESTitleMeta *)CurrentTmd)->head.sysVersion >> 32) == 1) {
if (((ESTitleMeta *)CurrentTmd)->head.sysVersion == 0x0000000100000010ULL) {
BS2Report("This must be a backup disk\n");
State = BS2_STT_FATAL_ERROR;
break;
@@ -1874,80 +1906,95 @@ BS2State BS2Tick() {
titlePrefix = titleCode >> 0x18;
titleCharacters[3] = (u8)titleCode;
titleCharacters[0] = (char)(titleCode >> 0x18);
if (titlePrefix < 0x52) {
if (titlePrefix != 0x44)
goto unrestricted_title;
if (titlePrefix < 'R') {
if (titlePrefix == 'D')
goto check_title_region;
} else if (titlePrefix < 'U')
goto check_title_region;
regionMatches = TRUE;
goto title_region_checked;
{
check_title_region:
if (titleCharacters[3] == 0x41) {
regionMatches = TRUE;
goto title_region_checked;
}
productRegion = SCGetProductGameRegion();
if (productRegion == '\x03')
goto title_region_mismatch;
if ('\x02' < productRegion) {
if (productRegion == '\x05') {
if (titleCharacters[3] != 0x43)
goto title_region_mismatch;
regionMatches = TRUE;
} else {
if (('\x04' < productRegion) || (titleCharacters[3] != 0x4b))
goto title_region_mismatch;
regionMatches = TRUE;
}
goto title_region_checked;
}
if (productRegion == '\x01') {
if (titleCharacters[3] < 0x58) {
if (titleCharacters[3] == 0x45)
goto us_title_region;
} else if (titleCharacters[3] < 0x5b) {
us_title_region:
regionMatches = TRUE;
goto title_region_checked;
}
goto title_region_mismatch;
}
if (productRegion < '\x01') {
if ((productRegion < '\0') ||
((titleCharacters[3] != 0x57 && ((0x56 < titleCharacters[3] || (titleCharacters[3] != 0x4a))))))
goto title_region_mismatch;
regionMatches = TRUE;
} else {
switch (titleCharacters[3]) {
case 0x44:
case 0x46:
case 0x48:
case 0x49:
case 0x50:
case 0x52:
case 0x53:
case 0x55:
case 0x56:
case 0x58:
case 0x59:
case 0x5a:
switch (productRegion) {
case 0:
switch ((s32)titleCharacters[3]) {
case 'J':
case 'W':
regionMatches = TRUE;
break;
case 0x57:
titleCharacters[1] = (u8)(titleCode >> 0x10);
default:
goto title_region_mismatch;
}
break;
case 1:
switch ((s32)titleCharacters[3]) {
case 'E':
case 'X':
case 'Y':
case 'Z':
regionMatches = TRUE;
break;
default:
goto title_region_mismatch;
}
break;
case 2:
switch (titleCharacters[3]) {
case 'D':
case 'F':
case 'H':
case 'I':
case 'P':
case 'R':
case 'S':
case 'U':
case 'V':
case 'X':
case 'Y':
case 'Z':
regionMatches = TRUE;
break;
case 'W':
titleCharacters[1] = (u8)(titleCode >> 16);
titleCharacters[2] = (u8)(titleCode >> 8);
if (((titleCharacters[0] != 'R') || ((titleCode >> 0x10 & 0xff) != 0x4c)) || ((titleCode >> 8 & 0xff) != 0x57))
if (titleCharacters[0] != 'R' ||
(titleCode >> 16 & 0xff) != 'L' ||
(titleCode >> 8 & 0xff) != 'W')
goto title_region_mismatch;
regionMatches = TRUE;
break;
default:
title_region_mismatch:
regionMatches = FALSE;
break;
goto title_region_mismatch;
}
break;
case 4:
switch ((s32)titleCharacters[3]) {
case 'K':
regionMatches = TRUE;
break;
default:
goto title_region_mismatch;
}
break;
case 5:
switch ((s32)titleCharacters[3]) {
case 'C':
regionMatches = TRUE;
break;
default:
goto title_region_mismatch;
}
break;
default:
title_region_mismatch:
regionMatches = FALSE;
break;
}
goto title_region_checked;
} else {
if (titlePrefix < 0x55)
goto check_title_region;
unrestricted_title:
regionMatches = TRUE;
}
title_region_checked:
if (!regionMatches) {
@@ -1982,25 +2029,23 @@ BS2State BS2Tick() {
((void (*)(void *))((*(void **)&LoaderInit)))((void *)OSReport);
BS2Report("\nApploader Initialized\n");
State = BS2_STT_43;
break;
case 0x2b:
status = ((int (*)(u32 *, u32 *, u32 *))((*(void **)&LoaderMain)))(&readAddress, &readLength, &readOffset);
if (status == 0)
State = BS2_STT_45;
else {
BS2Report("Addr [0x%x] length [0x%x] offset [0x%x]\n", readAddress, readLength, readOffset);
status = ((int (*)(u32 *, u32 *, u32 *))((*(void **)&LoaderMain)))(&loaderRead.address, &loaderRead.length, &loaderRead.offset);
if (status != 0) {
BS2Report("Addr [0x%x] length [0x%x] offset [0x%x]\n", loaderRead.address, loaderRead.length, loaderRead.offset);
readInterruptsEnabled = OSDisableInterrupts();
BS2ReadDiskID((void *)readAddress, readLength, readOffset >> (__DVDLayoutFormat & 0x3f));
LoaderLength = readLength;
LoaderAddress = readAddress;
LoaderOffset = readOffset;
BS2ReadDiskID((void *)loaderRead.address, loaderRead.length, loaderRead.offset >> __DVDLayoutFormat);
LoaderLength = loaderRead.length;
LoaderAddress = loaderRead.address;
LoaderOffset = loaderRead.offset;
if ((*(s32 *)DvdProgress != 0) && (BS2BootFromCache == 0)) {
DvdReadPending = 1;
DvdTransferLength = readLength;
DvdTransferLength = loaderRead.length;
}
OSRestoreInterrupts(readInterruptsEnabled);
State = BS2_STT_44;
}
} else
State = BS2_STT_45;
break;
case 0x2c:
status = CheckBS2CommandStatus();
@@ -2008,10 +2053,14 @@ BS2State BS2Tick() {
State = BS2_STT_43;
break;
case 0x2d:
if (PartitionParams.numTmdBytes == 0) {
if (PartitionParams.numTmdBytes != 0) {
State = BS2_STT_47;
break;
}
{
__DVDFSInit();
status = DVDConvertPathToEntrynum("/opening.bnr");
if (-1 < status) {
if (status >= 0) {
DVDFastOpen(status, &bannerFile);
if (Allocator != 0) {
if (BannerAllocation != 0)
@@ -2033,7 +2082,7 @@ BS2State BS2Tick() {
}
if (bannerFile.length != 0) {
BS2ReadDiskID((void *)BannerBuffer, ((bannerFile.length + 0x1fU) & 0xffffffe0),
bannerFile.startAddr >> (__DVDLayoutFormat & 0x3f));
bannerFile.startAddr >> __DVDLayoutFormat);
State = BS2_STT_46;
break;
}
@@ -2046,8 +2095,7 @@ BS2State BS2Tick() {
BannerLength = 0;
}
State = BS2_STT_47;
} else
State = BS2_STT_47;
}
break;
case 0x2e:
status = CheckBS2CommandStatus();
@@ -2073,10 +2121,10 @@ BS2State BS2Tick() {
}
if (((u32)((ESTitleMeta *)CurrentTmd)->head.titleId == 0x4c4f43) && (LoadingTitle == 0))
State = BS2_STT_DATA_DISK;
else if (PartitionParams.numTmdBytes == 0)
State = BS2_STT_RVL_GAME;
else
else if (PartitionParams.numTmdBytes != 0)
State = BS2_STT_START_LOCKED_DISK;
else
State = BS2_STT_RVL_GAME;
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
@@ -2089,7 +2137,7 @@ BS2State BS2Tick() {
status = CheckDVDCommandStatus(&CoverBlock);
if ((status != 0) && (StartingGame == 0)) {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
@@ -2100,7 +2148,7 @@ BS2State BS2Tick() {
status = CheckDVDCommandStatus(&CoverBlock);
if ((status != 0) && (StartingGame == 0)) {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
@@ -2131,15 +2179,19 @@ BS2State BS2Tick() {
BS2BootFromCache = 0;
BS2BootCaching = 1;
LoadingTitle = 0;
if ((Block.state < 6) && (3 < Block.state))
switch (Block.state) {
case 4:
case 5:
CheckDVDCommandStatus(&Block);
else {
break;
default: {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
}
} break;
}
break;
case 0x36:
@@ -2168,31 +2220,6 @@ BS2State BS2Tick() {
}
LoadingTitle = 0;
break;
case 0x3b:
case 0x3f:
if (UpdateErrorFlag == 0) {
if (RetryErrorFlag != 0) {
RetryErrorFlag = 0;
State = BS2_STT_DIRTY_DISK;
}
if (AbortFlag == 0) {
if ((Block.state < 6) && (3 < Block.state))
CheckDVDCommandStatus(&Block);
else {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
}
}
} else {
AbortFlag = 0;
State = BS2_STT_64;
}
} else
State = BS2_STT_UPDATE_FAILED;
break;
case 0x3c:
status = CheckBS2CommandStatus();
if (status != 0)
@@ -2210,29 +2237,81 @@ BS2State BS2Tick() {
State = BS2_STT_63;
}
break;
case 0x46:
DVDGetPartitionParamsAsync(&Block, &PartitionParams, (u32)((DVDPartitionInfo *)GamePartition)->partition, BS2DVDCallback);
State = BS2_STT_71;
break;
case 0x47: {
status = CheckBS2CommandStatus();
if (status != 0) {
ticketByte = (char *)&PartitionParams.ticket;
for (status = 0; status < sizeof(PartitionParams.ticket); ++status) {
if ((u8)ticketByte[status] != 0) {
BS2Report("eTicket is none zero\n");
break;
}
}
memcpy(&PartitionParams.ticketView, (void *)TitleTicketView, sizeof(ESTicketView));
DCStoreRange(&PartitionParams.ticketView, sizeof(ESTicketView));
DVDOpenPartitionWithParamsAsync(&Block, &PartitionParams, (u32)((DVDPartitionInfo *)GamePartition)->partition, BS2DVDCallback);
PartitionOpen = 1;
State = BS2_STT_38;
}
} break;
case 0x3b:
case 0x3f:
if (UpdateErrorFlag != 0) {
State = BS2_STT_UPDATE_FAILED;
break;
}
if (RetryErrorFlag != 0) {
RetryErrorFlag = 0;
State = BS2_STT_DIRTY_DISK;
}
if (AbortFlag != 0) {
AbortFlag = 0;
State = BS2_STT_64;
break;
}
switch (Block.state) {
case 4:
case 5:
CheckDVDCommandStatus(&Block);
break;
default: {
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - CoverPollTime) >= OSMillisecondsToTicks((OSTime)100)) {
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
}
} break;
}
break;
case 0x40:
AbortFlag = 0;
if (RestartRequested != 0) {
RestartRequested = 0;
if (FatalErrorFlag == 0) {
if (PartitionOpen == 0) {
if ((__DVDLayoutFormat == 2) || ((BS2DriveReset != 0 && (DriveWasReset == 0))))
State = BS2_STT_2;
else {
if (Block.state == 10)
Block.state = 0;
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
State = BS2_STT_3;
}
} else {
PartitionOpen = 0;
State = BS2_STT_15;
}
} else
State = BS2_STT_FATAL_ERROR;
if (RestartRequested == 0)
break;
RestartRequested = 0;
if (FatalErrorFlag != 0) {
State = BS2_STT_FATAL_ERROR;
break;
}
if (PartitionOpen != 0) {
PartitionOpen = 0;
State = BS2_STT_15;
break;
}
if ((__DVDLayoutFormat == 2) || (BS2DriveReset != 0 && DriveWasReset == 0)) {
State = BS2_STT_2;
break;
}
if (Block.state == 10)
Block.state = 0;
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
__DVDGetCoverStatusAsync(&CoverBlock, BS2DVDCallback);
State = BS2_STT_3;
break;
case 0x41:
BannerAvailable = 0;
@@ -2245,7 +2324,7 @@ BS2State BS2Tick() {
break;
case 0x42:
currentTime = __OSGetSystemTime();
if ((OSTime)(currentTime - (((u64)CoverOpenTimeHigh << 32) | CoverOpenTimeLow)) < (OSTime)(((OS_BUS_CLOCK >> 2) / 1000) * 350))
if ((OSTime)(currentTime - (((u64)CoverOpenTimeHigh << 32) | CoverOpenTimeLow)) < OSMillisecondsToTicks((OSTime)350))
break;
currentTime = __OSGetSystemTime();
CoverPollTime = currentTime;
@@ -2255,27 +2334,6 @@ BS2State BS2Tick() {
case 0x44:
CheckDVDCommandStatus(&Block);
break;
case 0x46:
DVDGetPartitionParamsAsync(&Block, &PartitionParams, (u32)((DVDPartitionInfo *)GamePartition)->partition, BS2DVDCallback);
State = BS2_STT_71;
break;
case 0x47: {
status = CheckBS2CommandStatus();
if (status != 0) {
ticketByte = (char *)&PartitionParams.ticket;
for (status = 0; status < sizeof(PartitionParams.ticket); ++status) {
if (ticketByte[status] != 0) {
BS2Report("eTicket is none zero\n");
break;
}
}
memcpy(&PartitionParams.ticketView, (void *)TitleTicketView, sizeof(ESTicketView));
DCStoreRange(&PartitionParams.ticketView, sizeof(ESTicketView));
DVDOpenPartitionWithParamsAsync(&Block, &PartitionParams, (u32)((DVDPartitionInfo *)GamePartition)->partition, BS2DVDCallback);
PartitionOpen = 1;
State = BS2_STT_38;
}
} break;
default:
OSPanic("BS2Mach.c", 0x14e3, "BS2 ERROR >>> UNKNOWN STATE");
break;

View File

@@ -87,22 +87,24 @@ static void* UpdateThread(void* argument) {
u32 requiredBytes;
u32 requiredInodes;
u32 channelCount;
u32 freeChannels;
u32 freeBlocks;
u32 freeInodes;
u32 ticketCount;
char productArea[8];
u64 titleId;
char updatePath[32];
char seatPath[32];
DVDFileInfo file;
u32 index;
BS2UpdateEntry* entry;
BS2UpdateEntry* seatEntries;
BS2UpdateEntry* selectedSeats;
u32 selectedSeatCount;
BOOL regionValid;
u32 titleRegion;
s32 importResult;
struct {
u32 freeChannels;
u32 freeBlocks;
u32 freeInodes;
u32 ticketCount;
char productArea[8];
u64 titleId;
char updatePath[32];
char seatPath[32];
DVDFileInfo file;
} scratch;
BS2Report("Start update thread\n");
StartUpdate = 0;
@@ -112,152 +114,174 @@ static void* UpdateThread(void* argument) {
requiredBytes = 0;
requiredInodes = 0;
channelCount = 0;
freeChannels = 0;
freeBlocks = 0;
freeInodes = 0;
scratch.freeChannels = 0;
scratch.freeBlocks = 0;
scratch.freeInodes = 0;
selectedSeatCount = 0;
State = 0;
ContainsSeatTitles = FALSE;
if (ES_GetTitleId(&titleId) != 0) {
if (ES_GetTitleId(&scratch.titleId) != 0) {
regionValid = FALSE;
} else {
titleRegion = (u8)titleId;
regionValid = FALSE;
titleRegion = (u8)scratch.titleId;
switch (SCGetProductArea()) {
case 0:
case 5:
if (titleRegion == 'J' || titleRegion == 'D') {
regionValid = TRUE;
goto product_region_checked;
}
break;
goto invalid_product_region;
case 1:
if (titleRegion == 'E' || titleRegion == 'D') {
regionValid = TRUE;
goto product_region_checked;
}
break;
goto invalid_product_region;
case 2:
if (titleRegion == 'P' || titleRegion == 'D') {
regionValid = TRUE;
goto product_region_checked;
}
break;
goto invalid_product_region;
case 6:
if (titleRegion == 'K') {
regionValid = TRUE;
goto product_region_checked;
}
break;
goto invalid_product_region;
case 11:
if (titleRegion == 'C') {
regionValid = TRUE;
goto product_region_checked;
}
goto invalid_product_region;
default:
invalid_product_region:
regionValid = FALSE;
break;
}
}
product_region_checked:
if (!regionValid) {
BS2Report("Error: failed to check product region.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
if (!SCGetProductAreaString(productArea, sizeof(productArea))) {
if (!SCGetProductAreaString(scratch.productArea, sizeof(scratch.productArea))) {
BS2Report("Error: failed to get product information.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
strcpy(updatePath, "__update.inf");
strcat(updatePath, "-");
strcat(updatePath, productArea);
if (DVDConvertPathToEntrynum(updatePath) < 0) {
strcpy(scratch.updatePath, "__update.inf");
strcat(scratch.updatePath, "-");
strcat(scratch.updatePath, scratch.productArea);
if (DVDConvertPathToEntrynum(scratch.updatePath) < 0) {
switch (SCGetProductArea()) {
case 0:
case 1:
case 2:
case 6:
case 11:
strcpy(updatePath, "__update.inf");
if (DVDConvertPathToEntrynum(updatePath) < 0) {
strcpy(scratch.updatePath, "__update.inf");
if (DVDConvertPathToEntrynum(scratch.updatePath) < 0) {
BS2Report("Error: update information file is not found.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
break;
default:
BS2Report("Error: update information file is not found.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
}
BS2Report("%s is found.\n", updatePath);
if (!DVDOpen(updatePath, &file)) {
BS2Report("%s is found.\n", scratch.updatePath);
if (!DVDOpen(scratch.updatePath, &scratch.file)) {
BS2Report("Error: failed to open update information file.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
if (DVDReadPrio(&file, &UpdateHeader0, sizeof(UpdateHeader0), 0, 2) < 0) {
if (DVDReadPrio(&scratch.file, &UpdateHeader0, sizeof(UpdateHeader0), 0, 2) < 0) {
BS2Report("Error: failed to read update information header.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
if (UpdateHeader0.wadCount == 0) {
BS2Report("Error: no entry.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
if (UpdateHeader0.wadCount > 32) {
BS2Report("Error: found too many entries.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
UpdateHeader0.wadCount += UpdateHeader0.extraCount;
if (UpdateHeader0.wadCount > BS2_UPDATE_ENTRY_COUNT) {
BS2Report("Error: found too many extra entries.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
if (DVDReadPrio(&file, UPDATE_DISC_ENTRIES, UpdateHeader0.wadCount * sizeof(BS2UpdateEntry), 32, 2) < 0) {
if (DVDReadPrio(&scratch.file, UPDATE_DISC_ENTRIES, UpdateHeader0.wadCount * sizeof(BS2UpdateEntry), 32, 2) < 0) {
BS2Report("Error: failed to read update information.");
goto no_updates;
selectedCount = 0;
goto selection_done;
}
for (index = 0; index < UpdateHeader0.wadCount; index++) {
entry = &UPDATE_DISC_ENTRIES[index];
if ((entry->attr & 1) == 0) {
continue;
}
switch (OSGetPhysicalMem2Size()) {
case 0x4000000:
if ((entry->depend & 1) == 0) {
{
BS2UpdateEntry *discEntries = UPDATE_DISC_ENTRIES;
for (index = 0; index < UpdateHeader0.wadCount; index++) {
if ((discEntries[index].attr & 1) == 0) {
continue;
}
break;
case 0x8000000:
if ((entry->depend & 2) == 0) {
switch (OSGetPhysicalMem2Size()) {
case 0x4000000:
if ((discEntries[index].depend & 1) == 0) {
continue;
}
break;
case 0x8000000:
if ((discEntries[index].depend & 2) == 0) {
continue;
}
break;
default:
BS2Report("Cannot get physical MEM2 size\n");
State = 5;
selectedCount = 0;
goto selection_done;
}
if (DVDOpen(discEntries[index].path, &scratch.file) < 0) {
BS2Report("%s is not found\n", discEntries[index].path);
missingFile = TRUE;
continue;
}
break;
default:
BS2Report("Cannot get physical MEM2 size\n");
State = 5;
goto no_updates;
}
if (DVDOpen(entry->path, &file) < 0) {
BS2Report("%s is not found\n", entry->path);
missingFile = TRUE;
continue;
}
entry->size = file.length;
if (entry->type == 0) {
selectedCount++;
} else if (WADCheckImport(entry->titleId, entry->titleVersion) == 0) {
BS2Report("%s is already installed\n", entry->path);
Flags1[index] = 0;
} else {
BS2Report("%s\n", entry->path);
memcpy(&EntriesToImport[selectedCount], entry, sizeof(*entry));
selectedCount++;
Flags1[index] = 1;
discEntries[index].size = scratch.file.length;
if (discEntries[index].type == 0) {
selectedCount++;
} else if (WADCheckImport(discEntries[index].titleId, discEntries[index].titleVersion) == 0) {
BS2Report("%s is already installed\n", discEntries[index].path);
Flags1[index] = 0;
} else {
BS2Report("%s\n", discEntries[index].path);
memcpy(&EntriesToImport[selectedCount], &discEntries[index], sizeof(BS2UpdateEntry));
selectedCount++;
Flags1[index] = 1;
}
}
}
strcpy(seatPath, "__seatholder.inf");
strcat(seatPath, "-");
strcat(seatPath, productArea);
if (DVDConvertPathToEntrynum(seatPath) < 0) {
strcpy(scratch.seatPath, "__seatholder.inf");
strcat(scratch.seatPath, "-");
strcat(scratch.seatPath, scratch.productArea);
if (DVDConvertPathToEntrynum(scratch.seatPath) < 0) {
switch (SCGetProductArea()) {
case 0:
case 1:
case 2:
case 6:
case 11:
strcpy(seatPath, "__seatholder.inf");
if (DVDConvertPathToEntrynum(seatPath) < 0) {
strcpy(scratch.seatPath, "__seatholder.inf");
if (DVDConvertPathToEntrynum(scratch.seatPath) < 0) {
BS2Report("Error: update seatholder information file is not found.");
goto seats_done;
}
@@ -267,12 +291,12 @@ static void* UpdateThread(void* argument) {
goto seats_done;
}
}
BS2Report("%s is found.\n", seatPath);
if (!DVDOpen(seatPath, &file)) {
BS2Report("%s is found.\n", scratch.seatPath);
if (!DVDOpen(scratch.seatPath, &scratch.file)) {
BS2Report("Error: failed to open update information file.");
goto seats_done;
}
if (DVDReadPrio(&file, &UpdateHeader1, sizeof(UpdateHeader1), 0, 2) < 0) {
if (DVDReadPrio(&scratch.file, &UpdateHeader1, sizeof(UpdateHeader1), 0, 2) < 0) {
BS2Report("Error: failed to read update information header.");
goto seats_done;
}
@@ -287,32 +311,31 @@ static void* UpdateThread(void* argument) {
}
seatEntries = &UPDATE_DISC_ENTRIES[UpdateHeader0.wadCount];
selectedSeats = &EntriesToImport[selectedCount];
if (DVDReadPrio(&file, seatEntries, UpdateHeader1.wadCount * sizeof(BS2UpdateEntry), 32, 2) < 0) {
if (DVDReadPrio(&scratch.file, seatEntries, UpdateHeader1.wadCount * sizeof(BS2UpdateEntry), 32, 2) < 0) {
BS2Report("Error: failed to read update information.");
goto seats_done;
}
for (index = 0; index < UpdateHeader1.wadCount; index++) {
entry = &seatEntries[index];
OSReport("type = %d\n", entry->type);
OSReport("attribute = %d\n", entry->attr);
OSReport("size = %d\n", entry->size);
OSReport("inodes = %d\n", entry->inodes);
OSReport("dependency = %d\n", entry->depend);
OSReport("path = %64s\n", entry->path);
OSReport("titleId = %llx\n", entry->titleId);
OSReport("titleVersion = %d\n", entry->titleVersion);
OSReport("type = %d\n", seatEntries[index].type);
OSReport("attribute = %d\n", seatEntries[index].attr);
OSReport("size = %d\n", seatEntries[index].size);
OSReport("inodes = %d\n", seatEntries[index].inodes);
OSReport("dependency = %d\n", seatEntries[index].depend);
OSReport("path = %64s\n", seatEntries[index].path);
OSReport("titleId = %llx\n", seatEntries[index].titleId);
OSReport("titleVersion = %d\n", seatEntries[index].titleVersion);
Flags0[index] = 0;
if ((entry->attr & 1) == 0) {
if ((seatEntries[index].attr & 1) == 0) {
continue;
}
switch (OSGetPhysicalMem2Size()) {
case 0x4000000:
if ((entry->depend & 1) == 0) {
if ((seatEntries[index].depend & 1) == 0) {
continue;
}
break;
case 0x8000000:
if ((entry->depend & 2) == 0) {
if ((seatEntries[index].depend & 2) == 0) {
continue;
}
break;
@@ -321,58 +344,58 @@ static void* UpdateThread(void* argument) {
State = 5;
goto seats_done;
}
if (DVDOpen(entry->path, &file) < 0) {
BS2Report("%s is not found\n", entry->path);
if (DVDOpen(seatEntries[index].path, &scratch.file) < 0) {
BS2Report("%s is not found\n", seatEntries[index].path);
missingFile = TRUE;
continue;
}
if (entry->type != 7) {
if (seatEntries[index].type != 7) {
continue;
}
if (ES_GetTicketViews(entry->titleId, NULL, &ticketCount) != 0) {
if (ES_GetTicketViews(seatEntries[index].titleId, NULL, &scratch.ticketCount) != 0) {
BS2Report("Faild to get eTicket views.\n");
continue;
}
if (ticketCount != 0) {
if (scratch.ticketCount != 0) {
continue;
}
if (SCGetWwwRestriction() && ((u32)entry->titleId & 0xFFFFFF00) == 0x48414400) {
if (SCGetWwwRestriction() && ((u32)(seatEntries[index].titleId & 0xFFFFFFFFULL) & 0xFFFFFF00) == 0x48414400) {
Flags0[index] = 0;
OSReport("Internet CH is restricted!\n");
continue;
}
if (SCGetProductGameRegion() == 2 && (SCGetSimpleAddressID() >> 24) != 110 &&
(u32)entry->titleId == 0x48434A50) {
(u32)(seatEntries[index].titleId & 0xFFFFFFFFULL) == 0x48434A50) {
Flags0[index] = 0;
OSReport("BBCi CH is only for UK!\n");
continue;
}
BS2Report("%s\n", entry->path);
memcpy(&selectedSeats[selectedSeatCount], entry, sizeof(*entry));
BS2Report("%s\n", seatEntries[index].path);
memcpy(&selectedSeats[selectedSeatCount], &seatEntries[index], sizeof(BS2UpdateEntry));
Flags0[index] = 1;
channelCount++;
selectedSeatCount++;
requiredBytes += entry->size;
requiredInodes += entry->inodes;
requiredBytes += seatEntries[index].size;
requiredInodes += seatEntries[index].inodes;
}
if (channelCount != 0) {
if (!SCGetFreeChannelAppCount(&freeChannels)) {
if (!SCGetFreeChannelAppCount(&scratch.freeChannels)) {
BS2Report("Error: cannot get channel count.");
goto seats_done;
}
if (NANDSecretGetUserAvailableArea(&freeBlocks, &freeInodes) != 0) {
if (NANDSecretGetUserAvailableArea(&scratch.freeBlocks, &scratch.freeInodes) != 0) {
BS2Report("Error: cannot get free user blocks.");
goto seats_done;
}
if ((freeBlocks << 14) < 0x1004000 || requiredBytes > (freeBlocks << 14) - 0x1004000) {
if ((scratch.freeBlocks << 14) < 0x1004000 || requiredBytes > (scratch.freeBlocks << 14) - 0x1004000) {
BS2Report("Sufficient user blocks doesn't exist.");
goto seats_done;
}
if (freeInodes < requiredInodes + 36) {
if (scratch.freeInodes < requiredInodes + 36) {
BS2Report("Sufficient user inodes doesn't exist.");
goto seats_done;
}
if (channelCount > freeChannels) {
if (channelCount > scratch.freeChannels) {
BS2Report("No enough blank channel.");
goto seats_done;
}
@@ -388,23 +411,23 @@ static void* UpdateThread(void* argument) {
seats_done:
if (missingFile) {
State = 5;
goto no_updates;
selectedCount = 0;
goto selection_done;
}
pEntries = EntriesToImport;
pFlags = Flags1;
for (index = 0; index < UpdateHeader0.wadCount; index++) {
if (Flags1[index] == 1) {
entry = &UPDATE_DISC_ENTRIES[index];
BS2Report("File: %s\n", entry->path);
BS2Report("Name: %s\n", entry->dataName);
BS2Report("Info: %s\n", entry->dataMeta);
BS2Report("Attr: %s\n", (entry->attr & 1) ? "Critical" : "Non critical");
BS2Report(" %s\n", (entry->attr & 2) ? "Reboot" : "Not reboot");
{
BS2UpdateEntry *discEntries = UPDATE_DISC_ENTRIES;
for (index = 0; index < UpdateHeader0.wadCount; index++) {
if (Flags1[index] == 1) {
BS2Report("File: %s\n", discEntries[index].path);
BS2Report("Name: %s\n", discEntries[index].dataName);
BS2Report("Info: %s\n", discEntries[index].dataMeta);
BS2Report("Attr: %s\n", (discEntries[index].attr & 1) ? "Critical" : "Non critical");
BS2Report(" %s\n", (discEntries[index].attr & 2) ? "Reboot" : "Not reboot");
}
}
}
goto selection_done;
no_updates:
selectedCount = 0;
selection_done:
EntriesCount = selectedCount;
if (EntriesCount == 0) {
@@ -416,76 +439,81 @@ selection_done:
}
State = 1;
UpdateProgress = 0;
for (;;) {
if (StartUpdate != 0) {
if (UpdateProgress < UpdateHeader0.wadCount) {
BS2Report("Progress : %d\n", UpdateProgress);
if (Flags1[UpdateProgress] == 1) {
BS2Report("Import : %s\n", UPDATE_DISC_ENTRIES[UpdateProgress].path);
State = 2;
CurrentEntry = &UPDATE_DISC_ENTRIES[UpdateProgress];
if (UPDATE_DISC_ENTRIES[UpdateProgress].type == 0) {
UpdateProgress++;
continue;
}
if (UPDATE_DISC_ENTRIES[UpdateProgress].type == 1) {
BS2Report("BS2WADImportDVD : ");
index = UpdateProgress;
if (strcmp(getSuffix(UPDATE_DISC_ENTRIES[index].path), "wad") == 0) {
rc = WADImportDVDForBS(UPDATE_DISC_ENTRIES[index].path, (void*)BS2_UPDATE_ADDRESS, 0x80000);
{
BS2UpdateEntry *discEntries = UPDATE_DISC_ENTRIES;
for (;;) {
if (StartUpdate != 0) {
if (UpdateProgress < UpdateHeader0.wadCount) {
BS2Report("Progress : %d\n", UpdateProgress);
if (Flags1[UpdateProgress] == 1) {
BS2Report("Import : %s\n", discEntries[UpdateProgress].path);
State = 2;
CurrentEntry = &discEntries[UpdateProgress];
if (discEntries[UpdateProgress].type == 0) {
UpdateProgress++;
continue;
}
if (discEntries[UpdateProgress].type == 1) {
BS2Report("BS2WADImportDVD : ");
index = UpdateProgress;
if (strcmp(getSuffix(discEntries[index].path), "wad") == 0) {
importResult = WADImportDVDForBS(discEntries[index].path, (void*)BS2_UPDATE_ADDRESS, 0x80000);
} else {
importResult = 0;
}
rc = importResult;
BS2Report("rc = %d\n", rc);
if (rc != 0) {
NANDLoggingAddMessageAsync(NULL, "BS2 error. [%d] titleID: 0x%016llx %s line: %d",
rc, discEntries[UpdateProgress].titleId, "BS2Update.c", 0x3F5);
State = 5;
UpdateProgress = UpdateHeader0.wadCount + 1;
break;
}
if ((discEntries[UpdateProgress].attr & 2) != 0) {
RebootRequired = 1;
}
UpdateProgress++;
} else {
rc = 0;
BS2Report("BS2WADImportDVDEx : ");
index = UpdateProgress;
if (strcmp(getSuffix(discEntries[index].path), "wad") == 0) {
importResult = WADImportDVDExForBS(discEntries[index].path, (void*)BS2_UPDATE_ADDRESS, 0x80000);
} else {
importResult = 0;
}
rc = importResult;
BS2Report("rc = %d\n", rc);
if (rc != 0) {
NANDLoggingAddMessageAsync(NULL, "BS2 error. [%d] titleID: 0x%016llx %s line: %d",
rc, discEntries[UpdateProgress].titleId, "BS2Update.c", 0x40F);
State = 5;
UpdateProgress = UpdateHeader0.wadCount + 1;
break;
}
if ((discEntries[UpdateProgress].attr & 2) != 0) {
RebootRequired = 1;
}
UpdateProgress++;
}
BS2Report("rc = %d\n", rc);
if (rc != 0) {
NANDLoggingAddMessageAsync(NULL, "BS2 error. [%d] titleID: 0x%016llx %s line: %d",
rc, UPDATE_DISC_ENTRIES[UpdateProgress].titleId, "BS2Update.c", 0x3F5);
State = 5;
UpdateProgress = UpdateHeader0.wadCount + 1;
break;
}
if ((UPDATE_DISC_ENTRIES[UpdateProgress].attr & 2) != 0) {
RebootRequired = 1;
}
UpdateProgress++;
} else {
BS2Report("BS2WADImportDVDEx : ");
index = UpdateProgress;
if (strcmp(getSuffix(UPDATE_DISC_ENTRIES[index].path), "wad") == 0) {
rc = WADImportDVDExForBS(UPDATE_DISC_ENTRIES[index].path, (void*)BS2_UPDATE_ADDRESS, 0x80000);
} else {
rc = 0;
}
BS2Report("rc = %d\n", rc);
if (rc != 0) {
NANDLoggingAddMessageAsync(NULL, "BS2 error. [%d] titleID: 0x%016llx %s line: %d",
rc, UPDATE_DISC_ENTRIES[UpdateProgress].titleId, "BS2Update.c", 0x40F);
State = 5;
UpdateProgress = UpdateHeader0.wadCount + 1;
break;
}
if ((UPDATE_DISC_ENTRIES[UpdateProgress].attr & 2) != 0) {
RebootRequired = 1;
}
BS2Report("Not import : %s\n", discEntries[UpdateProgress].path);
UpdateProgress++;
}
} else {
BS2Report("Not import : %s\n", UPDATE_DISC_ENTRIES[UpdateProgress].path);
} else if (UpdateProgress == UpdateHeader0.wadCount) {
if (RebootRequired != 0) {
State = 4;
} else {
State = 3;
}
UpdateProgress++;
CurrentEntry = NULL;
break;
}
} else if (UpdateProgress == UpdateHeader0.wadCount) {
if (RebootRequired != 0) {
State = 4;
} else {
State = 3;
}
UpdateProgress++;
CurrentEntry = NULL;
} else if (CancelUpdate != 0) {
State = 6;
break;
}
} else if (CancelUpdate != 0) {
State = 6;
break;
}
}
StartUpdate = 0;

View File

@@ -709,8 +709,8 @@ CHANSVmObjHdr* CHANSVm_8144B4D4(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr*
charCount = stringLength / 2;
if (CHANSVmStrCpyToU8FromU16(buf, (u8*)object->value.wstring_v->spData, charCount) != vmNull) {
p = buf + charCount;
*p = 0;
buf[charCount] = 0;
p = &buf[charCount];
charCount = 0;
while (charCount < 4) {
@@ -3076,9 +3076,9 @@ VmMethodDefine(String, Replace) {
parentLen = VmParentObj->value.string_v->len;
searchLen = arg0->value.string_v->len;
parentStr = VmParentObj->value.string_v->spData;
replaceLen = arg1->value.string_v->len;
searchStr = arg0->value.string_v->spData;
replaceStr = arg1->value.string_v->spData;
replaceLen = arg1->value.string_v->len;
if (parentLen < searchLen) {
goto return_input;
@@ -3088,8 +3088,8 @@ VmMethodDefine(String, Replace) {
dstBufLen = 0;
while (vmTrue) {
srcOffs = 0;
dstOffs = 0;
srcOffs = 0;
while (srcOffs + searchLen <= parentLen) {
if (searchLen == 0 || memcmp(parentStr + srcOffs, searchStr, searchLen) == 0) {
@@ -5479,9 +5479,12 @@ VmMethodDefine(Blob, Unpack) {
u32 outType;
u32 outVal;
u32 iterIdx;
u32 buf_area[2];
union {
u64 value;
u32 words[2];
} unpackValue;
srcBlob = (BlobHeader*)VmGetStrFromObjHdr(VmParentObj);
bufAreaBase = buf_area;
bufAreaBase = unpackValue.words;
argStr = CHANSVmConvertObjectType(VmInst, CHANS_VM_OBJ_TYPE_STRING, CHANSVmGetArg(VmInst, 0));
fmtStr = (wchar_t*)VmGetStrFromObjHdr(argStr);
fmtLen = (u32)VmGetIntFromObjHdr(argStr) >> 1;
@@ -5675,9 +5678,9 @@ VmMethodDefine(Blob, Unpack) {
}
for (iterIdx = 0; iterIdx < count; iterIdx++) {
buf_area[0] = c0;
buf_area[1] = c0;
memcpy(buf_area, srcBlob->pData + srcBlob->offset, outSize);
unpackValue.words[0] = c0;
unpackValue.words[1] = c0;
memcpy(unpackValue.words, srcBlob->pData + srcBlob->offset, outSize);
if ((s32)outType >= 8 && (s32)outType < 10) {
switch (outSize) {
@@ -5720,8 +5723,8 @@ VmMethodDefine(Blob, Unpack) {
goto merge_point;
}
case 8: {
valHigh = bufAreaBase[0];
setVal = bufAreaBase[1];
valHigh = (s32)(unpackValue.value >> 32);
setVal = (u32)unpackValue.value;
goto merge_point;
}
default: {
@@ -5808,6 +5811,7 @@ VmMethodDefine(Blob, Unpack) {
strLen = (u32)VmGetIntFromObjHdr(arrElem);
if (strData != vmNull && strLen != 0 && arrElem->type == CHANS_VM_OBJ_TYPE_STRING) {
u32 remaining = strLen / 2;
i = 0;
while (vmTrue) {
if (remaining == 0) {
break;
@@ -6374,8 +6378,9 @@ CHANSVmErr CHANSVmAddExe(CHANSVm* vm, vmS32 unk0, CHANSVm* execCtx) {
u32 i;
u32 tblOffs;
for (i = 0, tblOffs = 0; i < header->moduleCount; i++) {
for (i = 0, tblOffs = 0; i < header->moduleCount;) {
memset((u8*)header->pModuleTbl + tblOffs, 0, sizeof(ModuleEntry));
i++;
tblOffs += sizeof(ModuleEntry);
}
}
@@ -7204,20 +7209,19 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
s32 cmpHigh;
u32 cmpLow;
CHANSVmObjHdr tmpObj;
CHANSVmObjHdr tmpCopyObj;
u32 etypes[8];
CHANSVmObjHdr tmpCopyObj[2];
CHANSVmObjType etypes[2];
const VmResultTypeData* resultTypes = &VmResultTypeTbl;
pVm = (CHANSVmPrivate*)vm;
if (stepCount == 0) {
stepCount = 1;
}
stepCount += (stepCount == 0);
memset(&tmpObj, 0, sizeof(tmpObj));
stackPtr = &tmpCopyObj;
stackPtr = tmpCopyObj;
cmpHigh = 0;
cmpLow = -2;
while (stepCount-- != 0) {
do {
s32 opSize;
u32 opcodeVal;
u8* operandBuf;
@@ -7259,7 +7263,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
u32 leftTypeByte;
u32 rightTypeByte;
u32 typeIdx;
u32 typeOffset;
CHANSVmObjType* enumedType;
opSize = 1;
switch (opcodeVal) {
case CHANS_VM_OP_LOAD_IMM_1: {
@@ -7376,9 +7380,9 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
rightTypeByte = rightOp->type;
typeIdx = 0;
leftTypeByte = leftOp->type;
typeOffset = 0;
for (; typeIdx < 2; typeIdx++, typeOffset += 4) {
if (CHANSVmGetEnumedType((CHANSVmObjType*)((u8*)etypes + typeOffset), (s32)(typeIdx == 0 ? leftTypeByte : rightTypeByte)) ==
enumedType = etypes;
for (; typeIdx < 2; typeIdx++, enumedType++) {
if (CHANSVmGetEnumedType(enumedType, (s32)(typeIdx == 0 ? leftTypeByte : rightTypeByte)) ==
0) {
goto error_setter;
}
@@ -7388,27 +7392,27 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
const u8* convTbl;
switch (opKind) {
case VM_OPKIND_ADD: {
convTbl = (u8*)VmResultTypeTbl.add;
convTbl = (const u8*)resultTypes->add;
break;
}
case VM_OPKIND_MOD:
case VM_OPKIND_MUL:
case VM_OPKIND_SUB:
case VM_OPKIND_DIV: {
convTbl = (u8*)VmResultTypeTbl.arith;
convTbl = (const u8*)resultTypes->arith;
break;
}
case VM_OPKIND_CMP: {
convTbl = (u8*)VmResultTypeTbl.cmp;
convTbl = (const u8*)resultTypes->cmp;
break;
}
case VM_OPKIND_EQ: {
convTbl = (u8*)VmResultTypeTbl.eq;
convTbl = (const u8*)resultTypes->eq;
break;
}
case VM_OPKIND_BIT:
case VM_OPKIND_SHIFT: {
convTbl = (u8*)VmResultTypeTbl.bitShift;
convTbl = (const u8*)resultTypes->bitShift;
break;
}
default: {
@@ -7621,12 +7625,12 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
case CHANS_VM_OP_LOG_NOT: {
CHANSVmObjHdr* pAcc = &pVm->accumulator;
u32 bResult;
if (CHANSVmGetBoolean((CHANSVmObjHdr*)&bResult, pAcc) == CHANS_VM_OK) {
CHANSVmErr booleanResult = CHANSVmGetBoolean((CHANSVmObjHdr*)&bResult, pAcc);
if (booleanResult == CHANS_VM_OK) {
s32 boolVal = bResult ? 0 : 1;
result = CHANSVmSetInteger(vm, pAcc, boolVal);
} else {
// result unset in this code path?
booleanResult = CHANSVmSetInteger(vm, pAcc, boolVal);
}
result = booleanResult;
break;
}
@@ -7637,7 +7641,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
if (pAcc->type == CHANS_VM_TYPE_INDEX_REF) {
copyResult = CHANSVmCopyObject(vm, &loadTmp, pAcc);
if (copyResult != vmNull) {
foundObj = VmGetArrayElement(vm, &loadTmp, arrayIdx, vmFalse);
foundObj = VmGetArrayElement(vm, &loadTmp, loadTmp.value.data.len, vmFalse);
result = VmStore(vm, pAcc, foundObj);
if (result == CHANS_VM_OK) {
result = CHANSVmDeleteObject(vm, &loadTmp);
@@ -7741,20 +7745,21 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
}
case CHANS_VM_OP_SET_INDEX: {
CHANSVmObjHdr* accumulator = &pVm->accumulator;
u64 cmpVal;
s64 fullVal;
u64 tmp64;
result = CHANS_VM_ERR_SET_INDEX;
copyResult = CHANSVmCopyObject(vm, stackPtr, &pVm->accumulator);
copyResult = CHANSVmCopyObject(vm, stackPtr, accumulator);
if (copyResult == 0) {
break;
goto set_index_ok;
}
result = CHANSVmPopObject(vm, &pVm->accumulator);
result = CHANSVmPopObject(vm, accumulator);
if (result != CHANS_VM_OK) {
break;
goto set_index_ok;
}
if (pVm->accumulator.type == CHANS_VM_TYPE_ARRAY) {
if (accumulator->type == CHANS_VM_TYPE_ARRAY) {
int typeByte = stackPtr->type;
switch (typeByte) {
case CHANS_VM_OBJ_TYPE_INTEGER:
@@ -7791,17 +7796,20 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
}
set_index_error:
result = CHANS_VM_ERR_SET_INDEX;
break;
set_index_ok:
pVm->accumulator.value.data.len = arrayIdx;
pVm->accumulator.type = CHANS_VM_TYPE_INDEX_REF;
if (result != CHANS_VM_OK) {
break;
}
accumulator->value.data.len = arrayIdx;
accumulator->type = CHANS_VM_TYPE_INDEX_REF;
result = CHANSVmDeleteObject(vm, stackPtr);
break;
}
case CHANS_VM_OP_GET_PROPERTY_NAME: {
u32 foundEntry;
CHANSVmObjHdr* accumulator;
opSize = 5;
operandBuf = VmGetOperand(vm, 1, 5);
if (operandBuf == vmNull) {
@@ -7811,14 +7819,16 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
arrayIdx = 0;
imm16Val = VM_READ_BE_U16(operandBuf, 0);
foundObj = CHANSVm_81455654(vm, imm16Val);
if (foundObj != vmNull && pVm->accumulator.type == CHANS_VM_OBJ_TYPE_INTEGER &&
// TODO: these raw pointer casts with the accumulator are a recurring thing. get rid of raw ptr access
(computedAddr = *((u32*)&pVm->accumulator.value + 1), (u64)pVm->accumulator.value.int_v <= ~1U)) {
if (foundObj->type != CHANS_VM_TYPE_ARRAY) {
accumulator = &pVm->accumulator;
if (foundObj != vmNull && accumulator->type == CHANS_VM_OBJ_TYPE_INTEGER &&
(computedAddr = accumulator->value.data.len, (u64)accumulator->value.int_v <= ~1U)) {
if ((s32)foundObj->type != CHANS_VM_TYPE_ARRAY) {
foundEntry = 0;
} else {
u32 idx;
u32 remaining;
u32 len = VmArrayGetLengthInternal(foundObj);
remaining = computedAddr;
idx = 0;
while (idx < len) {
copyResult = CHANSVmGetArrayElement(vm, foundObj, idx);
@@ -7826,11 +7836,11 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
break;
}
if (copyResult->type != CHANS_VM_OBJ_TYPE_BLANK) {
if (computedAddr == 0) {
arrayIdx = idx;
if (remaining == 0) {
computedAddr = idx;
goto found_entry;
} else {
computedAddr--;
remaining--;
}
}
idx++;
@@ -7839,21 +7849,21 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
found_entry:
if (copyResult != vmNull) {
foundEntry = 1;
result = CHANSVmDeleteObject(vm, &pVm->accumulator);
if (result == CHANS_VM_OK) {
CHANSVmObjHdr* hdr = CHANSVmNewObject(vm, vmFalse, &pVm->accumulator, CHANS_VM_OBJ_TYPE_STRING, VM_STRING_SIZE);
if (CHANSVmDeleteObject(vm, accumulator) == CHANS_VM_OK) {
CHANSVmObjHdr* hdr = CHANSVmNewObject(vm, vmFalse, accumulator, CHANS_VM_OBJ_TYPE_STRING, VM_STRING_SIZE);
if (hdr != vmNull) {
char* s = pVm->accumulator.value.string_v->spData;
s32 snpLen = snprintf(s, 0x40, VmIntegerFormat, (u64)arrayIdx);
char* s = accumulator->value.string_v->spData;
s32 snpLen = snprintf(s, 0x40, VmIntegerFormat, (u64)computedAddr);
CHANSVmStrCpyToU16FromU8((wchar_t*)s, s, snpLen);
pVm->accumulator.value.string_v->len = VM_STR_LENGTH(snpLen);
accumulator->value.string_v->len = VM_STR_LENGTH(snpLen);
if (accumulator->value.string_v->len == 0) {
goto property_error;
}
} else {
result = CHANS_VM_ERR_GET_PROPERTY_NAME;
goto property_error;
}
}
if (result != CHANS_VM_OK) {
result = CHANS_VM_ERR_GET_PROPERTY_NAME;
break;
} else {
goto property_error;
}
} else {
foundEntry = 0;
@@ -7862,6 +7872,10 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
result = CHANS_VM_OK;
arrayIdx = 0;
}
goto property_done;
property_error:
result = CHANS_VM_ERR_GET_PROPERTY_NAME;
property_done:
if (result == CHANS_VM_OK && foundEntry == 0) {
u8* pOpData = operandBuf;
computedAddr = (VM_READ_BE_U16(pOpData, 2)) & CHANS_VM_OP_BRANCH_OFFSET_BIAS;
@@ -8107,7 +8121,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
return CHANS_VM_ERR_CODE_RANGE;
}
pVm->pActiveCtx->pc = newPos;
}
} while (stepCount-- != 1);
return CHANS_VM_OK;
}

View File

@@ -713,6 +713,9 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
tistring::Decolated* current = getCurrentString(false);
tistring::Decolated* fixed = mpString;
bool currentIsFixed = current == fixed;
wchar_t atokPrediction[64];
wchar_t ziPrediction[64];
wchar_t ziInput[64];
switch (command) {
case 40:
if (current == mpUnfixString) {
@@ -738,30 +741,35 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
CharacterInput* input = static_cast<CharacterInput*>(data);
wchar_t character = input->character;
u32 modifiers = input->modifiers;
tistring::Decolated::TranslateMode savedMode = current->getTranslateMode();
bool savedFix = false;
bool savedKana = false;
struct InputModeState {
tistring::Decolated::TranslateMode mode;
bool kana;
bool direct;
};
InputModeState savedState;
InputModeState keyboardState;
if (input->keyboardMode) {
tistring::Decolated::TranslateMode keyboardMode = static_cast<tistring::Decolated::TranslateMode>(mpManager->getPCKeyboard()->getTranslateMode());
bool direct = mpManager->getPCKeyboard()->getTranslateMode() == keyboard::pctype::Base::TM_00;
bool kana = mpManager->getPCKeyboard()->getTranslateMode() == keyboard::pctype::Base::TM_Kana;
keyboardState.mode = static_cast<tistring::Decolated::TranslateMode>(mpManager->getPCKeyboard()->getTranslateMode());
keyboardState.direct = mpManager->getPCKeyboard()->getTranslateMode() == keyboard::pctype::Base::TM_00;
keyboardState.kana = mpManager->getPCKeyboard()->getTranslateMode() == keyboard::pctype::Base::TM_Kana;
tistring::Decolated* active = getCurrentString(false);
savedMode = active->getTranslateMode();
savedState.mode = active->getTranslateMode();
if (active == mpString) {
tistring::Decolated::TranslateMode mode = keyboardMode;
tistring::Decolated::TranslateMode mode = keyboardState.mode;
if (meLanguage == KR) {
if (mode != tistring::Decolated::TM_Direct) mode = tistring::Decolated::TM_Hangul;
} else if (meLanguage == CN) mode = tistring::Decolated::TM_Direct;
mpString->getCursorPos();
mpString->setTranslateMode(mode);
mpString->getCursorPos();
} else active->setTranslateMode(keyboardMode);
bool useAtok;
if (!mbPredictOn) useAtok = false;
else useAtok = mePredictMode == PM_Atok;
} else active->setTranslateMode(keyboardState.mode);
bool useAtok = isAtokActive();
if (useAtok) {
mpUnfixString->setFixMode(direct);
mpUnfixString->changeKanaMode(kana);
savedState.direct = false;
savedState.kana = false;
mpUnfixString->setFixMode(keyboardState.direct);
mpUnfixString->changeKanaMode(keyboardState.kana);
}
}
if (input->deadKey) character = DeadKeyStream::ToCombineClass(meLanguage, character);
@@ -782,28 +790,26 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
if (input->keyboardMode) {
tistring::Decolated* active = getCurrentString(false);
if (active == mpString) {
tistring::Decolated::TranslateMode mode = savedMode;
tistring::Decolated::TranslateMode mode = savedState.mode;
if (meLanguage == KR) {
if (mode != tistring::Decolated::TM_Direct) mode = tistring::Decolated::TM_Hangul;
} else if (meLanguage == CN) mode = tistring::Decolated::TM_Direct;
mpString->getCursorPos();
mpString->setTranslateMode(mode);
mpString->getCursorPos();
} else active->setTranslateMode(savedMode);
bool useAtok;
if (!mbPredictOn) useAtok = false;
else useAtok = mePredictMode == PM_Atok;
} else active->setTranslateMode(savedState.mode);
bool useAtok = isAtokActive();
if (useAtok) {
mpUnfixString->setFixMode(savedFix);
mpUnfixString->changeKanaMode(savedKana);
mpUnfixString->setFixMode(savedState.direct);
mpUnfixString->changeKanaMode(savedState.kana);
}
}
if (checkHeadOfSentence(true)) onCommand(static_cast<INPUT_COMMAND>(33), NULL);
break;
}
case 1:
if (!current->canBackSpace()) onSE(static_cast<sound::SE>(8));
else onSE(static_cast<sound::SE>(7));
if (current->canBackSpace()) onSE(static_cast<sound::SE>(7));
else onSE(static_cast<sound::SE>(8));
if (current == mpString) {
resetInputRelation();
mpString->getCursorPos();
@@ -827,7 +833,7 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
if (checkHeadOfSentence(true)) onCommand(static_cast<INPUT_COMMAND>(33), NULL);
break;
case 2:
if (!currentIsFixed) {
if (current != fixed) {
onSE(static_cast<sound::SE>(8));
return;
}
@@ -835,7 +841,7 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
else onSE(static_cast<sound::SE>(7));
break;
case 7:
if (currentIsFixed) {
if (current == fixed) {
if (meLanguage == KR) {
tistring::Decolated* active = getCurrentString(false);
if (!active->isKanaFix()) {
@@ -850,37 +856,39 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
}
resetInputRelation();
bool lineFeed;
if (!mpManager->getToolBar()->isQwerty()) lineFeed = mpManager->getCellPhoneKeyboard()->hasLineFeedButton();
else lineFeed = mpManager->getPCKeyboard()->hasLineFeedButton();
if (mpManager->getToolBar()->isQwerty()) lineFeed = mpManager->getPCKeyboard()->hasLineFeedButton();
else lineFeed = mpManager->getCellPhoneKeyboard()->hasLineFeedButton();
bool allowed = true;
if (mpString->isKanaFix()) {
bool withinLimit = false;
if (lineFeed && static_cast<u32>(getLine() + 1) <= muLimitRowNum) withinLimit = true;
if (lineFeed && muLimitRowNum >= static_cast<u32>(getLine() + 1)) withinLimit = true;
if (!withinLimit) allowed = false;
}
bool atLimit = true;
if (static_cast<u32>(getLine() + 1) <= muLimitRowNum && !mpManager->getCandidateBox()->isActive()) atLimit = false;
if (!allowed) {
if (atLimit) onSE(static_cast<sound::SE>(8));
return;
}
onSE(static_cast<sound::SE>(9));
mpString->getCursorPos();
mpString->inputChar(L'\n');
mpString->getCursorPos();
if (meLanguage == CN && hasZiPredictions()) {
mpZiString->setCurrentWord(NULL);
mpZiString->update();
if (muLimitRowNum >= static_cast<u32>(getLine() + 1) && !mpManager->getCandidateBox()->isActive()) atLimit = false;
if (allowed) {
onSE(static_cast<sound::SE>(9));
mpString->getCursorPos();
mpString->inputChar(L'\n');
mpString->getCursorPos();
if (meLanguage == CN && hasZiPredictions()) {
mpZiString->setCurrentWord(NULL);
mpZiString->update();
}
} else {
if (atLimit) {
onSE(static_cast<sound::SE>(8));
return;
} else return;
}
} else if (current == mpZiString) {
onSE(static_cast<sound::SE>(9));
if (getPredictMode() == PM_11 || getPredictMode() == PM_12) confirmInput_();
else if (!(mbCursorSelected | mbZuSelected) && mpManager->getToolBar()->isQwerty()) {
if (mbPredictOn && mePredictMode != PM_Atok) {
wchar_t input[64];
mpZiString->getCurrentInput(input, 64);
mpZiString->getCurrentInput(ziInput, 64);
mpString->getCursorPos();
mpString->inputString(input);
mpString->inputString(ziInput);
mpString->getCursorPos();
mpZiString->clearCandidates();
mbZuSelected = false;
@@ -890,11 +898,10 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
} else confirmInput_();
} else {
onSE(static_cast<sound::SE>(9));
if (!mpUnfixString->isConverting()) confirmInput_();
else {
if (mpUnfixString->isConverting()) {
mpUnfixString->commitPredicted(mpUnfixString->getSelectedConverting());
updateCandidateState_();
}
} else confirmInput_();
}
meScrollFlag = SF_ScrollOn;
if (checkHeadOfSentence(true)) onCommand(static_cast<INPUT_COMMAND>(33), NULL);
@@ -912,23 +919,24 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
if (!input->character) return;
confirmInputting_(input->character, input->direct, input->letterMode, input->confirmOnly, input->holdingKey);
if (!input->silent) {
if (!input->confirmOnly) onSE(static_cast<sound::SE>(10));
else onSE(static_cast<sound::SE>(9));
if (input->confirmOnly) onSE(static_cast<sound::SE>(9));
else onSE(static_cast<sound::SE>(10));
}
meScrollFlag = SF_ScrollOn;
if (checkHeadOfSentence(true)) onCommand(static_cast<INPUT_COMMAND>(33), NULL);
break;
}
case 8:
if (currentIsFixed) onPressLeft();
if (current == fixed) onPressLeft();
else onHKBCtrlCode(static_cast<HVKCode>(31), 0);
return;
case 9:
if (currentIsFixed) onPressRight();
if (current == fixed) onPressRight();
else onHKBCtrlCode(static_cast<HVKCode>(32), 0);
return;
case 10: onPressUp(); return;
case 11: onPressDown(); return;
case 24: doScroll(static_cast<Scroll*>(data)); return;
case 14:
if (currentIsFixed && current->isKanaFix()) {
nw4r::math::VEC2 origin = getGlobalLeftTopPos();
@@ -966,14 +974,42 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
if (data && *static_cast<bool*>(data)) {
mpUnfixString->confirm(NULL);
onCommand(static_cast<INPUT_COMMAND>(6), NULL);
resetCandidate();
updateCandidate();
candidatebox::CandidateBoxCaller::resetCandidate();
candidatebox::CandidateBoxCaller::updateCandidate();
}
break;
case 21: {
if (mbPredictOn) {
if (mePredictMode == PM_Atok) {
if (mpUnfixString->isConverting()) mpUnfixString->commitPredicted(*static_cast<s32*>(data));
else {
mpUnfixString->getPredicted(*static_cast<s32*>(data), atokPrediction);
mpString->getCursorPos();
mpString->inputString(atokPrediction, tistring::Decolated::TM_Direct);
mpString->getCursorPos();
mpUnfixString->commitPredicted(*static_cast<s32*>(data));
}
} else {
mpZiString->getPredicted(*static_cast<s32*>(data), ziPrediction);
mpString->getCursorPos();
mpString->inputString(ziPrediction);
mpString->getCursorPos();
mpZiString->clearCandidates();
mbZuSelected = false;
if (meLanguage == CN) {
mpZiString->setCurrentWord(ziPrediction);
mpZiString->update();
}
}
}
meScrollFlag = SF_ScrollOn;
break;
}
case 18: {
tistring::Decolated::TranslateMode fixedMode;
tistring::Decolated::TranslateMode mode = *static_cast<tistring::Decolated::TranslateMode*>(data);
if (meLanguage != JP && meLanguage != KR) mode = tistring::Decolated::TM_Direct;
tistring::Decolated::TranslateMode fixedMode = mode;
fixedMode = mode;
if (meLanguage == KR) {
if (mode != tistring::Decolated::TM_Direct) fixedMode = tistring::Decolated::TM_Hangul;
} else if (meLanguage == CN) fixedMode = tistring::Decolated::TM_Direct;
@@ -985,35 +1021,6 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
}
case 19: mpUnfixString->changeKanaMode(*static_cast<bool*>(data)); break;
case 20: mpUnfixString->setFixMode(*static_cast<bool*>(data)); break;
case 21: {
s32 index = *static_cast<s32*>(data);
if (mbPredictOn) {
if (mePredictMode == PM_Atok) {
if (!mpUnfixString->isConverting()) {
wchar_t predicted[96];
mpUnfixString->getPredicted(index, predicted);
mpString->getCursorPos();
mpString->inputString(predicted, tistring::Decolated::TM_Direct);
mpString->getCursorPos();
mpUnfixString->commitPredicted(index);
} else mpUnfixString->commitPredicted(index);
} else {
wchar_t predicted[64];
mpZiString->getPredicted(index, predicted);
mpString->getCursorPos();
mpString->inputString(predicted);
mpString->getCursorPos();
mpZiString->clearCandidates();
mbZuSelected = false;
if (meLanguage == CN) {
mpZiString->setCurrentWord(predicted);
mpZiString->update();
}
}
}
meScrollFlag = SF_ScrollOn;
break;
}
case 22:
moveCandidateToIdx(*static_cast<s32*>(data));
meScrollFlag = SF_ScrollOn;
@@ -1027,7 +1034,6 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
}
meScrollFlag = SF_ScrollOn;
return;
case 24: doScroll(static_cast<Scroll*>(data)); return;
case 25: current->converDakuten(); onSE(static_cast<sound::SE>(10)); break;
case 26: current->converHandaku(); onSE(static_cast<sound::SE>(10)); break;
case 27: current->convertAll(); break;
@@ -1040,17 +1046,17 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
mbPredictOn = enabled;
if (meLanguage == KR) mpManager->getPCKeyboard()->refreshState();
}
tistring::Decolated::TranslateMode fixedMode = mpString->getTranslateMode();
tistring::Decolated::TranslateMode unfixMode = mpUnfixString->getTranslateMode();
tistring::Decolated::TranslateMode predictionFixedMode = mpString->getTranslateMode();
const tistring::Decolated::TranslateMode predictionUnfixMode = mpUnfixString->getTranslateMode();
mpString->initKanaConverter();
mpUnfixString->initKanaConverter();
if (meLanguage == KR) {
if (fixedMode != tistring::Decolated::TM_Direct) fixedMode = tistring::Decolated::TM_Hangul;
} else if (meLanguage == CN) fixedMode = tistring::Decolated::TM_Direct;
if (predictionFixedMode != tistring::Decolated::TM_Direct) predictionFixedMode = tistring::Decolated::TM_Hangul;
} else if (meLanguage == CN) predictionFixedMode = tistring::Decolated::TM_Direct;
mpString->getCursorPos();
mpString->setTranslateMode(fixedMode);
mpString->setTranslateMode(predictionFixedMode);
mpString->getCursorPos();
mpUnfixString->setTranslateMode(unfixMode);
mpUnfixString->setTranslateMode(predictionUnfixMode);
switch (mePredictMode) {
case PM_Atok:
if (!mbPredictOn) {
@@ -1074,10 +1080,14 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
case PM_It: mpZiString->setPredictLaunguage(static_cast<tistring::WithZi::PredictLanguage>(7)); break;
case PM_Nl: mpZiString->setPredictLaunguage(static_cast<tistring::WithZi::PredictLanguage>(8)); break;
case PM_11: mpZiString->setPredictLaunguage(static_cast<tistring::WithZi::PredictLanguage>(9)); break;
case PM_12:
mpZiString->setPredictLaunguage(static_cast<tistring::WithZi::PredictLanguage>(mpManager->getToolBar()->isQwerty() ? 10 : 11));
case PM_12: {
bool qwerty = mpManager->getToolBar()->isQwerty();
tistring::WithZi::PredictLanguage language = static_cast<tistring::WithZi::PredictLanguage>(11);
if (qwerty) language = static_cast<tistring::WithZi::PredictLanguage>(10);
mpZiString->setPredictLaunguage(language);
break;
}
}
onCommand(static_cast<INPUT_COMMAND>(30), NULL);
return;
}
@@ -1092,7 +1102,7 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
mbZuSelected = false;
getCurrentString(false);
resetPredictionContext();
resetCandidate();
candidatebox::CandidateBoxCaller::resetCandidate();
return;
}
case 31: {
@@ -1102,30 +1112,30 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
return;
}
case 32: *static_cast<bool*>(data) = hasZiPredictions(); return;
case 36: {
u32 length = *static_cast<u32*>(data);
if (length < fixed->getLength()) mpString->getLength();
mpString->setLength(static_cast<u16>(length));
return;
}
case 38: {
ControlInput* input = static_cast<ControlInput*>(data);
onHKBCtrlCode(input->code, input->modifiers);
return;
}
case 39: mDKStream.clear(); return;
case 41: notifyChangeMode(); return;
case 42: onPressLeftHWKB(); return;
case 43: onPressRightHWKB(); return;
case 44: onPressUp(); return;
case 45: onPressDownHWKB(); return;
case 39: mDKStream.clear(); return;
case 47: return;
case 36: {
u32 length = *static_cast<u32*>(data);
if (fixed->getLength() > length) mpString->getLength();
mpString->setLength(static_cast<u16>(length));
return;
}
case 46:
if (meLanguage == CN && !mpManager->getPCKeyboard()->isQwertyOnly() && mpManager->getPCKeyboard()->isLanguageKeyActive()) {
if (mpManager->getPCKeyboard()->getTranslateMode() == keyboard::pctype::Base::TM_00) mpManager->getPCKeyboard()->setTranslateMode(keyboard::pctype::Base::TM_Kana);
else mpManager->getPCKeyboard()->setTranslateMode(keyboard::pctype::Base::TM_00);
}
break;
case 47: return;
default: break;
}
updateCandidateState_();
@@ -1233,17 +1243,20 @@ void LayoutByNW4R::create(MEMAllocator* allocator, EditBuffer* editBuffer) {
rows[previous].Next = next;
selected->Back = selectedIndex;
selected->Next = selectedIndex;
Info_* listEnd = &rows[rows[static_cast<u16>(mriManager.mMaxLength + 1)].Back];
next = listEnd->Next;
selected->Back = rows[next].Back;
selected->Next = next;
listEnd->Next = selectedIndex;
rows[next].Back = selectedIndex;
Info_* listEnd = &mriManager.mpInfo[mriManager.mpInfo[static_cast<u16>(mriManager.mMaxLength + 1)].Back];
rows = mriManager.mpInfo;
if (selected->Back == selected->Next) {
next = listEnd->Next;
selected->Back = rows[next].Back;
selected->Next = next;
listEnd->Next = selectedIndex;
rows[next].Back = selectedIndex;
}
selected->StrCount = 0;
selected->DispRowCount = 1;
mpCursorLine = selected;
void* handlerMemory = MEMAllocFromAllocator(allocator, sizeof(EventHandler));
mpInputEventHandler = handlerMemory ? new (handlerMemory) EventHandler(this) : NULL;
mpInputEventHandler = new (handlerMemory) EventHandler(this);
nw4rmanager::Layout::createWithEventHandler(allocator, mpInputEventHandler);
if (!mpFontName) {
mpFontName = "RevoIpl_RodinNTLGProM_32_I4.brfnt";
@@ -1266,20 +1279,25 @@ void LayoutByNW4R::create(MEMAllocator* allocator, EditBuffer* editBuffer) {
setVisible("N_2line", true);
mpPaneManager->setAllComponentTriggerTarget(false);
mpPaneManager->setAllBoundingBoxComponentTriggerTarget(true);
nw4r::lyt::Pane* pane = mpLayout->GetRootPane()->FindPaneByName(static_cast<const LanguagePaneData*>(mpLanguageData)->textBox, true);
nw4r::lyt::Pane* pane = getPane(static_cast<const LanguagePaneData*>(mpLanguageData)->textBox);
if (!pane) pane = mpLayout->GetRootPane()->FindPaneByName(getLanguageTextPane() ? static_cast<const LanguagePaneData*>(mpLanguageData)->textBox : "T_2l_TextBox", true);
mpPaneManager->getPaneComponentByPane(pane)->setTriggerTarget(true);
for (u32 buttonIndex = 0; buttonIndex < 2; ++buttonIndex) {
const ButtonAnimations& button = csButtonAnimations[static_cast<u16>(buttonIndex)];
nw4rmanager::AnmPane* animationPane = NULL;
if (csButtonAnimations[static_cast<u16>(buttonIndex)].type == KT_NormalButton) {
switch (button.type) {
case KT_NormalButton: {
void* memory = MEMAllocFromAllocator(allocator, sizeof(NormalButtonAnmPane));
if (memory) animationPane = new (memory) NormalButtonAnmPane(getPane(csButtonAnimations[static_cast<u16>(buttonIndex)].paneName), NULL);
animationPane = new (memory) NormalButtonAnmPane(getPane(button.paneName), NULL);
break;
}
}
nw4r::ut::List_Append(&mAnmPanes, animationPane);
const char* bindingName = csButtonAnimations[static_cast<u16>(buttonIndex)].bindingName;
u32 count = csButtonAnimations[static_cast<u16>(buttonIndex)].count;
u32 count;
const char* bindingName = button.bindingName;
count = button.count;
for (u16 animationIndex = 0; animationIndex < count; ++animationIndex) {
const InputFormAnimationFile* file = csButtonAnimations[static_cast<u16>(buttonIndex)].files[animationIndex];
const InputFormAnimationFile* file = button.files[animationIndex];
void* resource = mpMultiArcResourceAccessor->GetResource(0, file->fileName, NULL);
AnimTransformPane* transform = static_cast<AnimTransformPane*>(getLayout()->CreateAnimTransform(resource, mpMultiArcResourceAccessor));
if (!bindingName) animationPane->addAnimation(allocator, file->id, transform, false, true);
@@ -1532,296 +1550,101 @@ void Base::setDestination(Destination destination) {
meDestination = destination;
}
extern "C" asm bool findURL__Q39textinput9inputform4BaseFPUlPUlPCwUlUl() {
nofralloc
stwu r1, -0x40(r1)
mflr r0
stw r0, 0x44(r1)
addi r11, r1, 0x40
bl _savegpr_20
lis r27, pppURLCheck@ha
mr r20, r4
mr r21, r5
mr r22, r6
mr r26, r7
mr r23, r8
addi r27, r27, pppURLCheck@l
li r29, 0
li r28, 1
b findURL_L8
findURL_L1:
slwi r3, r26, 1
lhzx r0, r22, r3
cmpwi r0, 0x41
bge findURL_L2
cmpwi r0, 0xd
beq findURL_L4
bge findURL_L3
cmpwi r0, 0xa
beq findURL_L4
bge findURL_L7
cmpwi r0, 0
beq findURL_L5
b findURL_L7
findURL_L3:
cmpwi r0, 0x30
bge findURL_L6
cmpwi r0, 0x20
beq findURL_L4
b findURL_L7
findURL_L6:
cmpwi r0, 0x3a
bge findURL_L7
b findURL_L10
findURL_L2:
cmpwi r0, 0x68
beq findURL_L9
bge findURL_L11
cmpwi r0, 0x5b
bge findURL_L12
cmpwi r0, 0x48
beq findURL_L9
b findURL_L10
findURL_L12:
cmpwi r0, 0x61
bge findURL_L10
b findURL_L7
findURL_L11:
cmpwi r0, 0x3000
beq findURL_L4
bge findURL_L7
cmpwi r0, 0x7b
bge findURL_L7
b findURL_L10
findURL_L5:
cmpwi r29, 0
beq findURL_L13
cmpwi r21, 0
beq findURL_L13
stw r26, 0(r21)
findURL_L13:
mr r3, r29
b findURL_L14
findURL_L4:
cmpwi r29, 0
bne findURL_L15
li r28, 1
b findURL_L16
findURL_L15:
cmpwi r21, 0
beq findURL_L17
stw r26, 0(r21)
findURL_L17:
li r3, 1
b findURL_L14
findURL_L9:
cmpwi r28, 0
beq findURL_L16
cmpwi r29, 0
bne findURL_L16
mr r31, r27
add r30, r22, r3
li r28, 0
li r25, 0
findURL_L18:
mr r3, r31
bl wcslen
mr r24, r3
mr r3, r30
mr r4, r31
mr r5, r24
bl wcsnicmp
cmpwi r3, 0
bne findURL_L19
cmpwi r20, 0
beq findURL_L20
stw r26, 0(r20)
findURL_L20:
add r3, r26, r24
li r29, 1
subi r26, r3, 1
b findURL_L16
findURL_L19:
addi r25, r25, 1
addi r31, r31, 0x14
cmplwi r25, 2
blt findURL_L18
b findURL_L16
findURL_L10:
li r28, 0
b findURL_L16
findURL_L7:
li r28, 1
findURL_L16:
addi r26, r26, 1
findURL_L8:
cmplw r26, r23
blt findURL_L1
mr r3, r29
findURL_L14:
addi r11, r1, 0x40
bl _restgpr_20
lwz r0, 0x44(r1)
mtlr r0
addi r1, r1, 0x40
blr
bool Base::findURL(u32* start, u32* end, const wchar_t* string, u32 from, u32 to) {
const wchar_t* prefix;
const wchar_t* current;
bool found;
bool wordStart;
const wchar_t* prefixes = pppURLCheck[0];
u32 position;
u32 prefixIndex;
u32 length;
found = false;
wordStart = true;
for (position = from; position < to; ++position) {
wchar_t character = string[position];
if (s32(character) < L'A') {
if (s32(character) == L'\r') goto separator;
if (s32(character) < L'\r') {
if (s32(character) == L'\n') goto separator;
if (s32(character) >= L'\n') goto punctuation;
if (!character) goto endString;
goto punctuation;
}
if (s32(character) < L'0') {
if (s32(character) == L' ') goto separator;
goto punctuation;
}
if (s32(character) >= L':') goto punctuation;
goto wordCharacter;
}
if (s32(character) == L'h') goto prefixStart;
if (s32(character) < L'h') {
if (s32(character) < L'[') {
if (s32(character) == L'H') goto prefixStart;
goto wordCharacter;
}
if (s32(character) >= L'a') goto wordCharacter;
goto punctuation;
}
if (s32(character) == 0x3000) goto separator;
if (s32(character) >= 0x3000) goto punctuation;
if (s32(character) >= L'{') goto punctuation;
goto wordCharacter;
endString:
if (found && end) *end = position;
return found;
separator: {
if (!found) wordStart = true;
else {
if (end) *end = position;
return true;
}
goto nextCharacter;
}
prefixStart: {
if (wordStart && !found) {
prefix = prefixes;
current = &string[position];
wordStart = false;
for (prefixIndex = 0; prefixIndex < 2; ++prefixIndex, prefix += 10) {
length = wcslen(prefix);
if (!wcsnicmp(current, prefix, length)) {
if (start) *start = position;
found = true;
position += length - 1;
break;
}
}
}
goto nextCharacter;
}
wordCharacter:
wordStart = false;
goto nextCharacter;
punctuation:
wordStart = true;
nextCharacter:
continue;
}
return found;
}
extern "C" asm void autoScroll__Q39textinput9inputform4BaseFv() {
nofralloc
stwu r1, -0x40(r1)
mflr r0
stw r0, 0x44(r1)
stfd f31, 0x30(r1)
psq_st f31, 0x38(r1), 0, 0
stw r31, 0x2c(r1)
stw r30, 0x28(r1)
mr r30, r3
lwz r12, 0x18c(r3)
lwz r12, 0x14(r12)
mtctr r12
addi r3, r3, 0x18c
bctrl
cmpwi r3, 0
bne autoScroll_Lend
lwz r3, 0x1b0(r30)
subi r0, r3, 1
cmplwi r0, 1
bgt autoScroll_Lend
lwz r12, 0x5c(r30)
addi r3, r30, 0x10
lwz r12, 0x28(r12)
mtctr r12
bctrl
lfs f0, lbl_81694D3C(r0)
lfs f2, 0x180(r30)
fmuls f1, f1, f0
lfs f0, lbl_81694D28(r0)
fadds f31, f2, f1
fcmpo cr0, f31, f0
bge autoScroll_L2
lwz r12, 0x5c(r30)
addi r3, r30, 0x10
lwz r12, 0x28(r12)
mtctr r12
bctrl
fdivs f1, f31, f1
lfs f0, lbl_81694D38(r0)
lwz r12, 0x5c(r30)
addi r3, r30, 0x10
lwz r12, 0x28(r12)
fsubs f0, f1, f0
fctiwz f0, f0
stfd f0, 0x18(r1)
lwz r31, 0x1c(r1)
mtctr r12
bctrl
xoris r3, r31, 0x8000
lis r0, 0x4330
stw r3, 0x24(r1)
addi r3, r30, 0x18c
lwz r12, 0x18c(r30)
li r4, 0
stw r0, 0x20(r1)
li r5, 0
lfd f3, lbl_81694D30(r0)
lfd f2, 0x20(r1)
lfs f0, 0x188(r30)
fsubs f2, f2, f3
lwz r12, 8(r12)
lfs f3, lbl_81694D88(r0)
fmuls f2, f2, f1
fmr f1, f0
fsubs f2, f0, f2
mtctr r12
bctrl
lwz r12, 0(r30)
mr r3, r30
li r4, 0xb
lwz r12, 0x178(r12)
mtctr r12
bctrl
autoScroll_L2:
lwz r12, 0(r30)
mr r3, r30
lwz r12, 0x188(r12)
mtctr r12
bctrl
lfs f1, 0x124(r30)
lfs f0, 0x12c(r30)
stw r4, 0x14(r1)
fsubs f1, f1, f0
lfs f0, 0x14(r1)
stw r3, 0x10(r1)
fmuls f0, f1, f0
fcmpo cr0, f31, f0
cror eq, gt, eq
bne autoScroll_L3
lwz r12, 0(r30)
mr r3, r30
lwz r12, 0x188(r12)
mtctr r12
bctrl
lwz r12, 0x5c(r30)
stw r3, 8(r1)
addi r3, r30, 0x10
lwz r12, 0x28(r12)
stw r4, 0xc(r1)
mtctr r12
bctrl
lfs f2, 0x124(r30)
addi r3, r30, 0x10
lfs f0, 0x12c(r30)
lwz r12, 0x5c(r30)
fsubs f2, f2, f0
lfs f0, 0xc(r1)
lwz r12, 0x28(r12)
fmuls f0, f2, f0
fsubs f0, f31, f0
fdivs f0, f0, f1
fctiwz f0, f0
stfd f0, 0x20(r1)
lwz r4, 0x24(r1)
addi r31, r4, 1
mtctr r12
bctrl
xoris r3, r31, 0x8000
lis r0, 0x4330
stw r3, 0x1c(r1)
addi r3, r30, 0x18c
lwz r12, 0x18c(r30)
li r4, 0
stw r0, 0x18(r1)
li r5, 0
lfd f3, lbl_81694D30(r0)
lfd f2, 0x18(r1)
lfs f0, 0x188(r30)
fsubs f2, f2, f3
lwz r12, 8(r12)
lfs f3, lbl_81694D88(r0)
fmuls f2, f2, f1
fmr f1, f0
fsubs f2, f0, f2
mtctr r12
bctrl
lwz r12, 0(r30)
mr r3, r30
li r4, 0xb
lwz r12, 0x178(r12)
mtctr r12
bctrl
autoScroll_L3:
li r0, 0
stw r0, 0x1b0(r30)
autoScroll_Lend:
psq_l f31, 0x38(r1), 0, 0
lwz r0, 0x44(r1)
lfd f31, 0x30(r1)
lwz r31, 0x2c(r1)
lwz r30, 0x28(r1)
mtlr r0
addi r1, r1, 0x40
blr
void Base::autoScroll() {
if (mScrollAnm.isActive()) return;
if (u32(meScrollFlag - SF_ScrollOn) > 1) return;
f32 cursorY = mfCursorY + getLineHeight() / 2.0f;
if (cursorY < 0.0f) {
s32 lines = s32(cursorY / getLineHeight() - 1.0f);
mScrollAnm.startAnm(mfScrollY, mfScrollY - lines * getLineHeight(), 15.0f, NULL, NULL);
onSE(static_cast<sound::SE>(11));
}
if (cursorY >= (mRect.top - mRect.bottom) * getScale().y) {
s32 lines = s32((cursorY - (mRect.top - mRect.bottom) * getScale().y) / getLineHeight()) + 1;
mScrollAnm.startAnm(mfScrollY, mfScrollY - lines * getLineHeight(), 15.0f, NULL, NULL);
onSE(static_cast<sound::SE>(11));
}
meScrollFlag = SF_NoScroll;
}
}
@@ -3688,9 +3511,9 @@ void Base::clear() {
u32 Base::isOverRowLimit(u32 limit, const wchar_t* string) {
const wchar_t* current = string;
if (!*string) return 0;
f32 scaleX;
f32 cursorX = getScale().x;
nw4r::math::VEC2 scale = getScale();
f32 scaleX = scale.x;
u32 pos = 0;
u32 rows = 0;
muWordWrapCounter = 0;
@@ -3698,6 +3521,7 @@ u32 Base::isOverRowLimit(u32 limit, const wchar_t* string) {
mbHyphen = false;
u32 cursorStart, cursorEnd;
mpString->getCursorPos(&cursorStart, &cursorEnd);
scaleX = scale.x;
for (;;) {
DrawInfo info;
info.rect.left = 0.0f;
@@ -3705,14 +3529,14 @@ u32 Base::isOverRowLimit(u32 limit, const wchar_t* string) {
info.rect.right = 0.0f;
info.rect.bottom = 0.0f;
bool kana = false;
const wchar_t* character = current;
const wchar_t* character;
if (meLanguage == KR && !kanaHandled && cursorStart == pos) {
kanaHandled = true;
character = mpString->getKanaBuffer();
if (*character) kana = true;
}
if (!kana) {
if (!*current) return 0;
if (!*current) break;
character = current;
}
info.character = *character;
@@ -3759,6 +3583,7 @@ u32 Base::isOverRowLimit(u32 limit, const wchar_t* string) {
++pos;
++current;
}
return 0;
}
bool Base::onCursor(CursorPos* cursor) {
@@ -3902,12 +3727,15 @@ bool Base::onCursor(CursorPos* cursor) {
}
u32 Base::calcCursorPos(f32 x, f32 y) {
f32 cursorX;
f32 lineTop;
f32 lineBottom;
f32 localY = y - mfScrollY;
const wchar_t* string = mpString->getWCString();
if (!*string) return 0;
f32 cursorX = getScale().x;
f32 lineTop = 0.0f;
f32 lineBottom = lineTop;
cursorX = getScale().x;
lineTop = 0.0f;
lineBottom = lineTop;
nw4r::math::VEC2 scale = getScale();
u32 pos = 0;
muWordWrapCounter = 0;
@@ -3947,8 +3775,8 @@ u32 Base::calcCursorPos(f32 x, f32 y) {
lineBottom = lineTop + scale.y * (info.rect.bottom - info.rect.top);
if (!string[1] && localY >= lineTop && localY <= lineBottom) return pos + 1;
} else {
if (cursorX <= x && x < right && localY >= lineTop && localY < lineBottom) {
if (cursorX + (right - cursorX) * 0.5f > x) return pos;
if (x >= cursorX && x < right && localY >= lineTop && localY < lineBottom) {
if (cursorX + 0.5f * (right - cursorX) > x) return pos;
return pos + 1;
}
cursorX += scale.x * (info.rect.right - info.rect.left);
@@ -4094,59 +3922,8 @@ void Base::doLineFeed() {
SetCursorX(getScale().x);
}
asm bool Base::isOverLine(const DrawInfo& drawInfo) {
nofralloc
stwu r1, -0x40(r1)
mflr r0
stw r0, 0x44(r1)
stfd f31, 0x30(r1)
psq_st f31, 0x38(r1), 0, 0
stfd f30, 0x20(r1)
psq_st f30, 0x28(r1), 0, 0
stw r31, 0x1c(r1)
mr r31, r4
stw r30, 0x18(r1)
mr r30, r3
lwz r12, 0(r3)
lwz r12, 0x188(r12)
mtctr r12
bctrl
lwz r12, 0(r30)
lfs f1, 0x128(r30)
lfs f0, 0x120(r30)
lwz r12, 0x188(r12)
stw r3, 8(r1)
fsubs f31, f1, f0
mr r3, r30
stw r4, 0xc(r1)
mtctr r12
bctrl
lfs f1, 8(r31)
lfs f0, 0(r31)
stw r3, 0x10(r1)
addi r3, r30, 0x10
fsubs f30, f1, f0
stw r4, 0x14(r1)
bl GetCursorX__Q34nw4r2ut10CharWriterCFv
lfs f2, 0x10(r1)
lfs f0, 8(r1)
fmuls f2, f30, f2
fmuls f0, f31, f0
fadds f1, f1, f2
fcmpo cr0, f1, f0
cror eq, gt, eq
mfcr r3
extrwi r3, r3, 1, 2
psq_l f31, 0x38(r1), 0, 0
lfd f31, 0x30(r1)
psq_l f30, 0x28(r1), 0, 0
lfd f30, 0x20(r1)
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r0, 0x44(r1)
mtlr r0
addi r1, r1, 0x40
blr
bool Base::isOverLine(const DrawInfo& drawInfo) {
return GetCursorX() + drawInfo.rect.GetWidth() * getScale().x >= mRect.GetWidth() * getScale().x;
}
void Base::drawFixString(u32 position) {

View File

@@ -557,3 +557,522 @@ GATE PASS
```
No source/header/configuration outside this leaf changed. No linking promotion was attempted.
## 2026-09-30 interpreter body sizes
Baseline 23/121 correct interpreter jump-table relocations. Main case order is already correct. Inspecting instruction-count spans from the top; register differences are excluded from this structural measurement.
first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394
Unequal instruction-count spans: [('delete', 12, 13, 12, 12), ('delete', 15, 16, 14, 14), ('insert', 22, 22, 20, 22), ('insert', 25, 25, 25, 27), ('insert', 187, 187, 189, 190), ('insert', 209, 209, 212, 213), ('insert', 511, 511, 515, 516), ('delete', 512, 513, 517, 517), ('insert', 598, 598, 602, 603), ('delete', 599, 600, 604, 604), ('insert', 641, 641, 645, 646), ('delete', 665, 666, 670, 670), ('delete', 667, 668, 671, 671), ('insert', 670, 670, 673, 674), ('delete', 671, 672, 675, 675), ('replace', 729, 731, 732, 733), ('delete', 758, 759, 760, 760), ('insert', 773, 773, 774, 775), ('delete', 775, 776, 777, 777), ('insert', 804, 804, 805, 806), ('insert', 834, 834, 836, 837), ('delete', 837, 839, 840, 840), ('delete', 842, 843, 843, 843), ('delete', 993, 994, 993, 993), ('insert', 999, 999, 998, 999), ('delete', 1073, 1074, 1073, 1073), ('insert', 1076, 1076, 1075, 1076), ('insert', 1154, 1154, 1154, 1155), ('delete', 1159, 1160, 1160, 1160)]
Body spans: target start-end | mine start-end | instruction counts | entries
013c-0144 | 0144-014c | 2/2 | 1
0144-014c | 014c-0154 | 2/2 | 1
014c-0154 | 0154-015c | 2/2 | 1
0154-0188 | 015c-0190 | 13/13 | 1
0188-01c4 | 0190-01cc | 15/15 | 1
01c4-01d4 | 01cc-01dc | 4/4 | 1
01d4-01e4 | 01dc-01ec | 4/4 | 1
01e4-01f4 | 01ec-01fc | 4/4 | 1
01f4-0204 | 01fc-020c | 4/4 | 1
0204-0214 | 020c-021c | 4/4 | 1
0214-0224 | 021c-022c | 4/4 | 1
0224-0234 | 022c-023c | 4/4 | 1
0234-0244 | 023c-024c | 4/4 | 1
0244-0254 | 024c-025c | 4/4 | 1
0254-0264 | 025c-026c | 4/4 | 1
0264-0274 | 026c-027c | 4/4 | 1
0274-0284 | 027c-028c | 4/4 | 1
0284-0294 | 028c-029c | 4/4 | 1
0294-0344 | 029c-0350 | 44/45 | 1
0344-034c | 0350-035c | 2/3 | 1
034c-0354 | 035c-0364 | 2/2 | 4
0354-035c | 0364-036c | 2/2 | 1
035c-0364 | 036c-0374 | 2/2 | 1
0364-036c | 0374-037c | 2/2 | 2
036c-0500 | 037c-0510 | 101/101 | 38
0500-056c | 0510-057c | 27/27 | 1
056c-0580 | 057c-0590 | 5/5 | 1
0580-0590 | 0590-05a0 | 4/4 | 1
0590-05a0 | 05a0-05b0 | 4/4 | 1
05a0-05b0 | 05b0-05c0 | 4/4 | 1
05b0-05c0 | 05c0-05d0 | 4/4 | 1
05c0-05d0 | 05d0-05e0 | 4/4 | 1
05d0-05e0 | 05e0-05f0 | 4/4 | 1
05e0-05f0 | 05f0-0600 | 4/4 | 1
05f0-0600 | 0600-0610 | 4/4 | 1
0600-0610 | 0610-0620 | 4/4 | 1
0610-0620 | 0620-0630 | 4/4 | 1
0620-0630 | 0630-0640 | 4/4 | 1
0630-0640 | 0640-0650 | 4/4 | 1
0640-0650 | 0650-0660 | 4/4 | 1
0650-0660 | 0660-0670 | 4/4 | 1
0660-0670 | 0670-0680 | 4/4 | 1
0670-06a0 | 0680-06b0 | 12/12 | 1
06a0-06d0 | 06b0-06e0 | 12/12 | 1
06d0-06e8 | 06e0-06f8 | 6/6 | 1
06e8-07a8 | 06f8-07b8 | 48/48 | 1
07a8-07e4 | 07b8-07f4 | 15/15 | 1
07e4-0854 | 07f4-0864 | 28/28 | 1
0854-0894 | 0864-08a4 | 16/16 | 1
0894-08b0 | 08a4-08c0 | 7/7 | 1
08b0-08f4 | 08c0-0904 | 17/17 | 1
08f4-0940 | 0904-0950 | 19/19 | 2
0940-09c8 | 0950-09d8 | 34/34 | 1
09c8-0a6c | 09d8-0a7c | 41/41 | 1
0a6c-0b8c | 0a7c-0b94 | 72/70 | 1
0b8c-0da4 | 0b94-0da4 | 134/132 | 1
0da4-0e74 | 0da4-0e74 | 52/52 | 1
0e74-0f14 | 0e74-0f14 | 40/40 | 1
0f14-0f2c | 0f14-0f2c | 6/6 | 1
0f2c-0f80 | 0f2c-0f80 | 21/21 | 1
0f80-0fb8 | 0f80-0fb8 | 14/14 | 1
0fb8-1114 | 0fb8-1114 | 87/87 | 8
1114-113c | 1114-113c | 10/10 | 1
113c-1154 | 113c-1154 | 6/6 | 1
1154-11a4 | 1154-11a4 | 20/20 | 1
11a4-11ac | 11a4-11ac | 2/2 | 1
11ac-11f0 | 11ac-11f0 | 17/17 | 4
11f0-1394 | 11f0-1394 | 105/105 | 2
### Source trials
- const-qualified result-table rows: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- const byte pointers for result-table conversion: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- Conversion table address: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- Conversion table base_pointer: first unequal instruction-count span target+0x30; jump relocations 0/121; size 0x1390/0x1394; restored.
- Conversion table row_pointer: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- Conversion table array_temporary: first unequal instruction-count span target+0x30; jump relocations 96/121; size 0x1384/0x1394; retained.
- Conversion default table initialization: frame now 0xf0 (target 0xf0), first opcode label now 0x13c (target 0x13c); remaining ADD target entry skips an empty case. Full gate PASS, 208/233 objdiff, 207/233 instruction-exact, .data 18.050066.
- Initial conversion matrix arith: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- Initial conversion matrix cmp: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- Initial conversion matrix eq: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- Initial conversion matrix bitShift: first unequal instruction-count span target+0x30; jump relocations 23/121; size 0x1394/0x1394; restored.
- SET_INDEX cache: first unequal instruction-count span target+0x30; jump relocations 96/121; size 0x1388/0x1394; restored.
- SET_INDEX common: first unequal instruction-count span target+0x30; jump relocations 96/121; size 0x1388/0x1394; restored.
- SET_INDEX cache_common: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; retained.
- SET_INDEX cache_common_float: compiler error, restored.
- SET_INDEX shared result check and accumulator pointer: target/source body counts 72/72, GET_PROPERTY_NAME entry restored to 0xb8c. Full gate PASS, relocation targets 97/121; .data 18.050066.
- GET_PROPERTY_NAME length: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x13a0/0x1394; restored.
- GET_PROPERTY_NAME cache_length: compiler error, restored.
- GET_PROPERTY_NAME cache_length_branch: compiler error, restored.
- GET_PROPERTY_NAME cache_length_branch_signed_counter_tail: compiler error, restored.
- GET_PROPERTY_NAME cached accumulator, remaining counter, string-length validation and shared status: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1388/0x1394; restored.
- GET_PROPERTY_NAME baseline structured candidate diagnostic: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1388/0x1394; restored.
- GET_PROPERTY_NAME corrected cache_length: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x13a4/0x1394; restored.
- GET_PROPERTY_NAME corrected cache_length_branch: first unequal instruction-count span target+0x30; jump relocations 2/121; size 0x13a4/0x1394; restored.
- GET_PROPERTY_NAME corrected cache_length_branch_signed_counter_tail: first unequal instruction-count span target+0x30; jump relocations 2/121; size 0x13a0/0x1394; restored.
- GET_PROPERTY_NAME shape init_index: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x138c/0x1394; restored.
- GET_PROPERTY_NAME shape nonarray_else: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- GET_PROPERTY_NAME shape init_index_nonarray_else: first unequal instruction-count span target+0x30; jump relocations 85/121; size 0x1394/0x1394; restored.
- GET_PROPERTY_NAME shape global_index: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1388/0x1394; restored.
- GET_PROPERTY_NAME shape arrayflag: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x138c/0x1394; restored.
- GET_PROPERTY_NAME body with status_local: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- GET_PROPERTY_NAME body with log_not: first unequal instruction-count span target+0x30; jump relocations 95/121; size 0x1394/0x1394; restored.
- GET_PROPERTY_NAME body with copy_temps: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- GET_PROPERTY_NAME body with result_length: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- GET_PROPERTY_NAME body with result_string_length: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- GET_PROPERTY_NAME body with opfunc_first: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- GET_PROPERTY_NAME body with opkind_signed: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- LOAD_INDIRECT indexed reference with load: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- LOAD_INDIRECT indexed reference with property_load: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- LOAD_INDIRECT indexed reference with property_init_load: first unequal instruction-count span target+0x30; jump relocations 85/121; size 0x1394/0x1394; restored.
- LOAD_INDIRECT indexed reference with property_load_lognot: first unequal instruction-count span target+0x30; jump relocations 95/121; size 0x1394/0x1394; restored.
- LOAD_INDIRECT indexed reference with property_init_load_lognot: first unequal instruction-count span target+0x30; jump relocations 72/121; size 0x1398/0x1394; restored.
- Boolean status tail with boolean_local: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Boolean status tail with property_boolean_local: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Boolean status tail with property_boolean_local_load: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Boolean status tail with property_init_boolean_local_load: first unequal instruction-count span target+0x30; jump relocations 85/121; size 0x1394/0x1394; restored.
- Property body and declaration scope result_outer: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Property body and declaration scope all_outer: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Property body and declaration scope binary_outer: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Property body and declaration scope object_temps_first: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Property body and declaration scope types_before_objects: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Property body and declaration scope bool_correct_property_scope: first unequal instruction-count span target+0x30; jump relocations 62/121; size 0x1390/0x1394; restored.
- Original property control flow error_gotos: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1380/0x1394; restored.
- Original property control flow error_gotos_length: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1390/0x1394; restored.
- Original property control flow error_gotos_length_nozero: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Original property control flow error_gotos_length_branch: first unequal instruction-count span target+0x30; jump relocations 25/121; size 0x1390/0x1394; restored.
- Original property control flow result_local_error: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x137c/0x1394; restored.
- Original property control flow helper_format: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1380/0x1394; restored.
- Operand conversion types_pointer_outer: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Operand conversion types_pointer_inner: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Operand conversion type_indexing: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Operand conversion table_pointer_outer: first unequal instruction-count span target+0x58; jump relocations 0/121; size 0x1398/0x1394; restored.
- Operand conversion pointer_array_inner: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Operand conversion void_table_inner: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x138c/0x1394; restored.
- Operand conversion table_switch_result: first unequal instruction-count span target+0x30; jump relocations 0/121; size 0x139c/0x1394; restored.
- Property validation refinement integer_signed_bounds: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x13c4/0x1394; restored.
- Property validation refinement high_low_bounds: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x13bc/0x1394; restored.
- Property validation refinement delete_assign: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1390/0x1394; restored.
- Property validation refinement newobject_assign: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1390/0x1394; restored.
- Property validation refinement string_length_copy: compiler error, restored.
- Property validation refinement negative_length: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1388/0x1394; restored.
- Property validation refinement foundidx_computed: first unequal instruction-count span target+0x30; jump relocations 120/121; size 0x1394/0x1394; retained.
- Property validation refinement boolean_flag: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1390/0x1394; restored.
- Property validation refinement loop_for: first unequal instruction-count span target+0x30; jump relocations 97/121; size 0x1390/0x1394; restored.
- Property validation refinement loop_do: first unequal instruction-count span target+0x30; jump relocations 120/121; size 0x1394/0x1394; restored.
- Metric clarification: mnemonic SequenceMatcher initially reports 0x30 because the readonly base load moves across memset; this is instruction scheduling, not a size difference. Use the first wrong cumulative case-label offset as the size anchor: initial 0x13c, current 0x344. Initial loop entry 0x78 vs target 0x70; current loop entry 0x70. Current first extra table-header instructions are at source 0x324/0x32c, balanced by an empty ADD case.
- GET_PROPERTY_NAME now 134/134 instructions. Carry the found element index in computedAddr, keep enumeration remaining separate, validate formatted string length, and share error completion. Full gate PASS; jump offsets 120/121 correct; all case intervals except ADD table label/header now match counts.
- File-private interpreter-only result type table linkage diagnostic: first unequal instruction-count span target+0x30; jump relocations 120/121; size 0x1394/0x1394; restored (support declaration outside requested function).
- ADD table control/lifetime goto_cases: first wrong cumulative size anchor target+0x344; jump relocations 120/121; size 0x1394/0x1394; restored.
- ADD table control/lifetime outer_declaration: first wrong cumulative size anchor target+0x344; jump relocations 120/121; size 0x1394/0x1394; restored.
- ADD table control/lifetime operator_declaration: first wrong cumulative size anchor target+0x344; jump relocations 120/121; size 0x1394/0x1394; restored.
- ADD table control/lifetime function_initialization: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13a4/0x1394; restored.
- ADD table control/lifetime typecheck_initialization: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13a4/0x1394; restored.
- ADD table control/lifetime operator_initialization: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13a4/0x1394; restored.
- ADD table control/lifetime enum_kind: first wrong cumulative size anchor target+0x344; jump relocations 120/121; size 0x1394/0x1394; restored.
- ADD table control/lifetime case_value_normalization: first wrong cumulative size anchor target+0x344; jump relocations 120/121; size 0x1394/0x1394; restored.
- ADD table control/lifetime case_scope: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13a4/0x1394; restored.
- ADD table control/lifetime result_default: first wrong cumulative size anchor target+0x344; jump relocations 74/121; size 0x1394/0x1394; restored.
- Inline result table helper table_return: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13ac/0x1394; restored.
- Inline result table helper table_return_default: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13a8/0x1394; restored.
- Inline result table helper table_out: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13c0/0x1394; restored.
- Inline result table helper enum_and_table: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x13b4/0x1394; restored.
- Operator table with loop form table_math_normalize: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x139c/0x1394; restored.
- Operator table with loop form table_do: first wrong cumulative size anchor target+0x13c; jump relocations 0/121; size 0x139c/0x1394; restored.
- Operator table with loop form table_math_do: first wrong cumulative size anchor target+0x344; jump relocations 19/121; size 0x1398/0x1394; restored.
- Operator table with loop form table_math_do_typeptr: first wrong cumulative size anchor target+0x1394; jump relocations 121/121; size 0x1394/0x1394; retained.
- Operator table with loop form table_ternary_do_typeptr: compiler error, restored.
- Operator table with loop form table_math_do_reverse_types: compiler error, restored.
- Operator table with loop form table_math_do_array_ptr: compiler error, restored.
- Complete interpreter layout: all 68 distinct case/shared-tail intervals have matching counts; all 121 relocation offsets match (type 10/10, operator 47/47, opcode 64/64). First mismatched size anchor: none. Entry prefix and final tail sizes match; 1253/1253 total instructions.
- The final operator-table change uses the actual resultTypes pointer and a moving enum-output pointer. Normalize zero step counts arithmetically and use a do loop with the existing count value. These remove the entry copy/branch while retaining the requested iteration count. No synthetic data, offsets or padding were added.
```text
first wrong cumulative size anchor target+0x1394; jump relocations 121/121; size 0x1394/0x1394
Unequal instruction-count spans: [('insert', 13, 13, 13, 14), ('delete', 16, 18, 17, 17), ('insert', 22, 22, 21, 23), ('delete', 27, 28, 28, 28), ('insert', 187, 187, 187, 188), ('delete', 188, 189, 189, 189), ('insert', 511, 511, 511, 512), ('delete', 512, 513, 513, 513), ('insert', 598, 598, 598, 599), ('delete', 599, 600, 600, 600), ('insert', 641, 641, 641, 642), ('delete', 665, 666, 666, 666), ('insert', 773, 773, 773, 774), ('delete', 842, 843, 843, 843), ('delete', 993, 994, 993, 993), ('insert', 999, 999, 998, 999), ('delete', 1073, 1074, 1073, 1073), ('insert', 1076, 1076, 1075, 1076), ('insert', 1154, 1154, 1154, 1155), ('delete', 1159, 1160, 1160, 1160), ('insert', 1236, 1236, 1236, 1237), ('delete', 1237, 1238, 1238, 1238)]
Body spans: target start-end | mine start-end | instruction counts | entries
013c-0144 | 013c-0144 | 2/2 | 1
0144-014c | 0144-014c | 2/2 | 1
014c-0154 | 014c-0154 | 2/2 | 1
0154-0188 | 0154-0188 | 13/13 | 1
0188-01c4 | 0188-01c4 | 15/15 | 1
01c4-01d4 | 01c4-01d4 | 4/4 | 1
01d4-01e4 | 01d4-01e4 | 4/4 | 1
01e4-01f4 | 01e4-01f4 | 4/4 | 1
01f4-0204 | 01f4-0204 | 4/4 | 1
0204-0214 | 0204-0214 | 4/4 | 1
0214-0224 | 0214-0224 | 4/4 | 1
0224-0234 | 0224-0234 | 4/4 | 1
0234-0244 | 0234-0244 | 4/4 | 1
0244-0254 | 0244-0254 | 4/4 | 1
0254-0264 | 0254-0264 | 4/4 | 1
0264-0274 | 0264-0274 | 4/4 | 1
0274-0284 | 0274-0284 | 4/4 | 1
0284-0294 | 0284-0294 | 4/4 | 1
0294-0344 | 0294-0344 | 44/44 | 1
0344-034c | 0344-034c | 2/2 | 1
034c-0354 | 034c-0354 | 2/2 | 4
0354-035c | 0354-035c | 2/2 | 1
035c-0364 | 035c-0364 | 2/2 | 1
0364-036c | 0364-036c | 2/2 | 2
036c-0500 | 036c-0500 | 101/101 | 38
0500-056c | 0500-056c | 27/27 | 1
056c-0580 | 056c-0580 | 5/5 | 1
0580-0590 | 0580-0590 | 4/4 | 1
0590-05a0 | 0590-05a0 | 4/4 | 1
05a0-05b0 | 05a0-05b0 | 4/4 | 1
05b0-05c0 | 05b0-05c0 | 4/4 | 1
05c0-05d0 | 05c0-05d0 | 4/4 | 1
05d0-05e0 | 05d0-05e0 | 4/4 | 1
05e0-05f0 | 05e0-05f0 | 4/4 | 1
05f0-0600 | 05f0-0600 | 4/4 | 1
0600-0610 | 0600-0610 | 4/4 | 1
0610-0620 | 0610-0620 | 4/4 | 1
0620-0630 | 0620-0630 | 4/4 | 1
0630-0640 | 0630-0640 | 4/4 | 1
0640-0650 | 0640-0650 | 4/4 | 1
0650-0660 | 0650-0660 | 4/4 | 1
0660-0670 | 0660-0670 | 4/4 | 1
0670-06a0 | 0670-06a0 | 12/12 | 1
06a0-06d0 | 06a0-06d0 | 12/12 | 1
06d0-06e8 | 06d0-06e8 | 6/6 | 1
06e8-07a8 | 06e8-07a8 | 48/48 | 1
07a8-07e4 | 07a8-07e4 | 15/15 | 1
07e4-0854 | 07e4-0854 | 28/28 | 1
0854-0894 | 0854-0894 | 16/16 | 1
0894-08b0 | 0894-08b0 | 7/7 | 1
08b0-08f4 | 08b0-08f4 | 17/17 | 1
08f4-0940 | 08f4-0940 | 19/19 | 2
0940-09c8 | 0940-09c8 | 34/34 | 1
09c8-0a6c | 09c8-0a6c | 41/41 | 1
0a6c-0b8c | 0a6c-0b8c | 72/72 | 1
0b8c-0da4 | 0b8c-0da4 | 134/134 | 1
0da4-0e74 | 0da4-0e74 | 52/52 | 1
0e74-0f14 | 0e74-0f14 | 40/40 | 1
0f14-0f2c | 0f14-0f2c | 6/6 | 1
0f2c-0f80 | 0f2c-0f80 | 21/21 | 1
0f80-0fb8 | 0f80-0fb8 | 14/14 | 1
0fb8-1114 | 0fb8-1114 | 87/87 | 8
1114-113c | 1114-113c | 10/10 | 1
113c-1154 | 113c-1154 | 6/6 | 1
1154-11a4 | 1154-11a4 | 20/20 | 1
11a4-11ac | 11a4-11ac | 2/2 | 1
11ac-11f0 | 11ac-11f0 | 17/17 | 4
11f0-1394 | 11f0-1394 | 105/105 | 2
```
- Final full gate PASS: objdiff code 32944/53564, data 6904/6904, functions 208/233; instruction-exact 207/233; .data 100.0; CHANSVmStep 96.199524. Zero regressions, forbidden patterns and readability warnings. Instruction-exact count is unchanged; this round completes the requested case-size/relocation work, not full instruction matching.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 32944/53564 data 6904/6904 functions 208/233 fuzzy 98.5453 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 207/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 98.54529
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.427086
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 96.92771
[src/channelScript/CHANSVm] below 100: VmArraySlice 96.2782
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringFromCharCode 99.40678
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.106064
[src/channelScript/CHANSVm] below 100: VmStringSplit 96.04955
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 98.58237
[src/channelScript/CHANSVm] below 100: CHANSVm_81450D14 97.391304
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobCalcRangeSHA1Digest 96.484535
[src/channelScript/CHANSVm] below 100: VmBlobCalcHMAC 99.453125
[src/channelScript/CHANSVm] below 100: VmBlobCalcRangeHMAC 99.97479
[src/channelScript/CHANSVm] below 100: vmBlobParsePackFormatString 99.69827
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 92.603294
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 92.083176
[src/channelScript/CHANSVm] below 100: VmImageCtor 99.0
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.1063
[src/channelScript/CHANSVm] below 100: CHANSVm_81455654 94.0
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 97.2242
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.199524
[src/channelScript/CHANSVm] baseline: code 32944/53564 data 2232 functions 208 fuzzy 98.4492
regressions vs baseline: 0
global matched_code_percent: 84.94337 -> 84.94337
global fuzzy_match_percent: 98.15556 -> 98.15729
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.68994
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## 2026-09-30 code continuation on agent/w0930/chansvm-code
- Fresh branch at latest origin/main 2a34d370. Latest-main gate has no baseline report; use supported --base 3f5248be, the nearest existing ancestor baseline and the merged interpreter data fix. No baseline files changed. Initial instruction-exact 207/233, objdiff 208/233; code 32944/53564; data 6904/6904; .data 100%; jump targets 121/121. Step first, then all remaining 25 raw-inexact functions by percentage.
- CHANSVmStep: two typed enum slots and two copy headers prevent scratch overlap: 96.213890%; insns 1253/1253; diffs 337; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: typed enum slots alone align the output type buffer: 96.199524%; insns 1253/1253; diffs 355; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: preserve Boolean conversion status in a local and one result tail: 96.215485%; insns 1253/1253; diffs 351; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: load indirect array index from its copied reference: 96.407020%; insns 1253/1253; diffs 354; jump targets 121/121; .data 100.0%; restored.
- Baseline gate audit before source changes: origin/main 2a34d370 has no stored report; nearest report 3f5248be reports 16 existing fa-driver regressions on unmodified latest main. Supported --base 30809a5b is the nearest available ancestor whose baseline is preserved by unmodified latest main (208/233 CHANSVm functions). Keep a separately generated fresh latest-main report in /tmp and require no regressions relative to it as well. No report or gate tool was modified.
- CHANSVmStep: two typed enum slots and two copy headers prevent scratch overlap: 96.213890%; insns 1253/1253; diffs 337; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- Step scratch-layout improvement: full gate PASS with --base 30809a5b. Two actual copy slots and two enum slots remove the out-of-bounds adjacent-header access; score 96.213890%, 337 raw differences versus 355. All jump targets 121/121 and .data 100%.
- CHANSVmStep: keep Boolean status in one local and copy it after conversion: 96.229850%; insns 1253/1253; diffs 333; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- CHANSVmStep: read LOAD_INDIRECT index from copied reference header: 96.437350%; insns 1253/1253; diffs 332; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- CHANSVmStep: test nonnegative float index before upper bound: 96.437350%; insns 1253/1253; diffs 332; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: read copied floating index through its value field: 96.437350%; insns 1253/1253; diffs 332; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: use bounded type-array indices for conversion outputs: 96.380684%; insns 1254/1253; diffs 1133; jump targets 19/121; .data 18.050066%; restored.
- CHANSVmStep: declare conversion enum buffer before scratch headers: 96.437350%; insns 1253/1253; diffs 332; jump targets 121/121; .data 100.0%; restored.
- VmBlobFill: use integer enum names for both argument conversions: 100.000000%; insns 63/63; diffs 2; jump targets 121/121; .data 100.0%; restored.
- VmBlobFill: remove redundant parent recheck after null rejection: 91.746030%; insns 60/63; diffs 43; jump targets 121/121; .data 100.0%; restored.
- VmBlobFill: reject missing parent and value in separate guards: 96.666664%; insns 65/63; diffs 39; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcRangeHMAC: represent the one digest context as a one-element context buffer: 99.974790%; insns 119/119; diffs 3; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcRangeHMAC: use a word buffer for the word-accessed SDK context workspace: 99.974790%; insns 119/119; diffs 3; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcRangeHMAC: reuse an explicit pointer to the existing context for all API calls: 96.722690%; insns 120/119; diffs 44; jump targets 121/121; .data 100.0%; restored.
- vmBlobParsePackFormatString: perform decimal multiplication, character addition and zero subtraction separately: 99.655174%; insns 116/116; diffs 6; jump targets 121/121; .data 100.0%; restored.
- vmBlobParsePackFormatString: scope the numeric input character to its parameter iteration: 98.017240%; insns 117/116; diffs 41; jump targets 121/121; .data 100.0%; restored.
- vmBlobParsePackFormatString: use one bounded unsigned decimal digit test: 98.353450%; insns 115/116; diffs 45; jump targets 121/121; .data 100.0%; restored.
- VmWinEmuWrite: advance the output cursor with the matching string-size constant: 99.626870%; insns 67/67; diffs 5; jump targets 121/121; .data 100.0%; restored.
- VmWinEmuWrite: limit remaining bytes before converting byte count to character count: 87.820890%; insns 67/67; diffs 13; jump targets 121/121; .data 100.0%; restored.
- VmWinEmuWrite: declare and initialize the converted string only at its use: 99.626870%; insns 67/67; diffs 5; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcHMAC: keep the key argument retrieval beside its instance check: 99.453125%; insns 64/64; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcHMAC: cache key payload and size at digest initialization: 99.453125%; insns 64/64; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcHMAC: use the context as an API work buffer array: 99.453125%; insns 64/64; diffs 7; jump targets 121/121; .data 100.0%; restored.
- CHANSVmNewObjData: initialize candidate allocation size where it is consumed: compiler error; restored.
- CHANSVmNewObjData: separate slot-pointer assignment from the next slot index update: 93.687500%; insns 96/96; diffs 21; jump targets 121/121; .data 100.0%; restored.
- CHANSVmNewObjData: replace the dead byte-offset accumulator with a typed chunk-table cursor: 90.177086%; insns 96/96; diffs 51; jump targets 121/121; .data 100.0%; restored.
- VmStringFromCharCode: form the truncation mask through the character range expression: 99.406780%; insns 59/59; diffs 6; jump targets 121/121; .data 100.0%; restored.
- VmStringFromCharCode: compute the second byte store index after the first store: 99.406780%; insns 59/59; diffs 6; jump targets 121/121; .data 100.0%; restored.
- VmStringFromCharCode: initialize the UTF-16 character value before the null-object branch: 94.237290%; insns 58/59; diffs 33; jump targets 121/121; .data 100.0%; restored.
- CHANSVmNewObjData: scope aligned allocation size with the allocation payload: 99.427086%; insns 96/96; diffs 10; jump targets 121/121; .data 100.0%; restored.
- CHANSVmAddExe: increment the module index before advancing the clear offset: 99.153540%; insns 254/254; diffs 34; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- CHANSVmAddExe: address the cleared module entry through its declared table type: 99.153540%; insns 254/254; diffs 34; jump targets 121/121; .data 100.0%; restored.
- CHANSVmAddExe: commute region-size arithmetic at method bounds validation: 99.153540%; insns 254/254; diffs 34; jump targets 121/121; .data 100.0%; restored.
- VmImageCtor: load the image callback into its API callback type: compiler error; restored.
- VmImageCtor: load payload and size within the callback branch: 98.920000%; insns 25/25; diffs 4; jump targets 121/121; .data 100.0%; restored.
- VmImageCtor: express successful no-callback construction as an early return: 91.800000%; insns 26/25; diffs 13; jump targets 121/121; .data 100.0%; restored.
- VmBlobGetHexString: advance both hexadecimal character indices after their stores: 96.158540%; insns 81/82; diffs 34; jump targets 121/121; .data 100.0%; restored.
- VmBlobGetHexString: initialize the low-nibble character index before the high-nibble index: 98.719510%; insns 82/82; diffs 14; jump targets 121/121; .data 100.0%; restored.
- VmBlobGetHexString: cache each source byte before converting its nibbles: 92.365850%; insns 81/82; diffs 36; jump targets 121/121; .data 100.0%; restored.
- CHANSVmLinkModules: scope each dispatch-pass index to its module iteration: 98.677246%; insns 189/189; diffs 43; jump targets 121/121; .data 100.0%; restored.
- CHANSVmLinkModules: load the dispatch table after its iteration cursor is initialized: 98.640210%; insns 189/189; diffs 43; jump targets 121/121; .data 100.0%; restored.
- CHANSVmLinkModules: advance the linked-module iteration number before its module pointer: 98.677246%; insns 189/189; diffs 43; jump targets 121/121; .data 100.0%; restored.
- CHANSVmGetSourceLine: cache the program-counter byte and block index for source lookup: 97.826090%; insns 46/46; diffs 18; jump targets 121/121; .data 100.0%; restored.
- CHANSVmGetSourceLine: move line-offset initialization after the bitfield address: 97.826090%; insns 46/46; diffs 16; jump targets 121/121; .data 100.0%; restored.
- CHANSVmGetSourceLine: use the source-line bitfield length to compute the byte position: 97.826090%; insns 46/46; diffs 16; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: handle negative positions before checking the upper bound: 49.673912%; insns 39/46; diffs 41; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: express the out-of-range test as the inverse of two bounds: 97.391304%; insns 45/46; diffs 29; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: keep negative-offset normalization at a shared success label: 97.391304%; insns 45/46; diffs 29; jump targets 121/121; .data 100.0%; restored.
- VmStringReplace: load replacement length after all three string payloads: 97.840910%; insns 132/132; diffs 41; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- VmStringReplace: initialize destination and source cursors in destination-first order: 97.878784%; insns 132/132; diffs 40; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- VmStringReplace: advance copied UTF-16 output before advancing input: 97.803030%; insns 132/132; diffs 41; jump targets 121/121; .data 100.0%; restored.
- VmImageCtor: cache the registered image-construction callback in its real API type: 99.000000%; insns 25/25; diffs 4; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_8145049C: represent the temporary formatted object using its actual object type: 98.582370%; insns 431/431; diffs 42; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_8145049C: represent the UTF-16 character workspace with typed character storage: 98.582370%; insns 431/431; diffs 42; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_8145049C: initialize the source position after the segment and argument cursors: 98.542920%; insns 431/431; diffs 45; jump targets 121/121; .data 100.0%; restored.
- VmCallMethod: return missing-method and missing-property errors directly: 96.316730%; insns 280/281; diffs 246; jump targets 121/121; .data 100.0%; restored.
- VmCallMethod: initialize the call header counts before resolving the target: 97.224200%; insns 281/281; diffs 97; jump targets 121/121; .data 100.0%; restored.
- VmCallMethod: scope the code address and instruction pointer to one execution-context load: 97.224200%; insns 281/281; diffs 97; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_8144B4D4: use a real end-pointer local instead of a volatile integer alias: 96.927710%; insns 83/83; diffs 13; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_8144B4D4: initialize the conversion result after clearing the parsed end pointer: 94.518074%; insns 83/83; diffs 13; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_8144B4D4: advance the string terminator through the character count before parsing: 96.987950%; insns 83/83; diffs 10; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- VmBlobCalcRangeSHA1Digest: initialize the source data pointer directly at the digest update call: 87.206184%; insns 96/97; diffs 36; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcRangeSHA1Digest: declare the range offset after the digest workspace: 96.484535%; insns 97/97; diffs 14; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcRangeSHA1Digest: represent the SHA1 workspace as a one-element API context buffer: 96.484535%; insns 97/97; diffs 14; jump targets 121/121; .data 100.0%; restored.
- VmArraySlice: compute the slice end before initializing its beginning: 95.827065%; insns 133/133; diffs 59; jump targets 121/121; .data 100.0%; restored.
- VmArraySlice: load each source element before acquiring the destination slot: 88.684210%; insns 133/133; diffs 60; jump targets 121/121; .data 100.0%; restored.
- VmArraySlice: compute an empty slice with an explicit end-before-start branch: 92.067670%; insns 131/133; diffs 106; jump targets 121/121; .data 100.0%; restored.
- VmStringSplit: load both string lengths before their payload addresses: 95.936935%; insns 222/222; diffs 92; jump targets 121/121; .data 100.0%; restored.
- VmStringSplit: initialize the segment cursor and count before the scanning cursor: 96.049550%; insns 222/222; diffs 81; jump targets 121/121; .data 100.0%; restored.
- VmStringSplit: advance the empty-delimiter byte cursor before its array index: 95.995500%; insns 222/222; diffs 82; jump targets 121/121; .data 100.0%; restored.
- VmDateDtor: declare the calendar structure before its formatting buffer: 94.967030%; insns 91/91; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmDateDtor: initialize the calendar pointer at its declaration: 94.967030%; insns 91/91; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmDateDtor: clear the calendar through its named value instead of its pointer: 94.967030%; insns 91/91; diffs 7; jump targets 121/121; .data 100.0%; restored.
- CHANSVmParseInt: declare the numeric parse end pointer before the character buffer: 94.693880%; insns 49/49; diffs 3; jump targets 121/121; .data 100.0%; restored.
- CHANSVmParseInt: initialize the type discriminator after its parse-end pointer: 83.673470%; insns 49/49; diffs 5; jump targets 121/121; .data 100.0%; restored.
- CHANSVmParseInt: limit the parsed numeric temporary to the successful conversion block: 94.693880%; insns 49/49; diffs 3; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81455654: form the global object directly from its typed module-table entry: 94.000000%; insns 34/35; diffs 35; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81455654: select local headers before argument slots in the valid-frame branch: 71.000000%; insns 34/35; diffs 35; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81455654: compute the argument slot by subtracting the frame displacement first: 87.428570%; insns 34/35; diffs 35; jump targets 121/121; .data 100.0%; restored.
- VmBlobPackCommon: load the numeric packed value through the real integer object field: 92.603294%; insns 675/668; diffs 642; jump targets 121/121; .data 100.0%; restored.
- VmBlobPackCommon: initialize the format cursor before its packed argument cursor: 92.588326%; insns 675/668; diffs 644; jump targets 121/121; .data 100.0%; restored.
- VmBlobPackCommon: compute the copied destination pointer before the source byte count: 92.603294%; insns 675/668; diffs 642; jump targets 121/121; .data 100.0%; restored.
- VmBlobUnpack: declare the two-word unpack buffer as a typed integer union: 92.104450%; insns 531/517; diffs 496; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- VmBlobUnpack: scope the initial parse defaults to their format iteration: 91.655710%; insns 531/517; diffs 500; jump targets 121/121; .data 100.0%; restored.
- VmBlobUnpack: initialize string-termination character count before scanning: 92.404260%; insns 532/517; diffs 500; jump targets 121/121; .data 100.0%; retained, quick gate PASS.
- CHANSVmParseInt: initialize the parse end pointer before reading the object type: 83.673470%; insns 49/49; diffs 5; jump targets 121/121; .data 100.0%; restored.
- CHANSVmParseInt: initialize the parse end pointer beside the input-buffer declaration: 94.693880%; insns 49/49; diffs 3; jump targets 121/121; .data 100.0%; restored.
- CHANSVmParseInt: scope the base and output copies to the successful string branch: 94.693880%; insns 49/49; diffs 3; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: use explicit normalization and output blocks for the two bounds: 97.391304%; insns 45/46; diffs 29; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: leave the valid upper-bound branch with an explicit output jump: 97.391304%; insns 45/46; diffs 29; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: separate valid and normalized positions with a positive-bounds success test: 97.391304%; insns 45/46; diffs 29; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81455654: return a null pointer explicitly for an invalid argument slot: 88.142860%; insns 36/35; diffs 36; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81455654: return the initial null result before looking up a negative frame slot: 76.571430%; insns 36/35; diffs 36; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81455654: initialize the module-object result only in the global table branch: 94.000000%; insns 34/35; diffs 35; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: set the default instruction budget with an explicit zero-count branch: 96.838780%; insns 1254/1253; diffs 1230; jump targets 0/121; .data 18.050066%; restored.
- CHANSVmStep: store floating immediate bytes in their natural floating-point value: 96.437350%; insns 1253/1253; diffs 332; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: initialize enum cursor after operand discriminator loads: 96.437350%; insns 1253/1253; diffs 332; jump targets 121/121; .data 100.0%; restored.
- CHANSVmStep: form conversion enum cursor from a byte count within its array: 96.547485%; insns 1251/1253; diffs 1104; jump targets 19/121; .data 18.050066%; restored.
- CHANSVmStep: restore countdown entry test and select result matrices directly from their table: 96.756584%; insns 1256/1253; diffs 1231; jump targets 0/121; .data 18.050066%; restored.
- CHANSVmStep: keep the original budget and select each conversion matrix by direct member address: 96.292900%; insns 1254/1253; diffs 1096; jump targets 20/121; .data 18.050066%; restored.
- vmBlobParsePackFormatString: retain the Unicode input character in an unsigned code-point variable: 99.698270%; insns 116/116; diffs 6; jump targets 121/121; .data 100.0%; restored.
- vmBlobParsePackFormatString: accumulate decimal digits with a wide intermediate before overflow rejection: 89.991380%; insns 123/116; diffs 102; jump targets 121/121; .data 100.0%; restored.
- vmBlobParsePackFormatString: isolate the decimal product before reusing the parameter accumulator: 99.698270%; insns 116/116; diffs 6; jump targets 121/121; .data 100.0%; restored.
- VmWinEmuWrite: scope the string length to the successful conversion branch: 99.626870%; insns 67/67; diffs 5; jump targets 121/121; .data 100.0%; restored.
- VmWinEmuWrite: scope the converted string object to its output loop: 99.626870%; insns 67/67; diffs 5; jump targets 121/121; .data 100.0%; restored.
- VmWinEmuWrite: initialize the output cursor after reading the string byte count: 99.626870%; insns 67/67; diffs 5; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcHMAC: scope the key object to its native-instance resolution: 99.437500%; insns 64/64; diffs 12; jump targets 121/121; .data 100.0%; restored.
- VmBlobCalcHMAC: scope the newly created blob header to digest-buffer retrieval: compiler error; restored.
- VmBlobCalcHMAC: read the blob payload before its digest input size: 99.265625%; insns 64/64; diffs 11; jump targets 121/121; .data 100.0%; restored.
- VmImageCtor: cache the image payload within the callback guard: 99.000000%; insns 25/25; diffs 4; jump targets 121/121; .data 100.0%; restored.
- VmImageCtor: scope the image header to the callback path: 83.000000%; insns 25/25; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmImageCtor: declare the image header before initializing its constructor result: 99.000000%; insns 25/25; diffs 4; jump targets 121/121; .data 100.0%; restored.
- VmDateDtor: name day and month text at the formatting call: 94.967030%; insns 91/91; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmDateDtor: retrieve the month text before the weekday text: 94.967030%; insns 91/91; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmDateDtor: name the calendar year before selecting its format strings: 94.967030%; insns 91/91; diffs 7; jump targets 121/121; .data 100.0%; restored.
- VmBlobUnpack: read the signed eight-byte packed integer through the integer-union value: 92.404260%; insns 532/517; diffs 500; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: compare the combined range-rejection predicate with the VM false value: 93.804344%; insns 48/46; diffs 31; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: compare both range predicates with the VM true value: 84.782610%; insns 52/46; diffs 35; jump targets 121/121; .data 100.0%; restored.
- CHANSVm_81450D14: retain a Boolean range predicate for normalization: 93.804344%; insns 48/46; diffs 31; jump targets 121/121; .data 100.0%; restored.
- VmBlobUnpack: retain typed 64-bit union-member reads as a readability correction with identical compiled instructions, percentage, unit measures, pool and 121/121 targets; quick gate PASS. The integer member is actively used to decode the eight-byte packed integer; it is not unused alignment storage.
### Final code-round audit
- Every remaining function has at least three distinct, compiling source-level attempts in this round. All accepted edits passed the quick gate, the string pool, 121/121 Step jump relocations and .data 100%.
- A separate fresh project-wide report comparison against the unmodified latest-main 2a34d370 report found zero reductions in matched code/data, linked code/data or function counts across every unit. Gate fallback does not hide a latest-main regression.
- Instruction-exact count is unchanged: 207/233. Objdiff-exact count is unchanged: 208/233. No new exact function is claimed. The retained changes improve fuzzy matching and repair actual scratch storage and unset values.
| Open function | Objdiff % | Instructions | Raw differences | Distinct compiling attempts | Remaining difference |
|---|---:|---:|---:|---:|---|
| CHANSVmStep | 96.437350 | 1253/1253 | 332 | 16 | stack slots, registers, entry/countdown control flow; all case counts and jump relocations match |
| VmBlobFill | 100.000000 | 63/63 | 2 | 3 | 100% objdiff; ctxdiff CR-qualified branch decoding uses absolute address, leaving two tool differences |
| VmBlobCalcRangeHMAC | 99.974790 | 119/119 | 3 | 3 | context stack offset 0x0c versus 0x10 |
| vmBlobParsePackFormatString | 99.698270 | 116/116 | 6 | 6 | register allocation and instruction scheduling |
| VmWinEmuWrite | 99.626870 | 67/67 | 5 | 6 | register allocation and instruction scheduling |
| VmBlobCalcHMAC | 99.453125 | 64/64 | 7 | 5 | register allocation and instruction scheduling |
| CHANSVmNewObjData | 99.427086 | 96/96 | 10 | 3 | register allocation and instruction scheduling |
| VmStringFromCharCode | 99.406780 | 59/59 | 6 | 3 | register allocation and instruction scheduling |
| CHANSVmAddExe | 99.153540 | 254/254 | 34 | 3 | register allocation and instruction scheduling |
| VmImageCtor | 99.000000 | 25/25 | 4 | 6 | register allocation and instruction scheduling |
| VmBlobGetHexString | 98.719510 | 82/82 | 14 | 3 | register allocation and instruction scheduling |
| CHANSVmLinkModules | 98.677246 | 189/189 | 43 | 3 | register allocation and instruction scheduling |
| CHANSVm_8145049C | 98.582370 | 431/431 | 42 | 3 | register allocation and instruction scheduling |
| VmStringReplace | 97.878784 | 132/132 | 40 | 3 | register allocation and instruction scheduling |
| CHANSVmGetSourceLine | 97.826090 | 46/46 | 16 | 3 | register allocation and instruction scheduling |
| CHANSVm_81450D14 | 97.391304 | 45/46 | 29 | 9 | missing upper-bound branch; one commuted add operand |
| VmCallMethod | 97.224200 | 281/281 | 97 | 3 | register allocation and instruction scheduling |
| CHANSVm_8144B4D4 | 96.987950 | 83/83 | 10 | 3 | register allocation and instruction scheduling |
| VmBlobCalcRangeSHA1Digest | 96.484535 | 97/97 | 14 | 3 | register allocation and instruction scheduling |
| VmArraySlice | 96.278200 | 133/133 | 56 | 3 | register allocation and instruction scheduling |
| VmStringSplit | 96.049550 | 222/222 | 81 | 3 | register allocation and instruction scheduling |
| VmDateDtor | 94.967030 | 91/91 | 7 | 6 | day/month table address and format-argument scheduling |
| CHANSVmParseInt | 94.693880 | 49/49 | 3 | 6 | end-pointer store scheduled after parameter copies |
| CHANSVm_81455654 | 94.000000 | 34/35 | 35 | 6 | control flow and instruction count |
| VmBlobPackCommon | 92.603294 | 675/668 | 642 | 3 | control flow and instruction count |
| VmBlobUnpack | 92.404260 | 532/517 | 500 | 4 | control flow and instruction count |
- VmBlobFill tool-artifact confirmation: both complete function byte strings are identical. Both objects contain 0x4186000c at function+0x68 and 0x41860018 at function+0x7c; Capstone displays CR1-qualified branches with absolute destinations separated by the four-byte function-placement difference. Objdiff correctly reports 100%.
- Final non-quick gate uses supported --base 30809a5b because latest main 2a34d370 has no baseline report, while the nearer available 3f5248be baseline reports sixteen preexisting fa-driver regressions on the unmodified latest main. This fallback and the separate latest-main report comparison are explicitly disclosed. Baseline reports and gate tooling were not modified.
- The original increase-in-instruction-exact-count acceptance condition was not achieved in this round; this is partial progress after the required attempts, not a completed unit.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 32944/53564 data 6904/6904 functions 208/233 fuzzy 98.5888 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 207/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 98.58883
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.427086
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 96.98795
[src/channelScript/CHANSVm] below 100: VmArraySlice 96.2782
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringFromCharCode 99.40678
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 96.04955
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 98.58237
[src/channelScript/CHANSVm] below 100: CHANSVm_81450D14 97.391304
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobCalcRangeSHA1Digest 96.484535
[src/channelScript/CHANSVm] below 100: VmBlobCalcHMAC 99.453125
[src/channelScript/CHANSVm] below 100: VmBlobCalcRangeHMAC 99.97479
[src/channelScript/CHANSVm] below 100: vmBlobParsePackFormatString 99.69827
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 92.603294
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 92.40426
[src/channelScript/CHANSVm] below 100: VmImageCtor 99.0
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.15354
[src/channelScript/CHANSVm] below 100: CHANSVm_81455654 94.0
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 97.2242
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.43735
[src/channelScript/CHANSVm] baseline: code 32944/53564 data 2232 functions 208 fuzzy 98.4492
regressions vs baseline: 0
global matched_code_percent: 85.36819 -> 85.36819
global fuzzy_match_percent: 98.27361 -> 98.27611
global complete_code_percent: 59.70596 -> 59.70596
global matched_data_percent: 90.52625 -> 90.78117
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
- Post-full-clean-build latest-main comparison repeated: zero project-wide matched/linked/function regressions; 121/121 Step jump relocations preserved.
- Local improvement commits: c4ae8bcc correct interpreter scratch object storage; 743f0580 improve chansvmstep code matching; f9928196 improve chansvmstep code matching; 572a7c04 improve chansvmaddexe code matching; 076645dc improve vmstringreplace code matching; 647f5007 improve vmstringreplace code matching; 5e75409f improve chansvm_8144b4d4 code matching; 179218d7 improve vmblobunpack code matching; d125aec2 improve vmblobunpack code matching; 051a713b read unpacked integers through their typed value.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,306 @@
===== gate-initial.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 56/140 functions 1/7 fuzzy 98.6154 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] instruction-exact functions: 1/7
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] section .text size 5200 match 98.61539
[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.89238
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] baseline: code 332/5200 data 56 functions 1 fuzzy 98.6154
[libs/RVLMiddleware/eZiText/src/clib/zprepare] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zprepare] objdiff: code None/3760 data 8/68 functions 0/1 fuzzy 96.0979 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .text size 3760 match 96.09787
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extab size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extabindex size 12 match 91.66667
[libs/RVLMiddleware/eZiText/src/clib/zprepare] below 100: Zi8PrepareMatch 96.09787
[libs/RVLMiddleware/eZiText/src/clib/zprepare] baseline: code None/3760 data 8 functions 0 fuzzy 96.0979
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 3720/8256 data 608/728 functions 7/10 fuzzy 99.0354 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 7/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.03537
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 99.166664
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8MatchPhonetic 97.2011
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.69777
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] objdiff: code 6360/6888 data 324/332 functions 15/17 fuzzy 99.9506 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] instruction-exact functions: 15/17
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .data size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .rodata size 16 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .sbss2 size 8 match 50.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .sdata2 size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .text size 6888 match 99.95064
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section extab size 88 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section extabindex size 132 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] below 100: Zi8GetDataSignature 99.347824
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] below 100: Zi8IsDupWChar 99.36508
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] baseline: code 6360/6888 data 324 functions 15 fuzzy 99.9506
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] objdiff: code 4356/4868 data 120/120 functions 5/6 fuzzy 99.9754 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] instruction-exact functions: 5/6
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] section .text size 4868 match 99.97535
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] section extab size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] section extabindex size 72 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] below 100: Zi8MatchROMdata1 99.765625
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] baseline: code 4356/4868 data 120 functions 5 fuzzy 99.9754
[libs/RVLMiddleware/eZiText/src/clib/zikorean] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zikorean] objdiff: code 5188/5188 data 60/348 functions 3/3 fuzzy 100.0000 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] instruction-exact functions: 3/3
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section .data size 288 match None
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section .text size 5188 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section extab size 24 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section extabindex size 36 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] baseline: code 5188/5188 data 60 functions 3 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15438
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.43501
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-py-entry.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 3720/8256 data 608/728 functions 7/10 fuzzy 99.0378 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 7/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.03779
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 99.166664
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8MatchPhonetic 97.2011
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15438
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.43501
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-ko-cursor.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 56/140 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 .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 56 functions 1 fuzzy 98.6154
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15447
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.43501
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-prepare-pointer.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zprepare] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zprepare] objdiff: code None/3760 data 8/68 functions 0/1 fuzzy 96.3191 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .text size 3760 match 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extab size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extabindex size 12 match 91.66667
[libs/RVLMiddleware/eZiText/src/clib/zprepare] below 100: Zi8PrepareMatch 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] baseline: code None/3760 data 8 functions 0 fuzzy 96.0979
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15474
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.43501
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-match-group.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 3720/8256 data 608/728 functions 7/10 fuzzy 99.0451 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 7/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.04506
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 99.166664
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8MatchPhonetic 97.242424
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15474
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.43501
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-match-dictionary.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 3720/8256 data 728/728 functions 7/10 fuzzy 99.3934 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 7/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.39341
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8MatchPhonetic 99.22314
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15570
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.44156
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-match-offset.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 3720/8256 data 728/728 functions 7/10 fuzzy 99.4283 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 7/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.42829
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8MatchPhonetic 99.421486
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.92520
global fuzzy_match_percent: 98.15438 -> 98.15581
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.44156
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-match-exact.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 5172/8256 data 728/728 functions 8/10 fuzzy 99.5300 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 8/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.53004
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.97369
global fuzzy_match_percent: 98.15438 -> 98.15609
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.44156
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
===== gate-full.log =====
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zkokeyp] objdiff: code 332/5200 data 56/140 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 .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 56 functions 1 fuzzy 98.6154
[libs/RVLMiddleware/eZiText/src/clib/zprepare] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zprepare] objdiff: code None/3760 data 8/68 functions 0/1 fuzzy 96.3191 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .text size 3760 match 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extab size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extabindex size 12 match 91.66667
[libs/RVLMiddleware/eZiText/src/clib/zprepare] below 100: Zi8PrepareMatch 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] baseline: code None/3760 data 8 functions 0 fuzzy 96.0979
[libs/RVLMiddleware/eZiText/src/clib/zi8match] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8match] objdiff: code 5172/8256 data 728/728 functions 8/10 fuzzy 99.5300 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] instruction-exact functions: 8/10
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .rodata size 528 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section .text size 8256 match 99.53004
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extab size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] section extabindex size 120 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyPhonetic 98.704735
[libs/RVLMiddleware/eZiText/src/clib/zi8match] below 100: Zi8GetPyFinal 99.245285
[libs/RVLMiddleware/eZiText/src/clib/zi8match] baseline: code 3720/8256 data 608 functions 7 fuzzy 99.0354
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] objdiff: code 6360/6888 data 324/332 functions 15/17 fuzzy 99.9506 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] instruction-exact functions: 15/17
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .data size 80 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .rodata size 16 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .sbss2 size 8 match 50.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .sdata2 size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section .text size 6888 match 99.95064
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section extab size 88 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] section extabindex size 132 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] below 100: Zi8GetDataSignature 99.347824
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] below 100: Zi8IsDupWChar 99.36508
[libs/RVLMiddleware/eZiText/src/clib/zi8getc2] baseline: code 6360/6888 data 324 functions 15 fuzzy 99.9506
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] objdiff: code 4356/4868 data 120/120 functions 5/6 fuzzy 99.9754 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] instruction-exact functions: 5/6
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] section .text size 4868 match 99.97535
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] section extab size 48 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] section extabindex size 72 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] below 100: Zi8MatchROMdata1 99.765625
[libs/RVLMiddleware/eZiText/src/clib/zi8dawg] baseline: code 4356/4868 data 120 functions 5 fuzzy 99.9754
[libs/RVLMiddleware/eZiText/src/clib/zikorean] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zikorean] objdiff: code 5188/5188 data 60/348 functions 3/3 fuzzy 100.0000 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] instruction-exact functions: 3/3
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section .data size 288 match None
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section .text size 5188 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section extab size 24 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] section extabindex size 36 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zikorean] baseline: code 5188/5188 data 60 functions 3 fuzzy 100.0000
regressions vs baseline: 0
global matched_code_percent: 84.92520 -> 84.97369
global fuzzy_match_percent: 98.15438 -> 98.15609
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43501 -> 90.44156
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,201 @@
# FA driver attempts
Baseline pools identical for all four units. Each trial builds only its owned object. Failed experiments are restored.
- pfd_get_media_drv_char: output pointer unchanged. 67/70 instructions; 57 differing positions.
- pfd_get_media_drv_char: volume index in for increment. 69/70 instructions; 46 differing positions.
- pfd_get_media_drv_char: signed volume index and partition initialized first. 69/70 instructions; 44 differing positions.
- pfd_get_media_drv_char: separate pointer advance after volume loop body. 69/70 instructions; 46 differing positions.
- pfd_get_media_drv_char: use loop bound on indexed volume address. 69/70 instructions; 46 differing positions.
- fa_nanddrv_physical_write: find disk using existing inline accessor. 176/175 instructions; 161 differing positions.
- fa_nanddrv_physical_write: compute file size before byte count. 175/175 instructions; 38 differing positions.
- fa_nanddrv_physical_write: compute wanted byte offset before byte count. 175/175 instructions; 38 differing positions.
- fa_nanddrv_physical_write: declare disk record before size variables. 175/175 instructions; 21 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 1. 175/175 instructions; 21 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 2. 175/175 instructions; 41 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 3. 175/175 instructions; 27 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 4. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 5. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 6. 175/175 instructions; 39 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 7. 175/175 instructions; 23 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 8. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 9. 175/175 instructions; 31 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 10. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 11. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 12. 175/175 instructions; 35 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 13. 175/175 instructions; 27 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 14. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 15. 175/175 instructions; 30 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 16. 175/175 instructions; 41 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 17. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 18. 175/175 instructions; 38 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 19. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 20. 175/175 instructions; 39 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 21. 175/175 instructions; 41 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 22. 175/175 instructions; 34 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 23. 175/175 instructions; 42 differing positions.
- fa_nanddrv_physical_write: record and byte-count declaration order 24. 175/175 instructions; 38 differing positions.
- fa_nanddrv_physical_write: record declared after scratch buffer. 175/175 instructions; 0 differing positions.
- fa_nanddrv_ParseCreateNANDFile: directory success branch contains buffer reset. 130/130 instructions; 11 differing positions.
- fa_nanddrv_ParseCreateNANDFile: explicit failure and success arms. 130/130 instructions; 10 differing positions.
- fa_nanddrv_ParseCreateNANDFile: explicit failure arm and break after success arm. 130/130 instructions; 10 differing positions.
- fa_nanddrv_NotifyNANDFile: declare record after index. 72/72 instructions; 6 differing positions.
- fa_nanddrv_NotifyNANDFile: use record field for empty disk and size store. 72/72 instructions; 15 differing positions.
- fa_nanddrv_NotifyNANDFile: record indexed before loop body rather than saved local. 72/72 instructions; 0 differing positions.
NAND full gate: PASS, instruction exact 15 -> 17/18, code 5444 -> 6432/6952, data 5696/5696, zero regressions, correct DOL SHA1. Notify uses direct indexed fields; physical_write uses source declaration ordering.
- pfd_sddrv_store_fat32_bpb_buf: constant field offsets use word index quotient plus remainder. 374/370 instructions; 354 differing positions.
- pfd_sddrv_store_fat32_bpb_buf: validate both pointers and write signature bytes. 370/370 instructions; 8 differing positions.
- pfd_sddrv_store_fat32_bpb_buf: declare table pointer after requested sector count. 370/370 instructions; 0 differing positions.
- pfd_sddrv_store_bpb_buf: word-index endian macro instead of direct unaligned pointer. 327/327 instructions; 8 differing positions.
- pfd_sddrv_store_bpb_buf: initialize table before requested count. 327/327 instructions; 8 differing positions.
- pfd_sddrv_store_bpb_buf: table pointer declared after sector count. 327/327 instructions; 0 differing positions.
SD BPB full gate: PASS, exact 10 -> 12/26, code 2100 -> 4888/11752, zero regressions. Target endian stores use word-index quotient plus remainder: BPB serial byte offset 39 stores at word offset 48, FAT32 serial 67 stores at 76, MBR first sector 454 stores at 460. Field offsets come from offsetof, with no pinned addresses.
- pfd_sddrv_build_fat32_mbr_bpb: cast reserved buffer null comparison to integer. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: use struct pointer for reserved buffer helper. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: reserved sector builder has unconditional success as target inline path. 216/222 instructions; 100 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: reserved sector helper wraps success in positive pointer branch. 230/222 instructions; 122 differing positions.
- pfd_sddrv_store_fat32_mbr_buf: validate buffers and preserve signature bytes and table register. 204/207 instructions; 147 differing positions.
- pfd_sddrv_store_fat32_mbr_buf: saturated CHS branches first and total count bound before decrement. 207/207 instructions; 15 differing positions.
- pfd_sddrv_store_fat32_mbr_buf: declare end CHS before start CHS in sector head order. 207/207 instructions; 23 differing positions.
- pfd_sddrv_store_fat32_mbr_buf: partition type then start and end CHS declarations. 207/207 instructions; 0 differing positions.
- pfd_sddrv_store_mbr_buf: word-index stores and table pointer declaration follows request. 202/202 instructions; 36 differing positions.
- pfd_sddrv_store_mbr_buf: declare CHS values in target allocation order. 202/202 instructions; 20 differing positions.
- pfd_sddrv_store_mbr_buf: compute end cylinder before start cylinder. 202/202 instructions; 20 differing positions.
- pfd_sddrv_calc_mbr_bpb: recompute fixed sectors after convergence and order table locals. 171/173 instructions; 81 differing positions.
- pfd_sddrv_calc_mbr_bpb: DOS date and time low bits before high bits. 171/173 instructions; 81 differing positions.
- pfd_sddrv_calc_mbr_bpb: cluster size local before FAT arithmetic locals. 171/173 instructions; 76 differing positions.
- pfd_get_media_drv_char: count and output pointer before partition; index before volume. 69/70 instructions; 22 differing positions.
- pfd_get_media_drv_char: volume counter advance at loop tail. 69/70 instructions; 31 differing positions.
- pfd_get_media_drv_char: do while volume traversal. 58/70 instructions; 58 differing positions.
- pfd_get_media_drv_char: while volume traversal with post increment condition. 69/70 instructions; 32 differing positions.
- pfd_sddrv_init: SDK integer pointer tests and insertion status truth tests. 143/144 instructions; 138 differing positions.
- pfd_sddrv_init: state access through local struct pointer. 138/144 instructions; 141 differing positions.
- pfd_sddrv_init: initialize state pointer after local declarations. 138/144 instructions; 141 differing positions.
- pfd_sddrv_init: initialized device null comparison and explicit wrong-disk return first. 145/144 instructions; 135 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: reread format total at output and table pointer follows request. 133/133 instructions; 33 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: 16-bit DOS date and time with low fields first. 133/133 instructions; 33 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: cluster size declared ahead of cluster and FAT arithmetic. 133/133 instructions; 31 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: declare arithmetic locals in cluster size FAT count available FAT size order. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: snapshot calendar fields before composing DOS date and time. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: compose low-bit-first time before date and add time first. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: 32-bit intermediates for calendar serial. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: time declared before date. 133/133 instructions; 15 differing positions.
- pfd_sddrv_physical_read: sector parameter used directly on aligned path. 127/127 instructions; 2 differing positions.
- pfd_sddrv_physical_read: sector local initialized at declaration. 127/127 instructions; 22 differing positions.
- pfd_sddrv_physical_read: sector copy only initialized for unaligned loop. 127/127 instructions; 43 differing positions.
- pfd_sddrv_physical_write: sector parameter used directly on aligned path. 127/127 instructions; 2 differing positions.
- pfd_sddrv_physical_write: sector local initialized at declaration. 127/127 instructions; 22 differing positions.
- pfd_sddrv_physical_write: sector copy only initialized for unaligned loop. 127/127 instructions; 43 differing positions.
- pfd_sddrv_get_disk_info: split disk and geometry pointer validation. 100/96 instructions; 90 differing positions.
- pfd_sddrv_get_disk_info: read driver state through local pointer. 98/96 instructions; 21 differing positions.
- pfd_sddrv_get_disk_info: clear geometry fields through ordinary local aliases. 98/96 instructions; 2 differing positions.
- pfd_sddrv_get_total_sectors: reuse card capacity after multiplying by block count. 80/80 instructions; 14 differing positions.
- pfd_sddrv_get_total_sectors: clamp and subtract in sector multiplier itself. 77/80 instructions; 46 differing positions.
- pfd_sddrv_get_total_sectors: declare final multiplier before block size. 77/80 instructions; 46 differing positions.
- pfd_st_inter_callback: integer pointer and function pointer presence checks. 65/69 instructions; 55 differing positions.
- pfd_st_inter_callback: read state through struct pointer initialized locally. 64/69 instructions; 43 differing positions.
- pfd_st_inter_callback: inline media drive discovery directly in callback. 65/69 instructions; 55 differing positions.
- pfd_st_removal_callback: integer pointer and function pointer presence checks. 62/66 instructions; 53 differing positions.
- pfd_st_removal_callback: read state through struct pointer initialized locally. 63/66 instructions; 40 differing positions.
- pfd_st_removal_callback: inline media drive discovery directly in callback. 62/66 instructions; 53 differing positions.
- pfd_sddrv_finalize: mounted bit truth check and ordinary direct clear. 57/57 instructions; 42 differing positions.
- pfd_sddrv_finalize: state access through struct pointer. 54/57 instructions; 54 differing positions.
- pfd_sddrv_finalize: clear insertion and ejection separately after device cleanup. 58/57 instructions; 19 differing positions.
- pfd_sddrv_unmount: clear mounted bit directly at use. 12/13 instructions; 9 differing positions.
- pfd_sddrv_unmount: state access through struct pointer. 13/13 instructions; 10 differing positions.
- pfd_sddrv_unmount: subtract mounted bit when known set. 12/13 instructions; 9 differing positions.
- fa_nanddrv_ParseCreateNANDFile: advance parser after accepted directory-change branch rather than inside it. 130/130 instructions; 0 differing positions.
NAND parser full gate: PASS, exact 18/18, code 6952/6952, data 5696/5696, zero regressions, correct DOL SHA1. All NAND functions are now 100.0 percent objdiff and instruction exact.
- pfd_sddrv_get_total_sectors: cluster count declared before encoded card size. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: calculate cluster count directly from register bits. 80/80 instructions; 19 differing positions.
- pfd_sddrv_get_total_sectors: declare card size in block scope before computing count. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: factor sector shift clamping into an inline accessor. 80/80 instructions; 10 differing positions.
## Final open functions
- pfd_get_media_drv_char: 96.34286%; one missing unrolled-loop induction increment and register allocation; 9 logged attempts.
- pfd_st_inter_callback: 93.840576%; four missing global-field reloads around inline access and callback dispatch; 3 logged attempts.
- pfd_st_removal_callback: 90.30303%; four missing global-field reloads around inline access and callback dispatch; 3 logged attempts.
- pfd_sddrv_init: 90.27778%; global reloads, pointer-comparison lowering, initialization store scheduling; 4 logged attempts.
- pfd_sddrv_unmount: 90.0%; compiler reuses flags after the condition; target reloads the same field; 3 logged attempts.
- pfd_sddrv_finalize: 92.89474%; flag reload and final state-clear scheduling; 3 logged attempts.
- pfd_sddrv_get_disk_info: 97.916664%; target symbol size omits the final stack restore and blr; first 96 instructions match; 3 logged attempts.
- pfd_sddrv_physical_read: 99.92126%; two moves use incoming r5 instead of saved sector r28; 3 logged attempts.
- pfd_sddrv_physical_write: 99.92126%; two moves use incoming r5 instead of saved sector r28; 3 logged attempts.
- pfd_sddrv_get_total_sectors: 96.9875%; capacity and clamp-register allocation plus constant-load scheduling; 7 logged attempts.
- pfd_sddrv_calc_mbr_bpb: 92.699425%; fixed-sector recomputation, calendar-expression scheduling, register allocation; 3 logged attempts.
- pfd_sddrv_store_mbr_buf: 95.17326%; CHS arithmetic scheduling and register allocation; 3 logged attempts.
- pfd_sddrv_calc_fat32_mbr_bpb: 89.947365%; format-total reload and arithmetic/calendar register allocation; 8 logged attempts.
- pfd_sddrv_build_fat32_mbr_bpb: 94.75225%; reserved-sector helper null/error branch and argument scheduling; 4 logged attempts.
## Before -> after
- pfd_cmn: instruction exact 0 -> 0/1; fuzzy 96.3429 -> 96.3429; code 0 -> 0/280; data 0 -> 0.
- nand_drv: instruction exact 15 -> 18/18; fuzzy 99.7353 -> 100.0000; code 5444 -> 6952/6952; data 5696 -> 5696/5696.
- msc_drv: instruction exact 2 -> 2/2; fuzzy 100.0000 -> 100.0000; code 20 -> 20/20; data 8 -> 8/8.
- sd_drv: instruction exact 10 -> 13/26; fuzzy 95.2730 -> 97.2087; code 2100 -> 5716/11752; data 408 -> 408/3592.
Only NAND and SD source changes remain. All unsuccessful experiments were restored. No other translation unit changed output. Matching siblings in vf/develop were inspected; their per-device storage and VF adapters differ from these FA global drivers.
Uncertainty: get_disk_info has a target symbol size of 0x180 while its successor starts 0x188 later. The intervening target bytes restore r1 and return; no symbol/config edits were made. The SD BSS symbol-size and data-tail alignment differences remain open; no padding was added.
## Final full gate over all four units
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/pfd_cmn] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/pfd_cmn] objdiff: code None/280 data None/None functions 0/1 fuzzy 96.3429 linked code 0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/driver/pfd_cmn] section .text size 280 match 96.34286
[libs/RVL_SDK/src/fa/driver/pfd_cmn] below 100: pfd_get_media_drv_char 96.34286
[libs/RVL_SDK/src/fa/driver/pfd_cmn] baseline: code None/280 data None functions 0 fuzzy 96.3429
[libs/RVL_SDK/src/fa/driver/nand_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/nand_drv] objdiff: code 6952/6952 data 5696/5696 functions 18/18 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/nand_drv] instruction-exact functions: 18/18
[libs/RVL_SDK/src/fa/driver/nand_drv] section .bss size 5624 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .rodata size 32 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sbss size 32 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .text size 6952 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] baseline: code 5444/6952 data 5696 functions 15 fuzzy 99.7353
[libs/RVL_SDK/src/fa/driver/msc_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/msc_drv] objdiff: code 20/20 data 8/8 functions 2/2 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/msc_drv] instruction-exact functions: 2/2
[libs/RVL_SDK/src/fa/driver/msc_drv] section .sbss size 8 match 100.0
[libs/RVL_SDK/src/fa/driver/msc_drv] section .text size 20 match 100.0
[libs/RVL_SDK/src/fa/driver/msc_drv] baseline: code 20/20 data 8 functions 2 fuzzy 100.0000
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 5716/11752 data 408/3592 functions 13/26 fuzzy 97.2087 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 13/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 97.20865
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_calc_mbr_bpb 92.699425
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.17326
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_calc_fat32_mbr_bpb 89.947365
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 2100/11752 data 408 functions 10 fuzzy 95.2730
regressions vs baseline: 0
global matched_code_percent: 85.42374 -> 85.59482
global fuzzy_match_percent: 98.51842 -> 98.52665
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.78073 -> 90.78073
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,270 @@
# FA driver continuation attempts
Baseline pools identical for all four units. Each trial builds only its owned object. Failed experiments are restored.
- pfd_sddrv_physical_read: advance sector argument directly in fallback loop. 127/127 instructions; 40 differing positions.
- pfd_sddrv_physical_read: scope fallback sector and iteration variables to unaligned branch. 127/127 instructions; 43 differing positions.
- pfd_sddrv_physical_read: inline block transfer accessor reads sector by address. 127/127 instructions; 2 differing positions.
- pfd_sddrv_physical_write: advance sector argument directly in fallback loop. 127/127 instructions; 40 differing positions.
- pfd_sddrv_physical_write: scope fallback sector and iteration variables to unaligned branch. 127/127 instructions; 43 differing positions.
- pfd_sddrv_physical_write: inline block transfer accessor reads sector by address. 127/127 instructions; 2 differing positions.
- pfd_sddrv_get_disk_info: combine mutually exclusive geometry zero assignments. 98/96 instructions; 4 differing positions.
- pfd_sddrv_get_disk_info: check memory type with one mask. 96/96 instructions; 45 differing positions.
- pfd_sddrv_get_disk_info: give successful geometry status a common return variable. 98/96 instructions; 11 differing positions.
- pfd_sddrv_get_total_sectors: keep the two clamped exponents in nested expression. 82/80 instructions; 38 differing positions.
- pfd_sddrv_get_total_sectors: write capacity first and multiply through output field after clamp. 83/80 instructions; 44 differing positions.
- pfd_sddrv_get_total_sectors: compute block count after exponent clamp. 80/80 instructions; 23 differing positions.
- pfd_sddrv_get_total_sectors: use unsigned long unit for final sector multiplier. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: use unsigned unit for both CSD shifts. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: give first shift unsigned long width. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: give clamped exponent signed 16-bit representation. 80/80 instructions; 12 differing positions.
- pfd_sddrv_store_mbr_buf: snapshot start and end sector values for CHS calculation. 202/202 instructions; 30 differing positions.
- pfd_sddrv_store_mbr_buf: separate cylinder quotient and remainder before narrowing CHS fields. 202/202 instructions; 30 differing positions.
- pfd_sddrv_store_mbr_buf: complete end CHS before start CHS. 202/202 instructions; 24 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: declare reserved boot sector helper inline. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: direct struct signature writes without a cached boot pointer. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: local partition start snapshot before writing BPB. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: translate inline reserved-sector construction in caller. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: pass first array element explicitly to reserved-sector builder. 230/222 instructions; 122 differing positions.
- pfd_sddrv_build_fat32_mbr_bpb: use one common return from reserved-sector builder. 230/222 instructions; 122 differing positions.
- pfd_st_inter_callback: read device disk and drive through small inline accessors. 65/69 instructions; 55 differing positions.
- pfd_st_inter_callback: test through const state pointer and read globals at calls. 71/69 instructions; 65 differing positions.
- pfd_st_inter_callback: snapshot device and drive for each callback dispatch. 65/69 instructions; 55 differing positions.
- pfd_st_removal_callback: read device disk and drive through small inline accessors. 62/66 instructions; 53 differing positions.
- pfd_st_removal_callback: test through const state pointer and read globals at calls. 68/66 instructions; 62 differing positions.
- pfd_st_removal_callback: snapshot device and drive for each callback dispatch. 62/66 instructions; 53 differing positions.
- pfd_sddrv_finalize: translate target cleanup: preserve ejected state and test mounted flag as truth. 56/57 instructions; 50 differing positions.
- pfd_sddrv_finalize: clear initialized flag through local state pointer. 56/57 instructions; 50 differing positions.
- pfd_sddrv_finalize: group final state stores through state pointer. 56/57 instructions; 50 differing positions.
- pfd_sddrv_unmount: test mounted state through inline flag accessor. 12/13 instructions; 9 differing positions.
- pfd_sddrv_unmount: alias flags through named struct field pointer. 14/13 instructions; 13 differing positions.
- pfd_sddrv_unmount: test through const state pointer and clear global field directly. 14/13 instructions; 13 differing positions.
- pfd_sddrv_init: retranslate unsigned null and inserted truth tests. 143/144 instructions; 138 differing positions.
- pfd_sddrv_init: return initial-disk errors through a shared result. 141/144 instructions; 141 differing positions.
- pfd_sddrv_init: read initialized device from driver state for intr registration. 143/144 instructions; 138 differing positions.
- pfd_st_inter_callback: define driver state after functions using ordinary extern declarations. 65/69 instructions; 55 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: translate arithmetic locals and date before time low-bit fields. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: pack DOS fields through small calendar accessors. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: represent serial as date and time bit fields. 132/133 instructions; 37 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: interleave date and time field composition. 135/133 instructions; 28 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: declare DOS date and time as 16 bit encoded values. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: keep date as a signed 16-bit DOS value. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: shift date and accumulate into time. 133/133 instructions; 15 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: assemble date around the month and year fields. 133/133 instructions; 14 differing positions.
- pfd_sddrv_calc_mbr_bpb: derive converged data region from stored FAT field. 173/173 instructions; 44 differing positions.
- pfd_sddrv_calc_mbr_bpb: snapshot final partition capacity before field stores. 169/173 instructions; 77 differing positions.
- pfd_sddrv_calc_mbr_bpb: read cluster count and remainder directly from format fields. 171/173 instructions; 81 differing positions.
- pfd_get_media_drv_char: put both volume inductions in for increment with count pointer partition declaration order. 69/70 instructions; 31 differing positions.
- pfd_get_media_drv_char: initialize volume pointer alongside index and advance both at loop tail. 69/70 instructions; 31 differing positions.
- pfd_get_media_drv_char: use explicit next-partition exit from bounded volume scan. 69/70 instructions; 22 differing positions.
- pfd_get_media_drv_char: skip unmatched volumes with continue and advance both loop variables. 69/70 instructions; 31 differing positions.
- pfd_get_media_drv_char: bounded volume index is a 16-bit value. 70/70 instructions; 21 differing positions.
- pfd_get_media_drv_char: bound indexed volumes without caching an advancing pointer. 69/70 instructions; 36 differing positions.
- pfd_get_media_drv_char: advance 16-bit volume index in for increment. 70/70 instructions; 0 differing positions.
- pfd_get_media_drv_char: advance 16-bit volume index after conditional match. 70/70 instructions; 0 differing positions.
- pfd_get_media_drv_char: advance volume pointer before 16-bit index at loop tail. 70/70 instructions; 0 differing positions.
## pfd_cmn full gate
The 16-bit volume index keeps both increments in the compiler-unrolled loop. Declaring count, output pointer, partition, index, and volume in that order also matches allocation. All 70 instructions match; no data sections exist. pool_diff.py cannot read this object without .data; gate reports IDENTICAL.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/pfd_cmn] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/pfd_cmn] objdiff: code 280/280 data None/None functions 1/1 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] instruction-exact functions: 1/1
[libs/RVL_SDK/src/fa/driver/pfd_cmn] section .text size 280 match 100.0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] baseline: code None/280 data None functions 0 fuzzy 96.3429
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.60416
global fuzzy_match_percent: 98.54022 -> 98.54056
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
- pfd_sddrv_calc_fat32_mbr_bpb: pass calendar fields to serial encoder. 133/133 instructions; 0 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: encode fields with 16-bit intermediates. 133/133 instructions; 0 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: declare time before date in serial encoder. 133/133 instructions; 0 differing positions.
- pfd_sddrv_calc_fat32_mbr_bpb: encode unsigned calendar components. 133/133 instructions; 0 differing positions.
- pfd_sddrv_calc_mbr_bpb: shared serial encoder with converged FAT field access. 173/173 instructions; 29 differing positions.
- pfd_sddrv_calc_mbr_bpb: arithmetic locals in cluster start reserve total FAT bits fixed partition order. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: move current start before cluster size. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: declare current start last. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: reverse arithmetic local order. 173/173 instructions; 27 differing positions.
- pfd_sddrv_calc_mbr_bpb: partition and fixed region before FAT calculation. 173/173 instructions; 34 differing positions.
- pfd_sddrv_calc_mbr_bpb: retain cluster size as 32-bit arithmetic operand. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: use signed current start for positive partition calculation. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: reuse reserved-sector multiple without a separate current start. 170/173 instructions; 104 differing positions.
- pfd_sddrv_calc_mbr_bpb: declare current start at its first loop use. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: cluster size first among all locals. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: cluster size declared next to calculated cluster count. 173/173 instructions; 34 differing positions.
- pfd_sddrv_calc_mbr_bpb: cluster size declared after reserved count. 173/173 instructions; 34 differing positions.
- pfd_sddrv_calc_mbr_bpb: declare reserved multiple before the loop counters. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: declare cluster count before the geometry arithmetic. 173/173 instructions; 9 differing positions.
- pfd_sddrv_calc_mbr_bpb: declare initial reservation count before cluster size. 173/173 instructions; 9 differing positions.
## SD serial encoder full gate
A shared inline serial encoder accepts the six calendar fields, preserving the SDK date/year and raw-second encoding. FAT32 calculation now matches all 133 instructions. FAT12/16 reads the converged FAT field and matches 173 instructions with nine remaining register differences.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 6248/11752 data 408/3592 functions 14/26 fuzzy 98.0766 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 14/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 98.076584
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_calc_mbr_bpb 99.71098
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.17326
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.62193
global fuzzy_match_percent: 98.54022 -> 98.54395
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
- pfd_sddrv_calc_mbr_bpb: read cluster size from settings at every arithmetic use. 174/173 instructions; 118 differing positions.
- pfd_sddrv_calc_mbr_bpb: read cluster size from format field at every arithmetic use. 173/173 instructions; 0 differing positions.
- pfd_sddrv_calc_mbr_bpb: read total sectors from format field in cluster iteration. 173/173 instructions; 17 differing positions.
- pfd_sddrv_calc_mbr_bpb: compute first reserved multiple with a separate initial cursor. 173/173 instructions; 0 differing positions.
- pfd_sddrv_calc_mbr_bpb: compute selected partition start directly from reserved count. 173/173 instructions; 14 differing positions.
## SD FAT12/16 calculation full gate
Reading cluster size through the format field at each arithmetic use matches the remaining nine register differences. All 173 instructions now match; FAT32 retains 133/133 with zero differences. Removed the caller calendar intermediates that the new helper replaced.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 6940/11752 data 408/3592 functions 15/26 fuzzy 98.0936 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 15/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 98.0936
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.17326
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.64503
global fuzzy_match_percent: 98.54022 -> 98.54402
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
- pfd_sddrv_store_mbr_buf: use shared CHS calculator for start and end geometry. 202/202 instructions; 26 differing positions.
- pfd_sddrv_store_mbr_buf: calculate ending CHS before starting CHS through helper. 202/202 instructions; 25 differing positions.
- pfd_sddrv_store_mbr_buf: compute cylinder and head together before track sector. 202/202 instructions; 23 differing positions.
- pfd_sddrv_get_total_sectors: decode standard CSD capacity through scalar field accessor. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: declare block count before encoded size in scalar decoder. 80/80 instructions; 10 differing positions.
- pfd_sddrv_get_total_sectors: decode multiplier fields before computing capacity product. 80/80 instructions; 23 differing positions.
- pfd_sddrv_finalize: clear only insertion state as in target epilogue. 57/57 instructions; 11 differing positions.
- pfd_sddrv_finalize: scope initialized-flag update with media reset pointer. 57/57 instructions; 11 differing positions.
- pfd_sddrv_finalize: clear insertion state before initialized flag. 57/57 instructions; 16 differing positions.
- pfd_sddrv_store_mbr_buf: use canonical start and end CHS declaration order. 202/202 instructions; 20 differing positions.
- pfd_sddrv_finalize: validate target insertion-only reset against objdiff. 57/57 instructions; 11 differing positions.
- pfd_sddrv_store_mbr_buf: calculate head sector cylinder in partition byte order. 202/202 instructions; 18 differing positions.
- pfd_sddrv_store_mbr_buf: translate end geometry before start with head-first helper. 202/202 instructions; 23 differing positions.
- pfd_sddrv_store_mbr_buf: partition helper computes cylinders before heads and sectors. 202/202 instructions; 23 differing positions.
## Data inspection
The original and source .data bytes agree at every shared position, and all 46 pooled strings retain their offsets and token order. The source ends at 2574 bytes; the extracted target has two more zero bytes at 2576. An isolated compile using the compiler's ordinary `-str reuse,pool` option produced 2492 bytes and changed string offsets, so that option was rejected; configure.py is unchanged. No literal terminators, named string buffers, or placement attributes were added.
The BSS is 608 zero bytes in both objects. The source state record symbol is 28 bytes; the extracted target assigns it 32 bytes up to the next record at offset 32. Device storage and transfer buffer retain offsets 32 and 96 and sizes 64 and 512. The source .sbss has twelve bytes of actual globals; the extracted section is forty bytes, with the event at offset 32. Gate normalizes .sbss as 100%. The function table and fourteen-entry size table in .rodata remain 100%. Extra record members or alignment added just to reproduce extracted padding would not be justified by the available source evidence, so none were added.
## Restored experiments
The target finalizer resets inserted state without resetting ejected state. The insertion-only experiment matched instruction count but fell to 88.42105% from 92.89474%, so it was restored. Its flag load and bit comparison still differ. Physical transfers still differ only in two argument moves after three new source forms. The disk-info target symbol still omits stack restoration and return, while its first 96 instructions match. No symbol/config boundaries were changed.
All eleven remaining SD functions have at least three new distinct source-level attempts in this continuation. The table and CHS declaration order improvement is retained; speculative helpers are restored.
## Final full gate over all four units
CHS declaration order raises store_mbr_buf from 95.17326% to 95.84158%; its 202 instructions still have twenty scheduling/allocation differences.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/pfd_cmn] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/pfd_cmn] objdiff: code 280/280 data None/None functions 1/1 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] instruction-exact functions: 1/1
[libs/RVL_SDK/src/fa/driver/pfd_cmn] section .text size 280 match 100.0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] baseline: code None/280 data None functions 0 fuzzy 96.3429
[libs/RVL_SDK/src/fa/driver/nand_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/nand_drv] objdiff: code 6952/6952 data 5696/5696 functions 18/18 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/nand_drv] instruction-exact functions: 18/18
[libs/RVL_SDK/src/fa/driver/nand_drv] section .bss size 5624 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .rodata size 32 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sbss size 32 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .text size 6952 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] baseline: code 6952/6952 data 5696 functions 18 fuzzy 100.0000
[libs/RVL_SDK/src/fa/driver/msc_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/msc_drv] objdiff: code 20/20 data 8/8 functions 2/2 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/msc_drv] instruction-exact functions: 2/2
[libs/RVL_SDK/src/fa/driver/msc_drv] section .sbss size 8 match 100.0
[libs/RVL_SDK/src/fa/driver/msc_drv] section .text size 20 match 100.0
[libs/RVL_SDK/src/fa/driver/msc_drv] baseline: code 20/20 data 8 functions 2 fuzzy 100.0000
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 6940/11752 data 408/3592 functions 15/26 fuzzy 98.1395 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 15/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 98.13955
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.84158
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.64503
global fuzzy_match_percent: 98.54022 -> 98.54421
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
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,227 @@
# FA driver continuation report
pfd_cmn: exact 0 -> 1/1; fuzzy 96.3429 -> 100.0000; matched code 0 -> 280/280; matched data 0 -> 0.
nand_drv: exact 18 -> 18/18; fuzzy 100.0000 -> 100.0000; matched code 6952 -> 6952/6952; matched data 5696 -> 5696/5696.
msc_drv: exact 2 -> 2/2; fuzzy 100.0000 -> 100.0000; matched code 20 -> 20/20; matched data 8 -> 8/8.
sd_drv: exact 13 -> 15/26; fuzzy 97.2087 -> 98.1395; matched code 5716 -> 6940/11752; matched data 408 -> 408/3592.
## Remaining functions
pfd_st_inter_callback: 93.840576%; four global-field reloads are coalesced by the compiler; 4 new logged attempts.
pfd_st_removal_callback: 90.30303%; four global-field reloads are coalesced by the compiler; 3 new logged attempts.
pfd_sddrv_init: 90.27778%; global reloads, null comparison lowering, and state-store scheduling; 3 new logged attempts.
pfd_sddrv_unmount: 90.0%; flags are reused after the condition; target reads them again; 3 new logged attempts.
pfd_sddrv_finalize: 92.89474%; flag reload, mounted comparison, and final state-store scheduling; 7 new logged attempts.
pfd_sddrv_get_disk_info: 97.916664%; target symbol excludes two epilogue instructions; first 96 instructions match; 3 new logged attempts.
pfd_sddrv_physical_read: 99.92126%; two argument moves use incoming r5 instead of saved r28; 3 new logged attempts.
pfd_sddrv_physical_write: 99.92126%; two argument moves use incoming r5 instead of saved r28; 3 new logged attempts.
pfd_sddrv_get_total_sectors: 96.9875%; capacity and multiplier allocation plus constant-load scheduling; 10 new logged attempts.
pfd_sddrv_store_mbr_buf: 95.84158%; twenty CHS arithmetic scheduling/allocation differences; 10 new logged attempts.
pfd_sddrv_build_fat32_mbr_bpb: 94.75225%; reserved-sector null/error branches and one argument-load ordering; 230/222 instructions; 6 new logged attempts.
## Changes and source commits
libs/RVL_SDK/src/fa/driver/pfd_cmn.c: 70f61263 (bounded 16-bit volume index and loop/declaration order).
libs/RVL_SDK/src/fa/driver/sd_drv.c: a5f9eb19 (FAT32 geometry and scalar calendar encoder), 12e6be48 (direct format-field reads for FAT12/16), 4c9e0b18 (CHS declaration order).
tools/decomp-assist/fa-driver-continuation-attempts.md: per-function trials, measurements, restored experiments, data evidence, and gates.
tools/decomp-assist/fa-driver-continuation-report.md: this report and every gate block.
## Data and uncertainty
All 46 strings retain identical offsets and token order. Source .data is 2574 bytes; target is 2576 with two terminal zero bytes. Ordinary compiler string pooling was tested separately and rejected because it produced 2492 bytes with changed offsets. The BSS is 608 zero bytes in both objects, but the extracted state symbol is 32 bytes versus the source struct's 28. .rodata and normalized .sbss remain 100%. Source .sbss has twelve bytes of actual globals versus forty extracted bytes. No invented fields, padding, alignment, or placement changes were made. The original state layout and section-tail emission remain uncertain.
get_disk_info's target symbol is 0x180 bytes despite its next function starting 0x188 bytes later. The omitted bytes are stack restoration and blr. No symbol sizes were changed. An insertion-only finalize cleanup agreed with the observed target store but scored worse because its flag handling still differed, so that experiment was restored.
Three functions newly reach 100%: pfd_get_media_drv_char, pfd_sddrv_calc_mbr_bpb, pfd_sddrv_calc_fat32_mbr_bpb. Eleven SD functions and the data limitations remain open; every open function has at least three distinct new attempts. No Matching flags or shared headers changed. Final full gate reports zero regressions, zero forbidden patterns, and zero readability warnings.
## Every gate block
### Baseline (quick)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 5716/11752 data 408/3592 functions 13/26 fuzzy 97.2087 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 13/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 97.20865
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_calc_mbr_bpb 92.699425
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.17326
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_calc_fat32_mbr_bpb 89.947365
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
[libs/RVL_SDK/src/fa/driver/pfd_cmn] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/pfd_cmn] objdiff: code None/280 data None/None functions 0/1 fuzzy 96.3429 linked code 0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] instruction-exact functions: 0/1
[libs/RVL_SDK/src/fa/driver/pfd_cmn] section .text size 280 match 96.34286
[libs/RVL_SDK/src/fa/driver/pfd_cmn] below 100: pfd_get_media_drv_char 96.34286
[libs/RVL_SDK/src/fa/driver/pfd_cmn] baseline: code None/280 data None functions 0 fuzzy 96.3429
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.59482
global fuzzy_match_percent: 98.54022 -> 98.54022
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
### pfd_cmn (full)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/pfd_cmn] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/pfd_cmn] objdiff: code 280/280 data None/None functions 1/1 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] instruction-exact functions: 1/1
[libs/RVL_SDK/src/fa/driver/pfd_cmn] section .text size 280 match 100.0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] baseline: code None/280 data None functions 0 fuzzy 96.3429
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.60416
global fuzzy_match_percent: 98.54022 -> 98.54056
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
### SD serial encoder (full)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 6248/11752 data 408/3592 functions 14/26 fuzzy 98.0766 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 14/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 98.076584
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_calc_mbr_bpb 99.71098
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.17326
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.62193
global fuzzy_match_percent: 98.54022 -> 98.54395
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
### SD FAT12/16 geometry (full)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 6940/11752 data 408/3592 functions 15/26 fuzzy 98.0936 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 15/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 98.0936
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.17326
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.64503
global fuzzy_match_percent: 98.54022 -> 98.54402
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
### Final all four units (full)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVL_SDK/src/fa/driver/pfd_cmn] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/pfd_cmn] objdiff: code 280/280 data None/None functions 1/1 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] instruction-exact functions: 1/1
[libs/RVL_SDK/src/fa/driver/pfd_cmn] section .text size 280 match 100.0
[libs/RVL_SDK/src/fa/driver/pfd_cmn] baseline: code None/280 data None functions 0 fuzzy 96.3429
[libs/RVL_SDK/src/fa/driver/nand_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/nand_drv] objdiff: code 6952/6952 data 5696/5696 functions 18/18 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/nand_drv] instruction-exact functions: 18/18
[libs/RVL_SDK/src/fa/driver/nand_drv] section .bss size 5624 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .rodata size 32 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sbss size 32 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] section .text size 6952 match 100.0
[libs/RVL_SDK/src/fa/driver/nand_drv] baseline: code 6952/6952 data 5696 functions 18 fuzzy 100.0000
[libs/RVL_SDK/src/fa/driver/msc_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/msc_drv] objdiff: code 20/20 data 8/8 functions 2/2 fuzzy 100.0000 linked code 0
[libs/RVL_SDK/src/fa/driver/msc_drv] instruction-exact functions: 2/2
[libs/RVL_SDK/src/fa/driver/msc_drv] section .sbss size 8 match 100.0
[libs/RVL_SDK/src/fa/driver/msc_drv] section .text size 20 match 100.0
[libs/RVL_SDK/src/fa/driver/msc_drv] baseline: code 20/20 data 8 functions 2 fuzzy 100.0000
[libs/RVL_SDK/src/fa/driver/sd_drv] pool: IDENTICAL
[libs/RVL_SDK/src/fa/driver/sd_drv] objdiff: code 6940/11752 data 408/3592 functions 15/26 fuzzy 98.1395 linked code 0
[libs/RVL_SDK/src/fa/driver/sd_drv] instruction-exact functions: 15/26
[libs/RVL_SDK/src/fa/driver/sd_drv] section .bss size 608 match 97.36842
[libs/RVL_SDK/src/fa/driver/sd_drv] section .data size 2576 match 99.96117
[libs/RVL_SDK/src/fa/driver/sd_drv] section .rodata size 368 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .sbss size 40 match 100.0
[libs/RVL_SDK/src/fa/driver/sd_drv] section .text size 11760 match 98.13955
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_inter_callback 93.840576
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_st_removal_callback 90.30303
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_init 90.27778
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_unmount 90.0
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_finalize 92.89474
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_disk_info 97.916664
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_read 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_physical_write 99.92126
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_get_total_sectors 96.9875
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_store_mbr_buf 95.84158
[libs/RVL_SDK/src/fa/driver/sd_drv] below 100: pfd_sddrv_build_fat32_mbr_bpb 94.75225
[libs/RVL_SDK/src/fa/driver/sd_drv] baseline: code 5716/11752 data 408 functions 13 fuzzy 97.2087
regressions vs baseline: 0
global matched_code_percent: 85.59482 -> 85.64503
global fuzzy_match_percent: 98.54022 -> 98.54421
global complete_code_percent: 59.81479 -> 59.81479
global matched_data_percent: 90.85319 -> 90.85319
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -757,3 +757,656 @@ TMCJPEGDEC_IdctBlock_Col: 69.112335%; IDCT butterflies, sparse path and register
libs/RVLMiddleware/TMC_JPEG/src/b65/iqdec_b65_frv32
TMCJPEGDEC_decode_iquant: 87.576090%; AC Huffman loop scheduling and register allocation; 277/276 instructions.
## Planar converter block translation after 99cfa80f
Only Texture_MCUtoY8U8V8 is owned this round. Original has 196, 356, 391, 475, 391, 474, 394, 376, 386 instructions for the nine open functions. Source starts at 195, 338, 391, 477, 391, 475, 400, 376, 385. Four previously exact loops are preserved. Original has no data sections; pool must remain empty. Tests start with the smallest setter and proceed through the converter functions by target size.
TMCJPEGDEC_set_converterY8U8V8, inline-buffer-base: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, structured-conversion-buffer: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, conversion-buffer-address-arithmetic: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setup-cases-address-order: 780/784 bytes, 92.540820 percent, 183 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
Setter block audit covers dispatch 0x000-0x048, six case blocks through 0x228, dimension rounding 0x230-0x304, and epilogue. All real stores and arithmetic are present. The first unresolved difference is the folded conversion-buffer base: source omits target addi at 0x004. Inline accessor, structured buffer view, integer buffer address and source-token store order do not retain it. Rejected variants restored; this is recorded as a structural mismatch, not a register tie-break.
TMCJPEG_814EFEAC, luma-and-chroma-address-blocks: 1120/1424 bytes, 52.044945 percent, 257 positional non-register differences, first [1, 2, 3, 5, 7, 8, 14, 15].
TMCJPEG_814EFEAC, luma-four-pixel-loop: 1412/1424 bytes, 57.643257 percent, 232 positional non-register differences, first [3, 5, 7, 8, 14, 15, 16, 24].
TMCJPEG_814EFEAC, frame-and-row-initialization: 1412/1424 bytes, 57.643257 percent, 232 positional non-register differences, first [3, 5, 7, 8, 14, 15, 16, 24].
TMCJPEG_814EFEAC, luma-stores-with-signed-tile-offsets: 1412/1424 bytes, 73.766850 percent, 154 positional non-register differences, first [3, 5, 7, 8, 14, 15, 16, 24].
TMCJPEG_814EFEAC, local-order-0: 1412/1424 bytes, 74.811800 percent, 151 positional non-register differences, first [3, 5, 7, 8, 24, 25, 26, 149].
TMCJPEG_814EFEAC, local-order-29: 1412/1424 bytes, 75.050560 percent, 149 positional non-register differences, first [7, 8, 24, 25, 26, 149, 153, 154].
TMCJPEG_814EFEAC, local-order-32: 1412/1424 bytes, 75.078650 percent, 149 positional non-register differences, first [7, 8, 24, 25, 26, 149, 153, 154].
TMCJPEG_814EFEAC, local-order-40: 1412/1424 bytes, 75.134834 percent, 149 positional non-register differences, first [7, 8, 24, 25, 26, 149, 153, 154].
TMCJPEG_814EFEAC, local-order-48: 1412/1424 bytes, 75.443820 percent, 149 positional non-register differences, first [7, 8, 24, 25, 26, 149, 153, 154].
TMCJPEG_814EFEAC, local-order-67: 1412/1424 bytes, 75.696630 percent, 149 positional non-register differences, first [7, 8, 24, 25, 26, 149, 153, 154].
TMCJPEG_814EFEAC, local-order-139: 1412/1424 bytes, 75.514046 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, local-order-149: 1412/1424 bytes, 75.570220 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, local-order-152: 1412/1424 bytes, 75.612360 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, local-order-167: 1412/1424 bytes, 75.823040 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, local-order-176: 1412/1424 bytes, 75.991570 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, local-order-retained: 1412/1424 bytes, 75.991570 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
411 normal was discarded because 338/356 instructions exceeded the five percent threshold. Fresh translation restores the signed tile-offset arithmetic and four-pixel luma loop. Source now has a 0x60-byte frame, 353/356 instructions; luma store blocks use the target opcodes. Early initializer scheduling is being aligned by real local declaration order before the chroma blocks are finalized.
TMCJPEG_814EFEAC, chroma-hoisted-address-blocks: 1416/1424 bytes, 75.831460 percent, 185 positional non-register differences, first [5, 6, 7, 8, 9, 10, 11, 12].
TMCJPEG_814EFEAC, chroma-add-assignment-counter: 1412/1424 bytes, 75.991570 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-signed-row-product: 1324/1424 bytes, 59.615170 percent, 289 positional non-register differences, first [14, 15, 16, 20, 24, 25, 26, 27].
TMCJPEG_814EFEAC, chroma-signed-samples: 1412/1424 bytes, 75.991570 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-counter-retained: 1412/1424 bytes, 75.991570 percent, 146 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, separate-luma-and-chroma-row-products: 1416/1424 bytes, 77.174160 percent, 185 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, separate-chroma-offset-temporaries: 1416/1424 bytes, 77.174160 percent, 185 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-tile-offset-before-row-output: 1416/1424 bytes, 77.174160 percent, 185 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-exact-grayscale-address-shape: 1416/1424 bytes, 77.174160 percent, 185 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-byte-address-values: 1416/1424 bytes, 77.132020 percent, 185 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-width-signed-row-unsigned: 1416/1424 bytes, 77.174160 percent, 185 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-bounds-and-skip-own-lifetimes: 1416/1424 bytes, 76.441010 percent, 181 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, separate-chroma-bounds-retained: 1416/1424 bytes, 76.441010 percent, 181 positional non-register differences, first [7, 8, 149, 153, 154, 155, 157, 158].
TMCJPEG_814EFEAC, chroma-sample-load-temporaries: 1416/1424 bytes, 76.252810 percent, 192 positional non-register differences, first [5, 6, 7, 8, 9, 10, 11, 12].
TMCJPEG_814EFEAC, chroma-load-store-pointer-walk: 1424/1424 bytes, 88.000000 percent, 30 positional non-register differences, first [5, 6, 7, 8, 9, 10, 11, 12].
TMCJPEG_814EFEAC, chroma-direct-load-before-increment: 1424/1424 bytes, 88.000000 percent, 30 positional non-register differences, first [5, 6, 7, 8, 9, 10, 11, 12].
TMCJPEG_814EFEAC, local-order-0: 1424/1424 bytes, 88.210670 percent, 30 positional non-register differences, first [5, 6, 7, 8, 9, 10, 11, 12].
TMCJPEG_814EFEAC, local-order-1: 1424/1424 bytes, 88.252810 percent, 29 positional non-register differences, first [5, 6, 7, 8, 9, 10, 11, 13].
TMCJPEG_814EFEAC, local-order-17: 1424/1424 bytes, 89.606740 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-21: 1424/1424 bytes, 89.606740 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-22: 1424/1424 bytes, 89.901690 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-52: 1424/1424 bytes, 90.126400 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-55: 1424/1424 bytes, 90.168540 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-60: 1424/1424 bytes, 90.323040 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-72: 1424/1424 bytes, 90.603935 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-73: 1424/1424 bytes, 90.814606 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-85: 1424/1424 bytes, 90.898880 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-137: 1424/1424 bytes, 90.969100 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-207: 1424/1424 bytes, 91.221910 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-301: 1424/1424 bytes, 91.278090 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-302: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, local-order-retained: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
411 normal now has 356/356 instructions and the target 0x60 frame. The crucial correction is loading/storing each chroma byte before advancing its source pointer, instead of advancing inside the store expression. Initial dispatch/setup and luma blocks now differ only in register operands. Remaining work is two chroma setup schedules and the unrolled chroma address schedule around target instructions 236-268.
TMCJPEG_814EFEAC, chroma-cr-address-after-cb-store: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chroma-skip-before-tile-width: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chroma-both-input-walks-after-stores: 1424/1424 bytes, 91.300560 percent, 22 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, unsigned-chroma-pixel-offset: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, shared-chroma-row-offset: 1436/1424 bytes, 86.612360 percent, 193 positional non-register differences, first [152, 153, 154, 155, 156, 157, 158, 159].
TMCJPEG_814EFEAC, pixel-address-before-row-address: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, pixel-pointer-direct-byte-store: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, complete-411-translation-retained: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814F2570, 211-frame-and-luma-address-blocks: 1492/1504 bytes, 73.462770 percent, 223 positional non-register differences, first [9, 10, 11, 12, 13, 14, 15, 16].
TMCJPEG_814F2570, 211-luma-exact-grayscale-pointer-walk: 1492/1504 bytes, 73.462770 percent, 223 positional non-register differences, first [9, 10, 11, 12, 13, 14, 15, 16].
TMCJPEG_814F2570, 211-chroma-row-product-lifetime: 1504/1504 bytes, 80.691490 percent, 62 positional non-register differences, first [18, 20, 81, 83, 85, 88, 89, 90].
TMCJPEG_814F2570, local-order-8: 1504/1504 bytes, 80.710106 percent, 56 positional non-register differences, first [81, 83, 85, 88, 89, 90, 92, 93].
TMCJPEG_814F2570, local-order-12: 1504/1504 bytes, 80.896280 percent, 56 positional non-register differences, first [81, 83, 85, 88, 89, 90, 92, 93].
TMCJPEG_814F2570, local-order-30: 1504/1504 bytes, 80.936170 percent, 56 positional non-register differences, first [81, 83, 85, 88, 89, 90, 92, 93].
TMCJPEG_814F2570, local-order-35: 1504/1504 bytes, 81.162230 percent, 56 positional non-register differences, first [81, 83, 85, 88, 89, 90, 92, 93].
TMCJPEG_814F2570, local-order-115: 1504/1504 bytes, 81.135635 percent, 56 positional non-register differences, first [81, 83, 85, 88, 89, 90, 92, 93].
TMCJPEG_814F2570, local-order-retained: 1504/1504 bytes, 81.135635 percent, 56 positional non-register differences, first [81, 83, 85, 88, 89, 90, 92, 93].
TMCJPEG_814F2B50, 211-edge-width-height-and-complete-loops: 1544/1544 bytes, 76.779790 percent, 65 positional non-register differences, first [36, 37, 94, 96, 98, 101, 102, 103].
TMCJPEG_814F043C, 411-edge-width-rounding-and-complete-loops: 1580/1564 bytes, 74.404090 percent, 359 positional non-register differences, first [13, 15, 16, 17, 18, 19, 20, 21].
TMCJPEG_814F2B50, local-order-0: 1544/1544 bytes, 77.038860 percent, 65 positional non-register differences, first [36, 37, 94, 96, 98, 101, 102, 103].
TMCJPEG_814F2B50, local-order-retained: 1544/1544 bytes, 77.038860 percent, 65 positional non-register differences, first [36, 37, 94, 96, 98, 101, 102, 103].
211 normal and edge have been translated through both luma and chroma loops. Both now have target sizes, 1504 and 1544 bytes, and 0x60-byte frames. The normal chroma loop retains the original luma width/bounds and reloads only its height; edge chroma height rounds upward. Separate luma/chroma tile products avoid incorrect hoisting. 411 edge has also been rewritten through its scalar luma and quarter-width chroma phases; its first build is four instructions long and is being aligned.
TMCJPEG_814F043C, local-order-6: 1580/1564 bytes, 74.595910 percent, 359 positional non-register differences, first [13, 15, 16, 17, 18, 19, 20, 21].
TMCJPEG_814F043C, local-order-104: 1580/1564 bytes, 74.800514 percent, 359 positional non-register differences, first [13, 15, 16, 17, 18, 19, 20, 21].
TMCJPEG_814F043C, local-order-retained: 1580/1564 bytes, 74.800514 percent, 359 positional non-register differences, first [13, 15, 16, 17, 18, 19, 20, 21].
TMCJPEG_814F043C, separate-chroma: 1564/1564 bytes, 85.130430 percent, 60 positional non-register differences, first [33, 35, 187, 188, 189, 190, 191, 192].
TMCJPEG_814F2570, separate-chroma-offset: 1504/1504 bytes, 90.287230 percent, 22 positional non-register differences, first [220, 221, 222, 224, 225, 226, 227, 242].
TMCJPEG_814F2B50, separate-chroma-offset: 1544/1544 bytes, 88.062180 percent, 30 positional non-register differences, first [36, 37, 246, 247, 248, 250, 252, 254].
TMCJPEG_814F0A58, 422-two-pixel-luma-and-chroma-blocks: 1888/1900 bytes, 85.631580 percent, 411 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814EFEAC, chroma-baseline: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chromaTileRow-s32: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chromaTileWidth-s32: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chromaTileOffset-u32: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chroma-add-reversed: 1424/1424 bytes, 91.334270 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chroma-postincrement-column: 980/1424 bytes, 44.064606 percent, 164 positional non-register differences, first [0, 4, 43, 44, 47, 48, 50, 51].
TMCJPEG_814EFEAC, chroma-bases-before-tile: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-pixel-first: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-signed-byte-source: 1424/1424 bytes, 91.362360 percent, 20 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chroma-retained: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814F0A58, 422-two-offset-temporaries: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814EFEAC, chroma-order-baseline: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-0: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-1: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-2: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-3: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-4: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-5: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-6: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-7: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-8: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-9: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-10: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-11: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-12: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-13: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-14: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-15: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-16: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-17: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-18: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-19: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-20: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-21: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-22: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-23: 1424/1424 bytes, 91.300560 percent, 22 positional non-register differences, first [153, 155, 236, 238, 239, 242, 244, 245].
TMCJPEG_814EFEAC, chroma-dependency-order-24: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-25: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-26: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-27: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-28: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-29: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-30: 1424/1424 bytes, 92.143260 percent, 18 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-31: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-32: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-33: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-34: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-dependency-order-retained: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814F0A58, 422-luma-variants-baseline: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-recompute-row-for-second-byte: 1364/1900 bytes, 56.738950 percent, 325 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-inline-row-product: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-two-distinct-row-products: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-direct-signed-row-product: 1876/1900 bytes, 70.677895 percent, 424 positional non-register differences, first [0, 1, 2, 3, 4, 7, 8, 9].
TMCJPEG_814F0A58, 422-luma-variants-retained: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, luma-chroma-reuse-baseline: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, reuse-chromaTileRow: 1892/1900 bytes, 75.292630 percent, 402 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, reuse-chromaTileOffset: 1364/1900 bytes, 56.877895 percent, 320 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaPixelOffset: 1364/1900 bytes, 57.684210 percent, 326 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileWidth: 1896/1900 bytes, 79.082110 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, reuse-chromaTileRow,chromaTileOffset: 1360/1900 bytes, 52.197895 percent, 321 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileRow,chromaPixelOffset: 1360/1900 bytes, 53.435790 percent, 325 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileRow,chromaTileWidth: 1892/1900 bytes, 75.292630 percent, 402 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, reuse-chromaTileOffset,chromaPixelOffset: 1364/1900 bytes, 54.513683 percent, 324 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileOffset,chromaTileWidth: 1364/1900 bytes, 57.360000 percent, 318 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaPixelOffset,chromaTileWidth: 1364/1900 bytes, 58.040000 percent, 325 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileRow,chromaTileOffset,chromaPixelOffset: 1360/1900 bytes, 51.671577 percent, 325 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileRow,chromaTileOffset,chromaTileWidth: 1360/1900 bytes, 52.197895 percent, 321 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileRow,chromaPixelOffset,chromaTileWidth: 1360/1900 bytes, 53.435790 percent, 325 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, reuse-chromaTileOffset,chromaPixelOffset,chromaTileWidth: 1364/1900 bytes, 55.069473 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, luma-chroma-reuse-retained: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814EFEAC, chroma-shape-baseline: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-row-pointer-and-indexed-pixel: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-unsigned-row-offset: 1436/1424 bytes, 87.595505 percent, 193 positional non-register differences, first [152, 153, 154, 155, 156, 157, 158, 159].
TMCJPEG_814EFEAC, chroma-signed-row-offset: 1436/1424 bytes, 87.595505 percent, 193 positional non-register differences, first [152, 153, 154, 155, 156, 157, 158, 159].
TMCJPEG_814EFEAC, chroma-row-plus-pixel-integer: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, chroma-offset-address-all-integer: 1424/1424 bytes, 85.002810 percent, 67 positional non-register differences, first [153, 155, 215, 216, 217, 218, 220, 221].
TMCJPEG_814EFEAC, chroma-shape-retained: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, lifetime-baseline: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, reuse-chromaRowSkip: 1424/1424 bytes, 92.893260 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, reuse-chromaXEnd: 1424/1424 bytes, 92.893260 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, reuse-chromaYEnd: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, reuse-chromaTileOffset: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, reuse-chromaPixelOffset: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, inner-scope-chromaTileRow: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, lifetime-baseline: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, reuse-chromaRowSkip: 1424/1424 bytes, 92.893260 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, reuse-chromaXEnd: 1424/1424 bytes, 92.893260 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, reuse-chromaYEnd: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, reuse-chromaTileOffset: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, reuse-chromaPixelOffset: 1424/1424 bytes, 92.205055 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, lifetime-retained: 1424/1424 bytes, 92.893260 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814F0A58, 422-pair-baseline: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-distinct-offset: 1908/1900 bytes, 69.225266 percent, 427 positional non-register differences, first [0, 1, 2, 3, 4, 5, 6, 7].
TMCJPEG_814F0A58, 422-distinct-pixel: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-distinct-output: 1896/1900 bytes, 74.730530 percent, 426 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-distinct-offset-pixel: 1908/1900 bytes, 69.225266 percent, 427 positional non-register differences, first [0, 1, 2, 3, 4, 5, 6, 7].
TMCJPEG_814F0A58, 422-distinct-offset-output: 1896/1900 bytes, 85.368420 percent, 422 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, 422-distinct-all: 1896/1900 bytes, 85.852630 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, 422-pair-retained: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-scoped-baseline: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-inner-tileRow: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-inner-tileOffset: 1896/1900 bytes, 79.282104 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-inner-tileRow,tileOffset,pixelOffset,output: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-inline-second-row-product: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-inline-first-row-product: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-scoped-retained: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F11C4, 422-edge-complete-scalar-loop-port: 1564/1564 bytes, 85.130430 percent, 60 positional non-register differences, first [33, 35, 187, 188, 189, 190, 191, 192].
TMCJPEG_814F17E0, 420-normal-complete-double-byte-loop-port: 1892/1896 bytes, 80.681435 percent, 419 positional non-register differences, first [11, 12, 13, 14, 15, 16, 17, 18].
TMCJPEG_814F1F48, 420-edge-complete-scalar-loop-port: 1576/1576 bytes, 88.033000 percent, 30 positional non-register differences, first [33, 35, 180, 182, 183, 184, 185, 188].
TMCJPEG_814EFEAC, remove-obsolete-luma-temporaries: 1424/1424 bytes, 92.893260 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, local-order-29: 1424/1424 bytes, 93.005615 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, local-order-111: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, local-order-retained: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEGDEC_set_converterY8U8V8, setup-type-baseline: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, conversion-buffer-array-decay: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, conversion-buffer-void-base: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, conversion-buffer-byte-zero-address: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, conversion-buffer-word-base: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setup-type-retained: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEG_814F043C, row-skip-baseline: 1564/1564 bytes, 85.130430 percent, 60 positional non-register differences, first [33, 35, 187, 188, 189, 190, 191, 192].
TMCJPEG_814F043C, inline-rowSkip: 1564/1564 bytes, 86.473145 percent, 58 positional non-register differences, first [187, 188, 189, 190, 191, 192, 260, 261].
TMCJPEG_814F043C, inline-chromaRowSkip: 1564/1564 bytes, 90.933500 percent, 20 positional non-register differences, first [33, 35, 272, 274, 275, 278, 280, 281].
TMCJPEG_814F043C, row-skip-retained: 1564/1564 bytes, 90.933500 percent, 20 positional non-register differences, first [33, 35, 272, 274, 275, 278, 280, 281].
TMCJPEG_814F2B50, row-skip-baseline: 1544/1544 bytes, 88.062180 percent, 30 positional non-register differences, first [36, 37, 246, 247, 248, 250, 252, 254].
TMCJPEG_814F2B50, row-skip-baseline: 1544/1544 bytes, 88.062180 percent, 30 positional non-register differences, first [36, 37, 246, 247, 248, 250, 252, 254].
TMCJPEG_814F2B50, inline-rowSkip: 1544/1544 bytes, 89.981865 percent, 24 positional non-register differences, first [246, 247, 248, 250, 252, 254, 256, 258].
TMCJPEG_814F2B50, row-skip-retained: 1544/1544 bytes, 89.981865 percent, 24 positional non-register differences, first [246, 247, 248, 250, 252, 254, 256, 258].
TMCJPEG_814EFEAC, row-skip-baseline: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, inline-rowSkip: 1424/1424 bytes, 92.500000 percent, 16 positional non-register differences, first [153, 155, 224, 226, 228, 229, 230, 234].
TMCJPEG_814EFEAC, row-skip-retained: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814F043C, row-skip-baseline: 1564/1564 bytes, 90.933500 percent, 20 positional non-register differences, first [33, 35, 272, 274, 275, 278, 280, 281].
TMCJPEG_814F043C, inline-rowSkip: 1564/1564 bytes, 91.790280 percent, 18 positional non-register differences, first [272, 274, 275, 278, 280, 281, 282, 284].
TMCJPEG_814F043C, row-skip-retained: 1564/1564 bytes, 91.790280 percent, 18 positional non-register differences, first [272, 274, 275, 278, 280, 281, 282, 284].
TMCJPEG_814EFEAC, 411-second-phase-baseline: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, 411-chroma-height-from-width: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, 411-chroma-direct-height-bound: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, 411-skip-before-chroma-bounds: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, 411-chroma-inline-row-skip: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, 411-separate-chroma-width: 1424/1424 bytes, 93.342700 percent, 11 positional non-register differences, first [153, 155, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, 411-second-phase-retained: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, sample-temporary-baseline: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-u32-before-address: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-u32-before-store: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-u32-both-before-address: 1396/1424 bytes, 66.089890 percent, 190 positional non-register differences, first [0, 3, 4, 5, 6, 7, 8, 146].
TMCJPEG_814EFEAC, samples-s32-before-address: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-s32-before-store: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-s32-both-before-address: 1396/1424 bytes, 66.089890 percent, 190 positional non-register differences, first [0, 3, 4, 5, 6, 7, 8, 146].
TMCJPEG_814EFEAC, samples-u8-before-address: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-u8-before-store: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-u8-both-before-address: 1400/1424 bytes, 67.244385 percent, 190 positional non-register differences, first [0, 3, 4, 5, 6, 7, 8, 146].
TMCJPEG_814EFEAC, sample-temporary-retained: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, scoped-phase-baseline: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-phase-scope: 1424/1424 bytes, 93.539330 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, both-phase-scope: 1424/1424 bytes, 93.539330 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, initialized-chroma-phase-scope: 1420/1424 bytes, 86.460670 percent, 44 positional non-register differences, first [3, 5, 146, 147, 148, 149, 150, 151].
TMCJPEG_814EFEAC, row-unsigned-product-phase-scope: 1424/1424 bytes, 94.662920 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, scoped-phase-retained: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-order-baseline: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-0: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-1: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-2: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-3: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-4: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-5: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-6: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-7: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-8: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-9: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-10: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-11: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-12: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-13: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-14: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-15: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-16: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-17: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-18: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-19: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-20: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-21: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-22: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-23: 1424/1424 bytes, 94.609550 percent, 15 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-24: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-25: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-26: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-27: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-28: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-29: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-30: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-31: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-32: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-33: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-34: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-35: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-36: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-37: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-38: 1424/1424 bytes, 94.699440 percent, 13 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-39: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-40: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-41: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-42: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-43: 1424/1424 bytes, 94.699440 percent, 13 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-44: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-45: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-46: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-47: 1424/1424 bytes, 94.699440 percent, 13 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-48: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-49: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-50: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-51: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-52: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-53: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-54: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-55: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-56: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-57: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-58: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-59: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-60: 1424/1424 bytes, 94.609550 percent, 15 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-61: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-62: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-63: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-64: 1424/1424 bytes, 94.609550 percent, 15 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-65: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-66: 1424/1424 bytes, 94.609550 percent, 15 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-67: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-68: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-69: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-70: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-71: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-72: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-73: 1424/1424 bytes, 94.609550 percent, 15 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-74: 1424/1424 bytes, 94.699440 percent, 13 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-75: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-76: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-77: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-78: 1424/1424 bytes, 94.609550 percent, 15 positional non-register differences, first [153, 156, 234, 235, 239, 242, 246, 248].
TMCJPEG_814EFEAC, chroma-dependency-order-79: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-80: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-81: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-82: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-83: 1424/1424 bytes, 94.587080 percent, 13 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-dependency-order-retained: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
Round 3 progress: all eight pixel converters have full luma and chroma translations; scalar luma phases now align except registers after separating luma/chroma offset lifetimes. Edge 411 luma setup and all luma blocks align except registers after moving row skips to their loop-end expressions. Chroma unroll scheduling remains structural, not a register-only match. Setter still lacks one common buffer-base instruction. No data sections exist in the original unit. Continuing the remaining structural differences.
TMCJPEG_814F0A58, 422-inline-tile_offset: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-inline-tile_offset: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-inline-pixel_address: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-inline-rejected-restored: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F11C4, 422-edge-411-aligned-luma-port: 1564/1564 bytes, 91.790280 percent, 18 positional non-register differences, first [272, 274, 275, 278, 280, 281, 282, 284].
TMCJPEG_814F1F48, 420-edge-411-aligned-luma-port: 1576/1576 bytes, 92.596440 percent, 21 positional non-register differences, first [180, 182, 183, 184, 185, 188, 189, 190].
TMCJPEG_814F0A58, 422-pair-rebuild-baseline: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-pair-indexed-signed-offsets: 1888/1900 bytes, 84.661050 percent, 412 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-pair-unsigned-output-row-temporary: 1888/1900 bytes, 84.661050 percent, 412 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-pair-duplicate-row-address: 1888/1900 bytes, 84.503160 percent, 412 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-pair-counter-before-pointer: 1888/1900 bytes, 84.661050 percent, 412 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-pair-row-in-for-initializer: 1888/1900 bytes, 84.661050 percent, 412 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-pair-index-pointer-bias: 1900/1900 bytes, 65.418945 percent, 252 positional non-register differences, first [0, 1, 2, 3, 8, 11, 12, 13].
TMCJPEG_814F0A58, 422-pair-rebuild-retained: 1900/1900 bytes, 65.418945 percent, 252 positional non-register differences, first [0, 1, 2, 3, 8, 11, 12, 13].
TMCJPEG_814F0A58, 422-combined-index-baseline: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-tile-index-before-byte-offset: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-signed-tile-index-before-byte-offset: 1360/1900 bytes, 55.757896 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-tile-offset-shift-assignment: 1360/1900 bytes, 58.524210 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-row-product-multiply-assignment: 1360/1900 bytes, 56.109474 percent, 322 positional non-register differences, first [3, 4, 5, 6, 7, 8, 9, 10].
TMCJPEG_814F0A58, 422-combined-index-retained: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-row-types-baseline: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-types-s32-s32-s32: 1876/1900 bytes, 70.778946 percent, 423 positional non-register differences, first [0, 1, 2, 3, 8, 9, 10, 11].
TMCJPEG_814F0A58, 422-types-s32-s32-u32: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-types-s32-u32-s32: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-types-s32-u32-u32: 1876/1900 bytes, 70.778946 percent, 423 positional non-register differences, first [0, 1, 2, 3, 8, 9, 10, 11].
TMCJPEG_814F0A58, 422-types-u32-s32-s32: 1876/1900 bytes, 70.778946 percent, 423 positional non-register differences, first [0, 1, 2, 3, 8, 9, 10, 11].
TMCJPEG_814F0A58, 422-types-u32-s32-u32: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-types-u32-u32-u32: 1876/1900 bytes, 70.778946 percent, 423 positional non-register differences, first [0, 1, 2, 3, 8, 9, 10, 11].
TMCJPEG_814F0A58, 422-row-types-retained: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-output-pair-baseline: 1896/1900 bytes, 79.608420 percent, 421 positional non-register differences, first [12, 13, 14, 15, 16, 17, 18, 19].
TMCJPEG_814F0A58, 422-second-output: 1896/1900 bytes, 84.313680 percent, 424 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-inner-second-output: 1896/1900 bytes, 84.313680 percent, 424 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-two-tile-offsets: 1888/1900 bytes, 84.661050 percent, 412 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-direct-tile-offset-and-next-output: 1896/1900 bytes, 84.313680 percent, 424 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, 422-output-pair-retained: 1896/1900 bytes, 84.313680 percent, 424 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, local-order-0: 1896/1900 bytes, 84.576840 percent, 424 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, local-order-27: 1896/1900 bytes, 84.534740 percent, 424 positional non-register differences, first [19, 20, 21, 22, 23, 24, 26, 27].
TMCJPEG_814F0A58, local-order-34: 1896/1900 bytes, 83.400000 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-38: 1896/1900 bytes, 83.547370 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-47: 1896/1900 bytes, 83.463160 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-53: 1896/1900 bytes, 84.568420 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-55: 1896/1900 bytes, 85.284210 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-68: 1896/1900 bytes, 85.673680 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-211: 1896/1900 bytes, 85.600000 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, local-order-retained: 1896/1900 bytes, 85.600000 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, row-skip-baseline: 1896/1900 bytes, 85.600000 percent, 423 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, inline-rowSkip: 1896/1900 bytes, 87.608420 percent, 413 positional non-register differences, first [33, 36, 37, 38, 39, 40, 41, 42].
TMCJPEG_814F0A58, inline-chromaRowSkip: 1896/1900 bytes, 86.351580 percent, 427 positional non-register differences, first [21, 22, 23, 24, 26, 27, 29, 30].
TMCJPEG_814F0A58, row-skip-retained: 1896/1900 bytes, 87.608420 percent, 413 positional non-register differences, first [33, 36, 37, 38, 39, 40, 41, 42].
TMCJPEG_814EFEAC, chroma-walk-baseline: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, for-preincrement: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, for-assignment: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, while: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, samples-postincrement: 1416/1424 bytes, 76.280900 percent, 183 positional non-register differences, first [3, 5, 149, 153, 154, 155, 156, 157].
TMCJPEG_814EFEAC, cb-row-walk: 1436/1424 bytes, 82.522470 percent, 173 positional non-register differences, first [149, 151, 153, 154, 156, 157, 158, 159].
TMCJPEG_814EFEAC, both-row-walks: 1420/1424 bytes, 75.707860 percent, 191 positional non-register differences, first [3, 5, 149, 153, 154, 155, 156, 157].
TMCJPEG_814EFEAC, chroma-walk-retained: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814F0A58, 422-full-expression-baseline: 1896/1900 bytes, 87.608420 percent, 413 positional non-register differences, first [33, 36, 37, 38, 39, 40, 41, 42].
TMCJPEG_814F0A58, 422-full-expression-pixel-pointer: 1900/1900 bytes, 90.250530 percent, 40 positional non-register differences, first [178, 179, 180, 181, 182, 183, 184, 185].
TMCJPEG_814F0A58, 422-full-expression-tile-pointer: 1912/1900 bytes, 66.654740 percent, 420 positional non-register differences, first [0, 1, 2, 3, 4, 5, 6, 7].
TMCJPEG_814F0A58, 422-full-expression-all-integer: 1900/1900 bytes, 90.250530 percent, 40 positional non-register differences, first [178, 179, 180, 181, 182, 183, 184, 185].
TMCJPEG_814F0A58, 422-full-expression-row-product-temp: 1896/1900 bytes, 87.776840 percent, 413 positional non-register differences, first [33, 36, 37, 38, 39, 40, 41, 42].
TMCJPEG_814F0A58, 422-full-expression-retained: 1900/1900 bytes, 90.250530 percent, 40 positional non-register differences, first [178, 179, 180, 181, 182, 183, 184, 185].
TMCJPEG_814F17E0, 420-complete-inline-pixel-addresses: 1896/1896 bytes, 88.487340 percent, 62 positional non-register differences, first [176, 177, 178, 179, 180, 181, 182, 183].
TMCJPEG_814F0A58, luma-source-walk-baseline: 1900/1900 bytes, 90.250530 percent, 40 positional non-register differences, first [178, 179, 180, 181, 182, 183, 184, 185].
TMCJPEG_814F0A58, luma-two-input-postincrements: 1900/1900 bytes, 93.852630 percent, 18 positional non-register differences, first [355, 357, 358, 361, 363, 364, 365, 367].
TMCJPEG_814F0A58, luma-two-input-separate-increments: 1900/1900 bytes, 90.250530 percent, 40 positional non-register differences, first [178, 179, 180, 181, 182, 183, 184, 185].
TMCJPEG_814F0A58, luma-second-input-preincrement: 1900/1900 bytes, 93.873690 percent, 18 positional non-register differences, first [355, 357, 358, 361, 363, 364, 365, 367].
TMCJPEG_814F0A58, luma-source-walk-retained: 1900/1900 bytes, 93.873690 percent, 18 positional non-register differences, first [355, 357, 358, 361, 363, 364, 365, 367].
TMCJPEG_814EFEAC, chroma-complete-expression-baseline: 1424/1424 bytes, 94.676960 percent, 11 positional non-register differences, first [153, 156, 234, 235, 236, 238, 239, 244].
TMCJPEG_814EFEAC, chroma-full-inline-postincrements: 1416/1424 bytes, 76.747190 percent, 177 positional non-register differences, first [149, 153, 154, 155, 156, 157, 158, 159].
TMCJPEG_814EFEAC, chroma-full-inline-separate-increments: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, chroma-full-inline-row-product-temp: 1420/1424 bytes, 94.115166 percent, 166 positional non-register differences, first [146, 147, 148, 149, 150, 151, 153, 154].
TMCJPEG_814EFEAC, chroma-complete-expression-retained: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814F0A58, chroma-complete-expression-baseline: 1900/1900 bytes, 93.873690 percent, 18 positional non-register differences, first [355, 357, 358, 361, 363, 364, 365, 367].
TMCJPEG_814F0A58, chroma-full-inline-postincrements: 1892/1900 bytes, 81.338950 percent, 175 positional non-register differences, first [268, 273, 274, 276, 277, 278, 279, 280].
TMCJPEG_814F0A58, chroma-full-inline-separate-increments: 1900/1900 bytes, 95.094734 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-full-inline-row-product-temp: 1896/1900 bytes, 90.947365 percent, 186 positional non-register differences, first [270, 271, 272, 274, 277, 280, 281, 282].
TMCJPEG_814F0A58, chroma-complete-expression-retained: 1900/1900 bytes, 95.094734 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, 422-inline-input-postincrements-and-chroma: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F043C, chroma-complete-expression-baseline: 1564/1564 bytes, 91.790280 percent, 18 positional non-register differences, first [272, 274, 275, 278, 280, 281, 282, 284].
TMCJPEG_814F043C, chroma-full-inline-postincrements: 1552/1564 bytes, 75.601020 percent, 187 positional non-register differences, first [178, 180, 182, 183, 184, 185, 186, 187].
TMCJPEG_814F043C, chroma-full-inline-separate-increments: 1564/1564 bytes, 93.657290 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, chroma-full-inline-row-product-temp: 1556/1564 bytes, 88.974430 percent, 98 positional non-register differences, first [183, 184, 185, 187, 188, 189, 191, 192].
TMCJPEG_814F043C, chroma-complete-expression-retained: 1564/1564 bytes, 93.657290 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F2570, chroma-complete-expression-baseline: 1504/1504 bytes, 90.287230 percent, 22 positional non-register differences, first [220, 221, 222, 224, 225, 226, 227, 242].
TMCJPEG_814F2570, chroma-full-inline-postincrements: 1492/1504 bytes, 75.986700 percent, 346 positional non-register differences, first [9, 10, 11, 12, 13, 14, 15, 16].
TMCJPEG_814F2570, chroma-full-inline-separate-increments: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2570, chroma-full-inline-row-product-temp: 1496/1504 bytes, 84.914894 percent, 333 positional non-register differences, first [20, 21, 22, 23, 24, 26, 27, 28].
TMCJPEG_814F2570, chroma-complete-expression-retained: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2B50, chroma-complete-expression-baseline: 1544/1544 bytes, 89.981865 percent, 24 positional non-register differences, first [246, 247, 248, 250, 252, 254, 256, 258].
TMCJPEG_814F2B50, chroma-full-inline-postincrements: 1532/1544 bytes, 71.722800 percent, 326 positional non-register differences, first [27, 28, 32, 33, 34, 35, 36, 37].
TMCJPEG_814F2B50, chroma-full-inline-separate-increments: 1544/1544 bytes, 99.041450 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, chroma-full-inline-row-product-temp: 1536/1544 bytes, 78.129530 percent, 241 positional non-register differences, first [27, 28, 33, 34, 35, 36, 37, 38].
TMCJPEG_814F2B50, chroma-complete-expression-retained: 1544/1544 bytes, 99.041450 percent, 0 positional non-register differences, first [].
Round 3 breakthrough: the grouped luma loops require the whole tile address expression in each byte store; extra address temporaries changed the compiler unroll and invariant-hoisting stages. Postincrementing the two luma inputs makes the complete 422 luma phase align except registers. Chroma similarly requires complete address expressions but separate source-pointer increments. This gives 211 edge 386/386 instructions with zero positional non-register differences, and 411 normal 356/356 with only two setup schedules still open.
TMCJPEG_814F2B50, local-order-5: 1544/1544 bytes, 99.093260 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-13: 1544/1544 bytes, 99.183940 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-25: 1544/1544 bytes, 99.404144 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-51: 1544/1544 bytes, 99.443010 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-83: 1544/1544 bytes, 99.481865 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-117: 1544/1544 bytes, 99.689120 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-614: 1544/1544 bytes, 99.922280 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, local-order-retained: 1544/1544 bytes, 99.922280 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, 411-skip-shape-baseline: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-new-s32-chroma-skip: 1424/1424 bytes, 92.387640 percent, 13 positional non-register differences, first [153, 155, 224, 225, 226, 228, 229, 230].
TMCJPEG_814EFEAC, 411-new-u32-chroma-skip: 1424/1424 bytes, 92.387640 percent, 13 positional non-register differences, first [153, 155, 224, 225, 226, 228, 229, 230].
TMCJPEG_814EFEAC, 411-reused-skip-after-address-simplification: 1424/1424 bytes, 93.286514 percent, 13 positional non-register differences, first [153, 155, 224, 225, 226, 228, 229, 230].
TMCJPEG_814EFEAC, 411-reused-skip-at-row-end: 1436/1424 bytes, 89.356740 percent, 195 positional non-register differences, first [146, 147, 148, 149, 150, 152, 153, 154].
TMCJPEG_814EFEAC, 411-width-becomes-row-skip: 1424/1424 bytes, 93.286514 percent, 13 positional non-register differences, first [153, 155, 224, 225, 226, 228, 229, 230].
TMCJPEG_814EFEAC, 411-unsigned-shared-skip: 1424/1424 bytes, 93.258430 percent, 13 positional non-register differences, first [153, 155, 224, 225, 226, 228, 229, 230].
TMCJPEG_814EFEAC, 411-skip-shape-retained: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814F2B50, 211-edge-height-register-baseline: 1544/1544 bytes, 99.922280 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, 211-edge-height-in-bound: 1544/1544 bytes, 100.000000 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, 211-edge-new-chroma-height: 1544/1544 bytes, 100.000000 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, 211-edge-width-read-before-height: 1544/1544 bytes, 100.000000 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, 211-edge-height-two-statements: 1544/1544 bytes, 100.000000 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2B50, 211-edge-height-register-retained: 1544/1544 bytes, 100.000000 percent, 0 positional non-register differences, first [].
TMCJPEG_814F043C, lifetime-baseline: 1564/1564 bytes, 93.657290 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, reuse-chromaXEnd: 1564/1564 bytes, 94.539640 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, lifetime-retained: 1564/1564 bytes, 94.539640 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F2570, lifetime-baseline: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2570, lifetime-retained: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F0A58, lifetime-baseline: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, reuse-chromaXEnd: 1900/1900 bytes, 94.989470 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, reuse-chromaYEnd: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, lifetime-retained: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-column-baseline: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, new-chroma-column: 1900/1900 bytes, 93.673680 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, scoped-chroma-column: 1900/1900 bytes, 93.673680 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-column-retained: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F043C, chroma-column-baseline: 1564/1564 bytes, 94.539640 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, new-chroma-column: 1564/1564 bytes, 93.657290 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, scoped-chroma-column: 1564/1564 bytes, 93.657290 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, chroma-column-retained: 1564/1564 bytes, 94.539640 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F2570, chroma-column-baseline: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2570, new-chroma-column: 1504/1504 bytes, 93.164894 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2570, scoped-chroma-column: 1504/1504 bytes, 93.164894 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2570, chroma-column-retained: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814EFEAC, 411-second-phase-baseline: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-height-from-width: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-direct-height-bound: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-skip-before-chroma-bounds: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-inline-row-skip: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-separate-chroma-width: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-second-phase-retained: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-height-stride-baseline: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-stride-from-height: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-one-dimension: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-new-height: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-only-width: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-height-stride-retained: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-width-read-order-baseline: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-width-read-before-x: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, 411-chroma-width-read-before-width: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, 411-chroma-width-read-before-height: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-width-read-before-chromaXEnd: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-chroma-width-read-before-chromaYEnd: 1424/1424 bytes, 99.255615 percent, 2 positional non-register differences, first [153, 156].
TMCJPEG_814EFEAC, 411-width-read-order-retained: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, pairwise-declaration-baseline: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, pairwise-declaration-retained: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, chroma-column-baseline: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, new-chroma-column: 1424/1424 bytes, 98.820220 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, scoped-chroma-column: 1424/1424 bytes, 98.820220 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, chroma-column-retained: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814F043C, exact-template-baseline: 1564/1564 bytes, 94.539640 percent, 11 positional non-register differences, first [260, 261, 262, 264, 265, 266, 268, 271].
TMCJPEG_814F043C, exact-211-edge-shape-port: 1564/1564 bytes, 99.475700 percent, 0 positional non-register differences, first [].
TMCJPEG_814F11C4, exact-template-baseline: 1564/1564 bytes, 91.790280 percent, 18 positional non-register differences, first [272, 274, 275, 278, 280, 281, 282, 284].
TMCJPEG_814F11C4, exact-211-edge-shape-port: 1564/1564 bytes, 99.475700 percent, 0 positional non-register differences, first [].
TMCJPEG_814F1F48, exact-template-baseline: 1576/1576 bytes, 92.596440 percent, 21 positional non-register differences, first [180, 182, 183, 184, 185, 188, 189, 190].
TMCJPEG_814F1F48, exact-211-edge-shape-port: 1576/1576 bytes, 99.555840 percent, 0 positional non-register differences, first [].
TMCJPEG_814F2570, exact-template-baseline: 1504/1504 bytes, 93.723404 percent, 11 positional non-register differences, first [242, 243, 244, 246, 247, 248, 250, 253].
TMCJPEG_814F2570, exact-211-edge-shape-port: 1504/1504 bytes, 99.587770 percent, 0 positional non-register differences, first [].
TMCJPEG_814F17E0, 420-complete-422-luma-and-chroma-port: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F0A58, chroma-read-order-baseline: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-width-read-before-x: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-width-read-before-width: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-width-read-before-height: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-width-read-before-chromaXEnd: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-width-read-before-chromaYEnd: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, chroma-read-order-retained: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F17E0, chroma-read-order-baseline: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-width-read-before-x: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-width-read-before-y: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-width-read-before-width: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-width-read-before-height: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-width-read-before-chromaXEnd: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-width-read-before-chromaYEnd: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, chroma-read-order-retained: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F0A58, row-skip-baseline: 1900/1900 bytes, 95.073685 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, inline-chromaRowSkip: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, row-skip-retained: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F17E0, row-skip-baseline: 1896/1896 bytes, 93.424050 percent, 17 positional non-register differences, first [353, 354, 358, 360, 362, 364, 366, 367].
TMCJPEG_814F17E0, inline-chromaRowSkip: 1896/1896 bytes, 98.997890 percent, 0 positional non-register differences, first [].
TMCJPEG_814F17E0, row-skip-retained: 1896/1896 bytes, 98.997890 percent, 0 positional non-register differences, first [].
TMCJPEG_814F0A58, chroma-read-order-baseline: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-width-read-before-x: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-width-read-before-width: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-width-read-before-height: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-width-read-before-chromaXEnd: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-width-read-before-chromaYEnd: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-read-order-retained: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, stride-expression-baseline: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-stride-8 + (-width): 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-stride-(-width) + 8: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-stride-(u32)(8 - width): 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-stride-(s32)(8 - width): 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-pointer-subtract-width-minus-eight: 1900/1900 bytes, 93.073685 percent, 15 positional non-register differences, first [274, 275, 343, 344, 345, 347, 348, 349].
TMCJPEG_814F0A58, chroma-next-row-index: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, stride-expression-retained: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEGDEC_set_converterY8U8V8, setter-pointer-form-baseline: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-void-pointer-arithmetic: compiler rejected the pointer expression. Reverted.
TMCJPEGDEC_set_converterY8U8V8, setter-signed-byte-base: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-conversion-buffer-array-pointer: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-pointer-form-retained: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEG_814F0A58, 422-chroma-header-baseline: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-direct-chroma-height-bound: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-chroma-only-width-value: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-separate-chroma-width: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-separate-chroma-height: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-unsigned-chroma-width: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-reverse-bound-definition-order: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, 422-chroma-header-retained: 1900/1900 bytes, 98.547370 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-8: 1900/1900 bytes, 98.578950 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-10: 1900/1900 bytes, 98.610530 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-27: 1900/1900 bytes, 98.884210 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-46: 1900/1900 bytes, 98.915790 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-67: 1900/1900 bytes, 98.936844 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-76: 1900/1900 bytes, 99.200000 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-87: 1900/1900 bytes, 99.231580 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-280: 1900/1900 bytes, 99.263160 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-361: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, local-order-retained: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
Round 3 progress: TMCJPEG_814F2B50 is now objdiff 100.0 percent; its remaining five scratch-register differences disappeared when chroma height was calculated directly in the bound. Porting that exact source to 411 edge, 422 edge, 420 edge and 211 normal makes all four instruction counts match with only register operands remaining. Normal 411 is also down to only register operands; normal 420 now has 474/474 instructions and only register operands. Normal 422 has 475/475 with two chroma-setup instruction schedules still open. Setter retains the known buffer-address folding and store-order barrier.
TMCJPEGDEC_set_converterY8U8V8, setter-inline-buffer-argument: 780/784 bytes, 92.765305 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-inline-buffer-argument-rejected: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEG_814EFEAC, tile-width-form-baseline: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, reuse-luma-tile-width: 1424/1424 bytes, 99.648880 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, signed-chroma-tile-width: 1436/1424 bytes, 74.404495 percent, 314 positional non-register differences, first [0, 4, 12, 13, 15, 16, 17, 18].
TMCJPEG_814EFEAC, chroma-width-load-and-shift: 1424/1424 bytes, 99.691010 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, chroma-width-byte-count-temporary: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, chroma-width-load-unsigned-division: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, tile-width-form-retained: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814F0A58, tile-width-form-baseline: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, reuse-luma-tile-width: 1900/1900 bytes, 99.326320 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, signed-chroma-tile-width: 1900/1900 bytes, 63.692630 percent, 300 positional non-register differences, first [0, 1, 2, 3, 4, 5, 6, 7].
TMCJPEG_814F0A58, chroma-width-load-and-shift: 1900/1900 bytes, 98.894740 percent, 2 positional non-register differences, first [272, 274].
TMCJPEG_814F0A58, chroma-width-byte-count-temporary: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-width-load-unsigned-division: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, tile-width-form-retained: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, inline-stride-baseline: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, inline-row-skip-at-row-end: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, inline-row-skip-before-loop: 1900/1900 bytes, 94.494736 percent, 11 positional non-register differences, first [343, 344, 345, 347, 348, 349, 351, 354].
TMCJPEG_814F0A58, inline-stride-retained: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-header-skip-baseline: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, scoped-const-skip: 1912/1900 bytes, 91.098946 percent, 194 positional non-register differences, first [265, 266, 267, 268, 269, 271, 272, 273].
TMCJPEG_814F0A58, scoped-skip: 1912/1900 bytes, 91.098946 percent, 194 positional non-register differences, first [265, 266, 267, 268, 269, 271, 272, 273].
TMCJPEG_814F0A58, outer-skip: 1912/1900 bytes, 91.098946 percent, 194 positional non-register differences, first [265, 266, 267, 268, 269, 271, 272, 273].
TMCJPEG_814F0A58, chroma-header-skip-retained: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814EFEAC, chroma-constant-width-baseline: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, scoped-const-u32-chroma-tile-width: 1424/1424 bytes, 98.932590 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, scoped-u32-chroma-tile-width: 1424/1424 bytes, 98.932590 percent, 0 positional non-register differences, first [].
TMCJPEG_814EFEAC, chroma-constant-width-retained: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814F0A58, chroma-constant-width-baseline: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, scoped-const-u32-chroma-tile-width: 1900/1900 bytes, 98.052635 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, scoped-u32-chroma-tile-width: 1900/1900 bytes, 98.052635 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, chroma-constant-width-retained: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEGDEC_set_converterY8U8V8, setter-case-translation-baseline: 780/784 bytes, 92.739800 percent, 175 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-cases-through-1: 780/784 bytes, 92.744896 percent, 177 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-cases-through-3: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-cases-through-5: 780/784 bytes, 92.540820 percent, 183 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-case-translation-retained: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-temporary-case-baseline: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-address-order-temporaries-through-1: 780/784 bytes, 92.734695 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-address-order-temporaries-through-3: 780/784 bytes, 92.683670 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-address-order-temporaries-through-5: 780/784 bytes, 92.438774 percent, 183 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-address-order-temporaries-retained: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-address-dispatch-baseline: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-address-ordered-branch-blocks: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEG_814F0A58, one-plane-skip-baseline: 1900/1900 bytes, 99.368420 percent, 2 positional non-register differences, first [274, 275].
TMCJPEG_814F0A58, one-plane-cb-skip-8 - width: 1900/1900 bytes, 99.010530 percent, 0 positional non-register differences, first [].
TMCJPEG_814F0A58, one-plane-cb-skip-8 - height: 1912/1900 bytes, 97.741050 percent, 193 positional non-register differences, first [0, 3, 268, 270, 271, 272, 273, 274].
TMCJPEG_814F0A58, one-plane-cr-skip-8 - width: 1900/1900 bytes, 99.010530 percent, 0 positional non-register differences, first [].
TMCJPEG_814F0A58, one-plane-cr-skip-8 - height: 1912/1900 bytes, 97.698944 percent, 193 positional non-register differences, first [0, 3, 268, 270, 271, 272, 273, 274].
TMCJPEG_814F0A58, one-plane-skip-retained: 1900/1900 bytes, 99.010530 percent, 0 positional non-register differences, first [].
TMCJPEGDEC_set_converterY8U8V8, setter-initializer-baseline: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-buffer-initializer: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-all-initializers: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-const buffer-initializer: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-const all-initializers: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEGDEC_set_converterY8U8V8, setter-initializer-retained: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
Byte audit: [('TMCJPEG_814F2B50', 1544, '90cafddeb6c5e9cc7a1697de26afc992a99a15b2dd43c77827e4ba2c74416b6f'), ('TMCJPEG_814F3158', 396, 'ebff8cfa476f8b73a0e25774de6ed1894610b7bfeb01dba893d52ec77630be24'), ('TMCJPEG_814F32E4', 448, '0285055cc73aa0c067bf01d154c35507e4b7d5e15b415513ab79574b4942553c'), ('TMCJPEG_814F34A4', 648, '2d24887255337ced3949a4cd8df4d806620a7ab69e61a4c2b3c882037c044f2c'), ('TMCJPEG_814F372C', 700, '2ae15e8409df7cc2ca3ed0b394c7850dc30209078f3888253095c969b5463a8c')]. The external ctxdiff normalization misreads the first operand of CR-qualified branches as an immediate; its branch displacement differences are spurious when raw bytes are equal. Tools and baseline reports were not changed.
TMCJPEGDEC_set_converterY8U8V8, final-readable-pointer-stores: 780/784 bytes, 92.785710 percent, 179 positional non-register differences, first [1, 2, 3, 4, 5, 6, 7, 8].
TMCJPEG_814EFEAC, final-readable-four-pixel-expression: 1424/1424 bytes, 99.719100 percent, 0 positional non-register differences, first [].
TMCJPEG_814F0A58, final-aligned-chroma-header: 1900/1900 bytes, 99.010530 percent, 0 positional non-register differences, first [].
Round 3 current result: all eight converter bodies were translated through their epilogues and now have target instruction counts. Seven differ only in registers and 211 edge is byte-identical. Setter was translated/reviewed through all six cases, dimension rounding and epilogue, but remains 195/196 instructions because the compiler folds its buffer-base address into individual case addresses; its store scheduling also differs. Forty-plus ordinary source variations were logged for that barrier; no artificial address preservation was used.
## Round 3 final source and instruction audit
Before sizes were rebuilt from the starting source, then current source was restored and rebuilt. Register-normalized comparisons use actual relative branch destinations; byte-exact results compare complete function byte ranges with original ELF sections. Original allocated data sections: {}.
| Function | Source bytes before -> after (target) | Fuzzy before -> after | Remaining |
|---|---|---|---|
| TMCJPEGDEC_set_converterY8U8V8 | 780 -> 780 (784) | 92.739800 -> 92.785710 | buffer-base folding and case store scheduling; 195/196 instructions |
| TMCJPEG_814EFEAC | 1352 -> 1424 (1424) | 53.101124 -> 99.719100 | register allocation only |
| TMCJPEG_814F043C | 1564 -> 1564 (1564) | 57.682865 -> 99.475700 | register allocation only |
| TMCJPEG_814F0A58 | 1908 -> 1900 (1900) | 45.195790 -> 99.010530 | register allocation only |
| TMCJPEG_814F11C4 | 1564 -> 1564 (1564) | 57.682865 -> 99.475700 | register allocation only |
| TMCJPEG_814F17E0 | 1900 -> 1896 (1896) | 44.407173 -> 98.997890 | register allocation only |
| TMCJPEG_814F1F48 | 1600 -> 1576 (1576) | 52.167510 -> 99.555840 | register allocation only |
| TMCJPEG_814F2570 | 1504 -> 1504 (1504) | 52.587765 -> 99.587770 | register allocation only |
| TMCJPEG_814F2B50 | 1544 -> 1544 (1544) | 55.795338 -> 100.000000 | byte-identical |
| TMCJPEG_814F3158 | 396 -> 396 (396) | 100.000000 -> 100.000000 | byte-identical |
| TMCJPEG_814F32E4 | 448 -> 448 (448) | 100.000000 -> 100.000000 | byte-identical |
| TMCJPEG_814F34A4 | 648 -> 648 (648) | 100.000000 -> 100.000000 | byte-identical |
| TMCJPEG_814F372C | 700 -> 700 (700) | 100.000000 -> 100.000000 | byte-identical |
Raw byte-identical functions: 5/13; exact code bytes 2192 -> 3736; allocated data bytes 0 -> 0. Seven open converters now match instruction counts and normalized operations throughout. The setter remains open with the recorded folding/scheduling barrier.
Baseline-count correction: rebuilding the exact starting commit source confirms 211 edge started at 386 instructions (1544 bytes), rather than the 385 written in the initial round note. The before/after table above uses that verified build.
Final non-quick gate: PASS; clean full build, original DOL hash, identical empty pool, zero regressions, zero added forbidden patterns, zero readability warnings. Fresh clean-build byte comparison confirms 5/13 exact; register-normalized complete instruction sequences match 12/13, with setter the only structural remainder. External instruction-exact 2/13 is the previously logged branch-normalization issue; full raw byte evidence and objdiff agree on 5/13.

View File

@@ -0,0 +1,198 @@
# Planar converter translation gates
## 411 normal
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 2192/15948 data None/None functions 4/13 fuzzy 63.9556 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 63.955605
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.7398
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 91.36236
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 57.682865
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 45.19579
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 57.682865
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 44.407173
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 52.16751
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 52.587765
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2B50 55.795338
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.69363
global fuzzy_match_percent: 98.04096 -> 98.05914
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Complete loop ports, quick gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 2192/15948 data None/None functions 4/13 fuzzy 88.1116 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 88.11161
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.7398
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 92.89326
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 85.13043
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 79.60842
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 85.13043
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 80.681435
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 88.033
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 90.28723
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2B50 88.06218
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.69363
global fuzzy_match_percent: 98.04096 -> 98.18778
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Complete pixel address expressions, quick gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 2192/15948 data None/None functions 4/13 fuzzy 94.7775 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 94.77753
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.7398
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 99.255615
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 93.65729
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 95.073685
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 91.79028
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 88.48734
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 92.59644
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 93.723404
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2B50 99.04145
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.69363
global fuzzy_match_percent: 98.04096 -> 98.22327
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
211 edge exact, quick gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 3736/15948 data None/None functions 5/13 fuzzy 94.8703 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 94.87033
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.7398
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 99.255615
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 93.65729
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 95.073685
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 91.79028
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 88.48734
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 92.59644
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 93.723404
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.74518
global fuzzy_match_percent: 98.04096 -> 98.22376
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Port the exact 211 edge shape, quick gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 3736/15948 data None/None functions 5/13 fuzzy 99.1402 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.140205
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.7398
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 99.7191
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 99.4757
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 98.54737
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 99.4757
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 98.99789
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 99.55584
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 99.58777
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.74518
global fuzzy_match_percent: 98.04096 -> 98.24650
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## Final translated setup and chroma headers (quick)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 3736/15948 data None/None functions 5/13 fuzzy 99.1976 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.19764
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 99.7191
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 99.4757
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 99.01053
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 99.4757
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 98.99789
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 99.55584
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 99.58777
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.74518
global fuzzy_match_percent: 98.04096 -> 98.24680
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## Final full gate (clean build, non-quick)
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 3736/15948 data None/None functions 5/13 fuzzy 99.1976 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.19764
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814EFEAC 99.7191
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F043C 99.4757
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F0A58 99.01053
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F11C4 99.4757
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F17E0 98.99789
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F1F48 99.55584
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEG_814F2570 99.58777
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 2192/15948 data None functions 4 fuzzy 60.5393
regressions vs baseline: 0
global matched_code_percent: 84.69363 -> 84.74518
global fuzzy_match_percent: 98.04096 -> 98.24680
global complete_code_percent: 58.20100 -> 58.20100
global matched_data_percent: 90.34007 -> 90.34007
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Source commits: 75b91040 align remaining planar setup blocks; 4f97418f port exact planar edge loop shape; 79662a9e match planar 211 edge conversion; 33360af8 align planar tile address expressions; ef73aa9e retranslate planar subsampling loops; f52ddef8 retranslate planar 411 tile addressing;

View File

@@ -0,0 +1,389 @@
# BS2Mach assembly reconstruction, round 2
Baseline 6ade1630. Only BS2Mach source is in scope. Target blocks are processed in address order, with frame and earliest structural differences first.
| Function | Original bytes | Baseline fuzzy |
| --- | --- | --- |
| BS2Tick | 7760 | 76.669075 |
| CheckBS2CommandStatus | 1624 | 80.697044 |
| BS2StartGame | 1572 | 95.496185 |
| BS2StartGCGame | 912 | 98.24561 |
| BS2NANDDivideCallback | 512 | 85.03906 |
| BS2NANDDivideReadAsync | 188 | 60.31915 |
| BS2NANDDivideWriteAsync | 188 | 60.31915 |
| Run | 172 | 0.88372093 |
## BS2Tick, frame and 8137D40C–8137D514
Target and source frame are 0x70. Initial switch prologue already aligns except branch distances. The first body discrepancy is initialization scheduling at 8137D44C, before the first state transition.
| BS2Tick | 2 | 8137D44C: derive progress once and clear through stored pointer | 76.66908 -> 76.66908; src 0x1db8 base 0x1e50 insns 1902/1940; restored |
| BS2Tick | 3 | 8137D44C: keep progress and partition-parameter addresses in scoped typed locals | 76.66908 -> 76.39175; src 0x1db8 base 0x1e50 insns 1902/1940; restored |
| BS2Tick | 4 | 8137D44C: load no-disk flag before final initialization stores | 76.66908 -> 76.65619; src 0x1db8 base 0x1e50 insns 1902/1940; restored |
BS2Tick prefix allocation depends on 64-bit elapsed-time comparisons later in the same function. Target 8137D69C uses mulhwu/mullw for a 64-bit 100ms threshold; the existing C truncates that product to 32 bits. Reconstruct that real type boundary before continuing the prefix.
| BS2Tick | 5 | frame-wide time lifetime: restore 64-bit 100ms products from target blocks | 76.66908 -> 76.28299; src 0x1dd8 base 0x1e50 insns 1910/1940; restored |
| BS2Tick | 6 | 8137D4F4: retain promoted clock addend before system time | 76.66908 -> 76.66908; src 0x1db8 base 0x1e50 insns 1902/1940; restored |
| BS2Tick | 7 | 8137D698: use signed wide milliseconds as OS conversion input | 76.66908 -> 79.39536; src 0x1e28 base 0x1e50 insns 1930/1940; kept |
| BS2Tick | 8 | 8137D4F4: named 32-bit spinup duration promoted at addition boundary | 79.39536 -> 79.39536; src 0x1e28 base 0x1e50 insns 1930/1940; restored |
Signed OS milliseconds input retained: BS2Tick 1902 -> 1930 instructions against 1940 target; fuzzy 76.669075 -> 79.39536. The first initialization group remains the same count but has scheduling and register lifetime differences. No block beyond the already-present structure is treated as validated until prefix ordering is resolved.
| BS2Tick | 9 | 8137D4E4: express deadline as clock call plus OS seconds macro | 79.39536 -> 79.45052; src 0x1e28 base 0x1e50 insns 1930/1940; kept |
| BS2Tick | 10 | 8137D44C: move audio initialization before progress pointer computation | 79.45052 -> 79.43402; src 0x1e28 base 0x1e50 insns 1930/1940; restored |
| BS2Tick | 11 | 8137D44C: keep command reset after all partition stores via local pointer | 79.45052 -> 79.44021; src 0x1e28 base 0x1e50 insns 1930/1940; restored |
The initial BS2Tick group has no missing operations: remaining prefix differences are scheduling, use of addze versus the live zero register, and register lifetimes. Scoped-pointer and literal-call translations have been tested before advancing. A direct logger alias is tested as an inline-helper boundary, without changing BS2Report or any other function.
| BS2Tick | 12 | prefix/helper boundary: invoke existing logger through typed local alias | 79.45052 -> 71.64794; src 0x1f9c base 0x1e50 insns 2023/1940; restored |
| BS2Tick | 13 | 8137D44C: clear parameter fields through a compound struct assignment | 79.45052 -> 79.45000; src 0x1e28 base 0x1e50 insns 1930/1940; restored |
## BS2Tick region blocks, address-order reconstruction
Target 8137D970 reads audio flags only after the unconfigured-state test; the existing C reads and sign-extends the disc byte before that test. Target 8137DAxx and 8137DDxx use explicit shared false branches rather than synthesized cntlzw booleans. These are real source structure differences; the initial scheduling group remains open and no complete-function claim is made.
| BS2Tick | 14 | 8137D970: read unsigned audio bytes after pending-state validation | 79.45052 -> 79.25258; src 0x1e24 base 0x1e50 insns 1929/1940; restored |
| BS2Tick | 15 | 8137DA20 and 8137DCB0: load country only on completed command path | 79.45052 -> 79.47217; src 0x1e20 base 0x1e50 insns 1928/1940; kept |
| BS2Tick | 16 | 8137DA20/8137DCD0: correct each region load within its own state block | 79.47217 -> 79.37990; src 0x1e28 base 0x1e50 insns 1930/1940; kept |
Attempt 15 had a transformation-scope error: its second country assignment was inserted in state 14 instead of state 20. Attempt 16 fixes the source scope before any gate or commit; measurements of attempt 15 are rejected.
| BS2Tick | 17 | 8137DAxx/8137DDxx: translate region case blocks with explicit boolean stores | 79.37990 -> 80.30154; src 0x1e70 base 0x1e50 insns 1948/1940; kept |
| BS2Tick | 18 | 8137DAxx: share false region branch at target default block | 80.30154 -> 80.30154; src 0x1e70 base 0x1e50 insns 1948/1940; restored |
| BS2Tick | 19 | region fields: retain unsigned country comparisons and signed API region | 80.30154 -> 80.43144; src 0x1e70 base 0x1e50 insns 1948/1940; kept |
## BS2Tick stack outputs
Target frame 0x70: titleCharacters at sp+8, readOffset at sp+c, readLength at sp+10, readAddress at sp+14, bannerFile at sp+18. Current frame is also 0x70 but the three loader outputs are allocated in the opposite order, pushing the title-character array to sp+14. Reconstruct a typed loader-read descriptor rather than introducing padding.
| BS2Tick | 20 | frame: group actual loader outputs in offset-length-address order | 80.43144 -> 80.44485; src 0x1e70 base 0x1e50 insns 1948/1940; kept |
| BS2Tick | 21 | frame: declare loader descriptor before title character buffer | 80.44485 -> 80.44485; src 0x1e70 base 0x1e50 insns 1948/1940; restored |
| BS2Tick | 22 | 8137D71C and 8137D808: put cache branches before DVD branches | 80.44485 -> 81.44846; src 0x1e70 base 0x1e50 insns 1948/1940; kept |
BS2Tick loader descriptor now matches all target stack output slots: sp+14 address, sp+10 length, sp+c offset; title character bytes are sp+8..b. Target frame remains 0x70. Subsequent block comparison is performed against this frame layout.
| BS2Tick | 23 | 8137E02x and 8137E8xx: use layout format directly for loader word offsets | 81.44846 -> 82.05876; src 0x1e68 base 0x1e50 insns 1946/1940; kept |
| BS2Tick | 24 | loader helper boundary: call stored entry pointers without pointer punning | 82.05876 -> 82.05876; src 0x1e68 base 0x1e50 insns 1946/1940; restored |
## BS2Tick disc identity and audio basic blocks
Target retains the boot disc ID address across memcpy and strncmp calls. The old source repeatedly reconstructs raw addresses. Translate the same fields through DVDDiskID and preserve literal pool order.
| BS2Tick | 25 | 8137D84x-8137D970: keep a typed boot disc pointer across signature calls | 82.05876 -> 82.17114; src 0x1e64 base 0x1e50 insns 1945/1940; kept |
| BS2Tick | 26 | 8137D970-8137D9E8: translate unsigned audio fields with positive branch first | 82.17114 -> 82.55618; src 0x1e60 base 0x1e50 insns 1944/1940; kept |
| BS2Tick | 27 | 8137D9A4: express default streaming-buffer size as conditional value | 82.55618 -> 82.65928; src 0x1e64 base 0x1e50 insns 1945/1940; kept |
| BS2Tick | 28 | 8137DA4x-8137DD64: share region rejection blocks exactly as target branches | 82.65928 -> 83.42732; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
| BS2Tick | 29 | 8137DAA4: emit region-reject state before region-success state | 83.42732 -> 83.43093; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
| BS2Tick | 30 | 8137DD64-8137DE34: flatten region, disc validity and partition branches in address order | 83.43093 -> 83.83402; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
## BS2Tick title-region block 8137E4BC–8137E700
Translate the title header through CurrentTmd, compare the full system version, then use the target product-region switch instead of the previous hand-expanded if tree. Keep the literal strings and order unchanged.
| BS2Tick | 31 | 8137DE5x/8137E4D4: read first TMD version through typed current header | 83.83402 -> 84.53093; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
| BS2Tick | 32 | 8137E558: compare the full required IOS title ID in one condition | 84.53093 -> 84.61031; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
| BS2Tick | 33 | 8137E59C: keep extracted title prefix as promoted signed integer | 84.61031 -> 84.39278; src 0x1e24 base 0x1e50 insns 1929/1940; restored |
| BS2Tick | 34 | 8137E5E0–8137E700: reconstruct regional title checks as target switch blocks | 84.61031 -> 85.61340; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
## BS2Tick banner, closing and error-state blocks 8137E858–8137F1E4
Continue the loader-positive branch, banner early exit, partition transitions, then move ticket and error groups into actual target address order.
| BS2Tick | 35 | 8137E858: emit loader-read positive branch before loader-close state | 85.61340 -> 86.15154; src 0x1e24 base 0x1e50 insns 1929/1940; kept |
| BS2Tick | 36 | 8137E8xx–8137EA6C: translate banner early exit and unmasked disc layout shift | 86.15154 -> 86.63145; src 0x1e20 base 0x1e50 insns 1928/1940; kept |
| BS2Tick | 37 | 8137EB1C: put nonzero TMD locked-disc state before regular-disc state | 86.63145 -> 86.63505; src 0x1e20 base 0x1e50 insns 1928/1940; kept |
| BS2Tick | 38 | 8137ED24/8137EFBC: express DVD transfer state bounds as 4 <= state < 6 | 86.63505 -> 86.63609; src 0x1e20 base 0x1e50 insns 1928/1940; kept |
| BS2Tick | 39 | 8137EE54–8137EF60: arrange close, ticket and error groups in target address order | 86.63609 -> 93.01392; src 0x1e20 base 0x1e50 insns 1928/1940; kept |
| BS2Tick | 40 | 8137F134: use wide signed millisecond conversion for cover-open delay | 93.01392 -> 93.39794; src 0x1e30 base 0x1e50 insns 1932/1940; kept |
Gate 3: PASS; pool identical, regressions 0, forbidden/readability 0, DOL hash correct; Tick 93.39794%, 1932/1940 instructions. Retain TMD, region-switch, loader-positive, banner, partition and address-order corrections.
| BS2Tick | 41 | 8137DFxx: emit positive update-apploader read branch first | 93.39794 -> 93.84742; src 0x1e30 base 0x1e50 insns 1932/1940; kept |
| BS2Tick | 42 | 8137E9AC: express actual banner alignment as subtraction of low address bits | 93.84742 -> 93.61495; src 0x1e34 base 0x1e50 insns 1933/1940; restored |
| BS2Tick | 43 | 8137EEEC: scan ticket bytes as unsigned bytes | 93.84742 -> 93.75413; src 0x1e30 base 0x1e50 insns 1932/1940; restored |
| BS2Tick | 44 | 8137EF60–8137F050: reconstruct error and abort exits before polling path | 93.84742 -> 94.28712; src 0x1e30 base 0x1e50 insns 1932/1940; kept |
| BS2Tick | 45 | 8137F054–8137F0EC: reconstruct restart error and partition exits before drive path | 94.28712 -> 95.13505; src 0x1e30 base 0x1e50 insns 1932/1940; kept |
| BS2Tick | 46 | 8137E3D8–8137E49C: emit cached partition branch before physical drive branch | 95.13505 -> 95.88454; src 0x1e30 base 0x1e50 insns 1932/1940; kept |
| BS2Tick | 47 | 8137E59C: place unrestricted-title block before regional validation in address order | 95.88454 -> 96.23659; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| BS2Tick | 48 | 8137E650/8137E668: reconstruct Korean and Chinese title suffix switches | 96.23659 -> 96.39690; src 0x1e3c base 0x1e50 insns 1935/1940; kept |
| BS2Tick | 49 | 8137E070/8137E13C: evaluate update-state calls separately from short-circuit booleans | 96.39690 -> 96.62938; src 0x1e2c base 0x1e50 insns 1931/1940; kept |
| BS2Tick | 50 | 8137DEEC: put valid update disc state before invalid state | 96.62938 -> 96.82886; src 0x1e30 base 0x1e50 insns 1932/1940; kept |
| BS2Tick | 51 | 8137DD80: put update partition present branch before absent branch | 96.82886 -> 96.98711; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| BS2Tick | 52 | 8137E39C: put game-partition present branch before absent branch | 96.98711 -> 96.90464; src 0x1e38 base 0x1e50 insns 1934/1940; restored |
## CheckBS2CommandStatus end-to-end block map
8137CC28–CC54 frame 0x20/save29; CC58–CCF0 readiness and completion exits; CCF0–CD18 dispatch; CD18–CD58 seek; CD5C–CDD0 drive; CDD4–CE48 ID; CE4C–CEC0 TOC; CEC4–CF60 partitions; CF64–CFD8 BI3; CFDC–D054 TMD; D058–D0CC loader header; D0D0–D150 loader; D154–D1CC loader payload; D1D0–D258 banner; D25C–D27C returns. Prefix through CD74 aligns structurally. First blocker CD90 is a reload of CacheLength immediately after its store; compiler forwards the stored nonvolatile value. Re-translate the following chunks with typed pointers and fresh field expressions; do not add volatile.
| CheckBS2CommandStatus | 2 | CD18–CD90: test block-scoped report declaration at inline-helper boundary | 80.69704 -> 80.69704; src 0x610 base 0x658 insns 388/406; restored |
| CheckBS2CommandStatus | 3 | CEC4–CF60: retranslate partition length without early cached length temporary | 80.69704 -> 83.23645; src 0x620 base 0x658 insns 392/406; kept |
| CheckBS2CommandStatus | 4 | CF64–D27C: retranslate fixed and rounded cache chunks with SDK alignment operations | 83.23645 -> 83.23645; src 0x620 base 0x658 insns 392/406; restored |
| CheckBS2CommandStatus | 5 | CC74–CCC0: retranslate cache readiness as direct combined condition | 83.23645 -> 83.23645; src 0x620 base 0x658 insns 392/406; restored |
Gate 4-valid: PASS; pool identical, regressions 0, forbidden/readability 0. Tick 96.98711%, CheckBS2CommandStatus 83.23645%. Earlier gate 4 ran concurrently with an experiment and is discarded; only the stable rerun is evidence. CheckBS2CommandStatus frame/prefix align, remaining 392/406 count and missing global reloads are structural; not a register-only completion.
| BS2Tick | 53 | 8137E59C: declare extracted title prefix separately as signed word | 96.98711 -> 97.04948; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| BS2Tick | 54 | 8137E614: use suffix switch for US E and X-Y-Z region checks | 97.04948 -> 97.16392; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
## BS2StartGame full address-order translation
BD64–BD94 frame 0x50/save24 and CoverBlock; BD94–BE14 cover polling, report, NAND close; BE14–BE78 controller and boot fields; BE78–BED4 OS flags; BED4–BFF4 ticket/security/launch; BFF4–C0B4 IPC restoration; C0B8–C10C disc callback/poll; C10C–C194 error/fatal; C198–C244 identity and partition issue; C244–C318 partition result/error; C318–C364 fatal and partition reporting; C364–C3x legacy DI/audio/entry handoff. Frame and all non-poll blocks already align modulo registers. Target BD94 is a reloading empty CoverBlock.state loop; existing source uses the DVD status API to avoid unsafe compiler hoisting. C0E4/C130/C244/C2A0 likewise need repeated LowReadResult loads; current source uses interrupt calls. No volatile or assembly is permitted. Test distinct readable forms without accepting a hoisted asynchronous loop.
| BS2StartGame | 2 | C0F0–C194: retranslate disk completion and error dispatch as signed switch | 95.49618 -> 95.49618; src 0x644 base 0x624 insns 401/393; restored |
| BS2StartGame | 3 | C250–C318: retranslate partition completion, error and ticket dispatch as signed switch | 95.49618 -> 95.49618; src 0x644 base 0x624 insns 401/393; restored |
| BS2StartGame | 4 | BED4–BFF4: retranslate required IOS selection with full title ID temporary | 95.49618 -> 95.49618; src 0x644 base 0x624 insns 401/393; restored |
| BS2StartGame | 5 | BD64 frame: declare state flags and ticket output before transient values | 95.49618 -> 95.49618; src 0x644 base 0x624 insns 401/393; restored |
## BS2StartGCGame full address-order translation
C388–C3C4 frame 0x40, rtc sp+c, state flags sp+10, tickets sp+8; C3C4–C46C sound/video/language; C46C–C4A8 full-width RTC ticks; C4AC–C4E0 SRAM; C4E4–C53C NAND close; C53C–C594 controller/audio/state; C598–C5C8 legacy PI register; C5CC–C714 ES tickets/launch and return. First block still has API polling versus target field reload. One missing tail instruction is a hardware register readback: use the existing SDK PI register access definitions, not a new qualifier or hand-placed symbol.
| BS2StartGCGame | 2 | C598–C5C8: translate processor-interface control through existing SDK register macro | 98.24561 -> 98.24561; src 0x38c base 0x390 insns 227/228; restored |
| BS2StartGCGame | 3 | C388 frame: move state flag object beside RTC and ticket outputs | 98.24561 -> 98.24561; src 0x38c base 0x390 insns 227/228; restored |
| BS2StartGCGame | 4 | C46C–C4A8: retranslate RTC conversion through wide signed seconds macro | 98.24561 -> 98.24561; src 0x38c base 0x390 insns 227/228; restored |
| BS2StartGCGame | 5 | C3C4–C468: inline value temporaries at sound and progressive API boundaries | 98.24561 -> 98.24561; src 0x38c base 0x390 insns 227/228; restored |
## BS2NANDDivideCallback full address-order translation
C8B0–C8EC frame 0x10/save31 and cancellation; C8EC–C904 negative result; C904–C934 transferred/buffer and remaining bound; C934–C9AC write/read full chunk; C9AC–C9C8 callback error; C9C8–CA70 write/read final chunk; CA70–CA8C callback error; CA8C–CAAC completion/epilogue. Target reloads NandTransferred after store and rereads length/transferred at each later operation. Current compiler forwards nonvolatile globals. Translate early exits first, then chunk branches and completion in address order.
| BS2NANDDivideCallback | 2 | C8B0–C904: reconstruct cancellation and negative-result early returns | 85.03906 -> 85.03906; src 0x1dc base 0x200 insns 119/128; restored |
| BS2NANDDivideCallback | 3 | C904–C934: update byte pointer before transferred count | 85.03906 -> 85.00000; src 0x1dc base 0x200 insns 119/128; restored |
| BS2NANDDivideCallback | 4 | C9C8–CAAC: retranslate final chunk with explicit remaining-byte temporary | 85.03906 -> 70.85938; src 0x1dc base 0x200 insns 119/128; restored |
| BS2NANDDivideCallback | 5 | C934–CA70: use unsigned operation switch at NAND helper boundary | 85.03906 -> 84.94531; src 0x1dc base 0x200 insns 119/128; restored |
## BS2NANDDivideReadAsync full address-order translation
CAB0 frame 0x10/save31; six transfer-state stores; unsigned maximum 0x40000; report and NAND issue for full chunk; report and issue for final length; restore31/return. First structural gap is NandLength reload immediately after initialization. Body is fully represented in readable C but compiler forwards globals. No new qualifiers or artificial side effects are added.
| BS2NANDDivideReadAsync | 2 | initialization: keep file and buffer assignment before operation/length setup | 60.31915 -> 60.31915; src 0xb4 base 0xbc insns 45/47; restored |
| BS2NANDDivideReadAsync | 3 | helper boundary: test direct block-scoped report prototype | 60.31915 -> 60.31915; src 0xb4 base 0xbc insns 45/47; restored |
| BS2NANDDivideReadAsync | 4 | full-to-final chunk: retranslate length choice and common NAND issue | 60.31915 -> 35.31915; src 0x90 base 0xbc insns 36/47; restored |
| BS2NANDDivideReadAsync | 5 | initialization temporaries: snapshot incoming length through argument instead of stored global | 60.31915 -> 52.44681; src 0xc0 base 0xbc insns 48/47; restored |
## BS2NANDDivideWriteAsync full address-order translation
CB6C frame 0x10/save31; six transfer-state stores; unsigned maximum 0x40000; report and NAND issue for full chunk; report and issue for final length; restore31/return. First structural gap is NandLength reload immediately after initialization. Body is fully represented in readable C but compiler forwards globals. No new qualifiers or artificial side effects are added.
| BS2NANDDivideWriteAsync | 2 | initialization: keep file and buffer assignment before operation/length setup | 60.31915 -> 60.31915; src 0xb4 base 0xbc insns 45/47; restored |
| BS2NANDDivideWriteAsync | 3 | helper boundary: test direct block-scoped report prototype | 60.31915 -> 60.31915; src 0xb4 base 0xbc insns 45/47; restored |
| BS2NANDDivideWriteAsync | 4 | full-to-final chunk: retranslate length choice and common NAND issue | 60.31915 -> 35.31915; src 0x90 base 0xbc insns 36/47; restored |
| BS2NANDDivideWriteAsync | 5 | initialization temporaries: snapshot incoming length through argument instead of stored global | 60.31915 -> 52.44681; src 0xc0 base 0xbc insns 48/47; restored |
## Run end-to-end instruction audit
B3EC–B3F0 CTR/LR handoff; B3F4–B464 clears r0,r2,r3,r5,r7..r31; B468–B470 resets stack to 0x81600000; B474–B484 cache-line zero/flush counted loop; B488–B490 clears r4 and returns through LR; B494 loops to cache block. Target has no C frame. Ordinary C cannot specify these ABI register and stack resets, and new assembly is forbidden. Re-translate the expressible cache and entry operations; do not invent dummy locals for the register reset.
| Run | 2 | B48C–B490: reconstruct boot entry with zero r3 and r4 arguments | 0.88372 -> 0.00000; src 0x78 base 0xac insns 30/43; restored |
| Run | 3 | B474–B484: translate counted cache loop as explicit while | 0.88372 -> 0.88372; src 0x78 base 0xac insns 30/43; restored |
| Run | 4 | B478–B484: translate cache bounds through end pointer | 0.88372 -> 0.88372; src 0x78 base 0xac insns 30/43; restored |
## BS2Tick second structural pass
All state groups have now been translated through the shared epilogue in target address order. 97.16392%, 1933/1940 instructions. Remaining concrete differences include initial scheduling, low-memory address materialization, DVD magic failure ordering, banner alignment, unsigned ticket scan and DVD state range branch form. Continue source forms at those exact blocks; register-only status has not been reached.
| BS2Tick | 55 | 8137D860–8137D890: reconstruct header pointer only after memcpy | 97.16392 -> 97.24020; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| BS2Tick | 56 | 8137DCCC: emit valid magic and region path before magic failure | 97.24020 -> 97.16908; src 0x1e38 base 0x1e50 insns 1934/1940; restored |
| BS2Tick | 57 | 8137D44C: establish audio setup flag before transfer zeroing | 97.24020 -> 97.06186; src 0x1e2c base 0x1e50 insns 1931/1940; restored |
| BS2Tick | 58 | 8137ED20/8137EFB8: translate active DVD state range as target switch form | 97.24020 -> 97.30825; src 0x1e3c base 0x1e50 insns 1935/1940; kept |
Run compiler binary exposes __dcbz and __dcbf intrinsics. These express the actual cache instructions as C, but do not expose the all-GPR and stack reset. Test intrinsic cache loop without introducing assembly.
| Run | 5 | B478–B47C: translate cache-line zero and flush with compiler cache intrinsics | compile failed |
Gate 5: PASS; pool identical, regressions 0, forbidden/readability 0; Tick 97.30825%. All eight full target functions have been read through their epilogues and at least three distinct source experiments compiled for each. This is not completion: several functions still have structural mismatches and do not meet the exact/register-only endpoint.
Tick device field is the existing SDK __OSDeviceCode at 800030E6; use that named SDK field rather than the raw absolute cast. No new volatile declaration or mapped symbol is introduced.
| BS2Tick | 59 | 8137D7A4–8137D7CC: use named SDK boot device code field | 97.30825 -> 97.30825; src 0x1e3c base 0x1e50 insns 1935/1940; restored |
| Run | 6 | B478–B47C: translate cache instructions with correct two-argument intrinsics | 0.88372 -> 16.74419; src 0x2c base 0xac insns 11/43; kept |
Run intrinsic cache translation is retained: 30 -> 11 instructions, 0.88372 -> 16.74419%. Prefix mtctr and cache loop now use actual target operations. CPU register/stack handoff remains outside the permitted C operations.
| Run | 7 | B474–B484: use unconditional cache loop as target, including zero-count behavior | 16.74419 -> 10.11628; src 0x24 base 0xac insns 9/43; restored |
| Run | 8 | B48C–B490: translate zero-valued boot arguments after intrinsic cache loop | 16.74419 -> 15.69768; src 0x30 base 0xac insns 12/43; restored |
| BS2Tick | 60 | 8137D44C: use typed partition reset descriptor and direct progress pointer | 97.30825 -> 97.30825; src 0x1e3c base 0x1e50 insns 1935/1940; restored |
| BS2Tick | 61 | 8137D44C: assign one actual initialization constant across reset fields | 97.30825 -> 97.30773; src 0x1e3c base 0x1e50 insns 1935/1940; restored |
| BS2Tick | 62 | 8137D44C and timeout blocks: keep clock temporary as signed OSTime | 97.30825 -> 97.30825; src 0x1e3c base 0x1e50 insns 1935/1940; restored |
GC target C5B4 stores the processor-interface control word, then C5B8 reads the same MMIO register back. This is a real target hardware readback, not a RAM reload. Translate it using the existing SDK PI access macros; no new volatile qualifier or addressed object is added. CoverBlock polling remains the separate unresolved issue.
| BS2StartGCGame | 6 | C598–C5C8: translate target PI control write and actual MMIO readback | 98.24561 -> 99.56140; src 0x390 base 0x390 insns 228/228; kept |
Test direct cover-state source control-flow forms only if compiler actually reloads in the loop. Reject hoisted polls even if fuzzy score rises.
| BS2StartGCGame | 7 | cover-prefix: translate target label and backward branch explicitly | 99.56140 -> 96.88596; src 0x390 base 0x390 insns 228/228; restored |
| BS2StartGCGame | 8 | cover-prefix: translate target do-while read loop | 99.56140 -> 96.88596; src 0x390 base 0x390 insns 228/228; restored |
| BS2StartGCGame | 9 | cover-prefix: translate break-controlled cover loop | 99.56140 -> 96.88596; src 0x390 base 0x390 insns 228/228; restored |
| BS2StartGame | 6 | cover-prefix: translate target label and backward branch explicitly | 95.49618 -> 93.94402; src 0x644 base 0x624 insns 401/393; restored |
| BS2StartGame | 7 | cover-prefix: translate target do-while read loop | 95.49618 -> 93.94402; src 0x644 base 0x624 insns 401/393; restored |
| BS2StartGame | 8 | cover-prefix: translate break-controlled cover loop | 95.49618 -> 93.94402; src 0x644 base 0x624 insns 401/393; restored |
Test the repository NO_INLINE helper boundary on the real BS2Report body. Original target retains direct calls to an empty report function; this experiment changes no behavior, data, qualifier or function name. Keep only measurable aggregate progress with no exact-function regression.
| BS2Report | 1 | inline helper boundary: explicitly retain report calls with repository NO_INLINE | compile failed |
| BS2Report | 2 | inline helper boundary: test compiler noinline declaration form for C | compile failed |
Gate 7: PASS; pool identical, regressions 0, forbidden/readability 0. Run cache intrinsics and GC processor-interface readback reviewed against target; no assembly, new qualifier, or hand-placed object. GC now 228/228 instructions with one opcode mismatch at the cover wait (bl API versus lwz state), not a register-only result.
| BS2StartGCGame | 10 | C490–C4A4: put timer frequency before signed seconds in full-width product | 99.56140 -> 99.42982; src 0x390 base 0x390 insns 228/228; restored |
| BS2Tick | 63 | 8137DCCC–8137DD98: include region and disc validity checks inside valid-magic branch | 97.30825 -> 97.78866; src 0x1e3c base 0x1e50 insns 1935/1940; kept |
| BS2Tick | 64 | 8137E59C–8137E5C4: reconstruct restricted title families as sparse switch | 97.78866 -> 97.70773; src 0x1e40 base 0x1e50 insns 1936/1940; restored |
| BS2Tick | 65 | 8137D938–8137D96C: assign GC layout successor after both magic branches | 97.78866 -> 97.83402; src 0x1e3c base 0x1e50 insns 1935/1940; kept |
Assembly audit found real unfinished loader control flow: 8137E014 falls directly into LoaderMain at E018; E808 likewise falls into E80C. The old C broke after loader initialization and delayed the first loader read to another tick. Remove both breaks to reproduce target behavior.
| BS2Tick | 66 | 8137E014/E808: restore immediate loader-main fallthrough after initialization | 97.83402 -> 98.04021; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| BS2Tick | 67 | 8137EEEC: promote ticket scan byte as unsigned before zero comparison | 98.04021 -> 98.25309; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| BS2Tick | 68 | 8137E9AC: reconstruct target banner alignment by removing low five address bits | 98.25309 -> 97.99278; src 0x1e38 base 0x1e50 insns 1934/1940; restored |
BS2Tick now 98.25309%, 1933/1940. Real semantic gaps corrected: loader initialization immediately enters LoaderMain in the same tick; valid RVL magic includes region and disc validity checks before the later magic-reject block; unsigned ticket byte comparison matches target. Reindent the reconstructed valid-magic scope for review; no instruction change intended.
| BS2Tick | 69 | 8137D98C: load streaming byte before clearing audio configuration flag | 98.25309 -> 98.24794; src 0x1e34 base 0x1e50 insns 1933/1940; restored |
Gate 8: PASS; pool identical, regressions 0, forbidden/readability 0; Tick 98.25309%, 1933/1940. Streaming snapshot attempt 69 restored because it lowered fuzzy without instruction-count gain. Review confirms the new initialization fallthroughs and MMIO readback are actual target operations. All remaining nonmatches are structural; none is claimed finished or register-only.
BS2Tick: current 98.25309%; src 0x1e34 base 0x1e50 insns 1933/1940. Detailed final ctxdiff: /tmp/bs2r2-final-BS2Tick.diff.
CheckBS2CommandStatus: current 83.23645%; src 0x620 base 0x658 insns 392/406. Detailed final ctxdiff: /tmp/bs2r2-final-CheckBS2CommandStatus.diff.
BS2StartGame: current 95.496185%; src 0x644 base 0x624 insns 401/393. Detailed final ctxdiff: /tmp/bs2r2-final-BS2StartGame.diff.
BS2StartGCGame: current 99.5614%; src 0x390 base 0x390 insns 228/228. Detailed final ctxdiff: /tmp/bs2r2-final-BS2StartGCGame.diff.
BS2NANDDivideCallback: current 85.03906%; src 0x1dc base 0x200 insns 119/128. Detailed final ctxdiff: /tmp/bs2r2-final-BS2NANDDivideCallback.diff.
BS2NANDDivideReadAsync: current 60.31915%; src 0xb4 base 0xbc insns 45/47. Detailed final ctxdiff: /tmp/bs2r2-final-BS2NANDDivideReadAsync.diff.
BS2NANDDivideWriteAsync: current 60.31915%; src 0xb4 base 0xbc insns 45/47. Detailed final ctxdiff: /tmp/bs2r2-final-BS2NANDDivideWriteAsync.diff.
Run: current 16.744186%; src 0x2c base 0xac insns 11/43. Detailed final ctxdiff: /tmp/bs2r2-final-Run.diff.
Unmet endpoint: instruction-exact remains 21/29. Run still lacks GPR/stack/LR reset, StartGame/StartGCGame cover polling still uses an API call, and NAND/cache globals still have missing reloads. The forbidden volatile/assembly/configuration tricks were not used. All eight have target block maps through their returns and distinct compiled source attempts, but the requested exact-or-register-only endpoint has not been achieved.
## Final full clean gate and endpoint audit
Instruction-exact 21/29 -> 21/29; objdiff code 4052/16980 -> 4052/16980; data 155504/158528 -> 155504/158528; unit fuzzy 84.64641 -> 94.98469.
INCOMPLETE: none of the eight reaches the exact-or-register-only endpoint. No compiler/register/qualifier bypass is used to conceal this.
BS2Tick: 76.669075 -> 98.25309%; 68 logged attempts. 1933/1940 instructions; address materialization, initial/store scheduling, partition reloads, title-prefix branch and banner alignment still differ. This is structural, not register-only.
CheckBS2CommandStatus: 80.697044 -> 83.23645%; 4 logged attempts. 392/406; target reloads CacheLength after stores and repeats loader/banner length loads; generated C forwards those globals. Prefix/frame aligned.
BS2StartGame: 95.496185 -> 95.496185%; 7 logged attempts. 401/393; cover API call replaces target load and low-level callback waits add interrupt calls; direct loops tested this round hoist the load and are rejected.
BS2StartGCGame: 98.24561 -> 99.5614%; 9 logged attempts. 228/228; cover API bl/compare/backward branch differs from target lwz/cmpwi/bne. Direct label, do-while and break loops all produce bne -4 with the load outside the loop and are rejected. Remaining RTC operand registers also differ.
BS2NANDDivideCallback: 85.03906 -> 85.03906%; 4 logged attempts. 119/128; transferred/length/buffer reloads are forwarded and cancellation callback load is scheduled before the store.
BS2NANDDivideReadAsync: 60.31915 -> 60.31915%; 4 logged attempts. 45/47; stored length and final length reloads are forwarded; registers also differ.
BS2NANDDivideWriteAsync: 60.31915 -> 60.31915%; 4 logged attempts. 45/47; stored length and final length reloads are forwarded; registers also differ.
Run: 0.88372093 -> 16.744186%; 7 logged attempts. 11/43; actual dcbz/dcbf counted loop now present, but target GPR clears, SP replacement and LR handoff have no ordinary C expression in the exposed compiler intrinsics. New assembly is forbidden.
Retained source commits: 7d4bdea4, ad5c371e, 240d7a58, 0d575639, cb4db7d6, 9c829f69, ccd3577f. Only src/BS2/BS2Mach.c and this attempt log changed.
Final full gate (no --quick), after clean object rebuild:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4052/16980 data 155504/158528 functions 21/29 fuzzy 94.9847 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 21/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 94.98469
[src/BS2/BS2Mach] below 100: Run 16.744186
[src/BS2/BS2Mach] below 100: BS2StartGame 95.496185
[src/BS2/BS2Mach] below 100: BS2StartGCGame 99.5614
[src/BS2/BS2Mach] below 100: BS2NANDDivideCallback 85.03906
[src/BS2/BS2Mach] below 100: BS2NANDDivideReadAsync 60.31915
[src/BS2/BS2Mach] below 100: BS2NANDDivideWriteAsync 60.31915
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 83.23645
[src/BS2/BS2Mach] below 100: BS2Tick 98.25309
[src/BS2/BS2Mach] baseline: code 4052/16980 data 155504 functions 21 fuzzy 84.6464
regressions vs baseline: 0
global matched_code_percent: 84.84254 -> 84.84254
global fuzzy_match_percent: 98.07848 -> 98.13709
global complete_code_percent: 59.34297 -> 59.34297
global matched_data_percent: 90.43305 -> 90.43305
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,189 @@
# bs2 reload matching attempts
Baseline: 787aa9d3, fresh branch agent/w0930/bs2-reloads. Object builds, string pools, ctxdiff and objdiff accompany each candidate; rejected candidates restored. Detailed candidate source and diffs in /tmp/bs2r3-attempts.
main/src/BS2/BS2Mach
- Run: 172 bytes, 16.744186%.
- BS2StartGame: 1572 bytes, 95.496185%.
- BS2StartGCGame: 912 bytes, 99.5614%.
- BS2NANDDivideCallback: 512 bytes, 85.03906%.
- BS2NANDDivideReadAsync: 188 bytes, 60.31915%.
- BS2NANDDivideWriteAsync: 188 bytes, 60.31915%.
- CheckBS2CommandStatus: 1624 bytes, 83.23645%.
- BS2Tick: 7760 bytes, 98.25309%.
main/src/BS2/BS2Update
- BS2UpdateInit: 288 bytes, 79.875%.
- UpdateThread: 3652 bytes, 84.516975%.
| Unit | Function | Attempt | Change | Result |
| --- | --- | --- | --- | --- |
Initial quick gate: full build and DOL hash correct, both pools identical, no added forbidden/style patterns. Default gate lacks latest-main baseline 787aa9d3. Until the orchestrator supplies it, use gate --base 30809a5b, the immediately preceding checked-in main with an authoritative baseline, and independently compare both owned units to the fresh 787aa9d3 snapshot. No baseline reports edited.
| src/BS2/BS2Mach | BS2StartGCGame | 1 | Poll an explicit command-state snapshot read from CoverBlock each iteration; memcpy keeps the asynchronous read observable without qualifying the global | 99.56140 -> 96.71491; src 0x3a0 base 0x390 insns 232/228; restored |
| src/BS2/BS2Mach | BS2StartGCGame | 2 | RTC multiplication with frequency widened as the left operand, retaining the post-call RTC and bus-clock reads | 99.56140 -> 99.42982; src 0x390 base 0x390 insns 228/228; restored |
| src/BS2/BS2Mach | BS2StartGCGame | 3 | Use a 64-bit tick-frequency temporary and multiply by the explicitly unsigned RTC plus bias | 99.56140 -> 99.42982; src 0x390 base 0x390 insns 228/228; restored |
| src/BS2/BS2Mach | BS2StartGCGame | 4 | Inline the seconds addition into the tick conversion after the bias call, preserving global bus-clock read location | 99.56140 -> 99.42982; src 0x390 base 0x390 insns 228/228; restored |
| src/BS2/BS2Mach | BS2Tick | 1 | Remove cached partition pointer from both state-18 loops; each report and increment dereferences global PartitionCursor | 98.25309 -> 98.28918; src 0x1e34 base 0x1e50 insns 1933/1940; kept |
| src/BS2/BS2Mach | BS2Tick | 2 | Read data TOC partition count through the global pointer after reporting instead of the known GameTOCBuf address | 98.28918 -> 98.28505; src 0x1e34 base 0x1e50 insns 1933/1940; restored |
Correction: I read the wrong gate status before making local commit 9b58ef9a. The alternate-base gate actually FAILS due to changes already on main: nand_drv data decrease and sd_drv volatile additions in #400. I undid that local commit with git reset --soft HEAD~1, retaining source and logs. No gate-failing commit remains. Latest-main baseline 787aa9d3 is required; no restore-tools or baseline report edits are authorized. Tick improvement remains uncommitted until the default gate passes. Fuzzy 98.25309 -> 98.28918; 1933/1940 instructions.
| src/BS2/BS2Mach | BS2Tick | 3 | Positive GamePartition branch precedes the failed-partition branch; keep state-37 fallthrough into state 37 | 98.28918 -> 98.20515; src 0x1e38 base 0x1e50 insns 1934/1940; restored |
| src/BS2/BS2Mach | BS2StartGame | 1 | Remove local status snapshots; every error dispatch comparison reads global LowReadResult directly | 95.49618 -> 94.79644; src 0x644 base 0x624 insns 401/393; restored |
| src/BS2/BS2Mach | BS2StartGame | 2 | Read an explicit global completion snapshot at each polling iteration using ordinary memcpy, preserving asynchronous polling | 95.49618 -> 94.36132; src 0x65c base 0x624 insns 407/393; restored |
| src/BS2/BS2Mach | BS2StartGame | 3 | Remove drive-error caching; read and mask the hardware error register at each comparison | 95.49618 -> 95.49618; src 0x644 base 0x624 insns 401/393; restored |
| src/BS2/BS2Mach | BS2NANDDivideCallback | 1 | Use pointers to the real transfer counters and dereference them at every update, remaining-byte test, report and completion | 85.03906 -> 78.09375; src 0x1ec base 0x200 insns 123/128; restored |
| src/BS2/BS2Mach | BS2NANDDivideCallback | 2 | Keep cancellation and negative-result blocks as separate guards returning before updating the global transfer state | 85.03906 -> 85.03906; src 0x1dc base 0x200 insns 119/128; restored |
| src/BS2/BS2Mach | BS2NANDDivideCallback | 3 | Write counter and buffer updates explicitly, test completion by equality, and reload global completion callback on each call | 85.03906 -> 87.26562; src 0x1dc base 0x200 insns 119/128; kept |
| src/BS2/BS2Mach | CheckBS2CommandStatus | 1 | Remove cached dataToc pointer; both partition chunk calculations read global DataToc and its count directly | 83.23645 -> 83.27340; src 0x620 base 0x658 insns 392/406; kept |
| src/BS2/BS2Mach | CheckBS2CommandStatus | 2 | Dereference a pointer to the actual global CacheLength at every accumulation and limit comparison | 83.27340 -> 81.80788; src 0x624 base 0x658 insns 393/406; restored |
| src/BS2/BS2Mach | CheckBS2CommandStatus | 3 | Express cache capacity as failure guard then perform the write, maintaining literal order and direct global argument reads | 83.27340 -> 83.27340; src 0x620 base 0x658 insns 392/406; restored |
| src/BS2/BS2Mach | BS2NANDDivideReadAsync | 1 | Dereference pointer to the real global length at each limit test, report and async NAND argument | 60.31915 -> 52.44681; src 0xc0 base 0xbc insns 48/47; restored |
| src/BS2/BS2Mach | BS2NANDDivideReadAsync | 2 | Set global file and buffer before resetting the transferred count, keeping all later calls as direct global reads | 60.31915 -> 60.31915; src 0xb4 base 0xbc insns 45/47; restored |
| src/BS2/BS2Mach | BS2NANDDivideReadAsync | 3 | Use a switch over the length comparison to retain the two explicit reporting and async-call blocks | 60.31915 -> 71.80851; src 0xd0 base 0xbc insns 52/47; kept |
| src/BS2/BS2Mach | BS2NANDDivideWriteAsync | 1 | Dereference pointer to the real global length at each limit test, report and async NAND argument | 60.31915 -> 52.44681; src 0xc0 base 0xbc insns 48/47; restored |
| src/BS2/BS2Mach | BS2NANDDivideWriteAsync | 2 | Set global file and buffer before resetting the transferred count, keeping all later calls as direct global reads | 60.31915 -> 60.31915; src 0xb4 base 0xbc insns 45/47; restored |
| src/BS2/BS2Mach | BS2NANDDivideWriteAsync | 3 | Use a switch over the length comparison to retain the two explicit reporting and async-call blocks | 60.31915 -> 71.80851; src 0xd0 base 0xbc insns 52/47; kept |
| src/BS2/BS2Update | UpdateThread | 1 | Rebuild the target 0xf0 frame with a typed scratch structure: channel/block/inode outputs at sp8/c/10, ticket count14, area18, title20, paths28/48 and DVD file68 | compile failed |
| src/BS2/BS2Update | UpdateThread | 2 | Translate initial area switch to shared invalid-product block and valid-product join matching address-order basic blocks | 84.51698 -> 85.58051; src 0xd74 base 0xe44 insns 861/913; kept |
| src/BS2/BS2Update | UpdateThread | 3 | Read global UpdateProgress directly for each WAD suffix/import path; remove local index snapshots after report calls | 85.58051 -> 84.74699; src 0xd7c base 0xe44 insns 863/913; restored |
| src/BS2/BS2Update | UpdateThread | 4 | Correct the scratch-frame translation to qualify locals only, preserving BS2UpdateEntry.titleId fields and the target stack slots | 85.58051 -> 85.55203; src 0xd74 base 0xe44 insns 861/913; restored; regression matched_data |
| src/BS2/BS2Update | UpdateThread | 5 | Rebuild matching scratch stack layout with token-aware local replacements preserving string literals and entry fields | 85.58051 -> 85.61446; src 0xd74 base 0xe44 insns 861/913; kept |
| src/BS2/BS2Update | BS2UpdateInit | 1 | Explicitly initialize the existing seat flag array to zero to test declaration-order BSS emission and the target common Flags0 anchor | 79.87500 -> 79.87500; src 0x11c base 0x120 insns 71/72; restored |
| src/BS2/BS2Update | BS2UpdateInit | 2 | Give thread start an explicit local thread and stack-end pointer to match the original saved thread-base register and frame | 79.87500 -> 79.87500; src 0x11c base 0x120 insns 71/72; restored |
| src/BS2/BS2Update | BS2UpdateInit | 3 | Initialize the existing flag arrays, thread storage and update headers explicitly; test common BSS grouping without adding objects | 79.87500 -> 79.87500; src 0x11c base 0x120 insns 71/72; restored |
| src/BS2/BS2Update | UpdateThread | 6 | Translate every update-discovery failure in address order as report then selectedCount=0 then jump to the common count publication, avoiding a shared reset block | 85.61446 -> 86.59912; src 0xd9c base 0xe44 insns 871/913; kept |
All requested Mach functions now have at least three compiled source-level attempts in this round; real caching removals improved Tick and command-status, and callback equality changed register scheduling. GC and StartGame retain asynchronous-safe API polling: direct snapshots added calls instead of the target reloads. No volatile declarations or asm were added. UpdateThread stack layout now matches via typed scratch fields; proceeding through failure/basic-block joins. Latest-main baseline is still unavailable, so no commits are authorized by the gate yet.
| src/BS2/BS2Update | UpdateThread | 7 | Remove cached entry pointers in both discovery loops and listing; each statement re-indexes the disc/seat array, matching target repeated base-plus-index instructions | 86.59912 -> 89.73384; src 0xe08 base 0xe44 insns 898/913; kept |
UpdateThread: direct re-indexing of entries follows original address-order loads; cached base pointers retained where target keeps them across calls. All scratch fields are existing real outputs/paths/file info, with no padding.
| src/BS2/BS2Update | BS2UpdateInit | 4 | Extract actual seat-flag initialization and critical-attribute filtering into an inline helper before thread initialization, preserving executable operations and testing the original helper boundary/common BSS anchor | 79.87500 -> 79.87500; src 0x11c base 0x120 insns 71/72; restored |
| src/BS2/BS2Update | BS2UpdateInit | 5 | Group existing real flag arrays, thread and aligned DVD headers as typed update storage, preserving all sizes/required alignment and reading members directly; test the target shared-base addressing | 79.87500 -> 77.50000; src 0x11c base 0x120 insns 71/72; restored; regression matched_data |
| src/BS2/BS2Update | UpdateThread | 8 | Retain the literal disc-entry base as a typed local pointer while re-indexing every access, matching the target saved base register rather than folded addis accesses | 89.73384 -> 91.48083; src 0xe0c base 0xe44 insns 899/913; restored; regression matched_data |
| src/BS2/BS2Update | UpdateThread | 9 | Extract the low title code with the explicit 64-bit 0xffffffff mask used by the target Internet/BBC checks | 89.73384 -> 89.69003; src 0xe14 base 0xe44 insns 901/913; restored |
| src/BS2/BS2Update | UpdateThread | 10 | Restore the original global symbol binding of rc and hardware/version variables from target nm; external calls may modify rc, requiring the target repeated reads | 89.73384 -> 89.73384; src 0xe08 base 0xe44 insns 898/913; restored |
Update discovery stack and initial region/failure blocks now follow target order. Direct entry indexing improved UpdateThread 84.51698 -> 89.73384 and instruction count 860 -> 898 versus target 913. Rejected saved-base and 64-bit-mask candidates show further code gains but changed the matched jump-table data, so they remain restored. Target nm shows rc/version symbols global; restoring binding alone did not prevent -ipa file forwarding and was restored.
| src/BS2/BS2Update | UpdateThread | 11 | Re-translate first-loop copy cursor: original r30 advances only after an imported entry; type-zero entries increment selectedCount but not the selected-array write cursor | 89.73384 -> 89.63965; src 0xe04 base 0xe44 insns 897/913; restored |
| src/BS2/BS2Update | UpdateThread | 12 | Advance a typed selected-entry cursor in both type-zero and import-copy branches, reproducing the independent r30 cursor alongside selectedCount | 89.73384 -> 88.80614; src 0xe04 base 0xe44 insns 897/913; restored |
| src/BS2/BS2Mach | BS2NANDDivideReadAsync | 4 | Treat zero as the small-transfer case and use default for a full chunk, avoiding unreachable explicit-boolean switch alternatives | 71.80851 -> 82.55319; src 0xbc base 0xbc insns 47/47; kept |
| src/BS2/BS2Mach | BS2NANDDivideWriteAsync | 4 | Treat zero as the small-transfer case and use default for a full chunk, avoiding unreachable explicit-boolean switch alternatives | 71.80851 -> 82.55319; src 0xbc base 0xbc insns 47/47; kept |
| src/BS2/BS2Mach | BS2Tick | 4 | Use the disk-ID gameName field for the four system-disc comparisons, leaving the header pointer for magic and streaming reads | 98.28918 -> 98.28918; src 0x1e34 base 0x1e50 insns 1933/1940; restored |
| src/BS2/BS2Mach | BS2Tick | 5 | Keep an independently typed game-name pointer for the system-disc inline comparison block | 98.28918 -> 98.17680; src 0x1e38 base 0x1e50 insns 1934/1940; restored |
| src/BS2/BS2Mach | BS2Tick | 6 | Read the streaming flag into a byte temporary before preparing either audio-config call, matching the original field-load order | 98.28918 -> 98.28918; src 0x1e34 base 0x1e50 insns 1933/1940; restored |
| src/BS2/BS2Update | UpdateThread | 13 | Give discovery, listing and import phases separate typed disc-base pointer lifetimes, keeping repeated per-use indexing and original saved literal base registers | 89.73384 -> 91.29463; src 0xe14 base 0xe44 insns 901/913; kept |
| src/BS2/BS2Update | UpdateThread | 14 | Translate both import joins as local call result then one global rc store before the report, matching target stores outside the suffix branches | 91.29463 -> 91.45454; src 0xe0c base 0xe44 insns 899/913; kept |
| src/BS2/BS2Update | UpdateThread | 15 | Restore original global rc definition with explicit zero initialization before import-result joins; verify emitted reloads rather than assuming visibility fixes them | 91.45454 -> 91.45454; src 0xe0c base 0xe44 insns 899/913; restored |
| src/BS2/BS2Update | UpdateThread | 16 | Use the target 64-bit lower-word title mask in the seat restrictions after phase-specific disc-base lifetimes are rebuilt | 91.45454 -> 92.31435; src 0xe18 base 0xe44 insns 902/913; kept |
Current original global read limitations: NAND initializers target reloads at 8137CAE0/8137CB2C while direct global C reads are still store-forwarded. StartGame target polls CoverBlock.state and LowReadResult without API/barrier calls; all safe ordinary-C snapshot variants added calls and were rejected. Update rc report/error paths target reloads at 81380058/81380064/81380078; changing symbol binding did not stop compiler forwarding. No volatile/asm/codegen pragmas or hand-placed objects used.
Whitespace review: indented phase-local loops and failure jumps consistently; rebuilt Update object. Current retained Update discovery has the exact 0xf0 frame and named scratch slots; initial region switch, failure joins, both selection loops, restrictions, listing and import joins have been translated/reviewed in target address order. Residual data-anchor and rc/global forwarding are documented; no register-only or exact claim is made.
Final fresh-build measurements:
- BS2StartGCGame: 912 bytes, 99.56140 -> 99.56140; src 0x390 base 0x390 insns 228/228; 4 compiled attempts.
- BS2Tick: 7760 bytes, 98.25309 -> 98.28918; src 0x1e34 base 0x1e50 insns 1933/1940; 6 compiled attempts.
- BS2StartGame: 1572 bytes, 95.49618 -> 95.49618; src 0x644 base 0x624 insns 401/393; 3 compiled attempts.
- BS2NANDDivideCallback: 512 bytes, 85.03906 -> 87.26562; src 0x1dc base 0x200 insns 119/128; 3 compiled attempts.
- CheckBS2CommandStatus: 1624 bytes, 83.23645 -> 83.27340; src 0x620 base 0x658 insns 392/406; 3 compiled attempts.
- BS2NANDDivideReadAsync: 188 bytes, 60.31915 -> 82.55319; src 0xbc base 0xbc insns 47/47; 4 compiled attempts.
- BS2NANDDivideWriteAsync: 188 bytes, 60.31915 -> 82.55319; src 0xbc base 0xbc insns 47/47; 4 compiled attempts.
- UpdateThread: 3652 bytes, 84.51698 -> 92.31435; src 0xe18 base 0xe44 insns 902/913; 15 compiled attempts.
- BS2UpdateInit: 288 bytes, 79.87500 -> 79.87500; src 0x11c base 0x120 insns 71/72; 5 compiled attempts.
Final full gate, both touched units, default origin/main baseline.
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/BS2/BS2Mach] pool: IDENTICAL
[src/BS2/BS2Mach] objdiff: code 4052/16980 data 155504/158528 functions 21/29 fuzzy 95.5642 linked code 0
[src/BS2/BS2Mach] instruction-exact functions: 21/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 95.56419
[src/BS2/BS2Mach] below 100: Run 16.744186
[src/BS2/BS2Mach] below 100: BS2StartGame 95.496185
[src/BS2/BS2Mach] below 100: BS2StartGCGame 99.5614
[src/BS2/BS2Mach] below 100: BS2NANDDivideCallback 87.265625
[src/BS2/BS2Mach] below 100: BS2NANDDivideReadAsync 82.55319
[src/BS2/BS2Mach] below 100: BS2NANDDivideWriteAsync 82.55319
[src/BS2/BS2Mach] below 100: CheckBS2CommandStatus 83.2734
[src/BS2/BS2Mach] below 100: BS2Tick 98.28918
[src/BS2/BS2Update] pool: IDENTICAL
[src/BS2/BS2Update] objdiff: code 112/4052 data 1328/10488 functions 8/10 fuzzy 91.6427 linked code 0
[src/BS2/BS2Update] instruction-exact functions: 8/10
[src/BS2/BS2Update] section .bss size 9056 match 72.9682
[src/BS2/BS2Update] section .data size 1328 match 100.0
[src/BS2/BS2Update] section .sbss size 80 match 78.947365
[src/BS2/BS2Update] section .sdata size 24 match 94.117645
[src/BS2/BS2Update] section .text size 4052 match 91.64265
[src/BS2/BS2Update] below 100: BS2UpdateInit 79.875
[src/BS2/BS2Update] below 100: UpdateThread 92.31435
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE FAIL: no baseline report for merge-base 787aa9d3; rebase onto origin/main
```
Full clean build and DOL hash pass; both pools identical, zero added forbidden patterns and readability warnings. The only final failure is absent authoritative baseline 787aa9d3. Latest main already is 787aa9d3, so rebasing cannot solve this; no baseline files or restore tools were modified. No gate-passing commit could be made. All improvements are preserved as uncommitted changes on agent/w0930/bs2-reloads for orchestrator baseline generation/review. Erroneous local commit 9b58ef9a was undone and is not on this branch. No functions reached instruction exactness; no claim of completion or register-only equivalence.
| src/BS2/BS2Mach | BS2StartGCGame | 5 | Inline typed command-state accessor at the original polling helper boundary | 99.56140 -> 96.88596; src 0x390 base 0x390 insns 228/228; restored |
| src/BS2/BS2Mach | BS2StartGCGame | 6 | Inline global cover-state accessor; repeat the global member access through the helper on every iteration | 99.56140 -> 96.88596; src 0x390 base 0x390 insns 228/228; restored |
| src/BS2/BS2Mach | BS2StartGCGame | 7 | Inline pending-command predicate, with the idle comparison inside the helper | 99.56140 -> 96.88596; src 0x390 base 0x390 insns 228/228; restored |
Final additional helper boundary audit: GC attempts 5/6/7 all compiled at 228/228 instructions but 96.88596%, below the retained 99.56140%. Each hoists CoverBlock.state and branches bne -4, so it is also unsafe as asynchronous polling. All three restored. Seven compiled GC attempts total. No source differs from the full-gate candidate after these restorations.