Skip to content

Mac: render Switch HD rumble through DualSense USB - #1993

Open
radium-wang wants to merge 1 commit into
seedds:mainfrom
radium-wang:mac-dualsense-usb-haptics
Open

radium-wang wants to merge 1 commit into
seedds:mainfrom
radium-wang:mac-dualsense-usb-haptics

Conversation

@radium-wang

Copy link
Copy Markdown

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_haptics and t_haptics_apple cover 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

  • Added the service reference and game note, updated the player settings, and regenerated the symptom index.
  • No game files, keys, saves, or extracted data are included.

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.
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) docs Documentation game: 010015100B514000 Super Mario Bros. Wonder labels Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 010015100B514000 Super Mario Bros. Wonder host The Horizon host: SVCs, services, threads, memory (dm/host)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant