Repository navigation
Give PC-Talker its delay-load stubs on ARM64 - #132
Merged
Merged
Conversation
Owner
|
PCTalker is available on ARM64, so we do need to add stubs fro that arch (I forgot to do this in the recent batch of commits, woops). |
Contributor
Author
|
@ethindp should I do that in this pr, or would you like to close/merge this and then have me or you do that as its own pr? |
Owner
|
@trypsynth I'm happy if it's combined as one PR. Either works for me. |
trypsynth
force-pushed
the
fix/pc-talker-arm64
branch
from
September 22, 2026 14:25
cb3a361 to
b1d5794
Compare
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.
On Windows ARM64, probing PC-Talker on a machine without it crashes the process:
The availability poll reaches PC-Talker in its first scan, so any context with an availability callback takes the process down on ARM64 within a second of starting.
PC-Talker is built for ARM64, and
PrismPlatformWindows.cmakegenerates its import library there, butPCTK_DLLand PC-Talker's stubs sat inside the x86/x64 block indelayimp.cpp. With no stub, the failure hook has nothing to return, and the delay-load exception is fatal.What this does
Moves
PCTK_DLLout of the x86/x64 block and, inside the one stub table, wraps only the ZDSR and BoyPCReader entries in that block. PC-Talker's entries and the bridge entries now exist on every architecture, which makes the separate#elsetable (a copy of the bridge entries) redundant, so it goes.This replaces the first version of this PR, which built PC-Talker on x86 and x64 only.
Testing
On GitHub's
windows-11-armrunner, through a .NET test suite that creates a context with an availability callback. Before, the test host crashed on the first scan as above. After, PC-Talker is registered and the suite passes. The same suite passes on x64 and x86.