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.8k 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.
    • F
      Folly @DTEAM
      last edited by Folly

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

      It works with regular game names !!!! Not just with MAME naming... Awesome!! Nothing to do in mame.ini

      It’s scary how It’s simple!

      Explained :

      MAME naming works like this :
      If it finds the name and checksum in the database (~/BIOS/mame/hash/<system>.xml), if it exists.
      Then it knows how to run the game with which type of media and with which system.

      In the commands above we tell MAME, what system and media type it has to run.
      That's why the gamename doesn't mather anymore.
      As you see with jaguar and nes, etc.
      That's the theory.

      Basically, earlier on, I did the same with Philips CDI in an earlier script.
      But with Philips CDI, I could not get it to work anymore.
      Now I think it's because of a BIOS change, but I still don't actually know.

      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:

        Try this :
        mame-GP32= "/opt/retropie/emulators/mame/mame -c -autoframeskip GP32 -memc %ROM%"

        Yes GP32 works, but also very slow with autoframeskip and slider overclock 125% .

        CD-i also works :

        mame-CD-i= "/opt/retropie/emulators/mame/mame -c -autoframeskip cdimono1 -cdrm %ROM%"
        
        TPRT 1 Reply Last reply Reply Quote 1
        • TPRT
          TPR @DTEAM
          last edited by

          @dteam @Folly So what exactly does what you guys are talking about in this last exchange do? I'm not familiar with gp32

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

            @tpr
            alt text

            This system (gp32) doesn’t work well with Lr-Mess, but seems cool to play.

            That’s why I’m trying to run It with MAME.
            Same result with MAME

            TPRT F 2 Replies Last reply Reply Quote 0
            • TPRT
              TPR @DTEAM
              last edited by

              @dteam OH! Duh. Sorry. I thought for some reason it was a setting in MAME. Sorry, my brain is too far deep into these G&W games right now! lol

              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:

                @tpr
                alt text

                This system (gp32) doesn’t work well with Lr-Mess, but seems cool to play.

                That’s why I’m trying to run It with MAME.
                Same result with MAME

                Looks very cool !
                Perhaps it will improve with the next version of MAME combined with the new vulkan video driver.
                We have to wait a little bit longer.

                Tried to edit my script for MAME.
                But this can get quite a challenge or very difficult.
                Because :

                • I have to dig deeper in how script-modules are written.
                • Also MAME has to find/use the same BIOS files as lr-mess.
                • And it would be nice if 1 scriptmodule could add both commands for a system in one time in an emulators.cfg (for mame and lr-mess in one time)
                  (So then I also have to look at the filenaming of the script modules)
                • Also Valerino has a run_script for MAME, I think.
                  So It can load a bit the same as it does with lr-mess.
                • And a database should be added for the different options we would like to add ( like you did with fmmarty adding more ram)

                Are you getting it all Pfff.... ;-) ?

                So for the time beeing,
                I leave it for a while to get a better picture on how It has to be done and perhaps begin from scratch.

                DTEAMD 1 Reply Last reply Reply Quote 1
                • 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
                                            • 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.