Skip to content

Commit

Permalink
Some README.md formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Mar 31, 2023
1 parent 4606502 commit 2e02c4a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ A repository of PSP programs performing several tests on the PSP platform.

The main idea behind this is having several files per test unit:

* _file_*.expected* - File with the expected Kprintf's output, preferably from a real PSP
* _file_*.prx* - The program that will call Kprintf syscall in order to generate an output
* _file_*.input* - Optional file specifying automated actions that should simulate user interaction: pressing a key, releasing a key, selecting a file on the save selector, waiting for a function (for example a vsync) to call before continuing...
* `_file_*.expected*` - File with the expected Kprintf's output, preferably from a real PSP
* `_file_*.prx*` - The program that will call Kprintf syscall in order to generate an output
* `_file_*.input*` - Optional file specifying automated actions that should simulate user interaction: pressing a key, releasing a key, selecting a file on the save selector, waiting for a function (for example a vsync) to call before continuing...

## How to build and use

Expand All @@ -26,18 +26,18 @@ If you want to change tests, you'll need to read the rest. This tutorial is focu
* A PSP with custom firmware installed (6.60 recommended)
* A USB cable to use between your PC and PSP
* PSPSDK installed (on Windows I'd recommend MinPSPW, https://sourceforge.net/projects/minpspw/.) WARNING: Do not install 0.11b, install 0.10.
If you can't find it, use this link: http://ppsspp.org/unofficial/pspsdk/pspsdk-setup-0.10.0.exe
If you can't find it, use this link: https://ppsspp.org/unofficial/pspsdk/pspsdk-setup-0.10.0.exe

The rest of this tutorial will assume that you installed the PSPSDK in C:\pspsdk.

### Step 1: Install PSPLink on your PSP

* Copy the OE version of PSPLink (C:\pspsdk\psplink\psp\oe\psplink) to PSP/GAME on the PSP.
* Copy the OE version of PSPLink (`C:\pspsdk\psplink\psp\oe\psplink`) to PSP/GAME on the PSP.
* Run it on your PSP from the game menu.

### Step 2: Prepare the PC

Tip: If you see PSP Type A, you've connected the PSP in "USB mode". Disconnect, and run the PSPLINK game instead.
Tip: If you see PSP Type A, you've connected the PSP in "USB mode". Disconnect, and run the PSPLINK game instead.

#### Windows 7 and later

Expand All @@ -52,7 +52,7 @@ Tip: If you see PSP Type A, you've connected the PSP in "USB mode". Disconnect,
* Go into Device Manager and select the PSP Type B device in the list.
* Right click on "PSP Type B" -> Properties.
* Select Update Driver and select "I have my own driver".
* For the path, use C:\pspsdk\bin\driver or C:\pspsdk\bin\driver_x64 depending on your OS install.
* For the path, use `C:\pspsdk\bin\driver` or `C:\pspsdk\bin\driver_x64` depending on your OS install.

#### Mac OS X

Expand All @@ -65,14 +65,14 @@ Tip: If you see PSP Type A, you've connected the PSP in "USB mode". Disconnect,

### Step 3: Add pspsdk to PATH

* Add C:\pspsdk\bin (or equivalent) to your PATH if you haven't already got it.
* Go to pspautotests\common and run make (might need to start a new cmd shell)
* Add `C:\pspsdk\bin` (or equivalent) to your `PATH` if you haven't already got it.
* Go to `pspautotests\common` and run `make` (might need to start a new cmd shell)

You are now ready to roll!

### Running tests

In a command prompt in the directory that you want the PSP software to regard as "host0:/" (normally pspautotests/) if it tries to read files over the cable, type the following:
In a standard "cmd" command prompt in the directory that you want the PSP software to regard as "`host0:/`" (normally `pspautotests/`) if it tries to read files over the cable, type the following:

```bash
> cd pspautotests
Expand All @@ -85,19 +85,19 @@ Then in a separate command prompt:
> pspsh -p 3000
```

If you now don't see a host0:/ prompt, something is wrong. Most likely the driver has not loaded correctly. If the port 3000 happened to be taken (usbhostfs_pc would have complained), try another port number.
If you now don't see a `host0:/` prompt, something is wrong. Most likely the driver has not loaded correctly. If the port 3000 happened to be taken (usbhostfs_pc would have complained), try another port number.

Now you have full access to the PSP from this prompt.

You can exit it and use gentest.py (which will start the same prompt) to run tests (e.g. `gentest.py misc/testgp`) and update the .expected files.
You can exit it and use `gentest.py` (which will start the same prompt) to run tests (e.g. `gentest.py misc/testgp`) and update the .expected files.

You can run executables on the PSP that reside on the PC directly from within this the pspsh shell, just cd to the directory and run ./my_program.prx.

Note that you CAN'T run ELF files on modern firmware, you MUST build as .PRX. To do this, set BUILD_PRX = 1 in your makefile.

Also, somewhere in your program, add the following line to get a proper heap size:

unsigned int sce_newlib_heap_kb_size = -1;
`unsigned int sce_newlib_heap_kb_size = -1;`

For some probably historical reason, by default PSPSDK assumes that you want a 64k heap when you build a PRX.

Expand Down

0 comments on commit 2e02c4a

Please sign in to comment.