Page 1 of 2

PPSSPP on Pi2?

Posted: Thu Feb 12, 2015 1:59 am
by barrybarryk
Has anyone had any luck getting PPSSPP to compile on Raspian on the Pi2?

I've managed to get most of it's dependencies compiled and installed (I think!) and tweak the compile script so it almost finishes compiling, but right at the very end at the "Linking CXX executable PPSSPPSDL" step it throws a lot of errors like this:

Code: Select all

Linking CXX executable PPSSPPSDL
lib/libCore.a(GLES_GPU.cpp.o): In function `GLES_GPU::GetCurrentTexture(GPUDebugBuffer&, int) [clone .part.31]':
GLES_GPU.cpp:(.text+0x1674): undefined reference to `glGetTexLevelParameteriv'
GLES_GPU.cpp:(.text+0x1688): undefined reference to `glGetTexLevelParameteriv'
GLES_GPU.cpp:(.text+0x1730): undefined reference to `glGetTexImage'
GLES_GPU.cpp:(.text+0x178c): undefined reference to `glGetTexLevelParameteriv'
GLES_GPU.cpp:(.text+0x17a0): undefined reference to `glGetTexLevelParameteriv'
lib/libCore.a(Framebuffer.cpp.o): In function `FramebufferManager::ClearDepthBuffer()':
Framebuffer.cpp:(.text+0x13e4): undefined reference to `glClearDepth'
lib/libCore.a(Framebuffer.cpp.o): In function `FramebufferManager::ClearBuffer()':
Framebuffer.cpp:(.text+0x1670): undefined reference to `glClearDepth'
lib/libCore.a(Framebuffer.cpp.o): In function `FramebufferManager::GetCurrentFramebuffer(GPUDebugBuffer&)':
Framebuffer.cpp:(.text+0x37e4): undefined reference to `glReadBuffer'
lib/libCore.a(Framebuffer.cpp.o): In function `FramebufferManager::GetCurrentDepthbuffer(GPUDebugBuffer&)':
Framebuffer.cpp:(.text+0x3a5c): undefined reference to `glReadBuffer'
lib/libCore.a(Framebuffer.cpp.o): In function `FramebufferManager::GetCurrentStencilbuffer(GPUDebugBuffer&)':
Framebuffer.cpp:(.text+0x3bd8): undefined reference to `glReadBuffer'
lib/libCore.a(TransformPipeline.cpp.o): In function `TransformDrawEngine::DoFlush()':
TransformPipeline.cpp:(.text+0x296c): undefined reference to `glClearDepth'
lib/libCore.a(StateMapping.cpp.o): In function `TransformDrawEngine::ApplyDrawState(int)':
StateMapping.cpp:(.text+0x1b00): undefined reference to `glDepthRange'
StateMapping.cpp:(.text+0x1f04): undefined reference to `glDepthRange'
lib/libnative.a(PCMain.cpp.o): In function `EGL_Open()':
PCMain.cpp:(.text+0x324): undefined reference to `XOpenDisplay'
lib/libnative.a(PCMain.cpp.o): In function `EGL_Close()':
PCMain.cpp:(.text+0x914): undefined reference to `XCloseDisplay'
lib/libnative.a(gl_state.cpp.o): In function `OpenGLState::Restore()':
gl_state.cpp:(.text+0xd4): undefined reference to `glDepthRange'
lib/libnative.a(thin3d_gl.cpp.o): In function `Thin3DGLContext::Clear(int, unsigned int, float, int)':
thin3d_gl.cpp:(.text+0x458): undefined reference to `glClearDepth'
lib/libnative.a(thin3d_gl.cpp.o): In function `Thin3DGLContext::SetViewports(int, T3DViewport*)':
thin3d_gl.cpp:(.text._ZN15Thin3DGLContext12SetViewportsEiP11T3DViewport[_ZN15Thin3DGLContext12SetViewportsEiP11T3DViewport]+0xb4): undefined reference to `glDepthRange'
lib/libglew.a(glew.c.o): In function `_glewInit_GL_VERSION_1_3':
glew.c:(.text+0x184): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x19c): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x1b4): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x1cc): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x1e4): undefined reference to `glXGetProcAddressARB'
lib/libglew.a(glew.c.o):glew.c:(.text+0x1fc): more undefined references to `glXGetProcAddressARB' follow
lib/libglew.a(glew.c.o): In function `glxewGetExtension':
glew.c:(.text+0x12558): undefined reference to `glXGetClientString'
lib/libglew.a(glew.c.o): In function `glxewContextInit':
glew.c:(.text+0x125b8): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x125f0): undefined reference to `glXQueryVersion'
glew.c:(.text+0x12614): undefined reference to `glXGetClientString'
glew.c:(.text+0x126c8): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x12d98): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x12db0): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x12e14): undefined reference to `glXGetProcAddressARB'
glew.c:(.text+0x12e2c): undefined reference to `glXGetProcAddressARB'
lib/libglew.a(glew.c.o):glew.c:(.text+0x12e44): more undefined references to `glXGetProcAddressARB' follow
collect2: error: ld returned 1 exit status
CMakeFiles/PPSSPPSDL.dir/build.make:660: recipe for target 'PPSSPPSDL' failed
make[2]: *** [PPSSPPSDL] Error 1
CMakeFiles/Makefile2:208: recipe for target 'CMakeFiles/PPSSPPSDL.dir/all' failed
make[1]: *** [CMakeFiles/PPSSPPSDL.dir/all] Error 2
Makefile:72: recipe for target 'all' failed
make: *** [all] Error 2
From what I can tell it's some sort of linking error with some GL or GLES libraries, but I'm not sure if the CMake script is linking the right libs and it's having trouble finding them (and not reporting a lib not found error) or there really is a problem in some of the sources.

