Previous Thread
Next Thread
Print Thread
Issue with 0.191 Mame cross-compiled for Pandaboar #114185
11/06/18 08:08 PM
11/06/18 08:08 PM
Joined: Nov 2018
Posts: 5
L
Lukasz Bartosik Offline OP
Member
Lukasz Bartosik  Offline OP
Member
L
Joined: Nov 2018
Posts: 5
Hi All,

I have an issue with 0.191 Mame cross-compiled for Pandaboard. I attach all changes I made
to compile Mame for Pandaboard using steamlink target in 0001-Cross-compile-mame-for-pandaboard.patch (Changes to compile Mame for Pandaboard)

The compilation succeeds and I’m able to start Mame (I attach screenshot of Mame displayed on tv screen), however Mame consumes one core completely and because of that is very laggy (hardly responsive).

Mem: 157736K used, 859152K free, 196K shrd, 1524K buff, 73540K cached
CPU: 60% usr 0% sys 0% nic 38% idle 0% io 0% irq 0% sirq
Load average: 1.01 0.60 0.26 2/92 377
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
373 361 root S 293m 29% 61% ./mame1 -verbose
354 1 root S 29068 3% 1% /usr/bin/Xorg :0.0 vt01 -s 0 -noreset
377 361 root R 1572 0% 0% top
67 2 root SW 0 0% 0% [kworker/u4:1]
7 2 root SW 0 0% 0% [rcu_sched]
273 1 dbus S 1704 0% 0% dbus-daemon --system



Any ideas what can be the reason Mame is “eating” one core entirely ?
I would appreciate any hints what to check next ?

Thanks,
Lukasz

[img]https://ibb.co/hUge3V[/img]
[img]https://ibb.co/j0Vvcq[/img]

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114188
11/06/18 08:24 PM
11/06/18 08:24 PM
Joined: Mar 2001
Posts: 16,070
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,070
USA
Is vsync on? Does vsync work on that board?

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: R. Belmont] #114196
11/07/18 07:14 PM
11/07/18 07:14 PM
Joined: Nov 2018
Posts: 5
L
Lukasz Bartosik Offline OP
Member
Lukasz Bartosik  Offline OP
Member
L
Joined: Nov 2018
Posts: 5
Looking at OMAP display driver documentation at https://www.kernel.org/doc/Documentation/arm/OMAP/DSS I don't see any option for vsync. (actually there is an option tear_elim but it doesn't apply to HDMI and I use HDMI to connect pandabord with tv). I need to look through display driver code maybe there will be some clues regarding vsync.

Is there a way to verify whether vsync is on from the tv side ?

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114197
11/07/18 07:29 PM
11/07/18 07:29 PM
Joined: Mar 2001
Posts: 16,070
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,070
USA
There's not, as far as I'm aware. Next question, which is what I should've asked first: are you running hardware OpenGL or software rendering, and if it's software rendering, have you tried reducing the output resolution? 1080P on the software rendering path can certainly take up a lot of CPU.

Last edited by R. Belmont; 11/07/18 07:30 PM.
Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114204
11/08/18 08:52 PM
11/08/18 08:52 PM
Joined: Sep 2010
Posts: 14
B
balrog Offline
Member
balrog  Offline
Member
B
Joined: Sep 2010
Posts: 14
It looks like the PandaBoard has a PowerVR SGX540 graphics processor, which is poorly supported on Linux:
https://en.wikipedia.org/wiki/PandaBoard#Graphics

This means that MAME is almost certainly using software rendering on it.
I'd recommend finding hardware that has a more capable GPU — or reducing the resolution as RB suggests above..

Another option could be running Android, but I do not believe we currently support this.

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114214
11/09/18 06:55 PM
11/09/18 06:55 PM
Joined: Nov 2018
Posts: 5
L
Lukasz Bartosik Offline OP
Member
Lukasz Bartosik  Offline OP
Member
L
Joined: Nov 2018
Posts: 5
Yes, the Mame has only software rendering available on my Pandaboard. There is potential support for Ti-Sgx graphics included in buildroot however it requires special Ti kernel and at the moment I’m trying to figure out Ti kernel location.

Regarding resolution it’s funny because Tv supports only 1080i and even though Pandaboard HW supports both 1080i/p then the display driver implements only 1080p therefore after reading edid the Pandboard selects vga (640x480).

