Repository navigation
fix(oot): serve the nn::hid service, so the ocarina does not stop the process - #2
Merged
Merged
Conversation
… process Ocarina of Time opens nn::hid when the ocarina first runs (main+0x329541c -> sdk+0x10be854). The runtime had no handler for it, so sm answered "service hid not implemented" and stopped the process. Input, rumble and motion already reach the game through the SDK hooks in hid_feedback.c, so the service only answers: every command returns success with a zeroed reply, which nn::hid::Initialize and its style-set / handle queries accept. The first 12 commands are logged, so a call that really needs data can be recognised. Tested on bd3e70e from a Hateno save, including the ocarina, on an M3 Max (48 GB): the process no longer stops, and the rest of the session was stable.
Owner
|
Not tested but build passes |
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.
What
One-file fix for the process stopping the first time the ocarina is played.
Ocarina of Time opens
nn::hidwhen the ocarina first runs(
main+0x329541c→sdk+0x10be854). The runtime had no handler for thatservice, so
smanswered "service hid not implemented" and stopped theprocess.
Fix
Register a
hidservice ingames/totk/runtime/hid_feedback.c:nn::hid::Initializeand its style-set / handle queries accept;[totk-ipc] hid command …), so a callthat really needs data can be recognised later.
Input, rumble and motion are unchanged: they already reach the game through
the SDK hooks in the same file.
How it was tested
On
bd3e70e+ this patch, M3 Max (48 GB):Hateno gameplay, no other crash.
Without the patch the process stops the first time the ocarina opens, which is
what this addresses.