The generated link.txt for the CMake run for the PPSSPPSDL executable is listing:

Code: Select all

/usr/bin/arm-linux-gnueabihf-g++-4.8   -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -L/opt/vc/lib -std=c++11 -march=armv7-a -mfpu=neon -mcpu=cortex-a9  -O3 -D_NDEBUG    CMakeFiles/PPSSPPSDL.dir/android/jni/TestRunner.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/NativeApp.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/BackgroundAudio.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/DevScreens.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/EmuScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GameInfoCache.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/MainScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/MiscScreens.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/PauseScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GameScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GameSettingsScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TiltAnalogSettingsScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TiltEventProcessor.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TouchControlLayoutScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/TouchControlVisibilityScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/GamepadEmu.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/OnScreenDisplay.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ControlMappingScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ReportScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/Store.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/CwCheatScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/InstallZipScreen.cpp.o CMakeFiles/PPSSPPSDL.dir/UI/ui_atlas.cpp.o  -o PPSSPPSDL -rdynamic -L/opt/vc/lib lib/libCore.a -lpthread /usr/local/lib/libSDL2main.a /usr/local/lib/libSDL2.so -lpthread -lpthread -lEGL lib/libCommon.a ../ffmpeg/libavformat/libavformat.a ../ffmpeg/libavcodec/libavcodec.a ../ffmpeg/libavutil/libavutil.a ../ffmpeg/libswresample/libswresample.a ../ffmpeg/libswscale/libswscale.a lib/libnative.a lib/liblibzip.a -lz lib/libpng17.a lib/librg_etc1.a lib/libvjson.a lib/libstb_vorbis.a lib/libsnappy.a lib/libudis86.a -lrt lib/libkirk.a lib/libcityhash.a lib/libxbrz.a lib/libxxhash.a lib/libglew.a -lGLESv2 -lbcm_host -lglib-2.0 -ldl /usr/local/lib/libSDL2main.a /usr/local/lib/libSDL2.so -lpthread -lEGL -Wl,-rpath,/opt/vc/lib:/usr/local/lib 
Has anyone any idea what's going on here?

Update: I managed to get it to compile ok passing through -lGL and -lX11 to the linker.

