You can play PSP games on VisionFive 2 Now! The frame rate and performance of the game are constantly improving, and developers are welcome to try it out. Go to downloads to get it!
For graphics, currently you have to use GLES. As long as you’re using the Debian image, you should be able to just use the included driver. For Vulkan, there’s an issue in the driver and it’s unusably slow. It may default to Vulkan still, in which case you’d need to change to GLES.
The IR is a custom IR - PPSSPP’s jit for RISC-V is now using that IR, and I’ve also written a new jit for x64 (~10% faster, depends on the game) and arm64 (about even, disappointingly, with the old jit) that use the IR as well. But it’s custom-designed for our purposes - debugging metadata, cycle tracking, and specific ops to match the PSP’s complex matrix-based SIMD coprocessor.
A note for performance on the VisionFive 2 - you’ll likely want to turn on “lazy texture hashing”. This can result in a few graphical glitches, but currently the texture hashing is very expensive. Also, the community has created a patch for God of War which reduces its internal FPS to 30 FPS, and this makes it far more playable on ARM and RISC-V devices of VisionFive 2’s performance class.
I’m gonna try it on the ArchLinux image. I’ve been maintaining the PKGBUILD for mesa for Arch and recently got retroarch and a few SDL2 apps that use GLES working well.
I noticed it’s not in github actions or the release page. Do you need help with CI? I could try to set something up to run on “docker on qemu riscv64” aka docker buildx. I did something similar with psptoolchain but never finished it end to end.
You can pick between clang and gcc, just use update-alternatives to set your preference beforehand. You can skip mold if you want, but I recommend it - it links much faster (you’ll need apt-get install git build-essential cmake mold ninja-build.)
In the past I had to rebuild SDL for GLES to work. I just did it last time I updated the image, without checking if it’s still necessary. If it is still needed, I just used ./configure --disable-video-opengl for it.
I also had to run these, but again might’ve been a problem from a previous image only:
If anyone wants to contribute / maintain binaries, that’s always appreciated. All the builds outside Windows and Android are contributed.
A RISC-V GitHub Actions setup would be convenient if it could slot in to running the normal build commands. It would actually be most convenient there to just directly cross compile - compiling within qemu doesn’t seem all that useful, except a way to make builds take longer. Could run tests within qemu though.
I got it built and running on the VF2 ArchRiscv image but only on X11, when I tried wayland I got an EGL_BAD_NATIVE_WINDOW error any time I tried to interact with (hover mouse over) the ppsspp window. Any ideas about that @unknownbrackets ? It might be my fault as I’m using best-guess flags with starfive’s buildroot patches to build mesa. But thought I should mention it just in case.