PSP Port

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
mills
Posts: 8
Joined: Thu Oct 07, 2010 4:56 pm

PSP Port

Post by mills »

Sorry for the noob question, I just joined this forum because there is little info about this on the internet.

Is anyone interested in porting residualVM to PSP?

I can compile psp eboots, But this is not so simple, I'd need help to create the eboot from residualVM source, and then i could test things, or try to find the render code and port it to PSP.

It won't neeed a lot of optimization as the psp is powerfull enough to handle these kind of graphics, even if it only renders the games in software mode.

Thanks a lot.
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: PSP Port

Post by Botje »

ScummVM has a PSP port [https://github.com/scummvm/scummvm/tree ... atform/psp], so if you're interested in PSP support:

1) copy that code into a fork of residualvm
2) copy the relevant parts of the configure script (those relating to _backend == psp and _host_os == psp)

At this point you _should_ be able to run residualvm with software rendering.
I do not think anyone on the dev team is currently working on a PSP port, but if you have questions about the code itself we can help.
You can also ask questions on our IRC channel (#residualvm on irc.freenode.net) or here.
mills
Posts: 8
Joined: Thu Oct 07, 2010 4:56 pm

Re: PSP Port

Post by mills »

Botje wrote:ScummVM has a PSP port [https://github.com/scummvm/scummvm/tree ... atform/psp], so if you're interested in PSP support:

1) copy that code into a fork of residualvm
2) copy the relevant parts of the configure script (those relating to _backend == psp and _host_os == psp)

At this point you _should_ be able to run residualvm with software rendering.
I do not think anyone on the dev team is currently working on a PSP port, but if you have questions about the code itself we can help.
You can also ask questions on our IRC channel (#residualvm on irc.freenode.net) or here.
Thanks, I copied all psp related folders from scummvm to residualvm.

Then I wrote:

Code: Select all

./configure --host=psp
Everything OK because residualvm configure is just the same as scummvm, so it has all psp stuff.

Then i "make" and got some errors:

- A lot of errors in png_loader.cpp.
ERROR not declared in this scope: png_infopp_NULL, int_p_NULL, png_bytep_NULL...

I changed all not declared with "0" and it just showed warnings and compiled, But I don't know if this could cause trouble, because i could compile scummvm with these warnings and it worked.


- One error in psp_main.cpp:

Code: Select all

g_system = new OSystem_PSP();
assert(g_system);
ERROR: cannot allocate an object of abstract type OSystem_PSP.

Thanks
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: PSP Port

Post by Botje »

Mills wrote: Thanks, I copied all psp related folders from scummvm to residualvm.

Then I wrote:

Code: Select all

./configure --host=psp
Everything OK because residualvm configure is just the same as scummvm, so it has all psp stuff.

Then i "make" and got some errors:

- A lot of errors in png_loader.cpp.
ERROR not declared in this scope: png_infopp_NULL, int_p_NULL, png_bytep_NULL...

I changed all not declared with "0" and it just showed warnings and compiled, But I don't know if this could cause trouble, because i could compile scummvm with these warnings and it worked.
No such file in Scummvm or ResidualVM. Could be different compiler flags?
EDIT: nevermind. See http://stackoverflow.com/questions/2442 ... -not-found . Your solution is correct.
Mills wrote: - One error in psp_main.cpp:

Code: Select all

g_system = new OSystem_PSP();
assert(g_system);
ERROR: cannot allocate an object of abstract type OSystem_PSP.
ResidualVM adds a number of methods to the OSystem base class.
Normally the compiler should tell you which methods are missing, but you can check common/system.h.
The added methods are marked with "!!! ResidualVM specific method: !!!".
mills
Posts: 8
Joined: Thu Oct 07, 2010 4:56 pm

Re: PSP Port

Post by mills »

Botje wrote:
Mills wrote: - One error in psp_main.cpp:

Code: Select all

g_system = new OSystem_PSP();
assert(g_system);
ERROR: cannot allocate an object of abstract type OSystem_PSP.
ResidualVM adds a number of methods to the OSystem base class.
Normally the compiler should tell you which methods are missing, but you can check common/system.h.
The added methods are marked with "!!! ResidualVM specific method: !!!".

I solved the png loader thing... now i can compile normal scummvm with no errors and worked perfect (my first try freezed PSP).

So now i'll try to solve the OSystem_psp thing and compile residualVM.

I wonder if "Escape from monkey island" will really work... It required 4 MB of video ram, and psp has only 2MB. But if it is working in software, it might just be a bit slow and that's all.

If i could make the psp to use the gpu, then i'd have to reduce texture sizes to fit inside 2 MB, but i did not find any editor for EMI or Grim fandango to do that.
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: PSP Port

Post by Botje »

Software rendering will not use much video ram.
For 3D rendering you could downscale textures in memory, with some hacking.
mills
Posts: 8
Joined: Thu Oct 07, 2010 4:56 pm

Re: PSP Port

Post by mills »

I just need to understand how these functions work (i'm still learning...):

Image

Then it should compile well.

Thanks

EDIT:

launcherinitsize and lockMouse functions have no sense on PSP.. so I commented them.
Pixelbuffer.. i don't know, i think it sets the screen resolution.
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Re: PSP Port

Post by Botje »

A pixelbuffer is a small wrapper around a buffer which represents the screen.
You could return something like PixelBuffer(_screen.getScummvmPixelFormat(), _screen._frameBuffer.getPixels()) maybe?
Although I do not know how this interacts with screen locking and unlocking.
Nitrus
Posts: 177
Joined: Wed May 18, 2011 9:49 am

Re: PSP Port

Post by Nitrus »

Sorry for popping this old thread but just noticing it.
I feel like I should contribute here... I see that you've run into the libPNG problems. I cross-compiled ScummVM for the PSP a while ago, I even see that my "instructions" (which were more of a build process that I transferred over via e-mail or irc, I can't remember) made it into the [http://wiki.scummvm.org/index.php/Compi ... n_Portable], in the "Hard way" no less :S

Building for the PSP was not really straightforward back then as the toolchain was not continuously available, even now their webpage is down, though github is up. I'm not sure what the status is on their jim.
The trouble with libPNG was that even when including the missing defines of the newer version, it compiled correctly but did not run correctly, I can't quite remember what the issues were, but I remember running "Beneath a Steel Sky" with some messed up sprites. Not too much, but annoying.

I'm not sure how it will handle ResidualVM to be honest, as the port ran into some mutex and locking problems or races when it needed to load large stuff into memory. "The Dig" locked up in a specific place without fail, and so did Sam and Max IIRC.
(In hindsight those might have been engine issues and not port)

I think I still have my PSP2000 somewhere (if I haven't salvaged it for the display), so I might give building ResidualVM for it a try... No promises :)
Post Reply