SDL/docs/README-ps2.md
Francisco Javier Trujillo Mata d355ea9981 Add a way to avoid IOP reset
2022-08-08 08:32:38 -07:00

1.4 KiB

PS2

SDL2 port for the Sony Playstation 2 contributed by:

  • Francisco Javier Trujillo Mata

Credit to

  • The guys that ported SDL to PSP & Vita because I'm taking them as reference.
  • David G. F. for helping me with several issues and tests.

Building

To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
cmake --build build
cmake --install build

Notes

If you trying to debug a SDL app through ps2client you need to avoid the IOP reset, otherwise you will lose the conection with your computer. So to avoid the reset of the IOP CPU, you need to call to the macro SDL_PS2_SKIP_IOP_RESET();. It could be something similar as:

.....

SDL_PS2_SKIP_IOP_RESET();

int main(int argc, char *argv[])
{
.....

For a release binary is recommendable to reset the IOP always.

Remember to do a clean compilation everytime you enable or disable the SDL_PS2_SKIP_IOP_RESET otherwise the change won't be reflected.

Getting PS2 Dev

Installing PS2 Dev

Running on PCSX2 Emulator

PCSX2

More PCSX2 information

To Do

  • PS2 Screen Keyboard
  • Dialogs
  • Others