|
1 | 1 | # PSP Linux Controller |
2 | 2 |
|
3 | | -A wireless controller app for PPSSPP emulator on Linux. Use your Android phone as a PSP controller over WiFi. |
| 3 | +Use your Android phone as a wireless PSP controller for PPSSPP emulator on Linux. |
4 | 4 |
|
5 | | -## Features |
| 5 | + |
| 6 | + |
6 | 7 |
|
7 | | -- **Full PSP Controller Layout**: D-pad, action buttons (△, ○, □, ✕), Start/Select, L/R triggers, and analog stick |
8 | | -- **Low Latency**: TCP socket connection (~1-5ms on local network) |
9 | | -- **Connection Status**: Real-time connection indicator |
10 | | -- **Auto-reconnect**: Automatically saves server IP for quick reconnection |
11 | | -- **Fullscreen Mode**: Landscape layout with immersive controller experience |
| 8 | +## What It Does |
12 | 9 |
|
13 | | -## Quick Start |
| 10 | +This app lets you control PPSSPP running on your Linux PC using your phone as a gamepad. It connects over WiFi with very low latency (typically 1-5ms on a local network). |
14 | 11 |
|
15 | | -### 1. Start the Server |
| 12 | +The controller has all the PSP buttons - D-pad, analog stick, action buttons (Triangle, Circle, Square, Cross), shoulders (L/R), and Start/Select. |
| 13 | + |
| 14 | +There's also a desktop layout editor that lets you drag buttons around and see the changes live on your phone. Much easier than fiddling with the phone screen. |
| 15 | + |
| 16 | +## Getting Started |
| 17 | + |
| 18 | +### Step 1: Download |
| 19 | + |
| 20 | +Grab the latest release from the [Releases page](../../releases): |
| 21 | + |
| 22 | +- **PSPLinuxController-x.x.x.apk** - Install this on your Android phone |
| 23 | +- **PSPLinuxController-Server-x.x.x.tar.gz** - Extract this on your Linux PC |
| 24 | + |
| 25 | +### Step 2: Set Up the Server |
| 26 | + |
| 27 | +Extract the server tarball somewhere convenient: |
| 28 | + |
| 29 | +```bash |
| 30 | +tar -xzf PSPLinuxController-Server-*.tar.gz |
| 31 | +cd PSPLinuxController-Server |
| 32 | +``` |
| 33 | + |
| 34 | +Install xdotool if you don't have it (the server uses this to simulate keyboard input): |
16 | 35 |
|
17 | | -**On Linux:** |
18 | 36 | ```bash |
19 | | -# Install xdotool if not already installed |
20 | 37 | sudo apt install xdotool |
| 38 | +``` |
21 | 39 |
|
22 | | -cd server |
| 40 | +Start the server: |
| 41 | + |
| 42 | +```bash |
23 | 43 | ./start_server.sh |
24 | 44 | ``` |
25 | 45 |
|
26 | | -**On Windows:** |
27 | | -```powershell |
28 | | -# Just run the batch file (Python required) |
29 | | -cd server |
30 | | -start_server.bat |
| 46 | +You'll see something like this: |
| 47 | + |
| 48 | +``` |
| 49 | +================================================== |
| 50 | + PSP Controller Server |
| 51 | + Made by Uzair |
| 52 | +================================================== |
| 53 | + Local IP: 192.168.1.100 |
| 54 | + Port: 5555 |
| 55 | +================================================== |
31 | 56 | ``` |
32 | 57 |
|
33 | | -The server will display your local IP address. Note this for the Android app. |
| 58 | +Note down that IP address - you'll need it for the phone app. |
| 59 | + |
| 60 | +### Step 3: Install the App |
| 61 | + |
| 62 | +Transfer the APK to your phone and install it. You might need to allow installing from unknown sources in your phone's settings. |
| 63 | + |
| 64 | +### Step 4: Connect and Play |
| 65 | + |
| 66 | +1. Open the app on your phone |
| 67 | +2. Tap the Connect button and enter your PC's IP address |
| 68 | +3. Launch PPSSPP on your PC and load a game |
| 69 | +4. Use your phone as the controller! |
34 | 70 |
|
35 | | -### 3. Install the Android App |
| 71 | +## Customizing the Layout |
36 | 72 |
|
37 | | -Build and install the APK on your Android phone: |
| 73 | +If you want to move buttons around, use the desktop layout editor: |
38 | 74 |
|
39 | 75 | ```bash |
40 | | -./gradlew assembleDebug |
41 | | -adb install app/build/outputs/apk/debug/app-debug.apk |
| 76 | +pip install PyQt5 # Only needed once |
| 77 | +python3 layout_editor_gui.py |
42 | 78 | ``` |
43 | 79 |
|
44 | | -### 4. Connect |
45 | | - |
46 | | -1. Open the app on your phone |
47 | | -2. Tap "Connect" |
48 | | -3. Enter the IP address shown by the server |
49 | | -4. Tap "Connect" |
| 80 | +Drag controls to reposition them. Changes show up on your phone in real-time. Hit Save when you're happy with the layout. |
50 | 81 |
|
51 | | -### 5. Play! |
| 82 | +The editor supports undo/redo with Ctrl+Z and Ctrl+Y. |
52 | 83 |
|
53 | | -1. Launch PPSSPP on your Linux machine |
54 | | -2. Start a game |
55 | | -3. Use your phone as the controller! |
| 84 | +## Default Key Bindings |
56 | 85 |
|
57 | | -## Key Mapping |
| 86 | +These are the keyboard keys that get pressed when you tap each button: |
58 | 87 |
|
59 | | -| PSP Button | Keyboard Key | |
60 | | -|------------|--------------| |
| 88 | +| Button | Key | |
| 89 | +|--------|-----| |
61 | 90 | | D-pad | Arrow Keys | |
62 | | -| ✕ | Z | |
63 | | -| ○ | X | |
64 | | -| □ | A | |
65 | | -| △ | S | |
| 91 | +| Cross | Z | |
| 92 | +| Circle | X | |
| 93 | +| Square | A | |
| 94 | +| Triangle | S | |
66 | 95 | | Start | Space | |
67 | 96 | | Select | V | |
68 | | -| L Trigger | Q | |
69 | | -| R Trigger | W | |
| 97 | +| L / R | Q / W | |
70 | 98 | | Analog | I/J/K/L | |
71 | 99 |
|
72 | | -## Server Options |
| 100 | +You can change these in PPSSPP's control settings if needed. |
73 | 101 |
|
74 | | -```bash |
75 | | -python3 server/psp_controller_server.py --help |
| 102 | +## Troubleshooting |
76 | 103 |
|
77 | | -Options: |
78 | | - -p, --port PORT Port to listen on (default: 5555) |
79 | | - --host HOST Host to bind to (default: 0.0.0.0) |
80 | | -``` |
| 104 | +**Can't connect?** |
81 | 105 |
|
82 | | -## Troubleshooting |
| 106 | +Make sure your phone and PC are on the same WiFi network. You might also need to allow port 5555 through your firewall: |
83 | 107 |
|
84 | | -### "Connection failed" on Android |
| 108 | +```bash |
| 109 | +sudo ufw allow 5555 |
| 110 | +``` |
85 | 111 |
|
86 | | -- Make sure your phone and Linux PC are on the same WiFi network |
87 | | -- Check that the server is running |
88 | | -- Verify the IP address is correct |
89 | | -- Check firewall settings: `sudo ufw allow 5555` |
| 112 | +**Button presses not working?** |
90 | 113 |
|
91 | | -### Keys not working in PPSSPP |
| 114 | +Make sure PPSSPP has focus (click on it). You can test if xdotool is working by running: |
92 | 115 |
|
93 | | -- Make sure PPSSPP window is focused |
94 | | -- Verify xdotool is installed: `which xdotool` |
95 | | -- Test xdotool manually: `xdotool key z` |
| 116 | +```bash |
| 117 | +xdotool key z |
| 118 | +``` |
96 | 119 |
|
97 | | -### High latency |
| 120 | +## Building From Source |
98 | 121 |
|
99 | | -- Use 5GHz WiFi if available |
100 | | -- Reduce distance from router |
101 | | -- Close bandwidth-heavy apps |
| 122 | +If you want to build the app yourself instead of using the releases: |
102 | 123 |
|
103 | | -## Project Structure |
| 124 | +```bash |
| 125 | +# Build the APK |
| 126 | +./gradlew assembleDebug |
| 127 | +adb install app/build/outputs/apk/debug/app-debug.apk |
104 | 128 |
|
105 | | -``` |
106 | | -PSPLinuxController/ |
107 | | -├── server/ |
108 | | -│ ├── psp_controller_server.py # Python TCP server |
109 | | -│ ├── requirements.txt # Dependencies |
110 | | -│ └── start_server.sh # Startup script |
111 | | -├── app/ |
112 | | -│ └── src/main/ |
113 | | -│ ├── java/.../ |
114 | | -│ │ ├── MainActivity.java # Controller UI |
115 | | -│ │ ├── TcpClient.java # TCP connection |
116 | | -│ │ └── ConnectionManager.java # Connection logic |
117 | | -│ └── res/layout/ |
118 | | -│ └── activity_main.xml # Controller layout |
119 | | -└── README.md |
| 129 | +# Run the server (no build needed, it's Python) |
| 130 | +cd server |
| 131 | +python3 psp_controller_server.py |
120 | 132 | ``` |
121 | 133 |
|
122 | 134 | ## License |
123 | 135 |
|
124 | 136 | Apache License 2.0 |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +## Contributing |
| 141 | + |
| 142 | +Contributions are welcome! Please open an issue or submit a pull request. |
| 143 | + |
| 144 | +--- |
| 145 | + |
| 146 | +Made by Uzair |
0 commit comments