• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Installation of Mamedev MAME

Scheduled Pinned Locked Moved Ideas and Development
mamemamedev
82 Posts 9 Posters 13.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    jkman999
    last edited by 6 Feb 2019, 22:08

    WOW!! That is crazy. I, for one, am watching this fairly closely as I would love to have just a few of those things running on the PI that are only in the newer versions. I really appreciate the work you are putting into it. Thanks.

    J_K_M_A_N

    1 Reply Last reply Reply Quote 0
    • G
      George
      last edited by 25 Feb 2019, 06:29

      Thanks JKMan,

      It's been pretty smooth, so far, with the exception of getting it to compile on a Pi Zero. I'm still at that linking stage. I've gotten a couple of linker errors that I'm fighting through. The problem is that the linking process takes DAYS until it errors out on me again. I'm not ready to admit defeat on this yet though, even if the performance is abysmal on a Pi Zero.

      I know it's been about a month since my last update. I'll try to give updates a little more regularly.

      Thanks again,

      • George
      1 Reply Last reply Reply Quote 0
      • M
        meyers980
        last edited by 25 Feb 2019, 20:54

        I know I'm definitely interested in this. George mentioned them up top, the recently added handheld LCD games (like Tiger Electronics, Coleco, and Game and Watch) are a big interest of mine. And building a handheld with a pi of some sort that could play those games would be wonderful.
        The DEV team seems to be adding handfuls of old handhelds with each new build, as well. It seems like those games would run wonderfully on a pi but require new MAME to work.

        M 1 Reply Last reply 25 Feb 2019, 21:11 Reply Quote 0
        • M
          mitu Global Moderator @meyers980
          last edited by 25 Feb 2019, 21:11

          @meyers980 You can get that by installing the lr-mess emulator, if you're interested in non-arcade systems emulated in current MAME. Currently, after installing it, it will configure the emulator to run VTech CRVision, Coleco, GB , Nes and Arcadia systems - so you'll have to manually add the other systems you're interested.

          Compiling lr-mess on a Pi3 can take up to 30 hours.

          M 1 Reply Last reply 26 Feb 2019, 17:14 Reply Quote 0
          • M
            meyers980 @mitu
            last edited by 26 Feb 2019, 17:14

            @mitu I thought MESS stopped being developed a while back when it was rolled into MAME.

            Are you saying non-arcade games added to MAME .204 for example can be played in lr-mess? Or just games added up until the merger?

            M 1 Reply Last reply 26 Feb 2019, 17:23 Reply Quote 0
            • M
              mitu Global Moderator @meyers980
              last edited by mitu 26 Feb 2019, 17:23

              @meyers980 said in Installation of Mamedev MAME:

              I thought MESS stopped being developed a while back when it was rolled into MAME.

              I'm not sure about naming, but Mess is now part of MAME - the lr-mess target is built from the same repository as MAME, including all the non-arcade targets. So yes, it's up to date - https://github.com/libretro/mame - with the current Libretro MAME core. You can check to which MAME version the Libretro core is synchronized.

              M M 2 Replies Last reply 26 Feb 2019, 17:48 Reply Quote 0
              • M
                meyers980 @mitu
                last edited by 26 Feb 2019, 17:48

                @mitu That's very interesting! I'm definitely going to be testing that soon then. Thanks for the info.

                1 Reply Last reply Reply Quote 0
                • G
                  George
                  last edited by 11 Mar 2019, 15:35

                  Some updates:

                  • I encountered linking errors with MAME on the Raspberry Pi 0, and when I attempted to resolve them, it restarted the compilation process. Sigh. For the time being, I've disabled Pi 0/ARM V6 (by adding !armv6 into the module flags).
                  • The script will now detect when being built on a PC and set the Swap space to be larger.
                  • Also when building for 64 bit, it will move the binary from mame64 to mame, so that it is still recognized by the script.
                  • Updated for MAME v0207

                  Feel free to have a look. I'm currently testing it out. https://github.com/GeorgeMcMullen/RetroPie-Setup/blob/master/scriptmodules/emulators/mame.sh

                  - George

                  M 1 Reply Last reply 11 Mar 2019, 17:18 Reply Quote 0
                  • M
                    markwkidd @mitu
                    last edited by markwkidd 3 Nov 2019, 17:01 11 Mar 2019, 17:01

                    @mitu said in Installation of Mamedev MAME:

                    @meyers980 said in Installation of Mamedev MAME:

                    I thought MESS stopped being developed a while back when it was rolled into MAME.

                    I'm not sure about naming, but Mess is now part of MAME - the lr-mess target is built from the same repository as MAME, including all the non-arcade targets. So yes, it's up to date - https://github.com/libretro/mame - with the current Libretro MAME core. You can check to which MAME version the Libretro core is synchronized.

                    I have just created a guide to compiling libretro-mame (including the MESS target: https://docs.libretro.com/development/cores/core-specific/mame/

                    If there is anything that folks discover would be useful to add for rpi and other RetroPie users, please feel free to either edit that doc directly or you can submit updates via a github issue in the docs repository http://github.com/libretro/docs

                    1 Reply Last reply Reply Quote 1
                    • M
                      mitu Global Moderator @George
                      last edited by 11 Mar 2019, 17:18

                      @George said in Installation of Mamedev MAME:

                      Feel free to have a look. I'm currently testing it out. https://github.com/GeorgeMcMullen/RetroPie-Setup/blob/master/scriptmodules/emulators/mame.sh

                      Just a couple of comments

                      • you don't need to rename the binary, I'd leave it as is and have a separate function (_mame_get_binary_name) that will return different values depending on the target platform. Use that function in the subsequent routines where the binary name is expected. Just a suggestion.

                      • due to the way ES works, you'll not be able to have arcade/mame as a (sub)system. arcade is already an existing system and its configuration will override any sub-folders' configs.

                      1 Reply Last reply Reply Quote 0
                      • G
                        George
                        last edited by 13 Mar 2019, 16:49

                        Thanks @mitu,

                        My most recent Pi 3 build was successful with my changes and v0207. So things are looking good.

                        @mitu said in Installation of Mamedev MAME:

                        • you don't need to rename the binary, I'd leave it as is and have a separate function (_mame_get_binary_name) that will return different values depending on the target platform. Use that function in the subsequent routines where the binary name is expected. Just a suggestion.

                        I'll look into adding a function like _mame_get_binary_name. I think that will help keep it clean.

                        • due to the way ES works, you'll not be able to have arcade/mame as a (sub)system. arcade is already an existing system and its configuration will override any sub-folders' configs.

                        I was using the scriptmodules for mame4all and advmame as a reference while doing the script. That's why I included the addSystem "arcade" lines (though I also include the optional arguments for description and file extension). Are you saying I should remove the addSystem line for arcade or remove the optional arguments?

                        In other news, I've found that the Pi can get very hot during compilation. I did not experience this before, but I recently put my Pi in a new mini-arcade case (reusing a case from an old broken Coleco tabletop arcade) and have the Adafruit LCD Kippah on it. All this adds up to very little ventilation. I noticed that certain files were taking an inordinate amount of time to compile. Did a little research and found this post:

                        https://raspberrypi.stackexchange.com/questions/83184/raspberry-pi-thermal-throttle

                        Sure enough, when running the commands:

                        vcgencmd measure_clock arm && vcgencmd measure_temp && vcgencmd get_throttled
                        

                        My temperature was around 81C and the CPU clock was getting throttled. This may also explain why my Pi 0 was taking so long to compile, but that will require more research for another time.

                        So, heat sinks and ventilation are a must when trying to compile MAME (probably most versions). @markwkidd would that be useful info for your compilation guide?

                        - George

                        M 1 Reply Last reply 13 Mar 2019, 17:19 Reply Quote 0
                        • M
                          mitu Global Moderator @George
                          last edited by 13 Mar 2019, 17:19

                          @George said in Installation of Mamedev MAME:

                          I was using the scriptmodules for mame4all and advmame as a reference while doing the script. That's why I included the addSystem "arcade" lines (though I also include the optional arguments for description and file extension). Are you saying I should remove the addSystem line for arcade or remove the optional arguments?

                          • Advmane is using arcade and mame-advmame as ROM folders - see here.
                          • Mame4All is using arcade and mame as ROMs folders - see here.

                          They're not configuring any sub-folders. So you can probably use arcade and mame (similar to Mame4ALL).

                          In other news, I've found that the Pi can get very hot during compilation. [...]

                          Did you hear about cross-compiling :) ?
                          https://retropie.org.uk/forum/topic/19854/install-and-configure-precompiled-emulator-binaries/5

                          G 1 Reply Last reply 13 Mar 2019, 17:48 Reply Quote 0
                          • G
                            George @mitu
                            last edited by 13 Mar 2019, 17:48

                            @mitu said in Installation of Mamedev MAME:

                            • Advmane is using arcade and mame-advmame as ROM folders - see here.
                            • Mame4All is using arcade and mame as ROMs folders - see here.

                            I see that advmame is creating a sub-directory here, but it's not actually being referenced in the configuration file. In fact, I don't reference the arcade/mame subfolder either, so I could probably take out:

                            mkRomDir "arcade/$system"
                            

                            as well as:

                            ln -sf "$romdir/$system/$mame_sub_dir" "$romdir/arcade/$system"
                            # fix for older broken symlink generation
                            rm -f "$romdir/$system/$mame_sub_dir/$mame_sub_dir"
                            

                            Would that be it?

                            Did you hear about cross-compiling :) ?
                            https://retropie.org.uk/forum/topic/19854/install-and-configure-precompiled-emulator-binaries/5

                            8-O!!! I did not know about cross-compiling for RetroPie. I will have to check it out! Though, it's probably still good to do a compile test on the actual device.

                            - George

                            M 1 Reply Last reply 13 Mar 2019, 17:51 Reply Quote 0
                            • M
                              mitu Global Moderator @George
                              last edited by 13 Mar 2019, 17:51

                              @George said in Installation of Mamedev MAME:

                              I see that advmame is creating a sub-directory here, but it's not actually being referenced in the configuration file. In fact, I don't reference the arcade/mame subfolder either, so I could probably take out:

                              I think that's for configuration or nvram, hiscore storage, but not dedicated ROM storage.

                              8-O!!! I did not know about cross-compiling for RetroPie. I will have to check it out! Though, it's probably still good to do a compile test on the actual device.

                              Timing a build is certainly useful - especially if the package is meant to be installed from source - , but not so much on a Pi Zero :).

                              G 1 Reply Last reply 13 Mar 2019, 18:09 Reply Quote 0
                              • G
                                George @mitu
                                last edited by George 13 Mar 2019, 18:09

                                @mitu said in Installation of Mamedev MAME:

                                I think that's for configuration or nvram, hiscore storage, but not dedicated ROM storage.

                                Yes, the symlinks are for nvram, hi, etc. but they are still not used in the config file (see here).

                                Updated the script again. Really want to nail down the (sub)system issue. I really appreciate the ongoing feedback! Thank you.

                                - George

                                M 1 Reply Last reply 13 Mar 2019, 18:12 Reply Quote 0
                                • M
                                  mitu Global Moderator @George
                                  last edited by 13 Mar 2019, 18:12

                                  @George said in Installation of Mamedev MAME:

                                  Updated the script again. Really want to nail down the (sub)system issue

                                  Which issue ? (you might have mentioned it during this topic, but I can't remember it).

                                  1 Reply Last reply Reply Quote 0
                                  • G
                                    George
                                    last edited by 13 Mar 2019, 18:15

                                    Hahah, yes this thread is getting long. Just the issue of not having arcade/mame as a (sub)system.

                                    M 1 Reply Last reply 13 Mar 2019, 18:17 Reply Quote 0
                                    • M
                                      mitu Global Moderator @George
                                      last edited by 13 Mar 2019, 18:17

                                      @George I though you were referring to something like adding command line parameters for starting mame as a different system emulator, like lr-mess does for multiple systems.

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        George
                                        last edited by 13 Mar 2019, 18:32

                                        @mitu said in Installation of Mamedev MAME:

                                        @George I though you were referring to something like adding command line parameters for starting mame as a different system emulator, like lr-mess does for multiple systems.

                                        Apologies for the confusion. I'm not trying to do anything like that. But I do want to make sure the script is as clean and conformant as possible.

                                        1 Reply Last reply Reply Quote 0
                                        • G
                                          George
                                          last edited by 19 Mar 2019, 16:46

                                          Quick little update. I successfully built MAME on my Intel/Ubuntu RetroPie installation with the script. Things are looking good.

                                          I have not been able to get cross-compiling to work though. Am I correct in my understanding that I should be able to cross-compile MAME for ARM/Raspbian Stretch on an Intel/Ubuntu machine? On one post I read that it might not be possible because of a large number of dependencies.

                                          I get the following errors:

                                          See any operating system documentation about shared libraries for
                                          more information, such as the ld(1) and ld.so(8) manual pages.
                                          ----------------------------------------------------------------------
                                          make[4]: Leaving directory '/home/george/Downloads/RetroPie-Setup/tmp/build/crosscomp/build-gcc/libcc1'
                                          make[3]: Leaving directory '/home/george/Downloads/RetroPie-Setup/tmp/build/crosscomp/build-gcc/libcc1'
                                          make[2]: Leaving directory '/home/george/Downloads/RetroPie-Setup/tmp/build/crosscomp/build-gcc/libcc1'
                                          make[1]: Leaving directory '/home/george/Downloads/RetroPie-Setup/tmp/build/crosscomp/build-gcc'
                                          Makefile:2302: recipe for target 'install' failed
                                          make: *** [install] Error 2
                                          ~/Downloads/RetroPie-Setup
                                          
                                          = = = = = = = = = = = = = = = = = = = = =
                                          Running action 'switch_distcc' for 'crosscomp' : Create am arm cross compiler env - based on examples from http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler
                                          = = = = = = = = = = = = = = = = = = = = =
                                          
                                          '/opt/retropie/admin/crosscomp/bin/cc' -> '/opt/retropie/admin/crosscomp/stretch/bin/arm-linux-gnueabihf-gcc'
                                          '/opt/retropie/admin/crosscomp/bin/gcc' -> '/opt/retropie/admin/crosscomp/stretch/bin/arm-linux-gnueabihf-gcc'
                                          '/opt/retropie/admin/crosscomp/bin/arm-linux-gnueabihf-gcc' -> '/opt/retropie/admin/crosscomp/stretch/bin/arm-linux-gnueabihf-gcc'
                                          '/opt/retropie/admin/crosscomp/bin/c++' -> '/opt/retropie/admin/crosscomp/stretch/bin/arm-linux-gnueabihf-g++'
                                          '/opt/retropie/admin/crosscomp/bin/g++' -> '/opt/retropie/admin/crosscomp/stretch/bin/arm-linux-gnueabihf-g++'
                                          '/opt/retropie/admin/crosscomp/bin/arm-linux-gnueabihf-g++' -> '/opt/retropie/admin/crosscomp/stretch/bin/arm-linux-gnueabihf-g++'
                                          sed: can't read /etc/init.d/distcc: No such file or directory
                                          Failed to restart distcc.service: Unit distcc.service not found.
                                          

                                          Again, thanks as always.

                                          - George

                                          M B 3 Replies Last reply 19 Mar 2019, 17:00 Reply Quote 0
                                          • First post
                                            Last post

                                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]