It compiles without errors now for both the EGL and FBDEV config routes, but neither executable runs. The FBDEV path giving an error of "SDL_CreateWindow failed: Couldn't find matching GLX visual" and the EGL one "EGL ERROR: Unable to create EGL display."

I'm not really sure what's causing the issue but I think it may have something to do with the configure options I used when I compiled SDL2.

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 12:08 pm
by GAMELASTER
Im trying this too today, for me is best way to use this:

Code: Select all

git clone git://github.com/hrydgard/ppsspp.git && cd ppsspp
git submodule update --i
./b.sh
But in my way i got those error:

Code: Select all

/home/pi/Desktop/ppsspp/Core/HLE/sceAtrac.cpp:95:38: fatal error: libswresample/swresample.h: Directory or file not exists

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 12:47 pm
by welshy
barrybarryk
With the wealth of awsome Titles available on the Dreamcast why would you want a PSP Emulator!? lol .Steev had similar issues, I noted some of his experiences compiling various Emulators for the Pi2 on the Emulation Thread.

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 1:39 pm
by barrybarryk
GAMELASTER wrote:But in my way i got those error:

Code: Select all

/home/pi/Desktop/ppsspp/Core/HLE/sceAtrac.cpp:95:38: fatal error: libswresample/swresample.h: Directory or file not exists
Yeah, I had to compile the ffmpeg version bundled with the PPSSPP source to get that library and then point the PPSSPP config at the newly compiled libs. It took ages to compile and needed some config tweaking of it's own. Honestly I wouldn't waste your time until someone else has a good look at that code

@Welshy, because only a few dreamcast roms open and none of them are Valkyria Chronicles II or III :cry:

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 1:50 pm
by welshy
barrybarryk wrote:@Welshy, because only a few dreamcast roms open and none of them are Valkyria Chronicles II or III :cry:
Apologies! My poor attempt at humor! Its just I believe the Saturn* and Dreamcast* are two of the most under rated Consoles, as for compatibility, of the Iso's (not ROMS btw) I have tested in Reicast thus far only Crazy Taxi seg faulted on me. However, I do love my PSP!

*PS I'm NOT a Sega 'Fan Boy' lol As previously stated on the Forum, I did own a Japanese imported MegaDrive which was traded in a few weeks later for a PCEngine CD ROM

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 2:29 pm
by GAMELASTER
barrybarryk wrote:
GAMELASTER wrote:But in my way i got those error:

Code: Select all

/home/pi/Desktop/ppsspp/Core/HLE/sceAtrac.cpp:95:38: fatal error: libswresample/swresample.h: Directory or file not exists
Yeah, I had to compile the ffmpeg version bundled with the PPSSPP source to get that library and then point the PPSSPP config at the newly compiled libs. It took ages to compile and needed some config tweaking of it's own. Honestly I wouldn't waste your time until someone else has a good look at that code
But its probably trouble in source code, not in RPI libraries, becouse that file exists in ffmpeg directory (in PPSSPP directory), so really dont know what to do now.. mmm.. Just i will probably try to compile it without FFMPEG or use older version (i have on my Ubuntu downloaded older version so that can be work :P )

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 4:05 pm
by steev
Well I had some success getting the libretro core to compile

Code: Select all

$ git clone https://github.com/libretro/libretro-ppsspp.git
$ cd libretro-ppsspp
$ git submodule init && git submodule update
$ export CC=gcc-4.8
$ export CXX=g++-4.8
$ export CFLAGS="-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -I/opt/vc/include"
$ export CXXFLAGS="$CFLAGS"
$ export LDFLAGS="-L/opt/vc/lib"
$ cd libretro
$ make platform=imx6 -j4
The compiler complains about these lines in gl3stub.h, but I found that removing the word 'extern' from each of them lets the code compile.

I couldn't run the emulator, though, it gave a bunch of "undefined symbol" errors

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 4:30 pm
by GAMELASTER
I posted issue to Github project and i will get the response we planning to edit build script for RPI, but its take some time, becouse author didnt get RPI and it take some time. Anyway, i will by trying still to run that :P We will see

