Skip to content

crucifix86/xbox_controller_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xbox Controller Plugin for PS4

A GoldHEN plugin that enables Xbox and Nintendo Switch USB controllers on jailbroken PS4 consoles.

Status: WORKING (Single Player + Local Multiplayer)

Xbox controllers work as Player 2 in local multiplayer games! DS4 remains Player 1.

Supported Controllers

Xbox Controllers:

  • Xbox 360 wired USB controller
  • Xbox One wired USB controller
  • Xbox Series X|S wired USB controller
  • Xbox Elite controllers (wired)

Nintendo Switch Controllers (PDP):

  • PDP Rock Candy Wired Controller
  • PDP Faceoff Wired Pro Controller
  • PDP Faceoff Deluxe Wired Pro Controller
  • PDP Wired Fight Pad Pro

Note for Xbox One/Series controllers: The controller must be off (Xbox button not lit) when launching the game. The plugin will detect and initialize it. If the controller is already on, unplug and replug it, or turn it off before starting the game.

What Works

  • Full button mapping (A/B/X/Y, bumpers, triggers, sticks, D-pad)
  • Responsive input (1ms polling, 2ms timeout)
  • Local multiplayer - Xbox controller as Player 2, DS4 as Player 1
  • Auto-detection of controller type

Not Supported

  • Rumble/vibration output
  • Wireless/Bluetooth Xbox controllers

Requirements

  • Jailbroken PS4 (tested on 9.00)
  • GoldHEN 2.3 or newer
  • Supported wired USB controller (Xbox 360/One/Series or PDP Switch controller)
  • A real DS4 controller (for system menu and Player 1)

Installation

  1. Connect to PS4 via FTP (port 2121)
  2. Upload xbox_controller.prx to /data/GoldHEN/plugins/
  3. Create or edit /data/GoldHEN/plugins.ini:
    [default]
    /data/GoldHEN/plugins/xbox_controller.prx
  4. Launch a game - plugin loads automatically

To disable: Remove the plugin line from plugins.ini

Multiplayer Setup

For local multiplayer to work:

  1. Create a second PS4 user profile (Settings > Users > Create User)
  2. Log in both users before launching the game:
    • Your main profile (Player 1 - DS4)
    • Second profile (Player 2 - Xbox controller)
  3. Launch the game
  4. You should see "Xbox 360 connected!" and "Xbox Player 2 ready!" notifications
  5. Both controllers now work independently!

Important: Both users must be logged in at the PS4 system level. The plugin automatically detects and assigns the Xbox controller to the second user.

Drop-in Games (Diablo 3, etc.)

For games where Player 2 joins by pressing Start:

  1. Create your Player 2 character on the second profile first - Launch the game as the second user and create a character before attempting co-op
  2. The game may freeze if you try to create a new character while joining in-game
  3. Once the character exists, you can drop in normally by pressing Start on the Xbox controller

Button Mapping

Xbox Controllers

Xbox DualShock 4
A Cross (X)
B Circle
X Square
Y Triangle
LB L1
RB R1
LT L2
RT R2
Back Share
Start Options
Guide PS Button
L3 L3
R3 R3

Switch Controllers (PDP)

Switch DualShock 4
A Circle
B Cross (X)
X Triangle
Y Square
L L1
R R1
ZL L2
ZR R2
- Share
+ Options
Home PS Button
L3 L3
R3 R3

Note: Switch controllers use positional mapping (A is in Circle position, B is in Cross position).

Limitations

  • No touchpad (third-party controllers have none)
  • No motion controls (no gyro/accelerometer)
  • No lightbar feedback
  • No controller audio
  • Requires DS4 for system menu
  • Switch controller triggers are digital only (full press or nothing)

Building

Requires:

  • OpenOrbis PS4 Toolchain
  • GoldHEN Plugins SDK
export OO_PS4_TOOLCHAIN=/path/to/openorbis
make

Output: bin/xbox_controller.prx

Technical Details

This plugin hooks multiple PS4 system functions:

  • scePadOpen / scePadClose - Virtual controller registration
  • scePadRead / scePadReadState - Input injection
  • scePadGetControllerInformation - Controller status
  • sceUserServiceGetLoginUserIdList - User injection for multiplayer
  • Reads Xbox controller via sceUsbd USB API
  • Translates Xbox HID reports to DS4 OrbisPadData format

Roadmap

PSN Spoof for Local Multiplayer (Planned)

Some games (like Minecraft Bedrock) require PSN sign-in for local multiplayer even though no online features are used. A future update will add PSN availability spoofing.

Target functions to hook (from libSceNpManager):

  • sceNpCheckNpAvailability() - Check if PSN is available
  • sceNpCheckNpAvailabilityA(userId) - Async version with user ID
  • sceNpGetState() - Get current PSN state
  • sceNpHasSignedUp() - Check if user has PSN account
  • sceNpManagerIntGetSigninState() - Internal sign-in state

Approach:

  1. Load libSceNpManager.sprx
  2. Hook availability/state functions to return "signed in" status
  3. May need to fake account data (OnlineId, AccountId) for some games

Reference:

License

MIT License

Contact

Discord: sinfulstoic

Credits

  • GoldHEN team for the plugin SDK and gamepad_helper reference
  • OpenOrbis team for the PS4 toolchain
  • remotePad plugin for virtual controller architecture inspiration

About

GoldHEN plugin that enables Xbox 360 USB controllers on jailbroken PS4

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors