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

Re: Scummvm GLES for Raspberry Pi

Sat Jan 17, 2015 1:37 pm

exobuzz wrote:I have it working! - it requires though that I set the framebuffer depth to 32 first with fbset -depth 32

some framebuffer / sdl compatibility issue ?
SDL1 is broken on the Pi. I has always been, and it will always be, as it's an old piece of software which relies on hardware very different from what the Pi has to offer. No SDL1 apps should be running on the Pi ever, but sadly it's needed to initialize the scummvm input.

I did an #ifdef for 16bpp buffer in SetVideoMode() if it's running on the Pi. No idea why the 32bpp call is running fine on mine, maybe we have different SDL1.x versions. I don't use the default SDL package in debian because it has a lot of stinky X-related dependencies.

So, please, update the sources, rebuild and tell me if it works now without having to mess with fbset :)

exobuzz
Posts: 137
Joined: Mon Nov 26, 2012 6:58 pm

Re: Scummvm GLES for Raspberry Pi

Sat Jan 17, 2015 2:02 pm

Lots of stuff still uses SDL1, so it would make sense if the fault lies with the way SDL1 uses the framebuffer that it is fixed up - at least to stop the crashes - I might have a look. (btw is your dispmanx backend project dead / unmaintained ? No replies to bugs / pull requests etc).

Regarding the code change, I have feeling I already tried this and it doesn't work (scummvm throws an error - but it's not a crash), but I'll recheck.

You might have mentioned you were not running with the default rasbian SDL ;-)

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

Re: Scummvm GLES for Raspberry Pi

Sat Jan 17, 2015 2:06 pm

exobuzz wrote:
You might have mentioned you were not running with the default rasbian SDL ;-)
Sorry about that.

And yes, I consider the dispmanx backend abandoned. There's SDL2 and direct GLES2 or even direct dispmanx from apps. I think these solutions are better/more standard.

exobuzz
Posts: 137
Joined: Mon Nov 26, 2012 6:58 pm

Re: Scummvm GLES for Raspberry Pi

Sat Jan 17, 2015 2:11 pm

scummvm works nicely now thanks - I must have missed something/got something wrong when I thought I made that change before. Cheers.

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

Re: Scummvm GLES for Raspberry Pi

Sat Jan 17, 2015 2:15 pm

No problem, enjoy it! :)

exobuzz
Posts: 137
Joined: Mon Nov 26, 2012 6:58 pm

Re: Scummvm GLES for Raspberry Pi

Wed Feb 04, 2015 1:53 am

I see you have created another dispmanx backend for scummvm ? how does it differ - is that a better choice for the pi, than the gles via dispmanx ?

Please could you provide some details etc. thanks again for your efforts.

Micha1982
Posts: 261
Joined: Wed Oct 03, 2012 11:18 am

Re: Scummvm GLES for Raspberry Pi

Wed Feb 04, 2015 9:34 am

