Skip to content

WOW64: preserve Wine-provided FS base in interpreter lookups - #30

Open
butilly wants to merge 1 commit into
mainfrom
fix/midnight-suns-box64-fs-fix
Open

butilly wants to merge 1 commit into
mainfrom
fix/midnight-suns-box64-fs-fix

Conversation

@butilly

@butilly butilly commented Nov 2, 2026

Copy link
Copy Markdown
Owner

AI-authored container-scoped fix for Marvel’s Midnight Suns, exe MidnightSuns-Win64-Shipping.exe, thread 1566649959229427735. The game never starts: steamhost32.exe on WOWBox64 0.4.2 6515f68 emits GetSegmentBase does not apply to Wine dlls and raises c0000005 in wowbox64.dll+0x3f6a48, with caller offsets 0x3db848 and 0x3bb1f4, then exits -1073741819. No thermal or memory pressure; median GPU 0%. Source inspection: BTCpuSimulate seeds segs_offs[_FS] using calculate_fs(), ARM64 JIT grab_segdata consumes that cache, but interpreter prefix handling calls GetSegmentBaseEmu, whose non-BOX64EC path overwrites it through the null-returning Wine stub. Extend the existing FS cache guard to Windows builds while preserving BOX64EC GS behavior and Linux selector lookup. No Wine, architecture, driver or game-file changes. Targeted compiled harness using the actual changed function passes for WOW64, BOX64EC and Linux guards, checking distinct thread caches, refreshed FS, zero selector, GS and flat DS. git diff --check passes. On-device validation pending: expect the segment warning and helper access violation to disappear and check whether the game process starts. This fixes a demonstrated source mismatch; report offsets are not symbolized, so other startup faults remain possible.

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.

1 participant