ResidualVM logo Forum Index - ResidualVM website - Contact us - Rules Login    Register     Search curved edge
It is currently Tue Jun 27, 2017 1:53 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: PSP Port
PostPosted: Sat Apr 25, 2015 1:39 pm 
Offline

Joined: Sat Apr 25, 2015 12:07 pm
Posts: 4
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.


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Mon Apr 27, 2015 9:45 am 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 178
ScummVM has a PSP port [https://github.com/scummvm/scummvm/tree/master/backends/platform/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.


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Mon May 04, 2015 6:13 pm 
Offline

Joined: Sat Apr 25, 2015 12:07 pm
Posts: 4
Botje wrote:
ScummVM has a PSP port [https://github.com/scummvm/scummvm/tree/master/backends/platform/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:
./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:
g_system = new OSystem_PSP();
assert(g_system);

ERROR: cannot allocate an object of abstract type OSystem_PSP.

Thanks


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Tue May 05, 2015 11:52 am 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 178
Mills wrote:
Thanks, I copied all psp related folders from scummvm to residualvm.

Then I wrote:

Code:
./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:
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: !!!".


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Tue May 05, 2015 12:49 pm 
Offline

Joined: Sat Apr 25, 2015 12:07 pm
Posts: 4
Botje wrote:

Mills wrote:
- One error in psp_main.cpp:
Code:
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.


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Tue May 05, 2015 1:30 pm 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 178
Software rendering will not use much video ram.
For 3D rendering you could downscale textures in memory, with some hacking.


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Tue May 05, 2015 2:36 pm 
Offline

Joined: Sat Apr 25, 2015 12:07 pm
Posts: 4
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.


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Wed May 06, 2015 6:48 am 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 178
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.


Top
 Profile  
 
 Post subject: Re: PSP Port
PostPosted: Tue Feb 02, 2016 3:42 am 
Offline
User avatar

Joined: Thu Jun 21, 2012 3:00 pm
Posts: 129
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/Compiling_ScummVM/PlayStation_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 :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Forum design by ScummVM team, icons by raina, adopted for ResidualVM
curved edge   curved edge