[Howto] Compile Mame on NVidia Jetson

This is not really a question, rather I wanted to give my experiences compiling Mame on the Jetson. The short version is that it’s not too hard and works great.

Steps:

  1. Install firmware version 21.4. It’s possible earlier 21.x versions work as well. It may be more difficult to get sound working on 19.x.

  2. Create a swap partition. 2 GB of RAM isn’t enough to compile MAME without swap. I installed an SSD and put an 8 GB swap partition on the SSD. You could also shrink the internal flash and put the swap there.

  3. Download “SDL-MAME-Orig” version 164 from the SDL Mame site. The Arm changes were integrated into the trunk of the project in version 164. Older versions may require patching.

  4. Edit the makefile. Set “WERROR” to false (or NOWERROR to True). For a faster compile, add “-j 5 -pipe” to the build options. This uses 5 threads to compile and uses pipelining to keep the threads full.

  5. Type make. If you want just Mame (and not Mess), specify the “SUBPROJECT” for Arcade. Wait an hour or so.

The compile will show a whole lot of byte align warnings. These are harmless from a functionality perspective, and are likely caused by compiling for ARM.

  1. Put ROMs in the ROMs folder. There are some legal ones on the Mame website.

  2. Run the executable. It’s working great for me.

I’m planning to get an arcade cabinet soon, and I had a Jetson board that was underutilized, so decided to try it with Mame. The plan right now is that the Jetson board is going to live inside my arcade cabinet as a dedicated Mame processor.

As far as performance, check out this site:

http://www.ischo.com/mamebench/

He tested with a 1.6 Ghz Atom processor, but in my experience the Jetson is roughly similar for Mame performance. The games that are Green should work well on the Jetson.

Also, setting the SDL video mode to “opengl” provides much faster performance on the Jetson than the default of “soft”, because of the fast GPU.

Is anyone else running Mame on their Jetson? Thoughts?

Cheers,

Harley.

Thanks Harley’s sharing. This is great to know. Let’s see who else has experience with MAME using Jetson.

I’ve been getting the same issue from every other build of mame (sdlmame etc) concerning qtgui
QtGui/QApplication: No such file or directory
error 2 at osd_sdl

which i find odd cause i have every dependency mentioned here, on the mamedev forums as well as the sdl mame forums… every fix i think i’ve come across has essentially said "install libsdl-ttf2**-dev (which i have) … do I have to go a bit further into the makefile to link an sdl library or is there an additional library or something I’m missing?

also sorry to resurrect an old thread… I’ve just been trying to go it alone and am not nearly as savvy when it comes to building from source

You’re probably missing an SDL dependency. Here’s all the dependencies mentioned in this thread on bannister.org: http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=35138 (In the Ubuntu 14.04 instructions.)

sudo apt-get install build-essential subversion libsdl1.2-dev libgtk2.0-dev libgconf2-dev libsdl-ttf2.0-dev gcc-4.6 g++-4.6
sudo apt-get install libqt4-*

I’m attempting to compile MAME right now, it’s been going fine for the past 1/2 hour (this is going to take a while since I don’t know where to put the build arguments in the makefile).


Okay, the compile finished (after about 5-6 hours), MAME seems to work although I haven’t loaded any ROMs yet.

Thanks cstotts, i’ll give it a try tonite when I’m at my machine… just did a fresh-flash of l4t 21.4 so should be all good, i’m fine with an overnight build if all goes well.

No dice as they say still errors out… it’s failing for sdl2/sdlttf.h etc. ending in the osd_sdl error i mentioned
http://pastebin.com/vujLKcfT

I’m assuming there’s something further along in the makefile that needs a link to the library and somethings not quite peachy but poking about i haven’t the faintest.

ok… so for some reason the nowerror edit wasn’t being picked up until a final build last night… now all good. thank you folks…

I just posted instructions for compiling MAME 0.195 on the Jetson-TX2. Follow this link:

http://lesbird.com/home/mame-on-the-jetson-tx2/