• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 21.2k 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.
  • T
    Texacate @janderclander14
    last edited by 11 Apr 2019, 18:31

    @janderclander14
    Thanks for the pointers! I noticed that post #177 of the Super Famicom project included the runcommand_onstart.sh code, to display the image on the SPI based LCD. Very cool. I'd say go with that versus what's in my simpleServer.py script. It seems to follow very similar "fall-back rules" when the desired image isn't found.

    Let us know how your build goes! Do let me know if you find errors in the primary and secondary database files. The secondary one especially was a whole lot of copy-n-paste.

    J 1 Reply Last reply 8 Jun 2019, 14:42 Reply Quote 0
    • K
      Kjarkur
      last edited by 13 Apr 2019, 20:08

      Hey, thanks a lot for this project. I adapted the source code and put game snaps as background, new buttons and instead of rom file name the game name. Second I modified it to use a crt friendly resolution of 320 x 240 for my arcade cab via pi2jamma.

      Here's a little video.

      Cheers

      B T 2 Replies Last reply 13 Apr 2019, 21:21 Reply Quote 0
      • B
        BJRetro @Kjarkur
        last edited by 13 Apr 2019, 21:21

        @Kjarkur wow guys this video is like what everyone envisioned for this project - great teamwork. Is there some way to incorporate this easily into retropie setup some day? This project is a huge advancement for the retropie user interface for people with arcade setups.

        K 1 Reply Last reply 14 Apr 2019, 06:51 Reply Quote 1
        • K
          Kjarkur @BJRetro
          last edited by 14 Apr 2019, 06:51

          @BJRetro the video shows my own regamebox distribution. I can make a fork on github.com. Of course it can be done with retropie easily. General steps are this

          • create the button mapping pictures in advance
          • put a picture viewer in runcommand-onstart.sh

          I have used here a own picture viewer based on SDL. Reason was that I wanted to use something like quit on all keys and quit after 10 seconds.

          F R 3 Replies Last reply 19 Nov 2019, 06:03 Reply Quote 1
          • topic:timeago-later,9 days
          • T
            Texacate @Kjarkur
            last edited by 23 Apr 2019, 02:53

            @Kjarkur I like what you did with the code. Using a game-specific background is a great idea!

            T 1 Reply Last reply 11 Jun 2019, 20:47 Reply Quote 1
            • topic:timeago-later,2 months
            • J
              janderclander14 @Texacate
              last edited by 8 Jun 2019, 14:42

              @Texacate It took a longer than expected but I managed to setup up everything. First, I used a Waveshare 4inch SPI LCD connected to the GPIO, as explained here.

              After that, I configured the lcd screen by using the overlays available here. It was quite straightforward. Just need to activate SPI in /boot/config.txt and add the overlay file corresponding to the screen. You may even use parameters to increase the refresh rate or rotate the screen (it uses a vertical orientation by default). The lcd is detected as a secondary framebuffer in /dev/fb1

              Finally, as you suggested, I modified the script proposed here to call for the images generated by your button_map.sh tool once the emulator runs.

              I post here the code that looks for the button image or falls-back to title or generic system images if not found.

              # /opt/retropie/configs/all/runcommand-onstart.sh
              # get the full path filename of the ROM
              rom=$3
              # get the system name
              system=$1
              # get rom filename without folder
              rom_bn=$(basename "$rom")
              #get rom filename without extension
              rom_bn="${rom_bn%.*}"
              # escape square brackets in rom filename
              rom_bn="${rom_bn//[/\[}"
              rom_bn="${rom_bn//]/\]}"
              # Set a TFT-specific image if there is one
              img="$(find "/home/pi/button_images/${system}" -type f -name "${rom_bn}.*" -print -quit)"
              # If a TFT-specific image was not found, look in the images folder in the ROMs directory for that system
              if [[ -z "${img}" ]];
              then
                 img="$(find "/home/pi/RetroPie/roms/${system}/media/cover" -type f -name "${rom_bn}.*" -print -quit)"
              fi
              # If cover is not found, look for the title
              if [[ -z "${img}" ]];
              then
                 img="$(find "/home/pi/RetroPie/roms/${system}/media/title" -type f -name "${rom_bn}.*" -print -quit)"
              fi
              # If no game images are found, display one for the system being emulated
              if [[ -z "${img}" ]];
              then
                 img="$(find "/home/pi/button_images/systems" -type f -name "${system}.*" -print -quit)"
              fi
              # If no system image is found, default back to the Picade logo
              if [[ -z "${img}" ]];
              then
                 img="/home/pi/button_images/systems/picade.png"
              fi
              # run the script to display the image
              sudo fbv -c -u -i -e -k /home/pi/button_images/systems/black.png > /dev/null 2>&1 &
              sudo fbv -c -u -i -e -k "${img}" > /dev/null 2>&1 &
              

              I used the fbv tool to display static images in the secondary framebuffer, but the more common fbi tool can also be used.

              T 1 Reply Last reply 27 Oct 2019, 14:26 Reply Quote 0
              • T
                TheRealSmilebit @Texacate
                last edited by 11 Jun 2019, 20:47

                @Texacate Finally had an opportunity to look at your code. Looks good.

                For myself, I just need static images as I showed in my video. So I think what I need to do is the following:

                1 - Create XML file with gaming information. I would convert the work you have done and convert to XML. Do not have to do this, but would like to practice manipulating XML files.

                2- Will also add to this what recommended controller to use. Joystick, spinner, trackball or lightgun.

                3- If Joystick, what type (2-way, 4-way, etc.):

                4- A note added stating if certain controller is not available, which one to use. This would be static on every image file.

                5- When building the image, have the user select which button layout they want to use(6 button, 8 button, etc.)

                I am going to program this in Windows for now, but use ImageMagic to create the image to eventually port over to the Pi. Basically would program similar to what you have (if it is ok to reference your code) and just create the images, but add the additional data.

                Once the static image is create, will re-visit my code to have it come up before the game starts. Also thinking about just creating the image and putting the snapshots in the Screenshots or Covers folder. I have downloaded video snapshots and marquees, so the gamelist.xml file would already have a path to get the Screenshots or Covers and can just place the image on the theme instead. Would be less programming and just create the images.

                In any case, will start on this over the weekend. Hopefully will have something functional by the end of the weekend.

                1 Reply Last reply Reply Quote 0
                • topic:timeago-later,5 months
                • T
                  Texacate @janderclander14
                  last edited by 27 Oct 2019, 14:26

                  @janderclander14 and @TheRealSmilebit,

                  Sorry for the late replies. I'm not getting much hobby time these days... Feel free to reference/reuse any of my code in your projects. I'm always interested in seeing what folks do to improve it.

                  T 1 Reply Last reply 8 Nov 2019, 17:50 Reply Quote 0
                  • topic:timeago-later,10 days
                  • I
                    ImALegendKiller
                    last edited by 6 Nov 2019, 06:31

                    The work everyone is doing in this thread is impressive! I am working on my first RetroPie build and currently just going through trying to figure out how to get games running. One problem I've noticed is that I have no idea what the buttons do! In MAME I know I can just hit TAB and change the controls, but for FBA the controls seem to be all over the place, and the controls in the FBA retroarch core and the pifba are not matching up, so games I run with the pi version are hard to play.

                    This is all to say, I hope you all will make your results available once you finish, as it'd be sweet to get a quick glance at what the default controls were just before I jumped into a game so I'd at least have an idea of what to press and hopefully remap it if I needed to. Keep up the good work!

                    1 Reply Last reply Reply Quote 0
                    • P
                      paffley
                      last edited by 6 Nov 2019, 14:19

                      Interesting read this! thanks!

                      Just a quick question...

                      Is there anyway to edit runcommand so it freezes and then you have an option of 'A to load game' and 'B to cancel and return to gamelist' please?

                      1 Reply Last reply Reply Quote 0
                      • T
                        TheRealSmilebit @Texacate
                        last edited by 8 Nov 2019, 17:50

                        @Texacate Thanks...I kinda hit a brick wall and walked away for this particular project for a while. Just overthinking and making it too complicated.

                        I did, however, use your code to make LCD Marquee. Found a 14.9" stretched monitor and added to my Arcade1up mod.

                        But I will get back to the original idea in the New Year. Have some other projects I need to finish up and will revisit this one.

                        1 Reply Last reply Reply Quote 0
                        • topic:timeago-later,11 days
                        • F
                          fishman @Kjarkur
                          last edited by fishman 19 Nov 2019, 06:03

                          @Kjarkur
                          Did ever complete it?

                          1 Reply Last reply Reply Quote 0
                          • F
                            fishman @Kjarkur
                            last edited by 19 Nov 2019, 06:06

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

                            @BJRetro the video shows my own regamebox distribution. I can make a fork on github.com. Of course it can be done with retropie easily. General steps are this

                            • create the button mapping pictures in advance
                            • put a picture viewer in runcommand-onstart.sh

                            I have used here a own picture viewer based on SDL. Reason was that I wanted to use something like quit on all keys and quit after 10 seconds.

                            Sorry I meant to quote. Did you ever make a fork of this on gethub? And how do you set this up? And have been looking for something like this for my raspberry pi retropie.

                            1 Reply Last reply Reply Quote 0
                            • topic:timeago-later,about a month
                            • M
                              MISTERHOLLYW00D
                              last edited by 27 Dec 2019, 18:30

                              I had to edit the Joy2Key.py file to allow the user of the Start button so the player could exit the screen using the Player 1 button.

                              What line would you have to edit

                              1 Reply Last reply Reply Quote 0
                              • topic:timeago-later,6 months
                              • J
                                johnodon
                                last edited by 26 Jun 2020, 23:01

                                Apologies for digging up an old topic...

                                @TheRealSmilebit If you are still around, can you detail what changes you made to joy2key.py that allowed you to map a single button to close the launch image and start the game? There are a few of us that would love to have this functionality!

                                TIA!

                                John

                                1 Reply Last reply Reply Quote 0
                                • J
                                  johnodon @BJRetro
                                  last edited by 27 Jun 2020, 11:23

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

                                  https://retropie.org.uk/forum/topic/20030/controller-info-overlay-in-the-game

                                  @BJRetro I actually went this route and it works. I use 2 copies of my game specific bezels...one with a transparent background (gameplay) and one with the black background with controls. This makes the transition seamless. However, there are 2 things that make it non-optimal:

                                  1: Requires the use of a hotkey combination to change overlays. A single button solution would be preferred.
                                  2. The game is not paused when you display the controls bezel. I was thinking of adding a 'pause_toggle' command before the 'overlay_next' command but haven't found any instances of success. See this thread as an example: https://forums.libretro.com/t/overlay-format-documentation/230

                                  1 Reply Last reply Reply Quote 0
                                  • topic:timeago-later,9 months
                                  • R
                                    ronbo85 @mitu
                                    last edited by 29 Mar 2021, 21:57

                                    @mitu Any progress on this? I'm in the process of generating all my channel screens (per @Texacate ). His work is great, but I want joysticks, and spinners, and... ;)

                                    M 1 Reply Last reply 30 Mar 2021, 03:47 Reply Quote 0
                                    • M
                                      mitu Global Moderator @ronbo85
                                      last edited by 30 Mar 2021, 03:47

                                      @ronbo85 Not sure what you mean ?

                                      R 1 Reply Last reply 31 Mar 2021, 01:23 Reply Quote 0
                                      • R
                                        ronbo85 @mitu
                                        last edited by 31 Mar 2021, 01:23

                                        @mitu Sorry for being so vague :)
                                        I'm trying to use @Texacate 's work to generate snaps of control panels based on each rom. Unfortunately, his work stops at "buttons". I'd like to extend that to also include joysticks, etc., and I thought if I use the 'controllers.xml' file, that has the data but I'm not so well verse in either Bash or XMLStarlet. I was wondering if anyone else had written any bash scripts to query the controllers.xml file for the controller data. I've got @Texacate 's script generating images for the buttons. Looking to 'complete' the package. (much akin to .. was it CPWizard? .. which I think is outdated at this point. )
                                        Thanks for any pointers! Hope this explains my question better. Let me know if it needs further clarification :)

                                        M 1 Reply Last reply 31 Mar 2021, 03:16 Reply Quote 0
                                        • M
                                          mitu Global Moderator @ronbo85
                                          last edited by 31 Mar 2021, 03:16

                                          @ronbo85 To answer to your question - no. If you have any specific question about scripting though, just post a new topic with it and me or other forum members may be able to help you.

                                          R 1 Reply Last reply 1 Apr 2021, 12:52 Reply Quote 0
                                          79 out of 92
                                          • First post
                                            79/92
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received