You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: basic_programs.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -123,7 +123,7 @@ More libgu examples can be found <a href="https://github.com/pspdev/pspsdk/tree/
123
123
124
124
</details>
125
125
126
-
## Controller
126
+
## Input
127
127
{: .fs-6 .fw-700 }
128
128
129
129

@@ -377,9 +377,11 @@ Documentation for SDL2_ttf can be found <a href="https://wiki.libsdl.org/SDL2_tt
377
377
</details>
378
378
379
379
## More Examples
380
+
{: .fs-6 .fw-700 }
380
381
381
382
More examples on how to use specific functions offered in the PSPDEV toolchain can be found [here](https://github.com/pspdev/pspsdk/tree/master/src/samples). Additional documentation on these functions can be found [here](https://pspdev.github.io/pspsdk/).
382
383
383
384
## Debugging
385
+
{: .fs-6 .fw-700 }
384
386
385
387
When making changes to the example programs listed above, you might run into errors or even crashes. To learn how to figure out what went wrong, check out the [debugging](debugging.html) page.
Copy file name to clipboardExpand all lines: contributing.md
+2
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ nav_order: 7
10
10
There are many ways to contribute to our efforts to make developing homebrew for the PlayStation Portable (PSP) easier for everyone. The first step would be to [join our Discord](https://discord.gg/bePrj9W) or use our [GitHub Discussions](https://github.com/pspdev/pspdev/discussions)!
11
11
12
12
## Ways to contribute
13
+
{: .fs-6 .fw-700 }
13
14
14
15
Before making any contribution, it's best to talk about what you want to do on [Discord](https://discord.gg/bePrj9W). After that, here are some places you can look to contribute:
15
16
@@ -21,6 +22,7 @@ Before making any contribution, it's best to talk about what you want to do on [
21
22
Pull requests are always welcome!
22
23
23
24
## Where can I find the code?
25
+
{: .fs-6 .fw-700 }
24
26
25
27
The PSPDEV toolchain is build using quite a few different repositories which each add their own piece to the system. If you just want to build everything at once, the [pspdev repository](https://github.com/pspdev/pspdev) is the place to go.
Copy file name to clipboardExpand all lines: debugging.md
+43-66
Original file line number
Diff line number
Diff line change
@@ -10,78 +10,48 @@ nav_order: 4
10
10
When developing for the Playstation Portable (PSP), you may run into crashes or code that does not quite work like expected. Figuring out what is going in is called debugging. This page will cover how to do that.
11
11
12
12
## PSPLINK
13
+
{: .fs-6 .fw-700 }
13
14
14
-
PSPLINK is THE tool to use for debugging on the PSP. It is an application which allows you to run and debug programs for the PSP from your PC through USB.
15
+
PSPLINK is THE tool to use for testing code on the PSP. It is an application which allows you to run and debug programs for the PSP from your PC through USB without requiring data to be transferred to the PSP. Setting it up for use requires different action for the PSP and the PC.
15
16
16
-
### Setting up PSPLINK
17
-
18
-
Each system involved in the use of PSPLINK requires a bit of setup for it to work. This includes both PSP and PC. Below are instructions for both.
19
-
20
-
#### PSP
17
+
### Setting PSPLINK up on the PSP
18
+
{: .fs-4 .fw-700 }
21
19
22
20
Download the latest version of PSPLINK for the PSP [here](https://github.com/pspdev/psplinkusb/releases/download/latest/psplink.zip) and extract it in ``ms0:/PSP/GAME`` on the PSP memory card.
23
21
24
-
#### PC
25
-
26
-
Depending on the operating system used the setup on PC is different. Follow the on below which is relevant to your system.
27
-
28
-
##### Windows
29
-
30
-
On Windows a driver needs to be installed before PSPLINK can be used. To do this take the following steps:
31
-
32
-
1. Make sure the programs `usbhostfs_pc` and `pspsh` are available in cmd. Otherwise download them [here](https://github.com/pspdev/psplinkusb/releases/download/latest/pspsh-windows.zip).
33
-
2. Start PSPLINK on the Playstation Portable and connect it to the computer through USB.
34
-
3. Download [Zadig](https://zadig.akeo.ie/) and start it. It will ask if you want to run it as administrator, click yes.
35
-
4. In Zadig, click on `options` -> `List All Devices`.
36
-
5. Select the entry `"PSP" type B` from the dropdown list.
37
-
6. Left of driver, select the `libusb-win32` driver. Then click install.
38
-
7. Wait for the installation to finish, then disconnect the USB cable from the PSP.
39
-
40
-
Now PSPLINK can be used with Windows. See below how to do that.
41
-
42
-
##### Linux
22
+
### Setting PSPLINK up on the PC
23
+
{: .fs-4 .fw-700 }
43
24
44
-
With Linux PSPLINK will work without making any changes, but it will require using sudo for the `usbhostfs_pc` command. To make it work without sudo, a udev rule can be added.
25
+
Depending on the operating system used the setup on PC is different. Pick the setup guide for your system here:
45
26
46
-
To make using PSPLINK without sudo create file called `/etc/udev/rules.d/50-psplink.rules` (for example with `sudo nano /etc/udev/rules.d/50-psplink.rules`) and add the following content:
Save this, in Nano this can be done with Ctrl+O and pressing enter. The run the following command:
53
-
54
-
```
55
-
sudo udevadm control --reload
56
-
```
27
+
-[Windows](psplink/windows.html)
28
+
-[Linux](psplink/linux.html)
57
29
58
-
Now PSPLINK can be used without sudo. See below how to do that.
30
+
MacOS should not require any additional setup.
59
31
60
32
### Using PSPLINK
33
+
{: .fs-4 .fw-700 }
61
34
62
35
To be able to use PSPLINK with Playstation Portable homebrew, the homebrew will need to be build into an unencrypted ``.prx`` file. This can be done by running CMake like `psp-cmake -DBUILD_PRX=1 .` or if you're using a Makefile by adding `BUILD_PRX=1` to it. Then build the homebrew.
63
36
64
-
In the build directory, open a terminal and run the following program:
65
-
66
-
```
67
-
usbhostfs_pc
68
-
```
69
-
70
-
Keep this running!
71
-
72
-
Then open another terminal window and run the following there:
73
-
74
-
```
75
-
pspsh
76
-
```
77
-
78
-
Now we can simply start our homebrew on the PSP by running the following command in the pspsh window:
79
-
80
-
```
81
-
./myhomebrew.prx
82
-
```
83
-
84
-
Replace myhomebrew with the name of the `.prx` file which was generated.
37
+
After having done all of the above, PSPLINK can be used using the following steps:
38
+
39
+
1. Connect the PSP with a USB cable to the computer.
40
+
2. Launch the PSPLINK homebrew on the PSP. The PSP is now waiting for input from the PC.
41
+
3. In the build directory of the homebrew you wish to test, open a terminal and run the following:
42
+
```sh
43
+
usbhostfs_pc
44
+
```
45
+
Keep this running!
46
+
4. Then open another terminal window and run the following there:
47
+
```sh
48
+
pspsh
49
+
```
50
+
5. Now you can simply start our homebrew on the PSP by running the following commandin the pspsh window:
51
+
```sh
52
+
./myhomebrew.prx
53
+
```
54
+
Replace myhomebrew with the name of the `.prx` file which was generated. Now the PSP should be running your project!
85
55
86
56
When you're done with the current build, just run `reset`, rebuild the homebrew and try again.
87
57
@@ -92,12 +62,13 @@ Options available can be found when using the `help` command, but here are some
92
62
- `poweroff` for shutting down the PSP.
93
63
94
64
### Getting Basic Crash Information
65
+
{: .fs-4 .fw-700 }
95
66
96
67
When a crash happens a crash log will be shown with a hint of what might have happened at the top and some additional info. If you wish to figure out where the crash happened, only the address is needed.
97
68
98
69
To figure out where the crash happened, open another terminal in the build directory and use the address shown by PSPLINK in the following command:
99
70
100
-
```
71
+
```sh
101
72
psp-addr2line -e myhomebrew address
102
73
```
103
74
@@ -107,23 +78,27 @@ If no result is returned, make sure to build with the `-g` or `-g3` option and w
107
78
108
79
The information received from `psp-addr2line` will be limited and not always useful, for more information you'll have to use a debugger as described below.
109
80
110
-
### Using a Debugger
81
+
## Using a Debugger
82
+
{: .fs-6 .fw-700 }
111
83
112
-
When using `psp-addr2line` is not enough to figure out what is going on, the best way to debug will be by using an actual debugger called GDB. PSPLINK allows you to enable access to `psp-gdb`which comes bundles with the PSPDEV toolchain.
84
+
When using `psp-addr2line` is not enough to figure out what is going on, the best way to debug will be by using an actual debugger called GDB, which comes bundled with the PSPDEV toolchain as the `psp-gdb`command. PSPLINK allows this debugger to connect directly to the PSP.
113
85
114
-
#### Preparation
86
+
### Preparation
87
+
{: .fs-4 .fw-700 }
115
88
116
89
Prepare a separate terminal for`usbhostfs_pc`, `pspsh` and `psp-gdb`. Open all of themin the directory in which your compiled `.prx` and the `elf` (PSP binary) files are located.
117
90
118
-
##### 1. usbhostfs_pc
91
+
#### 1. usbhostfs_pc
92
+
{: .fs-2 .fw-700 }
119
93
120
94
Run `usbhostfs_pc` on your terminal dedicated for`usbhostfs_pc` and you will see the `waiting for device...` status.
121
95
122
96
Now start the PSPLINK app on your PSP and connect the USB cable. You should see the `connected to device` status in the terminal, which means success.
123
97
124
98
**Do not close this terminal after that.**
125
99
126
-
##### 2. pspsh
100
+
#### 2. pspsh
101
+
{: .fs-2 .fw-700 }
127
102
128
103
Run `pspsh` on your terminal dedicated for`pspsh` and you will see the `host0:/>`. Now run `debug file.prx`, and it will display something like this:
It means the debugger is succesfully loaded. You can type`reset`if there's something wrong with your GDBServer.
138
113
139
-
##### 3. psp-gdb
114
+
#### 3. psp-gdb
115
+
{: .fs-2 .fw-700 }
140
116
141
117
In a new terminal run `psp-gdb file -q` and you will see something like this:
142
118
@@ -176,5 +152,6 @@ Here are a few useful commands for getting around in psp-gdb:
176
152
You can type`help`for more information about the psp-gdb commands.
177
153
178
154
## Done
155
+
{: .fs-6 .fw-700 }
179
156
180
157
Now you know how to debug your code. Make sure to check out the [Tips and Tricks](tips_tricks.html) section to get most out of your PSP development experience.
Copy file name to clipboardExpand all lines: installation/windows.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,10 @@ nav_exclude: true
5
5
---
6
6
7
7
# Installation on Windows
8
-
{: .fs-10 .fw-700 .text-center }
8
+
{: .fs-8 .fw-700 .text-center }
9
9
10
10
## Windows Subsystem for Linux (WSL)
11
-
{: .fs-4 .fw-700 }
11
+
{: .fs-6 .fw-700 }
12
12
13
13
On Windows the PSPDEV toolchain is run on Ubuntu running on Microsoft's WSL. This is very easy to set up and will offer us the full power of Linux from a Windows machine.
With Linux PSPLINK will work without making any changes, but it will require using sudo for the `usbhostfs_pc` command. To make it work without sudo, a udev rule can be added.
11
+
12
+
To make using PSPLINK without sudo create file called `/etc/udev/rules.d/50-psplink.rules` (for example with `sudo nano /etc/udev/rules.d/50-psplink.rules`) and add the following content:
On Windows a driver needs to be installed before PSPLINK can be used. To do this take the following steps:
11
+
12
+
1. Make sure the programs `usbhostfs_pc` and `pspsh` are available in cmd. Otherwise download them [here](https://github.com/pspdev/psplinkusb/releases/download/latest/pspsh-windows.zip).
13
+
2. Start PSPLINK on the Playstation Portable and connect it to the computer through USB.
14
+
3. Download [Zadig](https://zadig.akeo.ie/) and start it. It will ask if you want to run it as administrator, click yes.
15
+
4. In Zadig, click on `options` -> `List All Devices`.
16
+
5. Select the entry `"PSP" type B` from the dropdown list.
17
+
6. Left of driver, select the `libusb-win32` driver. Then click install.
18
+
7. Wait for the installation to finish, then disconnect the USB cable from the PSP.
19
+
20
+
Now PSPLINK can be used with Windows. Continue with the instructions on the [Debugging](../debugging.html) page.
0 commit comments