Skip to content

Add direct tvOS controller and rumble bridge - #37

Closed
joeblack2k wants to merge 6 commits into
chrissotraidis:mainfrom
joeblack2k:codex/tvos-controller-rumble-preview11
Closed

Add direct tvOS controller and rumble bridge#37
joeblack2k wants to merge 6 commits into
chrissotraidis:mainfrom
joeblack2k:codex/tvos-controller-rumble-preview11

Conversation

@joeblack2k

Copy link
Copy Markdown
Contributor

Summary

  • feed the selected Extended Gamepad directly into Dolphin pad 0 without a sandbox-blocked FIFO
  • translate Dolphin rumble output to a persistent Core Haptics player
  • preserve the existing iOS FIFO path unchanged

Verification

  • ./scripts/check-repository.sh
  • arm64 tvOS compile of patched GCPad.cpp
  • SunPadTVAppDelegate.mm and SunPadCoreHost.mm compile cleanly for tvOS; the isolated feature branch stops only at the expected missing provisioned SunPadCore link input

@joeblack2k

Copy link
Copy Markdown
Contributor Author

Physical Woonkamer validation: the normal signed build reaches and enforces the Extended Gamepad gate. A controllerless diagnostic build then booted the same physical runtime. No Extended Gamepad was connected during this run, so real button input and controller rumble bridge active remain explicitly unverified. Commit 6240ed2 adds the default-off diagnostic compile flag used for the runtime smoke test.

@joeblack2k

Copy link
Copy Markdown
Contributor Author

Checkpoint correction applied in 5394aa3: asynchronous rumble teardown now exits when the weak controller owner has already deallocated, before dereferencing haptic ivars. Added test_tvos_rumble_teardown_is_owner_safe; the focused tvOS contract suite passes (8 tests on this isolated PR branch).

@joeblack2k

Copy link
Copy Markdown
Contributor Author

Controller startup behavior updated per device feedback: SunPad no longer blocks boot, shows a controller prompt, or starts wireless discovery when no gamepad is connected. The runtime now starts immediately and keeps the existing GameController connect/disconnect observers active, so an Extended Gamepad can be powered on during the intro/loading flow and is adopted without restarting the game. Added test_tvos_boot_never_waits_for_controller; the isolated PR branch passes all 9 tvOS contract tests and ./scripts/check-repository.sh. Physical Woonkamer validation follows on the normal signed build.

@joeblack2k

Copy link
Copy Markdown
Contributor Author

Physical Woonkamer follow-up on AppleTV11,1 / tvOS 26.6: the first Core Haptics implementation exposed an actual lifecycle incompatibility (NSCocoaErrorDomain 4097 when starting CHHapticAdvancedPatternPlayer). The branch now starts the engine first and uses Apple’s standard CHHapticPatternPlayer with direct start/stop for Dolphin’s binary GameCube rumble signal. Device evidence from the normal signed build: controller selected vendor=Xbox Wireless Controller haptics=1, controller haptics ready, and an explicit live call through the exported bridge produced controller rumble bridge active. The same launch logged runtime thread starting before controller selection, so boot is no longer gated and hot-connect remains active. All 9 isolated tvOS contract tests and ./scripts/check-repository.sh pass.

@chrissotraidis

Copy link
Copy Markdown
Owner

Thank you, Jeroen — the direct GameController snapshot bridge, hot connection, controller-owned teardown, and binary haptics path are now incorporated in merged PR #42 and the published Preview 12 release. I retained the corrective follow-up commits, reconciled startup with the Simulator path, and preserved attribution to your GitHub account. Normal gameplay input, FLUDD pressure, disconnect/reconnect, and game-triggered haptics remain exact-artifact hardware acceptance gates. I’m closing this source PR because the reviewed integration is now on main.

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