I hate it to build something by myself :(
--disable-engine="hugo,avalanche,bbvs,cge,cge2,cine,composer,cruise,draci,drascula,fullpipe,groovie,groovie2,hopkins, lastexpress,lure,made,mads,mohawk,cstime,mortevielle,parallaction,pegasus,sci32,sword1,sword2,sword25,teenagent,testbe d,tinsel,toltecs,tony,toon,touche,tsage,tucker,voyeur,wintermute,zvision"
Before I continue - does that quote mean these games does not work??

If i run make, which files can I delete when it is ready?

What a horror...this thread smells like lots of problems to a newbie before I even start anything^^
Alles, was schiefgehen kann, wird auch schiefgehen.

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

Re: Scummvm GLES for Raspberry Pi

Thu Feb 05, 2015 10:08 am

exobuzz wrote:I see you have created another dispmanx backend for scummvm ? how does it differ - is that a better choice for the pi, than the gles via dispmanx ?

Please could you provide some details etc. thanks again for your efforts.
Time ago, I hacked in a dispmanx backend for SDL1.x, but it wouldn't work with every game without modifying it's source code. It was ok for most of them, but it required that the user would have to install a modified SDL version, which many used wouldn't do.
So I integrated Raspberry Pi GLES context initialization directly on scummvm, and I opened this thread to announce it. Nothing special required, as Rasbian already comes with the needed headers and libraries included.
Then I noticed using GLES is "standard but not so optimal" and implemented a dispmanx backend, as I knew it would save ~15% CPU. So that's why there are both Rpi GLES and Rpi Dispmanx backends for scummvm now :)
The GLES one is specially interesting because it also works on X-less GNU/Linux (GLES on KMS) and other ARM dev boards like the Cubieboard/Cubietruck, while the dispmanx one only works in the Pi.

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

Re: Scummvm GLES for Raspberry Pi

Thu Feb 05, 2015 10:10 am

Micha1982 wrote:I hate it to build something by myself :(
--disable-engine="hugo,avalanche,bbvs,cge,cge2,cine,composer,cruise,draci,drascula,fullpipe,groovie,groovie2,hopkins, lastexpress,lure,made,mads,mohawk,cstime,mortevielle,parallaction,pegasus,sci32,sword1,sword2,sword25,teenagent,testbe d,tinsel,toltecs,tony,toon,touche,tsage,tucker,voyeur,wintermute,zvision"
Before I continue - does that quote mean these games does not work??

If i run make, which files can I delete when it is ready?

What a horror...this thread smells like lots of problems to a newbie before I even start anything^^
They are disabled *if* you disable them like I did. Just don't disable them and they will work with no problems at all...

User avatar
DigitalLumberjack
Posts: 336
Joined: Thu May 22, 2014 8:55 am
Location: France
Contact: Website

Re: Scummvm GLES for Raspberry Pi

Tue Feb 17, 2015 5:15 pm

Hi pal !

I compiled your scummvm in order to add it in recalboxOS :) Works like a charm after mannnnnnnny cross compilation issues.....

See yourself :
https://github.com/digitalLumberjack/re ... scummvm.mk :D

So good to play Broken Sword !

User avatar
DigitalLumberjack
Posts: 336
Joined: Thu May 22, 2014 8:55 am
Location: France
Contact: Website

Re: Scummvm GLES for Raspberry Pi

Wed Mar 04, 2015 9:41 pm

Oups i have an issue, i don't know what it can be, the resolution of games won't adapt to screen resolution. I have some games running on 1/2 of the screen if i'm in 720p or some games running like they are zoomed, so you see only a part of it on the screen.

Do you have an idea ?

thedanhil
Posts: 1
Joined: Fri Mar 06, 2015 4:37 pm

Re: Scummvm GLES for Raspberry Pi

Fri Mar 06, 2015 4:40 pm

Would you be able to post the complete code again? Otherwise poeple new to this topic (such a smyself) have to sip through 15 replies or so to get each part of code? Just so we have the complete set of instructions again? :) Thanx in advance.
The carpet needs a haircut.

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

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 21, 2015 6:01 pm

I've updated instructions on this. GLES is *not* the optimal backend to use for Scummvm on the Pi, so I've added a DispmanX (native 2D API) backend with advanced non-blocking vsync double-buffered video, which shows incredible results for low cpu usage and smoothness.

Also added cross-compilation instructions.

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Wed Mar 25, 2015 7:56 pm

Vanfanel wrote:I've updated instructions on this. GLES is *not* the optimal backend to use for Scummvm on the Pi, so I've added a DispmanX (native 2D API) backend with advanced non-blocking vsync double-buffered video, which shows incredible results for low cpu usage and smoothness.

Also added cross-compilation instructions.
Awesome.
I want to build this on my Pi.

Question: Should I follow the instructions from page 1, or are there new instructions for the dispmanX backend?
I am somewhat linux noob, so I cannot tell intuitively. my apologies.
Also, what sdl should I install and do you have a good noob source for it?
How about GLES? skip it completely?
I will fight through whatever instructions you send me, but I need to get a clear start.
Thanks for all of your hard work in the community! :D

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Fri Mar 27, 2015 4:16 am

Hi,
I compiled from Vanfanel's scummvm from this post, etc and I got weird results.

It runs, but only under X, and it doesn't seem to be scaling properly.
It will go fullscreen, but the scaler only makes it somewhat larger, not even close to filling the screen.
Some scalers will only double the size (I am running Day of The Tentacle), and a couple will triple the size. (it seems like the 3x scalers triple the size)
Also, a couple of the scalers do nothing, and OpenGl makes it run super-duper slow (unusable)

When I try to use scummvm in console, it craps out. I am able to enter /home/pi/scummvm/scummvm --help, and get the command switches, but when I try to run a game, (DOTT is the only game i have now on it) it just goes black and then sometimes I can recover to console by hitting esc, but sometimes it locks the system and I have to unplug.

Any thoughts?

AmigaGamer
Posts: 92
Joined: Sat Feb 01, 2014 9:02 pm

Re: Scummvm DISPMANX for Raspberry Pi

Fri Mar 27, 2015 11:48 am

7F20