https://github.com/hrydgard/ppsspp/issues/7479

Re: PPSSPP on Pi2?

Posted: Sun Feb 15, 2015 4:41 pm
by barrybarryk
Yeah ffmpeg doesn't come with that library anymore, even the dev package. You need to compile the version that comes with the source and the libraries in that ffmpeg folder (but you'll have to disable all the documentation/help modules because those sources aren't there and the compiler will complain if you don't), but even if do all this and get it to compile without errors the emulator still won't run on in it's current state.

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 11:24 am
by GAMELASTER
So, i too successfully builded PPSSPP on my RPI, but i too stuck on stage:

Code: Select all

libEGL warning: DRI2: failed to authenticate
SDL_CreateWindow failed: Could not initialize OpenGL / GLES library
when again rebuild:

Code: Select all

libEGL warning: DRI2: failed to authenticate
SDL_CreateWindow failed: Couldn't find matching GLX visual
Barry: u solved that or still searching where is problem?

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 11:38 am
by barrybarryk
I'm afraid not, I haven't looked at the PPSSPP source yet. I've been busy with FBA, but it's definitely on the "let's have a stab at that" list!

I think it's looking for OpenGL libraries or just not really gelling with the RPI's GL ES implementation. The emu devs that are already familiar with the codebase (it is a massively complicated emulator) should have it up and running in no time though. There's already Linux builds and ARMv7 GL ES builds, it's hopefully just a case of building the right modules, setting the right flags and hooking it up to Rasbian so it lands somewhere in the middle.

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 12:05 pm
by Vanfanel
It's dangerous to go alone! Use this:

https://github.com/libretro/libretro-ppsspp

Will make use of GLES instead of stinky desktopGL. Should build and run well on a Pi2.

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 2:02 pm
by GAMELASTER
Libretro-ppsspp got same error :-) Now again trying to rebuild PPSSPP, if again, i think i must look the source code :P

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 3:32 pm
by Vanfanel
GAMELASTER wrote:Libretro-ppsspp got same error :-) Now again trying to rebuild PPSSPP, if again, i think i must look the source code :P
Join #libretro on freenode and tell them about the error you get. They will solve it in no time.

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 5:54 pm
by AmigaGamer
Just a hunch based on a similar error i had with another program.....

If you have MESA installed or any of the mesa development headers lying around it may be building against them instead of the pi/broadcom specific stuff.

try running ldd on your compiled binary and look for GL or mesa related paths

ldd ppsspp | grep GL

Re: PPSSPP on Pi2?

Posted: Tue Feb 17, 2015 9:49 pm
by aaa801
AmigaGamer wrote:Just a hunch based on a similar error i had with another program.....

If you have MESA installed or any of the mesa development headers lying around it may be building against them instead of the pi/broadcom specific stuff.

try running ldd on your compiled binary and look for GL or mesa related paths

ldd ppsspp | grep GL
libGL.so.1 => /usr/lib/arm-linux-gnueabihf/mesa/libGL.so.1 (0x76ea5000)
thats the only thing linked against mesa

Re: PPSSPP on Pi2?

Posted: Wed Feb 18, 2015 9:39 pm
by GAMELASTER
barryk:
Update: I managed to get it to compile ok passing through -lGL and -lX11 to the linker.
How u do that? I now got this problem too :/ . But before when i reinstall the RPI i didnt get this error and im not modified the source code... I think is something loss on our devices or something old...

Re: PPSSPP on Pi2?

Posted: Fri Feb 20, 2015 8:23 am
by steev
I got Tekken 6 to start (but crash right before the main menu) in the libretro core

I compiled the same as here:
steev wrote:Well I had some success getting the libretro core to compile

Code: Select all

