This example demonstrates the use of SDL2 in PSP development. SDL2 provides a robust framework for managing graphics, sound, input, and more, making it a valuable tool for PSP game development.
- SDL2 is officially supported: libsdl wiki entry
- SDL2 GitHub Repository: libsdl-org/SDL2 branch
To get started, you need to have the PSPSDK installed. Follow the instructions at PSPSDK on GitHub to install it.
Building the project is straightforward. Use the following make
commands:
make
to build the project.make rebuild
to rebuild the project.make clean
to clean up the build files.
For debugging on a real PSP device, follow these steps:
- Build the project with
make debug
to create a debug build. - Utilize PSPLink to transmit your homebrew application to your PSP. PSPLink allows for real-time monitoring from your computer.
- With the debug build, you can effectively track exceptions. The tool
psp-addr2line
will assist you in locating the exact source file and line number where an exception occurred. - Note: In some cases, it may be necessary to compile SDL2 from the source as a debug build, particularly if
libSDL2d
(the debug library) is missing.
This setup will provide an environment for both developing and debugging your SDL2 applications on the PSP.