🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.7 KiB

  1. PS2
  2. ======
  3. SDL2 port for the Sony Playstation 2 contributed by:
  4. - Francisco Javier Trujillo Mata
  5. Credit to
  6. - The guys that ported SDL to PSP & Vita because I'm taking them as reference.
  7. - David G. F. for helping me with several issues and tests.
  8. ## Building
  9. To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
  10. ```bash
  11. cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
  12. cmake --build build
  13. cmake --install build
  14. ```
  15. ## Hints
  16. The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
  17. If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30.
  18. ## Notes
  19. If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer.
  20. So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`.
  21. It could be something similar as:
  22. ```c
  23. .....
  24. SDL_PS2_SKIP_IOP_RESET();
  25. int main(int argc, char *argv[])
  26. {
  27. .....
  28. ```
  29. For a release binary is recommendable to reset the IOP always.
  30. Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected.
  31. ## Getting PS2 Dev
  32. [Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
  33. ## Running on PCSX2 Emulator
  34. [PCSX2](https://github.com/PCSX2/pcsx2)
  35. [More PCSX2 information](https://pcsx2.net/)
  36. ## To Do
  37. - PS2 Screen Keyboard
  38. - Dialogs
  39. - Others