Skip to content

the-maazu/deckshock4

Repository files navigation

deckshock4

DualShock® 4 emulator for Steam Deck®

In(unin)stallation & Execution

  1. Download the latest release deckshock4-vX.X.X.tar.gz and extract content.
  2. Open terminal in the extracted subfolder and execute $ ./install.sh
  3. You can run deckshock4
    • In terminal, $ deckshock4,
    • or add as non-steam game and set target to ~/.local/bin/deckshock4.
  4. To stop deckshock4
    • Hold STEAM button for 10 seconds,
    • CTRL-C (in terminal)
    • or close the terminal.
  5. To uninstall, open terminal in extracted subfolder and execute $ ./uninstall.sh

Configuration (from v0.1.0)

A config file should be created in the home directory ~/.local/share/deckshock4/config.json. deckshock4 will fallback to an inbuilt default equivalent to the config below, should config.json be malformed or empty.


{
    "disable": 0,
    "accelX": 0,
    "accelY": 1,
    "accelZ": 2,
    "invaccelX": 0,
    "invaccelY": 0,
    "invaccelZ": 0,
    "accelXofst": 0,
    "accelYofst": -5000,
    "accelZofst": -13000,
    "R4": -1,
    "R5": -3,
    "L4": -3,
    "L5": -3
}

In the future this will be controlled with a frontend decky-plugin.

General:

  • disable is intepreted as false for '0' and true for non-zero values.

Accelerometer:

  • accelX,accelY,accelZ can be remapped with '0','1' and '2' and disabled with '-1'.
  • invaccelX,invaccelY,invaccelZ reverse axis directions and are intepreted as false for '0' and true for non-zero values.
  • accelXOfst,accelYOfst,accelZOfst control base orientation and can be assigned values '-32768' to '32767'. Inbuilt defaults assume a flat controller when SteamDeck is held at a viewing angle (tested with RPCS3).

Back-buttons (from v0.1.2):

  • R4,R5,L4,L5 can be mapped to {BackButtonDisable, BackButtonDefault, BackButtonShake, X, O, Square,Triangle, L1, R1, L2, R2, Share,Options,PS, Tpad1,Tpad2, L3, R3} with values '-3' to '14' respectively.
  • R4 is by default mapped to simulate shake (BackButtonShake=-1) on hold.
  • Tpad1 and Tpad2 map to the single DualShock trackpad click.

Controller Settings & Steam Client Considerations

Input may be duplicated while deckshock4 is running;

  • From v0.1.1 deckshock4 will try to grab(inhibit) the steam controller virtual input, so no need to remove in-built controller mappings in the per game controller settings.
  • However the steam client itself recieves the raw input so touch interactions with steam client UI is recommended while deckshock4 is running.
  • In desktop mode, disable steam input for the emulated PS4 Controller in Desktop Layout settings.
  • For games and apps with native DS4 support like RPCS3, PS Plus®, God of War© etc;
    1. Disable steam input for the virtual PS4 Controller.
    2. For the inbuilt controller set Gyro 'As Joystick'. Without gyro mapped to something Steam Controller does not send out sensor data.
    3. Optional: For inbuilt controller set Trackpads 'As Joystick' to enable haptic feedback.
    4. Download and extract Proton-X.X-X-ds4 to ~/.steam/root/compatibilitytools.d/. These are patched versions of proton to help detect virtual DS4 as a real controller. Some non-Sony or Linux games/apps with DS4 support may not need this.
    5. Restart Steam client
    6. Force compatibility in game properties and select Proton-X.X-X-ds4-X.

Note For PS Plus:

  • Desktop mode is recommended as the app sometimes minimizes into system tray, which is not accessible in game mode. Seems to happen at start and if the network is bad.
  • Incase of a blackscreen on PS Plus;
    • Disable Graphics Accelerated rendering in PS Plus settings from taskbar tray icon (in desktop mode).
    • Or in game properties->launch options, PROTON_USE_WINED3D=1 %command%