Building beetle-psx-libretro with dynarec on a Raspberry Pi 3 (64bit)

Hi there, guys!

I am trying to build this core since, from the news on the LibRetro frontpage, it is now suited to aarch64/arm64 GNU/Linux SBCs.

So, I am building with:

make HAVE_LIGHTREC=1 HAVE_OPENGL=1 platform=unixgles -j3

And I get:

In file included from ./libretro-common/include/glsm/glsmsym.h:26,
                 from ./mednafen/psx/gpu.h:14,
                 from rsx/rsx_intf.cpp:16:
./libretro-common/include/glsm/glsm.h:35:17: error: conflicting declaration 'typedef GLfloat GLdouble'
 typedef GLfloat GLdouble;
                 ^~~~~~~~
In file included from ./libretro-common/include/glsym/rglgen_headers.h:62,
                 from ./libretro-common/include/glsm/glsm.h:30,
                 from ./libretro-common/include/glsm/glsmsym.h:26,
                 from ./mednafen/psx/gpu.h:14,
                 from rsx/rsx_intf.cpp:16:
/usr/include/GLES2/gl2ext.h:3092:16: note: previous declaration as 'typedef double GLdouble'
 typedef double GLdouble;
                ^~~~~~~~
In file included from ./libretro-common/include/glsm/glsmsym.h:26,
                 from mednafen/psx/gpu.h:14,
                 from libretro.cpp:7:
./libretro-common/include/glsm/glsm.h:35:17: error: conflicting declaration 'typedef GLfloat GLdouble'
 typedef GLfloat GLdouble;
                 ^~~~~~~~
In file included from ./libretro-common/include/glsym/rglgen_headers.h:62,
                 from ./libretro-common/include/glsm/glsm.h:30,
                 from ./libretro-common/include/glsm/glsmsym.h:26,
                 from mednafen/psx/gpu.h:14,
                 from libretro.cpp:7:
/usr/include/GLES2/gl2ext.h:3092:16: note: previous declaration as 'typedef double GLdouble'
 typedef double GLdouble;
                ^~~~~~~~
In file included from ./libretro-common/include/glsm/glsmsym.h:26,
                 from mednafen/psx/gpu.h:14,
                 from mednafen/psx/psx.h:94,
                 from mednafen/psx/gpu.cpp:18:
./libretro-common/include/glsm/glsm.h:35:17: error: conflicting declaration 'typedef GLfloat GLdouble'
 typedef GLfloat GLdouble;
                 ^~~~~~~~
In file included from ./libretro-common/include/glsym/rglgen_headers.h:62,
                 from ./libretro-common/include/glsm/glsm.h:30,
                 from ./libretro-common/include/glsm/glsmsym.h:26,
                 from mednafen/psx/gpu.h:14,
                 from mednafen/psx/psx.h:94,
                 from mednafen/psx/gpu.cpp:18:
/usr/include/GLES2/gl2ext.h:3092:16: note: previous declaration as 'typedef double GLdouble'
 typedef double GLdouble;
                ^~~~~~~~
make: *** [Makefile:674: rsx/rsx_intf.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:674: libretro.o] Error 1
^Cmake: *** [Makefile:674: mednafen/psx/gpu.o] Interrupt

So, any idea on what is going on? Isnt this core supposed to be compatible with GLES2? (I have built a software renderer version, but its very slow with the dynarec active, so I blame the software renderer).

Thanks!

I’m not sure about the compile errors, but the software renderer is slightly faster than the hardware renderers, IIRC, because it still runs the software renderer in the background for framebuffer effects.

Then, is this emulator out of the scope something like the Pi3b+ in 64bit mode, even with the LIGHTREC dynarec active? (4 x Armv8 A53 at 1.5Ghz)

Just trying to figure out since I saw the aarch64 SBCs mentioned in the news :slight_smile:

Not sure about that. It was borderline on an Nvidia Shield without the dynarec, so if the RPi4 is anywhere close to that…

If not, it looks like they’re going to hook the same dynarec up to PCSX-ReARMed, so it’ll be fast(er) on 64-bit vs the interpreter.

@hunterk What nvidia shield model exactly do you mean? I would like to know what ARM core does it contain and compare to the Pi3b+

I have a 2015 model. Looks like: ARMv8 [ARM Cortex-A57] quad-core (64-bit) according to Wikipedia.

I’m pretty sure a RPi3 is significantly weaker, but a RPi4 should be much closer, I think.

Do you know how can I tell if the dynarec (aarch64) is being actually used or not? I activated the option and as you can see I built with HAVE_LIGHTREC=1, but I see no speed differences between dynarec and interpreter, so maybe that is the problem on the Pi3b+, its Armv8 A53 is not THAT far away from an A57…

I think it should have some stuff about it in the log.

re: HW renderer - beetle needs either vulkan or open gl 3.3 for it: https://docs.libretro.com/library/beetle_psx_hw/

so you’re stuck with software.

1 Like