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

    Tutorial: Handheld and Plug & Play systems with MAME

    Scheduled Pinned Locked Moved Ideas and Development
    game&watchjakkskonami handheldmametiger handheld
    280 Posts 10 Posters 132.9k 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.
    • DTEAMD
      DTEAM @Folly
      last edited by DTEAM

      @folly
      Seems to be a big project !
      What is your feeling about Vulkan. Is It coming soon?

      No need to play with Retropie naming :
      gb = Retropie gameboy = MAME

      mame-gb= "/opt/retropie/emulators/mame/mame -c -autoframeskip gameboy -cart %ROM%"
      

      It works as It is with gb rom folder and gameboy for MAME !

      F 1 Reply Last reply Reply Quote 0
      • F
        Folly @DTEAM
        last edited by Folly

        @dteam said in Tutorial: Handheld and Plug & Play systems with MAME:

        @folly
        Seems to be a big project !

        Indeed, but sometimes if I have a good idea about it,
        I can make it simpler and also smaller and easier.
        We will see, I hope I get the AHA effect.

        What is your feeling about Vulkan. Is It coming soon?

        I heard that it is already in a very developped stage.
        My brother said that it's already in the UBUNTU OS for RPI4.
        But I really don't know.
        My feeling is that it could be implemented within a month or perhaps two months.
        Curious if i will be correct in the prediction.

        No need to play with Retropie naming :
        gb = Retropie gameboy = MAME

        mame-gb= "/opt/retropie/emulators/mame/mame -c -autoframeskip gameboy -cart %ROM%"
        

        It works as It is with gb rom folder and gameboy for MAME !

        Yes, I know.
        Perhaps we don't understand each other about this point.
        But this part shouldn't be a problem for the future script.
        I really meant the the filenames of the module-scripts.
        Because if a generated module script can also add a mame command and the name of the script module is lr-mess...etc....
        You get confused about what the module-script actually does. That was my concern.

        DTEAMD 1 Reply Last reply Reply Quote 1
        • DTEAMD
          DTEAM @Folly
          last edited by DTEAM

          @folly
          Hi Folly, I'm trying to run MSX2 with cartridge and It won't recognize. Any idea!
          I already try this

          mame-msx2= "/opt/retropie/emulators/mame/mame -c -autoframeskip msx2 -cart %ROM%"
          

          and this

          mame-msx2= "/opt/retropie/emulators/mame/mame -c -autoframeskip msx2_cart -cart %ROM%"
          

          also without 2 (MSX standalone)

          F 1 Reply Last reply Reply Quote 0
          • F
            Folly @DTEAM
            last edited by Folly

            @dteam

            You have to use an MSX type like this for example :

            mame-msx2= "/opt/retropie/emulators/mame/mame -c -autoframeskip hbf700p -cart1 %ROM%"
            

            And make sure you have a matching BIOS rom file.
            hp700p.zip

            With this command you can find which one you really want (you use grep to filter the lines containing your search text) :

            /opt/retropie/emulators/mame/mame -listdevices | grep Driver | grep MSX
            

            If you want some information about the system do :

            /opt/retropie/emulators/mame/mame -listdevices hbf700p
            

            If you want some information about the supported media do :

            /opt/retropie/emulators/mame/mame -listmedia hbf700p
            
            1 Reply Last reply Reply Quote 0
            • F
              Folly
              last edited by Folly

              @DTEAM

              I simplified the RetroPie naming using your naming in my script.
              Now I use less loops and I can simply add unknown systems if I want.
              I added it as version 1v5.

              Also did a test to see if my idea could work adding 2 commands to 1 emulators.cfg.
              Well, that can work.

              So I have to think about the filenames and the module names.

              Seems it's not nessesary, for now, to begin again from scratch.:-)

              DTEAMD 1 Reply Last reply Reply Quote 1
              • DTEAMD
                DTEAM @Folly
                last edited by DTEAM

                @folly
                they say Error: unknown option: -cart in runcommand.log

                I've try 4 europeen systems + bios and It doesn't work for Metal Gear (eur). I'll try more systems tomorrow

                F 1 Reply Last reply Reply Quote 0
                • F
                  Folly @DTEAM
                  last edited by Folly

                  @dteam said in Tutorial: Handheld and Plug & Play systems with MAME:

                  @folly
                  they say Error: unknown option: -cart in runcommand.log

                  I've try 4 europeen systems + bios and It doesn't work for Metal Gear (eur). I'll try more systems tomorrow

                  Look at my post again I did an edit.
                  It has to be -cart1.

                  You can see with the "mame -listmedia <type>" command that -cart doesn't exist for this system.

                  DTEAMD 1 Reply Last reply Reply Quote 1
                  • DTEAMD
                    DTEAM @Folly
                    last edited by DTEAM

                    @folly
                    The blue screen with MSX load but reload endlessly. I'm not able run the program. The runcommand.log looks ok. Any suggestion

                    It works, but MAME setup menu doesn't seem to be supported and I can't exit the emulator.
                    I'm not able to set the controller.

                    mame-msx2= "/opt/retropie/emulators/mame/mame -c -autoframeskip canonv30f -cart1 %ROM%"
                    
                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Folly @DTEAM
                      last edited by Folly

                      @dteam said in Tutorial: Handheld and Plug & Play systems with MAME:

                      @folly
                      The blue screen with MSX load but reload endlessly. I'm not able run the program. The runcommand.log looks ok. Any suggestion

                      It works, but MAME setup menu doesn't seem to be supported and I can't exit the emulator.
                      I'm not able to set the controller.

                      mame-msx2= "/opt/retropie/emulators/mame/mame -c -autoframeskip canonv30f -cart1 %ROM%"
                      

                      With systems that use "keyboards" you have to toggle the "game-focus" with the "scroll-lock" key to be able to use the "tab" key and do some configs.

                      Here is the info from the mamedev page :
                      https://docs.mamedev.org/usingmame/defaultkeys.html

                      Note that controls can vary widely by computer type, so not all keys are shown here. See the “Input (this Machine)” section of MAME’s configuration menu for details for the machine you are currently using.

                      Tab
                      Toggles the configuration menu.

                      Scroll Lock/Forward Delete (Mac Desktop)/fn-Delete (Mac Laptop)
                      Default mapping for the uimodekey.

                      This key toggles MAME’s response to user interface keys such as the (by default) Tab key being used for menus. All emulated machines which require emulated keyboards will start with UI controls disabled by default and you can only access the internal UI by first hitting this uimodekey key. You can change the initial status of the emulated keyboard as presented upon start by using -uimodekey

                      So you could add "-uimodekey" to your command, if this works for you.
                      Note : using this option can conflict with using the emulated keyboard though.
                      That's why they did it this way.

                      DTEAMD 1 Reply Last reply Reply Quote 0
                      • DTEAMD
                        DTEAM @Folly
                        last edited by DTEAM

                        @folly
                        Thanks for the info.

                        1 Reply Last reply Reply Quote 0
                        • F
                          Folly
                          last edited by Folly

                          @DTEAM

                          I have done a test with implementing MAME in my script-generator.

                          It seems that I can generate combi lr-mess/mame scripts, so both emulators are being installed at the same time.

                          It will also add the game rompath to the mame.ini when installing, so the "handheld games" will be found.

                          It adds the emulator commands in the appropriate emulators.cfg without making a default. So you can make a choice when you first start a rom.

                          So basically this is possible, but :

                          • still all depends on the valerino fork, it won't work with the original retropie setup (so I would like to make changes so it can be used with the original retropie-setup)
                          • still I have to think about the module names, because of the combination lr-mess/mame
                          • it would be nice if It could create 1 script that will install all loader possiblilities in 1 go (still thinking about a solution)
                          • it would be nice if artwork and overlays are automatically installed (but perhaps too difficult)

                          I think I will work on this next week a bit.

                          DTEAMD 1 Reply Last reply Reply Quote 0
                          • DTEAMD
                            DTEAM @Folly
                            last edited by DTEAM

                            @folly
                            OMG 🤯
                            If you are able to do that, It will be awesome!!!!
                            I'll uninstalled my systems just to try It.
                            When It will be finished, you should do a clean tutorial for that.

                            Note: I've try to use the real ColecoVision Mess romset (ex: bdash.zip with bdash.1 and bdash.2 inside) and I'm not able to run It excepted if I'm using It with "lr-Mess manual installation" refered to a Hash file. It doesn't work with your script and It doesnt work with those commands lines:

                            mame-coleco= "/opt/retropie/emulators/mame/mame -c -autoframeskip coleco -cart %ROM%"
                            mame-coleco-hashf= "/opt/retropie/emulators/mame/mame -c -autoframeskip coleco $BASENAME% 
                            

                            BUT with jaguar.... It works

                            Do you know why?
                            Is It because when I do

                            pi@raspberrypi:~ $ /opt/retropie/emulators/mame/mame -listmedia coleco
                            

                            The coleco rom extension for the coleco Mess romset wasn't there? For jaguar, It matches. It's strange.

                            This afternoon I spoke with ScreenScraper's MarbleMad to match the MAME / MESS system with the Screenscraper database and He said "The MESS naming system is a real mess, we are not ready to do that for now ". It's sad!

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              Folly @DTEAM
                              last edited by Folly

                              @dteam said in Tutorial: Handheld and Plug & Play systems with MAME:

                              @folly
                              OMG 🤯
                              If you are able to do that, It will be awesome!!!!

                              ;-)

                              I'll uninstalled my systems just to try It.

                              It would be nice if you can test things.
                              But be carefull, I can't guarantee anything yet.
                              My advice don't wreck your good install, do you have a spare SD lying around ?

                              When It will be finished, you should do a clean tutorial for that.

                              Indeed, that should be done, so we can exchange things to improve and have it well documented.

                              Note: I've try to use the real ColecoVision Mess romset (ex: bdash.zip with bdash.1 and bdash.2 inside) and I'm not able to run It excepted if I'm using It with "lr-Mess manual installation" refered to a Hash file. It doesn't work with your script and It doesnt work with those commands lines:

                              mame-coleco= "/opt/retropie/emulators/mame/mame -c -autoframeskip coleco -cart %ROM%"
                              mame-coleco-hashf= "/opt/retropie/emulators/mame/mame -c -autoframeskip coleco $BASENAME% 
                              

                              BUT with jaguar.... It works

                              Do you know why?
                              Is It because when I do

                              pi@raspberrypi:~ $ /opt/retropie/emulators/mame/mame -listmedia coleco
                              

                              The coleco rom extension for the coleco Mess romset wasn't there? For jaguar, It matches. It's strange.

                              I will have to look at that, I can't tell why it isn't working now.

                              This afternoon I spoke with ScreenScraper's MarbleMad to match the MAME / MESS system with the Screenscraper database and He said "The MESS naming system is a real mess, we are not ready to do that for now ". It's sad!

                              Ok, sad indeed.

                              Edit : I have added the very early test version on github :
                              generate-systems-lr-mess_mame-1v6-alpha.sh

                              (https://github.com/FollyMaddy/RetroPie-Share/tree/main/00-scripts-00)

                              1 Reply Last reply Reply Quote 0
                              • F
                                Folly
                                last edited by Folly

                                @DTEAM

                                I could not get bdash.zip working also.

                                I found some strange things.
                                MAME should be looking for bios files in :
                                /home/pi/RetroPie/BIOS/mame
                                But for coleco it wanted the bios in :
                                /home/pi/RetroPie/roms/coleco/coleco.zip
                                It also looks for a bios rom called 313 10031-4005 73108a.u2

                                I got the bootlogo's from other games, so they seem to be running, but I can't do anything.

                                Tested a few normal .col and I could play those.

                                Perhaps an idea to improve your search for problems.
                                If you add -v to your mame command you get a better verbose log in :
                                /dev/shm/runcommand.log

                                1 Reply Last reply Reply Quote 1
                                • F
                                  Folly
                                  last edited by Folly

                                  @DTEAM

                                  It took me quite some time but it seems I have a working generator script.
                                  I tried to improve the file names and the names given to the commands.
                                  I also added quite some explaining in the script on how the script works.
                                  I still have to look out for some mistakes and I hope it still works on a fresh install.

                                  What it should do now is :

                                  • create module-scripts that work with an original RetroPie-setup (for lr-mess only the run_mess.sh from valerino is needed)
                                  • add all mame commands
                                  • add the rompaths in the commandlines (for now it was too difficult to add them in mame.ini)
                                  • use this BIOS directory for both lr-mess and mame : /home/pi/RetroPie/BIOS/mame

                                  I hope I can create a thread this week.

                                  This is the script so feel free to experiment :
                                  https://github.com/FollyMaddy/RetroPie-Share/blob/main/00-scripts-00/generate-systems-lr-mess_mame-1v8-alpha.sh

                                  EDIT :
                                  There still seems to be an issue with artwork.
                                  lr-mess doesn't load roms if mame artwork is present in :
                                  /home/pi/RetroPie/BIOS/mame/artwork
                                  Both emulators seem to share the same directory structure.

                                  DTEAMD 1 Reply Last reply Reply Quote 0
                                  • DTEAMD
                                    DTEAM @Folly
                                    last edited by DTEAM

                                    @folly said in Tutorial: Handheld and Plug & Play systems with MAME:

                                    EDIT :
                                    There still seems to be an issue with artwork.
                                    lr-mess doesn't load roms if mame artwork is present in :
                                    /home/pi/RetroPie/BIOS/mame/artwork
                                    Both emulators seem to share the same directory structure.

                                    Normally, games run and lr-Mess loads Artworks if you are able to go in the MAME UI menu with lr-mame and select Artwork. For some reason, I'm able to go in MAME UI when I press (select and Y) and in Retroarch UI with (select and X). With Lr-mess, you have access to Retroarch artwork and mess artwork. Maybe the problem is there?

                                    I'm gonna try generate-systems-lr-mess_mame-1v8-alpha.sh tomorrow. What do you prefer that I test. Handheld games above, lr-Mess systems like Vectrex, NES, Artworks?

                                    F 3 Replies Last reply Reply Quote 0
                                    • F
                                      Folly @DTEAM
                                      last edited by Folly

                                      @dteam

                                      Yes, it would be nice if you could test handhelds with mame and artwork.
                                      Can you then try if the handheld games also run with lr-mess ?

                                      Also testing some lr-mess systems using media would be great.
                                      As you said vextrex and nes will do for now.

                                      I like to hear what you think of the file/module naming and the commands that are being added in the emulators.cfg.
                                      Perhaps we can improve it somehow if we have better ideas.

                                      I added the version in the desired script and above systems are uncommented.
                                      So if you run the desired script it will generate those directly.

                                      The goal is to get it running with an original RetroPie-setup.
                                      Can you try with the original setup ?
                                      With the next command you only download the valerino run_mess.sh in the correct place :

                                      wget -nv -O /home/pi/RetroPie-Setup/scriptmodules/run_mess.sh https://raw.githubusercontent.com/valerino/RetroPie-Setup/master/scriptmodules/run_mess.sh
                                      
                                      

                                      run_mess.sh is only used if running games with lr-mess that use the -<media> option.

                                      **EDIT : I created a thread to discuss tests and improvements : **
                                      https://retropie.org.uk/forum/topic/29682/development-of-module-script-generator-for-lr-mess-and-mame-standalone

                                      1 Reply Last reply Reply Quote 1
                                      • F
                                        Folly @DTEAM
                                        last edited by

                                        @dteam

                                        Nice, I see you are integrating the script part in the first post. 👍

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Folly @DTEAM
                                          last edited by Folly

                                          @dteam

                                          I checked all handheld systems and discovered some systems that perhaps can be added.

                                          I checked all your system files against mame0233 and added these to the repository :
                                          commit 1

                                          I removed an unknown system :
                                          commit 2

                                          I removed a double system :
                                          commit 3

                                          I added possible systems to add :
                                          commit 4

                                          The JAKKS and the unknown have to be checked the most before adding.
                                          I am more confident that the others can just be added.

                                          Can you check it before we add them ?

                                          If you can keep the structure in post 2 the same that would be nice.

                                          ( I have to tell you, I was quite some work checking it all ;-) )

                                          DTEAMD 2 Replies Last reply Reply Quote 1
                                          • DTEAMD
                                            DTEAM @Folly
                                            last edited by DTEAM

                                            @folly

                                            here, I have tested a lot of systems and the unworking are listed. For JAKKS, a lot of handheld doesn't work.

                                            I removed an unknown system :

                                            commit 2

                                            For TBASKB

                                            see http://adb.arcadeitalia.net/dettaglio_mame.php?game_name=tbaskb&arcade_only=0&autosearch=1

                                            This pocket handheld exists and works. Maybe they change the name of the file?

                                            F 1 Reply Last reply 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.