Skip to content

๐ŸŽฎ HEX Mapping Reference: DualSense Triggers

rafaelvaloto edited this page Jan 6, 2026 · 4 revisions

Project: GamepadCore
Protocol: HID over USB/Bluetooth
Data Structure: 10-byte array per trigger

๐Ÿ“Œ Overview

DualSense triggers accept a 10-byte buffer to configure resistance, vibration, and feedback effects. The first byte (Mode) determines the motor behavior.


๐Ÿ›  Operation Modes

๐ŸŸข 0x00 - Off (Reset)

Disables any resistance or vibration. Returns the trigger to its default state.

  • Structure: [00 00 00 00 00 00 00 00 00 00]

๐Ÿ”ต 0x01 - Continuous Resistance

Applies a constant resistance force starting from a specific position.

  • Structure: [01] [StartPos] [Force] [00...00]
  • Parameters:
    • StartPos: Initial resistance position (0-255).
    • Force: Intensity of the resistance (0-255).

๐ŸŸก 0x02 - GameCube Click

Simulates a mechanical "click" at the end of the trigger pull.

  • Fixed Structure: [02 80 a0 ff 00 00 00 00 00 00]

๐Ÿ”ต 0x21 - Inclination Feedback

Linear resistance between two points. Ideal for pedal simulators (gas/brake).

  • Hex Example: 21 fe 03 f8 ff ff 3f

๐ŸŸก 0x22 - Bow (Tension)

Simulates the tension of a bowstring being pulled, with a "snap-back" point.

  • Structure: [22] [Start_Zone] [Behavior] [Amplitude]
  • Example: 22 82 00 3F (Strong bow from position 2 to 8).

๐ŸŸฃ 0x23 - Galloping

A rhythmic effect that simulates horse steps.

  • Structure: [23] [StartPos] [EndPos] [Footings] [Freq]
  • Example: 23 02 02 1E 04

๐Ÿ”ด 0x25 - Weapon (Semiautomatic)

Simulates a firearm trigger with a clear "break point" before firing.

  • Example: 25 20 01 07

๐ŸŸค 0x26 - Automatic Gun (Vibration)

Continuous high-frequency vibration. Ideal for automatic weapons or power tools.

  • Structure: [26] [StartPos] [Amplitude] [Frequency] ...
  • Example: 26 f0 03 00 00 8f 3f 00 00 09

โšซ 0x27 - Machine

Complex rhythmic vibration with two amplitude levels and a configurable period.

  • Structure: [27] [Start_Zone] [Behavior] [Amplitude] [Period] [Freq]
  • Example: 27 02 02 3A 0A 05

๐Ÿ’ป GamepadCore Implementation (C++20)

To apply these effects via code using the IGamepadTrigger interface:

#include <vector>
#include <cstdint>

void ApplyMachineEffect(IGamepadTrigger* Trigger) {
    if (!Trigger) return;

    // Example: Machine Effect (0x27)
    // The buffer must always be 10 bytes long
    std::vector<std::uint8_t> Buffer = {
        0x27, 0x02, 0x02, 0x3A, 0x0A, 0x05, 0x00, 0x00, 0x00, 0x00
    };

    Trigger->SetCustomTrigger(EDSGamepadHand::Right, Buffer);
}

โš ๏ธ Technical Notes

  1. Start Zones: Values such as 0x82 (Start), 0x84 (Middle), 0x80 (End) are commonly used to define where the effect begins.
  2. Padding: The buffer must always be 10 bytes. Fill with 0x00 if the command is shorter.
  3. Connectivity: Over Bluetooth, latency might affect the perception of high-frequency vibration effects (0x26/0x27). GamepadCore handles this automatically via connection-aware HID reports.

Documentation generated on 2026-01-05 for GamepadCore development support.