bluesmoke
Posts: 38
Joined: Tue Jul 16, 2013 12:02 pm

PSP emulator on the pi?

Tue Aug 27, 2013 6:41 pm

Is there a non-Java PSP emulator for the Raspberry Pi

SimPiko
Posts: 5
Joined: Fri Feb 08, 2013 9:44 pm

Re: PSP emulator on the pi?

Tue Aug 27, 2013 10:35 pm

There is one emulator that we could run on RPi, PPSSPP is the name.
Sadly, we have to compile it from source. I haven't managed to compile it myself, because of some strange "enum" error.
Also I think it must be compiled with GLES libraries from /opt/vc/, but I don't know how to add them to CMake files :/.

Topic on forums.ppsspp.org: http://forums.ppsspp.org/showthread.php ... 9#pid17629
Commands I used

Code: Select all

mkdir tmp
cd tmp
sudo apt-get install git-core
sudo apt-get install cmake
sudo apt-get install libsdl1.2-dev
Sudo apt-get install libgles2-mesa-dev //probably can be skipped if we use /opt/vc ones
git clone git://github.com/hrydgard/ppsspp.git
cd ppsspp
git submodule update --init
cd ..
ccmake ppsspp #enabled 'arm' and 'glesv2', disabled 'x86' and 'ffmpeg', built with release flags.
make 
Error itself:

Code: Select all

-------------- Build: all in PPSSPP ---------------

