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

    Show Control Panel Layout before game starts in RetroPie, just like Arcade1UP does.

    Scheduled Pinned Locked Moved Projects and Themes
    arcade1upcontrolruncommandjoy2key
    92 Posts 20 Posters 25.0k 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.
    • mituM
      mitu Global Moderator
      last edited by

      @TheRealSmilebit said in Show Control Panel Layout before game starts in RetroPie, just like Arcade1UP does.:

      The other negative is that I had to edit the two files above. I do not like editing the system files and working on way to create this in its own separate script.

      It's a nice idea. An alternative would be to use the onstart script for Runcommand to run your commands and show the image (just like Runcommand does). You can also disable the joy2key usage in Runcommand (there's a setting for that) and start joy2key - with the right parameters - just in your script. This way you don't have to keep a separate version for Runcommand and you can easily disable this behavior by removing the onstart script.

      T 1 Reply Last reply Reply Quote 0
      • T
        TheRealSmilebit @mitu
        last edited by

        @mitu Been looking at the runcommand-onstart.sh script, but still trying to figure out how to get the system and rom information. If I can get that figured out, then can use that script.

        Would be interested to know how to use the joy2key with the right parameters without having to edit the joy2key.py file to add the start button...will have to dig deeper into that.

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @TheRealSmilebit
          last edited by mitu

          @TheRealSmilebit Have you looked at the doc page ? The system/rom/emulator are passed as parameters to that script so you can use them freely.

          T 1 Reply Last reply Reply Quote 0
          • B
            BJRetro @TheRealSmilebit
            last edited by

            @TheRealSmilebit I would love to do something like this; I had thought about doing it using runcommand launching images and just setting the time the image appeared for longer but stopped short because of laziness in having to create or find control images for every game....good luck would be an awesome project.

            1 Reply Last reply Reply Quote 0
            • GreenGriffonG
              GreenGriffon
              last edited by

              Hey guys,

              If this along the lines of what you're looking for? I'm slowly working on a set of these for my own retrocade project.

              Between looking up the controls for each game, finding a good quality arcade advertisement flyer, and actually creating the image, it's taking some time to get through the roughly 200 arcade games I keep in my curated collection.

              I'm happy to take any suggestions or constructive feedback. I intend to release these when I finish, but that will take some time.

              asteroids-launching.jpg

              cyperghostC B chicueloC C 4 Replies Last reply Reply Quote 4
              • cyperghostC
                cyperghost @GreenGriffon
                last edited by

                @GreenGriffon I like the idea but there is no need for manual doing. You can setup a config file like keylayout.txt that holds some information about the loaded rom and the buttonlayout

                keylayout.txt sample file

                NAME of ROM|Button A text|Button B text|Button X text|Button Y text|Button 1 text|Button 2 text|Button Coins|Button Player 1 Start|Button Player 2 Start
                Annother ROMNAME|Button A text|Button B text|||||Player 1|Player 2
                asteroids.zip|Fire|Thrust|Hyperspace
                ROM|Button A text|Button B text
                

                Then you need a script that reads the values out and with a package like imagemagick you can automate button actions according to the description for every Arcade game. With the help of the community every game can get a "Button Layout Art" ;)

                The script will look like this

                #!/bin/bash
                # Keylayout Sample Script
                
                readonly LAYOUTS="keylayout.txt"
                readonly ROM="NAME of ROM"
                IFS="|"
                
                function get_game_buttons () {
                    while read -r name bA bB bX bY b1 b2 bcoin bp1 bp2; do
                        if [[ $ROM == $name ]]; then
                            return
                        else
                            echo "No Layout found for $ROM!"
                        fi
                    done < <(tr -d '\r' < "$LAYOUTS")
                }
                
                # call function
                get_game_buttons
                
                echo "ROMNAME: $name"
                echo "Button A: $bA"
                echo "Button B: $bB"
                echo "Coin Insert: $bcoin"
                
                T 1 Reply Last reply Reply Quote 3
                • B
                  BJRetro @GreenGriffon
                  last edited by

                  @GreenGriffon wow that is exactly what I was thinking of only nicer with the artwork! Ha. Of course @cyperghost would find a way to do it with coding! I guess the coding option is good because depending on the emulator used the buttons might be different for different people (I.e. same game but fb-alpha version vs. mame2003 vs mame2003-plus, then also where people have recoded buttons in retroarch).

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    TheRealSmilebit @mitu
                    last edited by

                    @mitu Yes...I have been looking at the RunCommand.sh to get an idea of how it is getting the information. Just trying to figure out how to code it...should not be too hard...just finding the time to work on it.

                    1 Reply Last reply Reply Quote 0
                    • T
                      TheRealSmilebit @cyperghost
                      last edited by

                      @cyperghost That is good idea.

                      cyperghostC 1 Reply Last reply Reply Quote 0
                      • T
                        TheRealSmilebit @BJRetro
                        last edited by

                        @BJRetro said in Show Control Panel Layout before game starts in RetroPie, just like Arcade1UP does.:

                        I guess the coding option is good because depending on the emulator used the buttons might be different for different people

                        Yes...I was going to try to figure this out, as if button layout changed would have to change each graphic...but with this would only have to change the text file.

                        1 Reply Last reply Reply Quote 0
                        • cyperghostC
                          cyperghost @TheRealSmilebit
                          last edited by cyperghost

                          @TheRealSmilebit I think if the community will start to collect the files for navigation someone will start to write a good script. My contribution is likely just a text message display ... simple but will not look well ;) Maybe a more talented user can do the graphic stuff. A tool package like imagemagick is the way to go ;)

                          Support for different emulators needs to be added, too.

                          UDb23U 1 Reply Last reply Reply Quote 1
                          • UDb23U
                            UDb23 @cyperghost
                            last edited by

                            @cyperghost Nice idea.
                            To be useful to players the txt file and the graphics should consider also the different types of gamepads actually used.
                            Buttons assignment / layout for an arcade game would be different depending on the controller you use. That makes the whole thing quite complicated.

                            cyperghostC 1 Reply Last reply Reply Quote 1
                            • cyperghostC
                              cyperghost @UDb23
                              last edited by

                              @UDb23 Na it is not so complicated if we assign to a Standard layout like the XBox or PS controller. And then map the inputs to a specific layout. It is doable but needs care what we are doing here. But in fact I would appreciate such a feature

                              1 Reply Last reply Reply Quote 0
                              • T
                                Texacate
                                last edited by Texacate

                                I found a database that will associate a rom name, with a list of button actions, like "Fire", "Jump", "Hard Punch", etc. Check out https://github.com/yo1dog/controls-dat-json. Not a full solution, but a necessary building block, for sure.

                                robertvb83R 1 Reply Last reply Reply Quote 2
                                • robertvb83R
                                  robertvb83 @Texacate
                                  last edited by

                                  @TheRealSmilebit what a great idea. This would really add some value to my arcade cabinet
                                  @GreenGriffon wow this is an awesome looking example. I like the idea of using a flyer in addition to the button layout.
                                  of course an automated script based solution would be great. @cyperghost could you imagine a solution to deal with different joypad layouts that people use for their arcade? I mean GreenGriffon uses a 6-Button layout with
                                  123
                                  456
                                  I think of some way to easily change that via a personal input e.g. my pad would also be 6-button but
                                  456
                                  123
                                  other pads would be
                                  1234
                                  4568
                                  you get my idea.

                                  btw. I am pretty sure there already is a source file inside of mame with button names and how many buttons are used for each game @markwkidd am I right? this is what you used to come up with the automated button names to display in retroarch for mame2003-plus

                                  My full size arcade cabinet Robotron vs. Octolyzer

                                  markwkiddM cyperghostC 2 Replies Last reply Reply Quote 0
                                  • markwkiddM
                                    markwkidd @robertvb83
                                    last edited by

                                    @robertvb83 said in Show Control Panel Layout before game starts in RetroPie, just like Arcade1UP does.:

                                    btw. I am pretty sure there already is a source file inside of mame with button names and how many buttons are used for each game @markwkidd am I right? this is what you used to come up with the automated button names to display in retroarch for mame2003-plus

                                    controls.c has the button names. I am determining the number of players in the code when the game is loaded, but I am pretty sure that information is available in the DAT.

                                    1 Reply Last reply Reply Quote 0
                                    • chicueloC
                                      chicuelo @GreenGriffon
                                      last edited by

                                      @GreenGriffon Thats my arcade cpo icon ;)

                                      GreenGriffonG 1 Reply Last reply Reply Quote 1
                                      • cyperghostC
                                        cyperghost @robertvb83
                                        last edited by cyperghost

                                        @robertvb83 said in Show Control Panel Layout before game starts in RetroPie, just like Arcade1UP does.:

                                        . @cyperghost could you imagine a solution to deal with different joypad layouts that people use for their arcade? I mean GreenGriffon uses a 6-Button layout with

                                        There is need for a standarized button layout. I suggested the XBOX or PS controllers and then the user can assign like you mentioned in your layout

                                        Button A = 1
                                        Button B = 2
                                        ...
                                        or
                                        Button A = 4
                                        Button B = 5

                                        as you like

                                        @Texacate said in Show Control Panel Layout before game starts in RetroPie, just like Arcade1UP does.:

                                        I found a database that will associate a rom name, with a list of button actions, like "Fire", "Jump", "Hard Punch", etc. Check out https://github.com/yo1dog/controls-dat-json. Not a full solution if you have hundres of games, but a necessary building block, for sure.

                                        This is a nice finding!
                                        The data can be extracted out from the 1.3MB database ;)

                                        T 1 Reply Last reply Reply Quote 0
                                        • T
                                          Texacate @cyperghost
                                          last edited by Texacate

                                          @cyperghost AFAIK, the yo1gog's data appears to be just a reformatting of the data from the Controls.dat project started by Kevin Jonas (SirPoonga) with the help of Howard Casto. The original data is currently archived here: http://controls.arcadecontrols.com I've noticed only parent roms are in the database. So if you run a clone (like PacMan), you will need to account for that limitation. Also, I believe the data has not been updated in several years, (2011? if memory serves...) Newer rom are likely to be missing, but I probably couldn't run those games on a RPi anyway.

                                          T markwkiddM 2 Replies Last reply Reply Quote 0
                                          • T
                                            Texacate @Texacate
                                            last edited by Texacate

                                            I'm pretty motivated to get something like this working. I thought about using a separate "slave" RPi, with its own 5" to 7" LCD display to display the button map. That way it could be placed anywhere on my cabinet, and would never interfere with the main gaming display. I sure someone has already created a simple script that just listens on a port, and displays the desired (local or remote) image file. Kinda like a kiosk, or remote-control screen saver, but I have yet to find a simple utility like that. I'm fairly linux and retropie literate, but if I have to build it from scratch, this sort of master-slave network communication is beyond my linux skills.

                                            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.