Repository navigation
Mac: render Switch HD rumble through DualSense USB - #1993
Open
radium-wang wants to merge 1 commit into
Open
radium-wang wants to merge 1 commit into
radium-wang wants to merge 1 commit into
Conversation
Core Haptics folds each grip’s two bands into intensity and sharpness. Send the timed bands as 48 kHz USB waveforms to the left and right grips when one DualSense is unambiguously connected as player 1. Keep the regular haptics route when USB output is unavailable. Double the base USB synthesis gain and apply the existing strength slider on top, with a per-grip peak limit. Exercise the signal path, strength, cutoff, and reset in t_haptics_apple.
4 of 5 tasks
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 and why
The Mac Core Haptics adapter converts each Switch grip's low and high vibration bands into intensity and sharpness. Super Mario Bros. Wonder uses distinct vibration pitches on the Wiggler Race Mountaineering course, which that mapping cannot reproduce directly.
Add a USB PCM output for a single DualSense or DualSense Edge in player 1's slot. It synthesizes both bands per grip at 48 kHz, routes them to channels 3 and 4, and leaves channels 1 and 2 silent. The adapter checks that the Sony audio and HID endpoints refer to the same USB device before sending a rumble mode report. It uses the existing Core Haptics path if USB is unavailable or
DM_DUALSENSE_USB=0.The USB output has a 2× base gain. The existing slider multiplies it, so 100% in the launcher produces twice the unscaled synthesis amplitude, while 200% produces four times the amplitude before limiting. The limit scales both bands together per grip to preserve their balance.
Related to #986, which improves the separate-handle Core Haptics path.
Checked
t_hapticsandt_haptics_applecover the vibration state, USB PCM channel separation, independent frequency bands, default and slider gains, peak limit, cutoff, and reset.On an Apple M1 Pro running macOS 27.0, a USB DualSense Edge was used with Super Mario Bros. Wonder 1.2.1 (
010015100B514000). The prototype log confirmed the USB PCM route, and the player felt the pitch changes on the race's track. The new gain curve is verified in the offline PCM test. Physical amplitude versus a Joy-Con and multi-controller USB setups were not compared.The macOS host test suite and the changed-file clang-tidy check passed. The full game regression comparison was stopped before completion.
Docs