Ghostpad - Virtual DualSense over TCP

TheStonedModder

Well-Known Member
Member
Joined
Dec 25, 2022
Messages
2,613
Reaction score
3,713
Trophies
2
Age
29
XP
8,032
Country
United States

What is Ghostpad?


Ghostpad is a payload + Windows desktop app that creates a virtual DualSense controller on a jailbroken PS5 and forwards keyboard, on-screen, or scripted input to it over your local network. The PS5 shell and games see it as a real, physical controller — no PSN account, no Remote Play, no Sony software required.

Download on GitHub

1780251579929.png


First-Time Setup


Make sure you disconnect any physical controllers before using Ghostpad! Otherwise you may get stuck with an un-dismissible "Who's using this controller" assignment screen. This is a known bug — any help solving it is appreciated.


Getting started is straightforward:
  1. Start the ELF loader on your PS5.
  2. Open the Ghostpad app on your PC and go to Settings.
  3. Add your PS5 using its local IP address and confirm the resolved payload path points to ghostpad.elf.
  4. Click Deploy Payload, then Connect.
Once Auto-deploy is enabled, Ghostpad handles payload deployment automatically on every future connection.

Input Redirection


Open Input Redirection to control the PS5 in real time. Ghostpad supports five input methods:
  • On-screen controller (built-in)
  • XInput gamepad (any compatible controller)
  • Keyboard bindings
  • Mouse look for analog stick movement
  • Auto-clicker for repeated button presses
Default keyboard bindings: W/A/S/D → D-pad, I/J/K/L → face buttons, U/O → L1/R1, Q/E → L2/R2, Enter → Options, Backspace → Create, Space → PS button. All bindings are fully remappable from within the app.

Macro Recording & Projects


Ghostpad includes a full macro system via the Projects screen:
  1. Create a project and add a command.
  2. Hit the red Record button and perform your inputs (controller, keyboard, mouse, or on-screen).
  3. Save the macro.
Macros capture button presses, analog stick movement, and trigger pressure with full fidelity. Run a macro once with Play or loop it indefinitely with Repeat. Projects can be exported/imported as JSON files, and individual macros can also be exported as Python replay scripts for advanced scripting workflows.

Optional Tools


Ghostpad ships with two optional companion payloads:
  • Beeper & LED (requires firmware 8.0+ and beeper_server.elf) — control the PS5's beeper and LED brightness from your PC.
  • System State (requires SystemStateManager.elf) — send reboot, shutdown, rest mode, and disc eject commands remotely. This is bundled with the Windows app and does not need to be installed separately.

How It Works — Technical Details


The core challenge: scePadVirtualDeviceAddDevice always returns error 0x803B0006 ("assignment screen pending") when called from a payload.

Ghostpad bypasses this with a 10-byte code-cave patch inside SceShellCore's libScePad.sprx. It locates the IPC dispatch call just before the function's canary epilogue, redirects it through a cave in the function's tail-padding, and patches the return value to 0. The virtual device is then accepted as real.

The assignment screen still pops up — Ghostpad dismisses it programmatically by calling the same MBus pair the OS uses when a real user accepts a controller (sceMbusDisconnectDevice + sceMbusBindDeviceWithUserId). From that point, every 16-byte GPAD packet the PC sends over TCP port 6967 is forwarded directly into scePadVirtualDeviceInsertData, and the shell and games react as if you pressed a real button.

Wire Protocol


Input is sent over TCP port 6967 as a fixed 16-byte GPAD packet:
  • 4-byte magic header
  • Big-endian 32-bit button bitmask
  • Four analog bytes (LX, LY, RX, RY — centred at 128)
  • Two analog trigger bytes (L2, R2)
  • Two reserved bytes
A second control channel on TCP port 6970 handles MBus bind/disconnect, diagnostic VDI writes, controller type switching, and clean disconnection.

Known Limitations


  • The VDA patch relies on firmware-specific byte patterns — other libScePad builds may need the scan updated.
  • Only a single virtual DualSense can be active at a time.
  • Touchpad XY motion is not yet wired through (button click works).
  • No haptics or rumble feedback from the PS5 back to the PC.
  • mdbg_copyin into SceShellCore fails with errno=1, which is why VDI uses pt_call_with_copy instead of a shared-memory path.
 

Site & Scene News

Popular threads in this forum