Software scalers in scummvm wont play well with the Dispmanx build. The whole idea of using dispmanx is it allows the raspberrys video hardware to scale the image instead of using the software scalers. This gives a significant performance boost as your CPU isnt tied up enlarging images

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 28, 2015 12:48 am

AmigaGamer wrote:7F20

Software scalers in scummvm wont play well with the Dispmanx build. The whole idea of using dispmanx is it allows the raspberrys video hardware to scale the image instead of using the software scalers. This gives a significant performance boost as your CPU isnt tied up enlarging images

Ok, I get that. I can't get the thing running in console is the problem.
When I try to run it in X, it just runs as tiny little window without scaling, it won't auto-scale with raspi.
I am recompiling.
Let people know when Im done if it changed.

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 28, 2015 2:52 am

Akk. now it won't even make.
It fails at FLAC. says it can't find audio/decoders/flac.o or something such that the Makefile.common is trying to do.
I have flac on the pi, I installed it already sudo apt-get install flac, and it shows up when the config runs.

Any thoughts?

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 28, 2015 4:31 am

So this is what I am getting, when it gets to this line:

C++ audio/deccoders/flac.o
audio/decoders/flac.ccp:38:25: fatal error: FLAC/export.h: No such file or directory
compilation terminated
Makefile.common:103: recipe for target 'audio/decoders/flac.o' failed
make:*** [audio/decoders/flac.o] Error1

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

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 28, 2015 10:29 am

You need the dev libraries. You only have the runtime libraries installed.

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 28, 2015 6:46 pm

Vanfanel wrote:You need the dev libraries. You only have the runtime libraries installed.
Thank you Vanfanel!
I got it running! results very smooth! it is a little bit milky looking in terms of the graphics, maybe and odd combo with the particular monitor that i am using. Super happy to get it going though. :)

Maybe anitaliasing is creating somewhat milky effect?
Any tips for optimizing appearance? I am playing Day of The Tentacle! yay.

Thanks again. :)

7F20

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Scummvm DISPMANX for Raspberry Pi

Sat Mar 28, 2015 11:43 pm

7F20 wrote:it is a little bit milky looking in terms of the graphics, maybe and odd combo with the particular monitor that i am using.
It may be the way the graphics are up-scaled. You can change the scaling to nearest neighbor in config.txt, to get that more retro blocky look. See this thread (and the links within my post).

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Sun Mar 29, 2015 2:03 am

AndyD wrote:
7F20 wrote:it is a little bit milky looking in terms of the graphics, maybe and odd combo with the particular monitor that i am using.
It may be the way the graphics are up-scaled. You can change the scaling to nearest neighbor in config.txt, to get that more retro blocky look. See this thread (and the links within my post).
Cool! This is great info, and I will enjoy playing around with it.
Thanks for the tip.

User avatar
7F20
Posts: 30
Joined: Tue Jul 24, 2012 2:45 am
Location: New York

Re: Scummvm DISPMANX for Raspberry Pi

Mon Mar 30, 2015 3:56 am

Vanfanel wrote:You need the dev libraries. You only have the runtime libraries installed.

Ahh. One more question here. I am now trying to get this running on composite, and no matter what I try, the edges appears to be cut off. This is happening on 3 different composite monitors.
I think it has something to do with overscan maybe?
The overscan controls crash scummvm, unless i do fbset -depth 32, but then it doesn't seem to make any difference once the game launches anyway.
I have tried forcing different resolutions from frame buffer, i have tried changing the sdtv settings. I have tried disabling overscan, and every combination of these things to no avail. It always has some stuff cut off.
In Day of The Tentacle, it prevents me from seeing the word choices in the corner, and also stuff around the edges.

Any thoughts?

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Scummvm DISPMANX for Raspberry Pi

Mon Mar 30, 2015 7:42 am

7F20 wrote:Ahh. One more question here. I am now trying to get this running on composite, and no matter what I try, the edges appears to be cut off. This is happening on 3 different composite monitors.
I think it has something to do with overscan maybe?
The overscan controls crash scummvm, unless i do fbset -depth 32, but then it doesn't seem to make any difference once the game launches anyway.
I have tried forcing different resolutions from frame buffer, i have tried changing the sdtv settings. I have tried disabling overscan, and every combination of these things to no avail. It always has some stuff cut off.
In Day of The Tentacle, it prevents me from seeing the word choices in the corner, and also stuff around the edges.

Any thoughts?
The DispmanX layers that are being used are not affected by the overscan or framebuffer settings in config.txt. Those settings only affect the framebuffer (which is just a single DispmanX layer).

Return to “Gaming”