Skip to content

Jj/sislib#2540

Merged
jellejurre merged 12 commits into
doldecomp:masterfrom
jurrejelle:jj/sislib
May 31, 2026
Merged

Jj/sislib#2540
jellejurre merged 12 commits into
doldecomp:masterfrom
jurrejelle:jj/sislib

Conversation

@jurrejelle
Copy link
Copy Markdown
Collaborator

No description provided.

jurrejelle and others added 9 commits May 25, 2026 18:30
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merge the pointer-param inline into a single function so pos/result/remove_size
stay in registers, and byte-index string_buffer (s16 signed for type 1, u16
unsigned for type 3). Remaining diffs are register swaps and an 8-byte frame.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fix halfword cursor reads (s16/u16 not byte/float), case 0/8 cursor reassign,
pass cursor pointer to HSD_SisLib_803A7684, relocate block_33, while-loop the
tail clear. Remaining diffs are the HSD_SisLib_8040CB00 SDA-vs-hoist register
cascade and an add reassociation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implement the ASCII->SIS conversion: fill in the space/dot/digit/colon kerning
prefix blocks, the SJIS LUT lookup loop (lbl_8040C8C0 -> HSD_SisLib_8040C680),
and convert to a for-loop. Remaining diffs are register allocation (has_kerning
stack spill vs register, CTR loop) producing extra moves.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implement the entry-replace function: find entry via fn_803A6FEC, format with
vsnprintf+HSD_SisLib_803A67EC, grow/shrink the buffer and shift the tail, then
copy the encoded string in. Remaining diffs are loop form (CTR vs manual
decrement) and bulk-8 unroll style.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fix the append-entry function: write through alloc->data_0 as the byte cursor
(member reload/increment per write), use (s16)x/(s16)y for position, correct
color/scale header order, and per-byte bulk copy. Remaining diffs are CTR loop
form and register allocation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Implement the push-state function: 5-case switch (scale/color/scale2/align/value)
that ensures string_buffer room (realloc + bulk copy + zero-fill) then writes the
state bytes via x6C++. Remaining diffs are CTR loop form and post-increment
register allocation in the copy loops.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add the HSD_SisLib_803A8134 line-measure call in opcode 7, and fix the delay
(case 5/6 u16) and scale (case 10 s16, case 14 u16) cursor reads to halfword.
Remaining diffs are the HSD_SisLib_8040CD40/CB00 SDA-vs-hoist register cascade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@decomp-dev
Copy link
Copy Markdown

decomp-dev Bot commented May 25, 2026

Report for GALE01 (06d20a7 - 1b1191b)

📈 7 improvements in unmatched items
Unit Item Bytes Before After
main/sysdolphin/baselib/sislib HSD_SisLib_803A7684 +1202 0.00% 55.05%
main/sysdolphin/baselib/sislib HSD_SisLib_803A84BC +913 66.31% 89.15%
main/sysdolphin/baselib/sislib HSD_SisLib_803A70A0 +765 0.00% 78.79%
main/sysdolphin/baselib/sislib HSD_SisLib_803A6B98 +397 51.49% 87.35%
main/sysdolphin/baselib/sislib HSD_SisLib_803A67EC +236 35.58% 60.71%
main/sysdolphin/baselib/sislib HSD_SisLib_803A7F0C +168 67.41% 97.87%
main/sysdolphin/baselib/sislib HSD_SisLib_803A8134 +108 82.88% 94.84%

@jellejurre jellejurre marked this pull request as ready for review May 31, 2026 13:40
@jellejurre jellejurre enabled auto-merge (squash) May 31, 2026 13:40
@jellejurre jellejurre merged commit 4a104e5 into doldecomp:master May 31, 2026
7 checks passed
sadkellz pushed a commit to sadkellz/melee that referenced this pull request Jun 6, 2026
* Match HSD_SisLib_803A594C (92%)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A5798 (99%)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A7F0C (98%)

Merge the pointer-param inline into a single function so pos/result/remove_size
stay in registers, and byte-index string_buffer (s16 signed for type 1, u16
unsigned for type 3). Remaining diffs are register swaps and an 8-byte frame.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A8134 (94%)

Fix halfword cursor reads (s16/u16 not byte/float), case 0/8 cursor reassign,
pass cursor pointer to HSD_SisLib_803A7684, relocate block_33, while-loop the
tail clear. Remaining diffs are the HSD_SisLib_8040CB00 SDA-vs-hoist register
cascade and an add reassociation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A67EC (60%)

Implement the ASCII->SIS conversion: fill in the space/dot/digit/colon kerning
prefix blocks, the SJIS LUT lookup loop (lbl_8040C8C0 -> HSD_SisLib_8040C680),
and convert to a for-loop. Remaining diffs are register allocation (has_kerning
stack spill vs register, CTR loop) producing extra moves.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A70A0 (79%)

Implement the entry-replace function: find entry via fn_803A6FEC, format with
vsnprintf+HSD_SisLib_803A67EC, grow/shrink the buffer and shift the tail, then
copy the encoded string in. Remaining diffs are loop form (CTR vs manual
decrement) and bulk-8 unroll style.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A6B98 (87%)

Fix the append-entry function: write through alloc->data_0 as the byte cursor
(member reload/increment per write), use (s16)x/(s16)y for position, correct
color/scale header order, and per-byte bulk copy. Remaining diffs are CTR loop
form and register allocation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A7684 (55%)

Implement the push-state function: 5-case switch (scale/color/scale2/align/value)
that ensures string_buffer room (realloc + bulk copy + zero-fill) then writes the
state bytes via x6C++. Remaining diffs are CTR loop form and post-increment
register allocation in the copy loops.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Match HSD_SisLib_803A84BC (89%)

Add the HSD_SisLib_803A8134 line-measure call in opcode 7, and fix the delay
(case 5/6 u16) and scale (case 10 s16, case 14 u16) cursor reads to halfword.
Remaining diffs are the HSD_SisLib_8040CD40/CB00 SDA-vs-hoist register cascade.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Remove target funcs

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: jellejurre <git@jellejurre.dev>
Co-authored-by: JelleJurre <76777936+jellejurre@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants