Previous Thread
Next Thread
Print Thread
Page 4 of 7 1 2 3 4 5 6 7
Re: MAME on ODROID-N2 (Linux) [Re: belegdol] #116147 10/07/19 02:56 PM
Joined: Aug 2019
Posts: 33
S
Steve Bourg Offline OP
Member
OP Offline
Member
S
Joined: Aug 2019
Posts: 33
The Wayland numbers do stand out, but I was told by one person in the odroid community that "wayland is not likely to happen in the lifetime of N2" - I think referring to a complete / stable implementation.

The prospect of a sub $100 SBC running MAME is really interesting. maciici is my target. Is there any SBC known to perform well and match well with mame for this type of emulated system?

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116152 10/07/19 05:38 PM
Joined: Oct 2019
Posts: 21
R
Robert Hildinger Offline
Member
Offline
Member
R
Joined: Oct 2019
Posts: 21
Sorry for the delay in getting back to you with results from the Rpi4. I do have some numbers for you now:

Raw maciici emulation speed is roughly 150%:

Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -bench 60
Average speed: 149.61% (59 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -bench 60
Average speed: 154.16% (59 seconds)


Of course, when I add video display output, things slow down a bit:

Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomaximize
Average speed: 88.35% (45 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomaximize -video accel
Average speed: 93.08% (44 seconds)


And some sdlvideofps results:

Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomaximize -sdlvideofps
 60.58s, 3224 F, avrg game: 53.22 FPS 18.79 ms/f, avrg video: 137.67 FPS 7.26 ms/f, last video:   inf FPS 7.15 ms/f
Average speed: 88.67% (73 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomaximize -video accel -sdlvideofps
 60.56s, 3407 F, avrg game: 56.26 FPS 17.77 ms/f, avrg video: 161.21 FPS 6.20 ms/f, last video:   inf FPS 6.07 ms/f
Average speed: 93.85% (58 seconds)


These results were obtained on a 4GB Rpi4 overclocked to 2.147 GHz CPU, 600 MHz GPU. The mame binary was compiled using all default settings.

When I run the maciici in non-maximized window mode, the startup chime is played correctly. If I run it full screen, the chime becomes extremely choppy.

Note that in all tests I was simply booting the Mac IIci ROM and not actually booting from floppy into System "x", primarily because I don't know how to do that...

Let me know if you want me to do any further experiments...

-Robert

Last edited by Robert Hildinger; 10/07/19 05:56 PM. Reason: Accidentally clicked post way too soon
Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116153 10/07/19 06:30 PM
Joined: Oct 2019
Posts: 21
R
Robert Hildinger Offline
Member
Offline
Member
R
Joined: Oct 2019
Posts: 21
Here's some more info on running macIIci on Rpi4. It appears that there is at least some level of support for wayland based on this verbose output:

Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomaximize -video accel -verbose
Attempting load of mame.ini
Parsing mame.ini
Attempting load of mame.ini
Parsing mame.ini
Attempting load of horizont.ini
Attempting load of computer.ini
Attempting load of raster.ini
Attempting load of source/mac.ini
Attempting load of maciici.ini
Starting plugin data...
Attempting load of mame.ini
Parsing mame.ini
Attempting load of mame.ini
Parsing mame.ini
Attempting load of horizont.ini
Attempting load of computer.ini
Attempting load of raster.ini
Attempting load of source/mac.ini
Attempting load of maciici.ini
Available videodrivers: x11 wayland RPI dummy 
Current Videodriver: x11
	Display #0
		Renderdrivers:
			    opengl (0x0)
			 opengles2 (0x0)
			  opengles (0x0)
			  software (0x0)


Notice the available videodrivers: x11 wayland RPI dummy

I tried switching videodrivers from the command line, but as expected it did not work. Not sure if that's an SDL limitation or a MAME one...

Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomaximize -video accel -verbose -videodriver wayland
Attempting load of mame.ini
Parsing mame.ini
Attempting load of mame.ini
Parsing mame.ini
Attempting load of horizont.ini
Attempting load of computer.ini
Attempting load of raster.ini
Attempting load of source/mac.ini
Attempting load of maciici.ini
Starting plugin data...
Attempting load of mame.ini
Parsing mame.ini
Attempting load of mame.ini
Parsing mame.ini
Attempting load of horizont.ini
Attempting load of computer.ini
Attempting load of raster.ini
Attempting load of source/mac.ini
Attempting load of maciici.ini
Setting SDL videodriver 'wayland' ...
Could not initialize SDL wayland not available


Not sure what it would take to enable wayland support...

-Robert

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116154 10/07/19 08:43 PM
Joined: Aug 2019
Posts: 33
S
Steve Bourg Offline OP
Member
OP Offline
Member
S
Joined: Aug 2019
Posts: 33
Thanks for those benchmarks Robert. How confident are you in an overclocked configuration like that?

I just used your -video accel switch, and performance on the odroid n2 jumped into the 80-95% range (90% in first 10 seconds, 80-85% for 60 second duration). This was on 1920x1080 display resolution, on linux console (No X windows). So that's exciting. Just shy of success for either path it seems.

I may go back to my Ubuntu MATE image and see if the switch has any effect.

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116155 10/07/19 09:24 PM
Joined: Oct 2019
Posts: 21
R
Robert Hildinger Offline
Member
Offline
Member
R
Joined: Oct 2019
Posts: 21
How confident? Well, I have two Rpi4's that will reach 2.147GHz (which is the current maximum the firmware will allow), and one that won't. The two that will seem to be very stable - I've never had to reboot either of them for a crash, but I haven't done a lot of hardcore stability testing either.

The OC'ed Rpi4 emulates at around 140-150% of real hardware, so it seems like there's enough headroom to deliver a decent experience if we could just speed up the video portion.

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116162 10/08/19 07:20 PM
Joined: Oct 2019
Posts: 21
R
Robert Hildinger Offline
Member
Offline
Member
R
Joined: Oct 2019
Posts: 21
Here's some more data that I took from running all available video switches. As it turns out, -video bgfx provides the best speed...

NOTE: On the Rpi4 at least, "-video soft" is equivalent to no video switch at all, which implies that the default renderer is software only.

Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video soft
Average speed: 80.72% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video accel
Average speed: 84.03% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video opengl
Average speed: 87.43% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video bgfx
Average speed: 99.32% (29 seconds)

pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video soft -sdlvideofps
 35.51s, 1688 F, avrg game: 47.54 FPS 21.04 ms/f, avrg video: 117.81 FPS 8.49 ms/f, last video:   inf FPS 8.48 ms/f
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video accel -sdlvideofps
 33.22s, 1662 F, avrg game: 50.02 FPS 19.99 ms/f, avrg video: 134.89 FPS 7.41 ms/f, last video:   inf FPS 7.44 ms/f
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video opengl -sdlvideofps
 32.45s, 1703 F, avrg game: 52.49 FPS 19.05 ms/f, avrg video: 152.04 FPS 6.58 ms/f, last video:   inf FPS 6.68 ms/f
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -nomax -seconds_to_run 30 -video bgfx -sdlvideofps
 28.15s, 1668 F, avrg game: 59.25 FPS 16.88 ms/f, avrg video: 269.29 FPS 3.71 ms/f, last video:   inf FPS 3.62 ms/f


Video mode differences (judging solely by information returned from -verbose flag):
- soft: SDL multi-window soft driver
- accel: SDL native texturing driver
- opengl: SDL multi-window OpenGL driver
- bgfx: No discerning info found in -verbose output, but display seems to be running in separate thread now.

bgfx is the clear winner here for the Rpi4...

-Robert


Last edited by Robert Hildinger; 10/08/19 07:20 PM.
Re: MAME on ODROID-N2 (Linux) [Re: Robert Hildinger] #116163 10/08/19 08:06 PM
Joined: Aug 2019
Posts: 33
S
Steve Bourg Offline OP
Member
OP Offline
Member
S
Joined: Aug 2019
Posts: 33
Wow, thanks Robert. This is running from within X windows? What is the video resolution of your host environment for these tests?

Would you mind sharing a -video bgfx result without both -window and -nomax, and with -window but without -nomax?

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116164 10/08/19 08:39 PM
Joined: Oct 2019
Posts: 21
R
Robert Hildinger Offline
Member
Offline
Member
R
Joined: Oct 2019
Posts: 21
Those results were from within X windows running at 3840x2160 - 60 fps, though the resolution shouldn't have affected the results much as they were always run in a 640x480 window (the size of the default Mac II ci screen).

I took the resolution down to 1920x1080 for the following tests:


Code
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -nowindow -max -seconds_to_run 30 -video bgfx
Average speed: 68.43% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -max -seconds_to_run 30 -video bgfx
Average speed: 88.03% (29 seconds)

pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -nowindow -max -seconds_to_run 30 -video accel
Average speed: 83.79% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -max -seconds_to_run 30 -video accel
Average speed: 89.58% (29 seconds)

pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -nowindow -max -seconds_to_run 30 -video accel -renderdriver opengles2
Average speed: 99.20% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -max -seconds_to_run 30 -video accel -renderdriver opengles2
Average speed: 99.41% (29 seconds)

pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -nowindow -max -seconds_to_run 30 -video accel -renderdriver opengles2 -nothrottle
Average speed: 101.58% (29 seconds)
pi@raspberrypi:~/MAME/mame $ ./mamemac maciici -window -max -seconds_to_run 30 -video accel -renderdriver opengles2 -nothrottle
Average speed: 107.94% (29 seconds)



That was definitely unexpected. It looks like the separate thread benefit of bgfx goes away when the output resolution increases. Now the clear winner is accel with the opengles2 render driver...

-Robert

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116165 10/08/19 08:51 PM
Joined: Aug 2019
Posts: 33
S
Steve Bourg Offline OP
Member
OP Offline
Member
S
Joined: Aug 2019
Posts: 33
In X on the Odroid N2 (1920x1080), I'm clocking in at 99.x% with maciici -video bgfx -window -nomax -seconds_to_run 30, but this drops into the 85% range when I boot an actual OS. The use of bgfx balloons cpu utilization to 450% (200% with -video accel). The emulation speed gets far worse without -max on odroidn2/X. I think I'm seeing comparable sdlvideofps, maybe?:

28.16s, 1670 F, avrg game: 59.31 FPS 16.86 ms/f, avrg video: 761.33 FPS 1.31 ms/f, last video: inf FPS 0.94 ms/f

There are definitely performance artifacts at 85% emulation speed, but it's nice to get that close. I'll have to go back to console/framebuffer and see if bgfx does something helpful there (to my recollection, it wasn't a working option even with belegdol's 2nd fix).

Re: MAME on ODROID-N2 (Linux) [Re: Steve Bourg] #116166 10/08/19 09:18 PM
Joined: Oct 2019
Posts: 21
R
Robert Hildinger Offline
Member
Offline
Member
R
Joined: Oct 2019
Posts: 21
Is that with mame compiled with default options, or with all of the modifications from this thread?

Your sdlvideofps results are considerably better than the max I am able to achieve on the Rpi4. I top out at around 300 FPS, where you're getting 761 FPS. Not exactly sure how to interpret that...

Page 4 of 7 1 2 3 4 5 6 7

Moderated by  R. Belmont 

Who's Online Now
2 registered members (2 invisible), 143 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,722
Posts114,651
Members4,873
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3