Skip to content

fix(oot): serve the nn::hid service, so the ocarina does not stop the process - #2

Merged
Kolkka merged 1 commit into
Kolkka:feat/ootfrom
MD5Visual:fix/oot-hid-service
Nov 8, 2026
Merged

Kolkka merged 1 commit into
Kolkka:feat/ootfrom
MD5Visual:fix/oot-hid-service

Conversation

@MD5Visual

Copy link
Copy Markdown

What

One-file fix for the process stopping the first time the ocarina is played.

Ocarina of Time opens nn::hid when the ocarina first runs
(main+0x329541c → sdk+0x10be854). The runtime had no handler for that
service, so sm answered "service hid not implemented" and stopped the
process.

Fix

Register a hid service in games/totk/runtime/hid_feedback.c:

  • every command returns success with a zeroed reply, which is what
    nn::hid::Initialize and its style-set / handle queries accept;
  • the first 12 commands are logged ([totk-ipc] hid command …), so a call
    that 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):

  • loaded a Hateno save and played the ocarina: the process no longer stops;
  • apart from this, the session was pretty stable — title/menu, opening movie,
    Hateno gameplay, no other crash.

Without the patch the process stops the first time the ocarina opens, which is
what this addresses.

… 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.
@Kolkka

Kolkka commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Not tested but build passes

@Kolkka
Kolkka merged commit a754466 into Kolkka:feat/oot Nov 8, 2026
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