Skip to content

feat: add DSX UDP mod protocol compatibility server (port 6969) - #86

Open
Gabarsolon wants to merge 4 commits into
hbashton:mainfrom
Gabarsolon:feature/dsx-udp-mod-protocol
Open

feat: add DSX UDP mod protocol compatibility server (port 6969)#86
Gabarsolon wants to merge 4 commits into
hbashton:mainfrom
Gabarsolon:feature/dsx-udp-mod-protocol

Conversation

@Gabarsolon

Copy link
Copy Markdown

Summary

Adds an integrated, lightweight UDP compatibility server implementing the DSX / DualSenseX modification protocol on port 6969. This allows third-party PC game mods (such as DualSenseV for GTA V, Cyberpunk 2077 DualSense Mod, Hogwarts Legacy, etc.) to directly control DualSense adaptive triggers, RGB lightbar colors, and mic/player LEDs through DS4Windows without requiring proprietary third-party applications.

Key Changes

  • DSXUdpServer.cs: Implemented UDP listener supporting JSON instructions (TriggerUpdate, RGBUpdate, PlayerLED, MicLED, ResetToUserSettings, and GetDSXStatus). Includes translation into raw 11-byte DualSense HID reports for modes such as Off, Feedback/Resistance, Weapon, Vibration, Bow, Galloping, Machine, and Custom zones.
  • ControlService.cs: Integrated DSXUdpServer into the service lifecycle (Start / Stop), connecting incoming mod instructions directly to connected DualSenseDevice instances.
  • Settings UI & Configuration:
    • Added UseDSXUDPServer, DSXUDPServerPort (default: 6969), and DSXUDPServerListenAddress (default: 127.0.0.1) in ScpUtil.cs and AppSettingsDTO.cs.
    • Added dedicated UI controls in the Settings tab in MainWindow.xaml under *\ DSX UDP Mod Compatibility Server*.
  • Unit Tests (DSXUdpServerTests.cs): Added comprehensive test coverage validating packet deserialization, trigger mode byte packing, and status responses.

Verification

  • Automated Tests: All 991 test cases passing (dotnet test).
  • Live Hardware In-Game Verification: Tested on physical DualSense hardware with Grand Theft Auto V (DualSenseV mod) and custom UDP payloads, verifying responsive adaptive triggers, character RGB switching, and reset handling.

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