Using makefile: Makefile
[  9%] Built target Common
[  9%] Built target sha1
[  9%] Built target stb_image
[ 10%] Built target snappy
[ 10%] Built target rg_etc1
[ 16%] Built target zlib
[ 17%] Built target stb_vorbis
[ 42%] Built target native
[ 42%] Building CXX object CMakeFiles/GPU.dir/GPU/GLES/DisplayListInterpreter.cpp.o
In file included from /home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/DisplayListInterpreter.h:26:0,
                 from /home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/DisplayListInterpreter.cpp:32:
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TransformPipeline.h:67:7: error: expected identifier before ‘int’
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TransformPipeline.h:67:14: error: expected unqualified-id before ‘{’ token
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TransformPipeline.h: In constructor ‘VertexArrayInfo::VertexArrayInfo()’:
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TransformPipeline.h:55:12: error: ‘VAI_NEW’ was not declared in this scope
In file included from /home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/DisplayListInterpreter.h:27:0,
                 from /home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/DisplayListInterpreter.cpp:32:
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TextureCache.h: At global scope:
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TextureCache.h:74:8: error: expected identifier before ‘int’
/home/pi/tmp/ppsspp-git/ppsspp/GPU/GLES/TextureCache.h:74:15: error: expected unqualified-id before ‘{’ token
make[2]: *** [CMakeFiles/GPU.dir/GPU/GLES/DisplayListInterpreter.cpp.o] Error 1
make[1]: *** [CMakeFiles/GPU.dir/all] Error 2
make: *** [all] Error 2
Process terminated with status 2 (1 minutes, 4 seconds)
5 errors, 0 warnings
EDIT:

Code: Select all

TransformPipeline.h:67
enum Status {
      VAI_NEW,
      VAI_HASHING,
      VAI_RELIABLE, // cache, don't hash
      VAI_UNRELIABLE, // never cache
};

TextureCache.h:74
enum Status {
     STATUS_HASHING = 0x00,
     STATUS_RELIABLE = 0x01, // cache, don't hash
     STATUS_UNRELIABLE = 0x02, // never cache
     STATUS_MASK = 0x03,

     STATUS_ALPHA_UNKNOWN = 0x04,
     STATUS_ALPHA_FULL = 0x00, // Has no alpha channel, or always full alpha.
     STATUS_ALPHA_SIMPLE = 0x08, // Like above, but also has 0 alpha (e.g. 5551.)
     STATUS_ALPHA_MASK = 0x0c,
};
Last edited by SimPiko on Thu Aug 29, 2013 4:13 pm, edited 1 time in total.

tinkernaut
Posts: 74
Joined: Fri May 10, 2013 5:58 pm

Re: PSP emulator on the pi?

Tue Aug 27, 2013 11:41 pm

I believe that ppsspp is included as part of RetroPie now.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PSP emulator on the pi?

Wed Aug 28, 2013 7:48 am

Retro Pie does indeed seem to have a script for PPSSPPSDL (as apposed to OpenGLES), that being the case I assume its performance would be woefully inadequate on the Pi (the PSP is in fact quite powerful hardware, way in excess of PS1). Unless anybody knows otherwise?
"The list of things I have heard now contains everything!"

bluesmoke
Posts: 38
Joined: Tue Jul 16, 2013 12:02 pm

Re: PSP emulator on the pi?

Wed Aug 28, 2013 12:54 pm

Well, I read on their site that linux builds have been broken since version 7 somthing so that might be your GLES issue. I the pi is plenty powerful enough. My Samsung Repelish can emulate most games to the point that its playable.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PSP emulator on the pi?

Wed Aug 28, 2013 1:29 pm

bluesmoke
No, I mean the SDL version will only use the ARM and not get support from the Graphic Chip, unlike an OpenGLES a rendered version. With OpenGLES drivers it MAY be possible, but unlikely without some serious optimisation, which is likely to have been applied on the Android version. Even then the Linux source code has no ARM support so it would need a port/fork or cross compiled for ARM. In any case the Broadcom SOC (RPi) differs from the Qualcomm MSM7000 in your Samsung Phone so any 'comparison' of performance between the architecture is debatable/argumentative.
"The list of things I have heard now contains everything!"

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: PSP emulator on the pi?

Wed Aug 28, 2013 10:30 pm

welshy wrote:Retro Pie does indeed seem to have a script for PPSSPPSDL (as apposed to OpenGLES), that being the case I assume its performance would be woefully inadequate on the Pi (the PSP is in fact quite powerful hardware, way in excess of PS1). Unless anybody knows otherwise?
about 10 times for CPU power alone (ignoring all GPU, SIMD, FPU etc etc). 33.8688MHz MIPS R3000 for the PS1 and 222/333MHz MIPS R4000 for the PSP (defaults to the prior option but a few titles ran at 333, it can also underclock in a few titles too).

The GPU is far more powerful and the CPU also has more advanced floating point units and other extensions. It is also of a newer hardware generation.

Hell, a PSP can emulate a PS1, the emulator is even built into the official firmware (however on an unmodified console it will only load roms obtained from the playstation network, with custom firmware it will load unsigned roms too, not to mention homebrew and PSP roms too)

Vanfanel
Posts: 444
Joined: Sat Aug 18, 2012 5:58 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 12:05 am

6677 wrote:
welshy wrote:Retro Pie does indeed seem to have a script for PPSSPPSDL (as apposed to OpenGLES), that being the case I assume its performance would be woefully inadequate on the Pi (the PSP is in fact quite powerful hardware, way in excess of PS1). Unless anybody knows otherwise?
about 10 times for CPU power alone (ignoring all GPU, SIMD, FPU etc etc). 33.8688MHz MIPS R3000 for the PS1 and 222/333MHz MIPS R4000 for the PSP (defaults to the prior option but a few titles ran at 333, it can also underclock in a few titles too).

The GPU is far more powerful and the CPU also has more advanced floating point units and other extensions. It is also of a newer hardware generation.

Hell, a PSP can emulate a PS1, the emulator is even built into the official firmware (however on an unmodified console it will only load roms obtained from the playstation network, with custom firmware it will load unsigned roms too, not to mention homebrew and PSP roms too)
It has been said countless times: emulated machines can NOT be compared with the emulation host!
Depending on the techniques involved for getting the "emulated" programs running, it could be necessary 10x or 1.000.000x the power of the emulated machine to run a gived program at a good / playable / full speed.

PS1 hardware is not really software-emulated on the PSP firmware: the PSP POPs modules allow high-level emulation (HLE) of the PSX system calls. In most cases, system calls of the emulated system (PSX) are "intercepted" and equivalent host system (PSP) functions are called instead. There's no need to emulate the PSX hardware: the games run in a semi-native way, so to say.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 7:24 am

Whoa guys!
Lets not get into a heavy tech talk which will alienate new users, apologies, my error, it was a badly structured sentence. I was trying to explain simply that the PSP is unlikely to be emulated on the RPi due to its computational performance which is closer to PS2 than PS1. I'm guessing the 'script' is a cross over from Retro Arch, not that a core is actually usable in Retro Pie. I still believe the best RPi users can hope for is an 'Optimised' N64 emulator, which may be able to run certain games at 50% (similar in performance to DaedalusX64 for the PSP, another 'HLE' (High Level Emulator)). Others may be possible, I had a Dreamcast emulator working on a 'Test Bed' before receiving my RPi (in retrospect it was fairly close in performance to the final hardware), but it ran in Seconds per Frame rather than Frames per Second! That's the difference between what is possible and what would be acceptable/playable.
"The list of things I have heard now contains everything!"

nexusrex
Posts: 234
Joined: Thu Jul 04, 2013 2:25 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 8:39 am

no psp emu ! :cry:

Oakham
Posts: 366
Joined: Tue Aug 20, 2013 9:11 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 9:13 am

nexusrex wrote:no psp emu ! :cry:
The Pi was designed for Educational purposes, basically to educate young people that pointy-clickey is not real computing :twisted: :evil:
Searching is easy, most questions have been asked before !

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 10:54 am

Vanfanel wrote:
6677 wrote: about 10 times for CPU power alone (ignoring all GPU, SIMD, FPU etc etc). 33.8688MHz MIPS R3000 for the PS1 and 222/333MHz MIPS R4000 for the PSP (defaults to the prior option but a few titles ran at 333, it can also underclock in a few titles too).
It has been said countless times: emulated machines can NOT be compared with the emulation host!
Depending on the techniques involved for getting the "emulated" programs running, it could be necessary 10x or 1.000.000x the power of the emulated machine to run a gived program at a good / playable / full speed.

PS1 hardware is not really software-emulated on the PSP firmware: the PSP POPs modules allow high-level emulation (HLE) of the PSX system calls. In most cases, system calls of the emulated system (PSX) are "intercepted" and equivalent host system (PSP) functions are called instead. There's no need to emulate the PSX hardware: the games run in a semi-native way, so to say.
In case you have never noticed, I am one of the people who goes around telling people to not compare emulated machines with the emulation host, I am not some random noob.

But if you re-read my post. I stated that the PSP CPU without any extensions is about 10x as powerful as a PS1 CPU, which it is.
The PSP does partially software emulate the PS1, but yes it can run parts natively due to shared MIPS architecture (and the same applies to N64 emulation on PSP), the GPU, controllers, bios and a few extensions to the PS1 CPU are software emulated on the PSP.
The n64 emulator for psp is very buggy though. Goldeneye runs at seconds per frame :/ Mario64 and Fzero work nicely though.

Oakham
Posts: 366
Joined: Tue Aug 20, 2013 9:11 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 11:44 am

I am not a gamer, but am aware of the various machines from Lynx to XBox

Sureley rather than expending energy on porting games from machines with PPC (IBM Power Now), Pentium and various MIPS & Risc CPU's it would be easier to compile Acorn RiscOS Games ?
Searching is easy, most questions have been asked before !

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 12:50 pm

Oakham
Unfortunately there are not many RISC OS emulators and for those that do exist its hard to find the source code for them (so you would just have to use a Binary, learning nothing), better to use Wheezy as most Linux emulators are Debian based. As for RISC OS, not to be disparaging but its an outdated/unused Operating System and pretty much redundant these days (unless for specific/embedded systems). It would be a bit like telling 'newbies' to learn 6502 assembler (which I leant when starting programming) if they want to get into computers, i.e. irrelevant/redundant (although in true 'Retro' fashion I now program games for the Atari VCS!) but in turn it has to be relevant to the modern world. I'm all for the educational aim of the Raspberry Pi, que 'Grumpy Old Man Mode': 'Kids to day can all use computers but have NO IDEA how they work, they have the internet at their fingertips, the greatest educational tool ever invented and all they seem to do is go on Facebook/Twitter or watch a skateboarding cat on You Tube!' If you read a lot of my posts I advocate users building their own emulators from source code including many 'Guides' on how to achieve it, learning about compiling/scripts/different chipsets etc. in the process but having something 'fun' to use once completed.
Last edited by welshy on Thu Aug 29, 2013 1:06 pm, edited 3 times in total.
"The list of things I have heard now contains everything!"

Oakham
Posts: 366
Joined: Tue Aug 20, 2013 9:11 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 12:59 pm

" As for RISC OS, not to be disparaging but its an outdated/unused Operating System and pretty much redundant"

I thought it was compiled to run on the Pi ? http://www.pilearn.com
Searching is easy, most questions have been asked before !

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PSP emulator on the pi?

Thu Aug 29, 2013 1:17 pm

Oakham
It is, but I haven't seen it running in any actual 'Real World' setting (be it for control/diagnostics in engineering) for 20 years outside of a University. Personally I consider it a 'Throwback' to the BBC/Archimedes educational use of old.
"The list of things I have heard now contains everything!"

noob
Posts: 218
Joined: Sat Dec 08, 2012 3:58 pm

Re: PSP emulator on the pi?

Sat Aug 31, 2013 2:24 pm

Wouldnt it be possible to use the arm itself, like a virtual machine, since they both use the arm?

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: PSP emulator on the pi?

Sat Aug 31, 2013 2:32 pm

noob
The PSP uses a 64Bit MIPS R4000, its a RISC (Reduced Instruction Set Computing) processor, but not an ARM.
"The list of things I have heard now contains everything!"

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: PSP emulator on the pi?

Sun Sep 01, 2013 10:32 pm

noob wrote:Wouldnt it be possible to use the arm itself, like a virtual machine, since they both use the arm?
There is an arm chip within the psp, but it is not the same variant as in the pi (its an M profile core I think). It is not used as the actual processor either, it just uses it as an interface between the CPU and WiFi I think (or some other system).

The CPU itself is MIPS R4000 based which has very little to do with ARM beyond being a RISC processor instead of CISC.

manzaiya
Posts: 4
Joined: Thu Nov 21, 2013 3:57 pm

Re: PSP emulator on the pi?

Wed Nov 27, 2013 7:55 pm

I am still having issues compiling PPSSPP but I at least got it to create the executable (unusable but it's a step in the right direction) on raspberry pi. This is what I've done.

+ I used the RetroPie script to git the source for that emulator.

+ Compiled ffmpeg separately

Add the following lines into /etc/apt/sources.list

Code: Select all

deb-src http://www.deb-multimedia.org sid main
deb http://www.deb-multimedia.org wheezy main non-free

Code: Select all

apt-get source ffmpeg-dmo
You should now have a folder called ffmpeg-dmo-0.11

Code: Select all

          cd ffmpeg-dmo-0.11
          ./configure
          make
          make install


+ Include the .a libs and include files in the build for PPSSPP by editing "ppsspp/CMakefiles/PPSSPP.dir/" files. I just did a search for all entries with ffmpeg and pointed it at the .a libs and .h files from ffmpeg-dmo-0.11 build by using the files I saw in the linux/x86 folder as a reference (libavformat.a, libavutil.a, etc) . I also added -lbz2 flag to link.txt so it will include bzip2 which is used by matroska in libavformat. Bzip is ultimately probably not needed by ppsspp but at least we have something to link against now.

Btw, I switched USING_GLES2 to off to get passed some undefined_references for the gl core functions in <GLES2/gl2.h> to get an executable to build, but this might be the reason why running this executable it complains about not having OpenGL on the raspberry pi and fails with a bad entry point.

Anyone familiar with USING_GLES2 flag? Not sure how to get it to compile when it includes the gl2.h header. Using the /opt/vc libraries or at least trying to include them in the build.

SimPiko
Posts: 5
Joined: Fri Feb 08, 2013 9:44 pm

Re: PSP emulator on the pi?

Wed Nov 27, 2013 9:37 pm

Wait, you managed to compile PPSSPP? I've been trying to compile it since June and it always crashed at GPU/GLES/GLES_GPU.cpp

manzaiya
Posts: 4
Joined: Thu Nov 21, 2013 3:57 pm

Re: PSP emulator on the pi?

Sun Dec 01, 2013 7:21 am

Yes, but the executable was unusable. When running it fails saying OpenGL wasn't installed on the system along with an invalid entry error. That was as far as I got with it.

Mine also complained around GLES_GPU.cpp, but mostly in regards to the gl2.h header file and not being able to resolve the extern GL method definitions. I was able to skip this include by changing "USING_GLES2" flag to off. It finished compiling and generated an executable. Though this may be why the executable is ultimately failing.

I have a strong suspicion it's very possible to get it to compile and run on the raspberry pi, but haven't found anybody yet who can help me with it.

manzaiya
Posts: 4
Joined: Thu Nov 21, 2013 3:57 pm

Re: PSP emulator on the pi?

Sun Dec 01, 2013 8:01 am

The specific error I get when running my executable is:
*** glib detected **** ./PPSSPPSDL: free(): Invalid pointer: 0xb59c2008 ***le(offscreen) aborted

SimPiko
Posts: 5
Joined: Fri Feb 08, 2013 9:44 pm

Re: PSP emulator on the pi?

Sun Dec 01, 2013 8:41 pm

Alright, after tons of googling around I think I've finally fixed that GLES_GPU related problem I had by adding this to cmake:

Code: Select all

CMAKE_CXX_FLAGS = -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -L/opt/vc/lib -lbz2 -lGLESv2 -lEGL -lm -lbcm_host
commenting out "gl3stub.c", "gl3stub.h" from CMakeLists.txt and "glDrawTextureNV" from "GPU/GLES/Framebuffer.cpp"

Now emulator can compile, but launching it leaves me with this error:

Code: Select all

pi@raspberrypi ~/tmp/psp_com $ ./PPSSPPSDL 
I: /home/pi/tmp/ppsspp/native/file/zip_read.cpp:304: I: Registered VFS for prefix : assets/
I: /home/pi/tmp/ppsspp/native/file/zip_read.cpp:304: I: Registered VFS for prefix : /home/pi/
I: /home/pi/tmp/ppsspp/UI/NativeApp.cpp:296: I: Logman: 0x2603f50
Pixels: 1280 x 1024
Virtual pixels: 1280 x 1024
I: /home/pi/tmp/ppsspp/native/gfx_es2/gl_state.cpp:129: I: GPU Vendor : (null)
Segmentation fault
pi@raspberrypi ~/tmp/psp_com $

User avatar
pkManu
Posts: 3
Joined: Thu Jul 23, 2015 7:24 pm

Re: PSP emulator on the pi?

Sun Jul 26, 2015 7:43 pm

Sooo.. I was interested about this. Is there something new?

Return to “Gaming”