Compiling MAME, Linux Wiz Advice Needed

While it’s always good to make a backup, I’m pretty sure this won’t do any damage. The only thing touching the GameShell stuff is the action.config to launch it – the rest should be standalone and only updating files in the MAME directory (like the configs there if you change settings, etc.)

BTW, I didn’t build a custom SDL2 like the guy suggested on the Raspberry Pi website linked above. I checked the version on my GameShell and it was slightly newer than the one he built at the time he wrote that tutorial so I figured I’d just use what I had and see if it worked. I guess it’s possible that building SDL could improve performance, but it might also require building a new MAME. Either way, I didn’t want to risk wrecking my other stuff so I left SDL alone for now. :wink:

Yeah my backup is for when I upgrade Debian to Buster. lol

1 Like

Thanks for taking the time to meticulously document your experience! I’ll follow your lead and give the stand-alone world a try. :slightly_smiling_face:

When I was testing RetroArch and flipping between FBTurbo and Lima, top showed a significant difference in CPU usage. It may not be noticeable in gameplay, but maybe battery life would be improved with Lima?

Good idea!

Here’s what pacman (almost certainly full speed) looks like, running under Lima:
image

I’m not sure what’s going on with the 196.7%?!? On the plus side, it’s not using much memory. Ha.

Here’s pacman running under fbturbo:
image

It’s only slightly better, and probably not significant.

At the other end of the frameskipping/speed spectrum, here’s spclords running under fbturbo:
image

And spclords running under Lima:
image

So it looks like Lima is consistently performing worse, although by such a small margin that it may not matter.

I didn’t have anything running in the background except a putty connection over wifi to show the top output so I could see and screenshot it.

What’s with the over 100% CPU usage though? I wasn’t expecting that.

If you made this update, then you already doesn’t have lima. This update mess it up.

Yeah, top gets weird with multi-core CPUs. Since the GameShell has a quad-core, the max is actually 400%. That %Cpu(s) in the upper left corner shows total system usage out of 100%.

It’s surprising that your results were so similar.

Lines 173-182 of this script show which files change when the Lima switch gets flipped. Would that be enough to fix it?

Oh. :frowning: I didn’t realize the update to Buster killed Lima. Is there any way to fix it besides a fresh OS install? I’m guessing the video driver files you point out in that script, @wolo, won’t have the hooks they need in Buster to do their thing. Although, I’m kinda surprised the display works at all. I can “switch” to Lima and reboot, and it still shows I’m on it, but I guess maybe it’s falling back to fbturbo or whatever is in Buster? Does fbturbo even work in Buster? :-o

I don’t know. I only know that it is stops working after update. :face_with_thermometer:

Ah, I wondered if it had to do with the 4 cores. Cool. It’s still strange to me that pacman running full speed is more draining that spclords which was frameskipping. Perhaps if I’d have turned frameskipping off and just let it run, spclords would have consumed a lot more processing power as it dragged along trying to get to full speed.

So, against my better judgement, I tried building SDL2 as per that website. That failed somewhere around some PS4 joystick input code, and it looked like it might even be a bug with that latest code in the repository, so I gave up on that and reverted back to the previous SDL2 that was already installed.

I’ve got a MAME build going now. It was happy with the sdl2-dev stuff already available, so it’s just doing its thing. I purposely chose to download version 0.207, because I have some ROMs that match that version. So if it completes, it won’t be a 100% fair comparison to the Pi build that guy made available which was the latest at 0.211. I doubt much has happened in MAME since February of this year though.

Now I know Lima isn’t being used on my device, I’m wondering if that’s going to affect the MAME build. Also, will my build run on a device that isn’t upgraded to Buster? I guess we’ll have to see, assuming it finishes and produces a working binary.

Also, I completely missed this:

There are some suggestions for tuning MAME settings on the Pi. I had already turned off artwork stuff, and disabled the joystick detection (which he doesn’t mention, probably because he was using a joystick on the Pi!) I thought I had turned off filtering but it was on in my mame.ini. I can’t test now while the build is going, but maybe that will give a little extra performance.

The other business about video mode and resolution doesn’t really apply to the GameShell. I’m assuming the system is just drawing to the 320x240 display, and not doing something silly like rendering to a larger resolution and scaling it down. I don’t doubt that the performance would be worse over the HDMI port on the GameShell though, if it was trying to run at 720p or 1080p.

In case if anyone has interest on MAME GameShell standalone build

here is the binary came out

https://mega.nz/#!4QNS2KTT!B85_6tiOSAEs_9kC_cosOQz426pZBcg-vk7hfngGRbk

mame0211s

took over 50 hours to build,lol

2 Likes

Hi guu,
Are you able to create a deb package out of it to save us 50hrs?
Also, how does it perform? Can you try some roms such as In The Hunt (inthunt.zip), Night Slashers (nslasher.zip) etc…

well, this binary is enough,other folders/resource can be copied from the source of mame0211s

and the performance is good
but the size is too big
I ran the pacman under lima( do not upgrade drm, or lima will be covered) ,it ran well

I haven’t managed to load a single game with action.config method, it is just throws me out to the main screen. I tried to launch “mame” file itself and it works, but text is so tiny so it is impossible to understand what are you doing if you are not familiar with menu (I’m not).
I get it with action.config file, but have no idea where and what additional files/folders (ini file for example) to put. I put everything into folder with “mame” file but after first launch new “.mame” folder appeared with different files with same names and I’m totally lost my mind :upside_down_face:

lol… yeah I had the same issues. The resolution is way to high and adding 640x480 in the mame.ini does not work.

Thanks for the build! I decided to stop mine since it was taking forever and would probably end up being about the same.

I ran some benchmarks using the script on that original site and for the games I tested, your GameShell build and the Pi build seem to be nearly identical. Since I’m on 0.4 with the Buster upgrade, I couldn’t test with Lima but I’m guessing your build may work best on a system with it enabled?

I posted some zips and instructions here:

If you follow that process, you should be able to download the build @guu posted and either replace or rename the one from the zip. The config file work fine with both versions. All the files you need should be in the zips I uploaded and provided in that post. You’ll need to update the action.config to make sure it matches the path and name of the MAME binary on your device though.

While the font is still tiny, my config zip includes a custom UI font for the MAME menus, and it’s easier to read than the default one.

1 Like

So prior to trying the build @guu posted, all the MAME config files were in the same place I had put them, along with the binary. I haven’t had time to investigate, but I noticed a new top level .mame directory under the cpi home directory today. Did you change where the configs were stored in your build, @guu? Makes sense to follow the pattern for other GameShell stuff, but that also means the settings may be reset to defaults that don’t work well (or at all) on GameShell.

That could explain why @podmaz and others might have problems with it. Copying my updated config files from the mame directory into .mame might help. I just tried to run the new build and it didn’t work for me either. The weird thing is, I ran it fine last night and I know it was using the configs in my mame directory where I put it. Not sure when the .mame directory got created, but maybe it was after a reboot.

Before I test other things, I just noticed that with FBNeo I can’t even load roms from the correct Romset (0.2.97.44). I thought I was using roms from that source but it seems I was using roms from another source. I can’t even know from what romset my roms come from, I believe I got them on the web and the Romset is not mentioned…

FBNeo is supposed to work with 0.2.97.44, why is it not?

I…am…lost!