Repository navigation
Add Intel macOS dmsh_xlate launcher - #1
Merged
Merged
Conversation
IndecentDad
pushed a commit
that referenced
this pull request
Nov 4, 2026
The walk from the load back to the bounds check noticed copies and masks but no other write: cmp w18,#4; b.hi; add w18,w18,#1; ldrsw x18,[x4,x18,lsl #2] read entries 0 to 4 while the code uses 1 to 5, so one case's target was missing with no sign of it. A site with a write of the index after its check, or a call with a caller-saved index, is now refused, as jump_adr_offsets and half_count already refuse a write. A refusal goes on to the other recognizers and ends in the jump table assertion. Writes before the check do not count, which keeps the sites check_before_copy takes. A write that keeps the value, such as sxtw x0,w0, is refused too; no module on the drive has one. Checked: test_jump_copies.py (the new cases fail on the previous rewriter). Of the 345 unique modules on the drive, old and new recognition are the same on 281, and 60 more mains were scanned on the previous code with no site this refuses. That includes Smash 13.0.5, EA SPORTS FC 27 and Well Dweller. Four could not be checked: New Super Mario Bros. U Deluxe's main, sdk and rtld fail alike (no profile), and Smash 1.0.0's main stops at a table the game's note already lists. No regress.py run: nothing changes in the modules checked.
sudodan
pushed a commit
to sudodan/nxnative-sudodan-branch-
that referenced
this pull request
Nov 7, 2026
Build on Linux, and sync with upstream to 2026-10-27
IndecentDad
pushed a commit
that referenced
this pull request
Nov 7, 2026
… that would put the table in page zero, since no path of a working game carries it to the load (issue seedds#1532) main+0x59dc90 interleaves four dispatch loops that share registers: x12 is the table base of one (adrp + add at +0x59dba4) and the constant 1 of another (mov w12,#1 at +0x59dbdc, in a block that leaves by b to its own dispatch), kept apart only by the value of w8. Since e5620b1 the base's writer walk sees a write of wN, met that mov first and gave up, and the NSP script stopped at `jump table 59dc90` on a build the profile names. patch_nso.py null_base: before the walk has found the base's add, a mov of a constant (or of wzr / xzr) that puts the whole table inside page zero is passed; Horizon never maps that page, so the load would fault through it on the console too. Any other writer still ends the chain, and a constant between the adrp and the add is the base's own input. Checked: test_jump_copies.py NullPageBase (4 of its cases fail on the rewriter before), lint_python 0 new, test_docs. The site's ten targets are instructions of the function, three of them shared with its sibling tables in x15 and x17, and Cuphead's main.sites.tsv is line for line the one of the rewriter before e5620b1. Rewritten before and after: 34 other modules of 12 games (Okami HD, Octopath Traveler 0 and II, Three Houses, Sonic Superstars, Minecraft Dungeons II, Splatoon Raiders, Ocarina of Time, DK Bananza, Pokopia, Mario Tennis Fever, Cuphead's sdk and movie module) are byte-identical. Cuphead's NSP build completes, and the game plays from a fresh save to the Inkwell Isle map at 1.3.7 with no red line (the route does not reach this function). No regress.py run: nothing changes in any module that rewrote before.
IndecentDad
pushed a commit
that referenced
this pull request
Nov 7, 2026
…d jump_adr_offsets took the nearest cmp of the index, whatever followed it (issue seedds#977, PR seedds#1515) guarded_count takes a compare only when, between it and the table load, the first branch on an unsigned condition comes with the compare's flags still in place: b.hi out of the dispatch reads N + 1 entries, b.hs / b.cs N (read as N + 1 before), b.ls / b.lo into it the same counts when the instruction before its target ends the path that failed. A compare with no such branch only sets the flags and the walk goes on to the check before it; with none the site is refused. Before, `cmp w18,#4; b.hi exit; cmp w18,#1; ldrsw ...` read 2 entries of a table of 5 with no error. Checked (by the author): 165 sites of 27 modules of 6 games, all cmp; b.hi, rewritten byte-identically; GuardedCheck, 8 cases, 7 failing before. Checked here, as seedds#977 asks before a stricter rule goes in: 35 modules of 12 games on the T7 (Cuphead, Three Houses, Minecraft Dungeons II, Octopath Traveler 0 and II, Okami HD, Sonic Superstars, Ocarina of Time, DK Bananza, Mario Tennis Fever, Pokopia, Splatoon Raiders) rewrite byte-identically before and after, and so do Super Smash Bros. Ultimate 13.0.5, Mario Kart 8 Deluxe and Super Mario Odyssey's main, sdk and subsdk0 (against origin/main, with the page-zero rule of the commit before); test_jump_copies 75 OK, lint_python 0 new, test_docs. No regress.py run: no module that rewrote before changes. Modules with b.hs or a branch into the dispatch are still tested only synthetically. Co-authored-by: Atomsk-debug <135618857+Atomsk-debug@users.noreply.github.com>
IndecentDad
pushed a commit
that referenced
this pull request
Nov 14, 2026
…eedds#1352) Civilization VII 1.5.0.1 crashed on the Mac with CRASH sig=10 addr=0 pc=main+0x4e8a18 on its UI's second screen change: four hand-written blocks in its main save x1-x17 in a 0x98-byte frame around svc #0x29, which leaves sp 8 bytes off. Horizon allows that, Apple's kernel faults on it, as with sub sp, sp, xN (site_sp_align). odd_sp_frames rounds both immediates of such a pair up to 16 in place, only when the matching add follows within 64 instructions and nothing between them branches, writes or copies sp, uses writeback or reaches past the frame. On top of the PR: a frame of 0xff1-0xfff rounds to 0x1000, which the unshifted 12-bit field cannot hold; written as before it became sub sp, sp, #0, lsl seedds#12, a frame of nothing whose stores land on the caller's stack. sp_adjust writes it as #1, lsl seedds#12, and test_sp_frame.py covers it. The search now finds candidates by a one-byte regex like exclusive_order_sites instead of walking every word: 2.71 s -> 0.08 s on PRAGMATA's 134 MiB main. Checked: test_sp_frame.py (8), the 16 test files that use patch_nso.py, test_docs.py, lint_python.py --against origin/main (nothing new). The search finds no odd sub/add sp, #imm word in 42 modules (main, rtld, sdk, subsdk*) of 10 local games, so their rewrites are unchanged; the PR author measured TotK and MGS4 byte-identical and Civilization VII 8 words changed, 14 minutes (49,800 frames) without a crash. regress.py not run: no local game has such a frame. Supersedes PR seedds#1666 (every odd immediate rounded unpaired, which would move incoming stack arguments). Co-authored-by: Xiaofeng Han <15362031+xiaofeng-han@users.noreply.github.com>
IndecentDad
pushed a commit
that referenced
this pull request
Nov 17, 2026
…bit test (seedds#2562) Manual Samuel's and w13,w17,seedds#7; tbnz w17,#2 gives four entries; the same form with tbnz #0 and #1 (masks #1 and #3) must give one and two, with the word past them poisoned so that a wider reading fails. Facts from PR seedds#2695's tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries the validated architecture-aware launcher and arm64 companion from PR #5. Intel uses the existing .NET DLL; Apple Silicon uses the native arm64 binary.