It's required to fix missing defines building for opengles2 (videocore) as with v1.16.6 of ppsspp.
Use the __mod_info array to get the path of the patch, so it works when called from the lr-ppsspp scriptmodule.
Core on v1.13.2 fails to run on Pi4 with the error:
...
[ERROR] Failed to open libretro core: "/opt/retropie/libretrocores/lr-ppsspp/ppsspp_libretro.so"
Error(s): /opt/retropie/libretrocores/lr-ppsspp/ppsspp_libretro.so: undefined symbol: hostAttemptBlockSize
This was fixed upstream with commits 1cd34f9d2bef6c92ed457c6aa85bf4d9b5111e90 and 7c5d36eca76c905a122c1, which are combined in the .diff file in this commit.
GL_COMPRESSED_RGBA_ASTC_4x4_KHR isn't available in the videocore iv gles2 includes, and documentation suggests this is an opengles 3 extension.
Add ifdefs to not include this if it isn't defined.
The 'ubershaders' introduced in v1.14 are not handled efficiently by the Mesa v3d driver, causing a performance regression [1].
Since the slowdown is not present in the Mesa version from Bullseye/Bookworm (which caused in part the version upgrade), install v1.13.2 just on Buster/RPI.
[1] https://github.com/hrydgard/ppsspp/issues/18388
Fixes building on Debian 12 Bookworm for the included `ffmpeg` project.
Changes since 13.x:
* ver 1.14.x (full list of changes - https://www.ppsspp.org/news/release-1.14)
* Graphics fixes in Burnout Dominator, Kurohyou, Ratchet & Clank, Outrun, Ridge Racer, Spongebob: Yellow Avenger, Cars: Race-o-Rama, Hunter x Hunter, many others
* Performance improvements: Killzone now runs at playable speed, Juiced 2 performance fixed, lighting ubershader optimization
* Many software renderer improvements, both performance and accuracy.
* Some input handling fixes, IR interpreter fixes, and so much more.
* MSAA antialiasing added to the Vulkan backend (desktop only)
* New API for plugins to access aspect ratio, scaling and fast-forward ([#16441]), other new APIs & improvements
* UI improvements
- New interactive Display Layout & Effects screen, replacing the old Display Layout Editor
- Add default shader for LCD persistence simulation
- Game being played can now be seen as a background in most menus
- Reorganize speed hack settings
* Stability fixes
- Workaround for hangs on older Adreno GPUs
- Input handling fixes for deadzones and touch controls
- Avoid game bugs in Twinbee Portable and Shining Ark
* Performance improvements
- Vulkan bandwidth and synchronization optimizations
- Lighting "ubershader" optimization to prevent hitches
- Assorted minor other improvements
- Improve texture replacement memory usage
- Texture upscaling speedup and fixes
* version 1.15 (full list of changes - https://www.ppsspp.org/news/release-1.15)
* Tilt controls: Restore "Low end radius" control
* Improve the workarounds for the DJ Max games
* OpenGL: Restore most of the lost performance on low-end hardware from the shader variant reduction
* Add a simple profiling tool to check CPU usage by the GL backend
* Loader: Fix bug preventing WWE 2009 from starting
* Control mapping: Fix bugs in mapping UI causing trouble with some controllers
* Fix for broken tilt d-pad controls
* Stutter caused by shader compilation has been reduced drastically
* Rendering performance and fixes
* Texture replacement improvements
* Optimizations for Vulkan texture uploads, Software renderer, Lighting shader optimizations.
* GLSL shader compatibility fixes
* Rewind savestates no longer slows things down a lot
* Depth-related rendering fixes
* UI fixes: Vertical use of space, scrollbars, touchpad scroll on Windows
* version 1.16 (full list of changes - https://www.ppsspp.org/news/release-1.16)
* RetroAchievements support !
* Fix performance issue with Vulkan descriptor set allocation
* Smoother loading of replacement textures
* Fix problem with waves background
* Fix for crash when changing render backend in-game
* Simplify shader cache lookups on Vulkan, hopefully fixing some crashes
* Other crash and stability fixes
* Assorted improvements to the IR JITs
* Fix crash bug and performance issue in Vulkan shader cache
* Fix for HTTP support on Linux on networks with shaky or incomplete IPv6 support
* Fix hang when switching UMD with RetroAchievements enabled
* Input fixes
* Rendering performance and fixes
* Texture replacement fixes
* UI changes
- Color emoji support on some platforms
- Use TTF fonts on SDL where available (macOS, Linux/Steam Deck)
- Allow setting the PSP's MAC address directly
- Better looking notifications
* Fix horrible audio glitch in After Burner
* Fix timing issue causing slowdowns in MLB games
* Emulate the vrnd instruction accurately
Changelog:
* Version 1.13.2
- Crashfix on Android 12 when playing certain background music ([#15990])
- Fix Star Ocean battles in D3D backends (#[15889])
- Minor fixes that might fix some other crashes
* Version 1.13.1
- Confirmation dialog added before change of MAC address (#15738)
- IR interpreter regression fixed (#15739)
- Fix clearing of replacement texture cache (#15740)
- Improved Portuguese-pt translation (#15734)
- Fix graphical regression in Split/Second (#15733)
- Couple of minor crash fixes
* Version 1.13
- Analog mapping for fast-forward (#15645)
- Major softgpu accuracy fixes and speedups, including a JIT (#15163, etc.)
- Fixed some NEON code paths (#15481)
- Fix performance of texture uploads with Vulkan (#15474)
- Don't include the large font atlas when we don't need it
- Improved upscaling shaders (#15566)
- Vulkan texture upscaling performance improvements (#15238), etc.
- Vulkan correctness fixes (#15217, #15211), use the VMA allocator (#15162), etc.
- Fixes to depth culling (#15106), many more
- Background loading of texture replacement (#15025)
- Threading manager improvements and fixes (#15470), etc.
- Added search in settings (#14414)
- Added fast button repeats on custom touch buttons (#15613)
- Two new bicubic upscaling shader: Catmull-Rom and Mitchell-Netravali (#15569)
- Allow to change screen rotation per game and to bind a key to change it (#15494, #15510)
- Add more workarounds for Mali driver bugs (#15016)
- Vortex in God of War: Ghost of Sparta can now be passed (#15640)
- Various proAdhoc fixes (#15213, #15215), and many more
- Correct flickering text in Sol Trigger and Last Ranker. (#15549)
- Fix and improve line drawing in Echochrome (#15583), after line refactoring (#15073, #15075)
- Fix HUD graphics in Split/Second (#15500, #15501)
- Fix bad screen overlay issues in Clone Wars and Force Unleashed (#15691, #15696, #12949, #9572)
- Zettai Zetsumei Toshi 3 no longer hangs on character select screen (#15687)
- Juiced 2: Bloom effect no longer covering the screen (#7295, #15717)
- Fix keyboard shift issue in a few games (#15698)
- Color change and basic theme support (#15396, #15394)
- Fix input focus bug (#15560)
- New GE debugger features and other UI fixes (#15393, #15324, #15377, #15424, #15402, #15378, #15338), etc.
Both stand-alone `ppsspp` and the libretro core `lr-ppsspp` share the `$HOME/.config/ppsspp` save file directory.
`moveConfigDir` removes the symlink on removal; this will disconnects the existing saves from the remaining emulator.
ppsspp: Use moveConfigDir only on install.
On removal, do not use the helper function. Remove the symlink manually and only if no remaining PSP emulators.
lr-ppsspp: Libretro core did not link this dir at all, and just used mkUserDir instead. Switch to use moveConfigDir and same fix as above, for libretro core also.
Current master has shader issues on videocore causing a black screen, so switching back to last tagged version - v1.12.3.
Historically we have had to fix up a fair number of ppsspp issues on the RPI due to upstream changes so sticking to a stable release seems like a good idea and allows us to test before we update.
The PPSSPP repository is also quite active and re-building ppsspp/lr-ppsspp binaries for every change takes a lot of time, so this also frees up some cpu time on our build system.
PPSSPP CMakeLists.txt adds -latomic for android targets, but this is also needed on armv6 on RaspberryPi OS Buster.
This commit sets the variable ATOMIC_LIB to "atomic" for videocore / armv6 so that -latomic is added.
Users reported that this version runs faster on videocore on the rpi1/2/3
Adjusted ppsspp sources to allow branch parameter and fixed build subfolder to ppsspp
so that paths are the same for md_ret_files, including adjusting lr-ppsspp in the same way.
Older code builds ok with our current ppsspp module script on rpi1/2/3 + videocore gles2,
but not rpi4, which it isn't needed on anyway. This may need changing if we have to update
ppsspp further in the future.
upstream are now doing a check for rpi model based on sysfs file which breaks when building
in a chroot or on other non rpi hardware (but targetting the rpi)
CMakeLists.txt uses CMAKE_SYSTEM_PROCESSOR and adjusts flags based on this
however if building on rpi2/3 or in a chroot with __platform=rpi1 this will
still return armv7l as it uses "uname". This causes armv7/neon code to be included
which causes building to fail. We can override this by setting -DFORCED_CPU=armv6
which fixes building for the rpi1
* change existing calls which used --strip-components
* use multiple parameters for arguments which should allow additional arguments with spaces
* implements #2630
Changes for all builds:
* Use the master branch (v1.6.3 is missing important EGL fixes)
* Disable Vulkan on non-X11 ARM targets to prevent build error
* Default to fullscreen on non-X11 targets
* replace many of the existing wget | tar commands with the new function
* include error logging in the function via runCmd, to trap download/unpacking issues