$ git clone https://github.com/libretro/libretro-ppsspp.git
$ cd libretro-ppsspp
$ git submodule init && git submodule update
$ export CC=gcc-4.8
$ export CXX=g++-4.8
$ export CFLAGS="-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -I/opt/vc/include"
$ export CXXFLAGS="$CFLAGS"
$ export LDFLAGS="-L/opt/vc/lib"
$ cd libretro
$ make platform=imx6 -j4
The compiler complains about these lines in gl3stub.h, but I found that removing the word 'extern' from each of them lets the code compile.
To get rid of most of the undefined symbol errors I edited native/gfx_es2/gl3stub.c and replaced the gl3stubinit function with:

Code: Select all

GLboolean gl3stubInit() {
return GL_FALSE; // also tried GL_TRUE - I have no idea what I'm doing
}
The last symbol error was 'glBlitFramebuffer', so I removed every reference to it in GPU/GLES/Framebuffer.cpp and GPU/GLES/StencilBuffer.cpp (I guess it should probably be replaced something else, but idk what that is). Alternatively, I can pass -lGL to the linker, but the result is the same as below.

The result:

Tekken 6 starts and plays the intro movie, gets to the "Press start" screen, then it crashes after I press start.

Code: Select all

RetroArch [WARN] :: udev_input_init :: [udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?
W: ../native/file/file_util.cpp:220: W: IsDirectory: stat failed on /home/pi/system/PPSSPP/lang/.ini
RetroArch [WARN] :: udev_input_init :: [udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?
RetroArch: rarch_log_libretro: [libretro INFO] :: Context reset!
I: ../native/gfx/gl_lost_manager.cpp:50: I: gl_lost() restoring 0 items:
I: ../native/gfx/gl_lost_manager.cpp:55: I: gl_lost() completed restoring 0 items:
I: ../native/gfx_es2/gl_state.cpp:137: I: GPU Vendor : Broadcom ; renderer: VideoCore IV HW version str: OpenGL ES 2.0 ; GLSL version str: OpenGL ES GLSL ES 1.00
I: ../native/gfx_es2/gpu_features.cpp:20: I: Checking for GL driver bugs... vendor=7 model='VideoCore IV HW'
W: ../native/file/file_util.cpp:220: W: IsDirectory: stat failed on /home/pi/system/PPSSPP/flash0/font/jpn0.pgf
Failed to load ppge_atlas.zim.

Place it in the directory "assets" under your PPSSPP directory.
W: ../native/file/file_util.cpp:220: W: IsDirectory: stat failed on /home/pi/system/PPSSPP/shaders
I: ../native/file/zip_read.cpp:359: I: Not a VFS path: /home/pi/system/PPSSPP/PSP/shaders . Reading local directory.
W: ../native/file/file_util.cpp:220: W: IsDirectory: stat failed on /home/pi/system/PPSSPP/flash0/font/jpn0.pgf
I: ../native/gfx_es2/fbo.cpp:194: I: Creating 512 x 1 FBO using separate stencil
I: ../native/gfx_es2/fbo.cpp:194: I: Creating 512 x 272 FBO using separate stencil
glGetError 0x500
I: ../native/gfx_es2/fbo.cpp:194: I: Creating 480 x 272 FBO using separate stencil
glGetError 0x500
I: ../native/gfx_es2/fbo.cpp:194: I: Creating 480 x 272 FBO using separate stencil
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
glGetError 0x500
pure virtual method called
terminate called without an active exception
Aborted
I will try some other games. Maybe something works

edit GTA VCS crashed immediately with

Code: Select all

pure virtual method called
terminate called without an active exception
Aborted
I will continue messing with this tomorrow

Re: PPSSPP on Pi2?

Posted: Fri Feb 20, 2015 9:16 am
by GAMELASTER
steev: for me is your libretro build dont work :(

Re: PPSSPP on Pi2?

Posted: Sun Feb 22, 2015 12:15 am
by memeka
Got it working on RPI2.

You don't need to change much:
- you need to get the EGL, GLES, GLESv2 and KHR headers from the mesa packages, preferably put them in the ppsspp source folder
- change CMakeLists.txt and remove RPI references: ppssppsdl uses SDL2 which already has videocore backend, so we don't need any rpi-specific backend here
- add the egl/gles include folder (where you copied the EGL, GLES, GLESv2 and KHR folders from mesa) and the egl/gles lib folder (the rpi one - /opt/vc/lib) - you can see in CMakeLists.txt how it was done previously for rpi

Run cmake, edit CMakeCache.txt and set FBDEV to ON, GLES2 to ON, maybe even MOBILE_DEVICE to ON, run cmake again, then run make.

A bit disappointed with the performance (GPU clocked at 500MHz), it runs fullspeed on the odroid...
https://www.youtube.com/watch?v=O8juShfoJtE

Re: PPSSPP on Pi2?

Posted: Sun Feb 22, 2015 1:14 am
by barrybarryk
Try running opening an ssh session from another machine and running htop to have a look at the individual core usage while it's running. There could be any number of things causing the performance hit.

I've got to say it performs better than what I was expecting though, that's pretty close to full speed.

Re: PPSSPP on Pi2?

Posted: Sun Feb 22, 2015 2:40 am
by memeka
I've already optimised it as much as possible (in-game settings). It's using threads, and max CPU load is 75% on one core.
So it's the GPU that it's limiting, even clocked at 500. I guess it's playable ... with frameskipping you get 30fps (but no slowdown) ... but still disappointed ... was hoping to get same performance as the odroid (where it runs fullspeed, but there is no vsync in framebuffer...)
so now I don't know if should go for vsync or lower performance for my arcade :(

Re: PPSSPP on Pi2?

Posted: Sun Feb 22, 2015 2:59 am
by expandables
Odroid is faster than the pi :mrgreen:

Re: PPSSPP on Pi2?

Posted: Sun Feb 22, 2015 4:48 am
by steev
Thanks to your instructions I got it to build. However, it still isn't working for me.
I suspect something is wrong with my setup, so I'll try again with a fresh sdcard (and possibly different distro)

EDIT: Yes, there was something wrong with my Raspbian install. I switched to a different sdcard with Arch Linux ARM and the same binary is working now. The libretro core I compiled the other night is also working.

Is that Raspbian you're using in the video or regular Debian?

How I built is below:

SDL2:

Code: Select all

$ ./configure --disable-video-x11 --disable-video-opengl --host=arm-raspberry-linux
$ make
$ sudo make install
('--host=*-raspberry-linux' seemed to be necessary to make it turn on the RPi backend, it wasn't auto-detected)


PPSSPP:
I copied /usr/include/{GLES,GLES2,EGL,KHR} from mesa packages to ppsspp source folder

In CMakeLists.txt I commented out all RPI code and added:

Code: Select all

include_directories(/home/pi/src/ppsspp)
link_directories(/opt/vc/lib)
set(OPENGL_LIBRARIES GLESv2)
Then I built with:

Code: Select all

$ export CC=gcc-4.8
$ export CXX=g++-4.8
$ export CFLAGS="-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
$ export CXXFLAGS="$CFLAGS"
$ mkdir build && cd build
$ cmake -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DUSING_GLES2=ON -DUSING_FBDEV=ON -DMOBILE_DEVICE=ON -DUSING_EGL=ON ../
$ make -j4
It segfaults

gdb says 'Illegal Instruction"

Code: Select all

(gdb) run
Starting program: /home/pi/src/ppsspp/build/PPSSPPSDL 

Program received signal SIGILL, Illegal instruction.
0x76fe8acc in ?? () from /lib/ld-linux-armhf.so.3
(gdb) bt
#0  0x76fe8acc in ?? () from /lib/ld-linux-armhf.so.3
#1  0x00000000 in ?? ()
(gdb)
Anyway, thanks for sharing how you got it to work

Re: PPSSPP on Pi2?

Posted: Sun Feb 22, 2015 8:20 am
by memeka
good to see you got it working.
yes, I am not using raspbian, it's Debian jessie.
I'm assuming with raspbian, it's still using some arm6 libraries... but any arm7 system should work.