Box86 + GL4ES: Undertale fails to display under x11 on Raspberry Pi 3 using RetroPie
Hi,
I'm trying to run Undertale on my RPi 3 using RetroPie (no desktop environment), and I came up with some errors. I have compiled Box86 with the -DRPI3 flag and GL4ES with the -DBCMHOST flag.
I used the MatchBox window manager along with xinit, and funnily enough, the window came up, but the window was just filled with black. The game only could output audio and receive keyboard input. I quit the game shortly there after realizing this.
I have attached a log file along with this.
Here were the commands in the shell script executed with xinit:
xset -dpms s off s noblank
matchbox-window-manager &
BOX86_LIBGL=/opt/retropie/supplementary/box86/gl4es/build/lib/libGL.so.1 box86 /opt/retropie/ports/box86/Undertale/runner
Oh, and also, the game doesn't run when LIBGL_FB is equal to 1, 2, or 3.
You are using legacy GLES driver for video and not the Mesa opensource VC4 ones? Why?
Also, do you have the log with LIBGL_FB=3? I'm surprised it didn't worked.
I'm not using the VC4 drivers because RetroPie straight up doesn't support them yet. And I can't get a log of LIBGL_FB=3 because it causes the framebuffer to become unstable, crashing the entire system.
Ok, that's odd. Try to build gl4es without -DBCMHOST and give it a try, just in case (especially with LIBGL_FB=3).
It works without -DBCMHOST but very slowly (like 6 frames a second)... I'm pretty sure that is not supposed to happen. Man, I hate the implementation of video on RPi.
I'm pretty sure that I can use -DBCMHOST, but I need to find out the issue with the EGL_BAD_DISPLAY error. I think it has to do with LIBGL_GLXRECYCLE... No matter what I do, I cannot turn it off.
What you can try then, with the -DBMCHOST build:
- try with
LIBGL_NOTEST=1environnement variable, to see if hardware testing messed things - try to play with
LIBGL_GLXRECYCLE. Note the handling was bugged and I've just fixed it...
If nothing works, uncomment line 45 of src/glx/glx.c to have mode debug trace of all glx calln that may help understanding what goes wrong.