Here's a part of Mame's initalization
# ./mame1 -verbose &
# Available videodrivers: x11 directfb dummy
Current Videodriver: x11
Display #0
Renderdrivers:
opengles2 (0x0)
opengles (0x0)
software (0x0)
Available audio drivers:
alsa
dsp
disk
dummy
Build version: 0.191 (mame0191-642-g6d5f6dd-dirty)
Build architecure:
Build defines 1: SDLMAME_UNIX=1 SDLMAME_X11=1 SDLMAME_LINUX=1
Build defines 1: LSB_FIRST=1 MAME_NOASM=1
SDL/OpenGL defines: SDL_COMPILEDVERSION=2008 USE_OPENGL=0
Compiler defines A: __GNUC__=7 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=0 __VERSION_
_="7.3.0"
Compiler defines B: __unix__=1
Compiler defines C:
Enter init_monitors
Adding monitor screen0 (640 x 480)
Leave init_monitors
Enter sdlwindow_init


I don't have experience with Mame performance but do you think that 640x480 still would be too much to handle on Armv7@1.4Ghz in software rendering mode ?
What else could I check ? As a last resort I can setup gdb remote session to Pandaboard and try to see what is Mame so busy with.

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114216
11/09/18 07:22 PM
11/09/18 07:22 PM
Joined: Mar 2001
Posts: 16,070
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,070
USA
I would think 640x480 should be OK, but without running gprof or something on it I don't know. Try running with -sdlvideofps - it will show on the tty how fast MAME could run if it wasn't emulating anything and was simply pushing frames through your video hardware. On a desktop PC with hardware OpenGL it will typically show values well into the thousands of frames per second.

Last edited by R. Belmont; 11/09/18 07:25 PM.
Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114268
11/12/18 04:17 PM
11/12/18 04:17 PM
Joined: Nov 2018
Posts: 5
L
Lukasz Bartosik Offline OP
Member
Lukasz Bartosik  Offline OP
Member
L
Joined: Nov 2018
Posts: 5
The performance shown by the -sdlvideofps is terrible - less than 1FPS !!!

913.24s, 725 F, avrg game: 0.79 FPS 1259.64 ms/f, avrg video: 0.80 FPS 1245.7
9 ms/f, last video: 1.00 FPS 1497.34 ms/f
914.62s, 726 F, avrg game: 0.79 FPS 1259.80 ms/f, avrg video: 0.80 FPS 1245.9
5 ms/f, last video: 1.00 FPS 1360.11 ms/f
915.85s, 727 F, avrg game: 0.79 FPS 1259.77 ms/f, avrg video: 0.80 FPS 1245.9
2 ms/f, last video: 1.00 FPS 1222.66 ms/f
917.20s, 728 F, avrg game: 0.79 FPS 1259.89 ms/f, avrg video: 0.80 FPS 1246.0
2 ms/f, last video: 1.00 FPS 1323.27 ms/f
918.43s, 729 F, avrg game: 0.79 FPS 1259.85 ms/f, avrg video: 0.80 FPS 1245.9
8 ms/f, last video: 1.00 FPS 1216.74 ms/f
919.67s, 730 F, avrg game: 0.79 FPS 1259.82 ms/f, avrg video: 0.80 FPS 1245.9
4 ms/f, last video: 1.00 FPS 1212.34 ms/

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114269
11/12/18 04:54 PM
11/12/18 04:54 PM
Joined: Mar 2001
Posts: 16,070
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,070
USA
That makes me think the X server and underlying video driver for that system are unsuitable for gaming then.

Re: Issue with 0.191 Mame cross-compiled for Pandaboar [Re: Lukasz Bartosik] #114280
11/13/18 02:57 PM
11/13/18 02:57 PM
Joined: Nov 2018
Posts: 5
L
Lukasz Bartosik Offline OP
Member
Lukasz Bartosik  Offline OP
Member
L
Joined: Nov 2018
Posts: 5
Thank you for your time and help. I'll give it a try to enable OpenGL on the Pandaboard however the prospects to do it are not very promising.


Moderated by  R. Belmont 

Who's Online Now
3 registered members (Reznor007, Breiztiger, 1 invisible), 126 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,606
Posts112,515
Members4,827
Most Online296
Dec 5th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.063s Queries: 15 (0.035s) Memory: 5.6654 MB (Peak: 5.8834 MB) Zlib enabled. Server Time: 2018-12-15 13:23:38 UTC