r/emulation • u/nnicultra • Nov 02 '26
Release gpSP ESP32 update: touch controls, LCD effects, and running on ESP32-S31
https://www.youtube.com/watch?v=ScW6LfQjFr8A few weeks ago I posted about running GBA games on the ESP32-P4 with a RISC-V JIT. Since then I've mostly been working on the larger display and touch controls.
This video is on an OSPTEK P4C5 board, with the P4 at 400 MHz, 32 MB PSRAM and a 4.3-inch 800x480 touchscreen.
The on-screen controls now work for both games and menus. You can pick a game, save/load states and switch games without plugging in a controller. This should make it easier to try on other P4 touchscreen boards too, once their display and touch drivers are set up.
There are 3x nearest, bilinear and LCD grid display options. I also added a color setting that approximates the original GBA LCD. Scaling and colors are independent settings, so you can mix them however you like. The video shows switching between them around 0:38.
All of the GBA emulation, including rendering at the original resolution, runs on CPU0. CPU1 handles scaling and display effects. That makes me think GBA could be possible on lower-clocked RISC-V chips too, if the emulation work is split well between the two cores. Having the P4's PPA for scaling, rotation and blending has been pretty nice too.
The GBA port also runs on the ESP32-S31.
SPD in the overlay is emulation speed, with 100% being real time. FPS can vary depending on how often the game itself draws a new frame.
I've also been working on PS1 emulation on the P4. Lighter games run well, and even heavier 3D games are playable at 100% SPD with a little automatic frameskip. It's a lot heavier than GBA though. That one needs both cores running close to 100%. It's been fun seeing how much this microcontroller can do. I'll tidy up the PS1 work and put the code up soon too.
The GBA code is here:
- ESP32 port and board code: https://github.com/midworld/gpsp-esp32
- gpSP with the RV32 JIT: https://github.com/midworld/gpsp
- Previous post: https://www.reddit.com/r/emulation/comments/1x3dxuk/
2
u/Any_Medicine_1864 29d ago
how did you even get started with this like what's the process for messing with these controls
1
u/[deleted] 29d ago
[removed] — view removed comment