gl4es icon indicating copy to clipboard operation
gl4es copied to clipboard

Box86 + GL4ES: Undertale fails to display under x11 on Raspberry Pi 3 using RetroPie

Open ghost opened this issue 6 years ago • 8 comments

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

ghost avatar Jan 18 '20 20:01 ghost

Oh, and also, the game doesn't run when LIBGL_FB is equal to 1, 2, or 3.

ghost avatar Jan 18 '20 21:01 ghost

You are using legacy GLES driver for video and not the Mesa opensource VC4 ones? Why?

ptitSeb avatar Jan 18 '20 21:01 ptitSeb

Also, do you have the log with LIBGL_FB=3? I'm surprised it didn't worked.

ptitSeb avatar Jan 18 '20 21:01 ptitSeb

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.

ghost avatar Jan 18 '20 22:01 ghost

Ok, that's odd. Try to build gl4es without -DBCMHOST and give it a try, just in case (especially with LIBGL_FB=3).

ptitSeb avatar Jan 18 '20 22:01 ptitSeb

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.

ghost avatar Jan 18 '20 22:01 ghost

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.

ghost avatar Jan 18 '20 22:01 ghost

What you can try then, with the -DBMCHOST build:

  • try with LIBGL_NOTEST=1 environnement 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.

ptitSeb avatar Jan 19 '20 09:01 ptitSeb