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

    Using MAME Overlays/Bezels and shaders with RetroArch in RetroPie

    Scheduled Pinned Locked Moved General Discussion and Gaming
    124 Posts 29 Posters 132.4k 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.
    • RionR
      Rion @Floob
      last edited by

      @Floob

      Ok from what i found out today and this may sound stupid because i was using my Desktop to go over the files that did not contain

      custom_viewport_width = 
      custom_viewport_height = 
      custom_viewport_x = 
      custom_viewport_y = 
      

      I was using Retroarch 1.3.6 (stable) and i did not see this on my Desktop ( with a 1080p Monitor) even if the cfg file was named correctly and in the right "folders" Roms & Overlay, or using the exact same settings as the cfg file for reference.

      If a game for example After Burner 2 (aburner2.zip.cfg ) only contained these lines at the end of the cfg file.

      aspect_ratio_index = "0"
      video_scale_integer = true
      

      And i went in to the Settings->Video->

      The only thing showing was
      aspect_ratio_index = 4:3
      custom_viewport_x = 0
      custom_viewport_y = 0
      custom_viewport_width = XXX
      custom_viewport_height = XXX
      video_scale_integer =On

      But if a started the same game on my Retropie setup hocked up to my 1080p tv and did the same thing, low and behold everything i needed was right there.

      aspect_ratio_index =  4:3
      custom_viewport_x = 362
      custom_viewport_y = 92
      custom_viewport_width = 1196
      custom_viewport_height = 896
      video_scale_integer =On
      

      Change it to this for 720p

      custom_viewport_width = "796" 
      custom_viewport_height = "596"
      custom_viewport_x = "241"
      custom_viewport_y = "61"
      
      aspect_ratio_index = "22"
      

      Change config.txt from

      1080p
      hdmi_group=1
      hdmi_mode=16

      to

      720p
      hdmi_group=2
      hdmi_mode=85

      Connected the pi to my old 720p tv. And everything fits nicely like it should in After Burner 2.

      This is going to take a while but at least now i don't have to guess and do it manually by resizing every game by hand to fit the Bezel in 720p.

      For NeoGeo games its a lot easier because everyone of them uses the same bezel and resolution..

      I wonder why these settings only show on the pi and not on my desktop pc?

      Ps
      I will input the setting for 1080p in the cfg files so they are easy to convert to any other resolution

      FBNeo rom filtering
      Mame2003 Arcade Bezels
      Fba Arcade Bezels
      Fba NeoGeo Bezels

      1 Reply Last reply Reply Quote 0
      • H
        Higgy @Floob
        last edited by

        @Floob

        Here is a picture from my system (1440x900) without:

        custom_viewport_width
        custom_viewport_height
        custom_viewport_x
        custom_viewport_y

        In the config file. Integer_scaling=true

        alt text

        1 Reply Last reply Reply Quote 0
        • pjftP
          pjft
          last edited by

          @Higgy

          Interesting. What system and ROM are you playing?

          I suppose that, conceptually, it may be that for these "non standard" TV resolutions, their resolution on one of the axis is effectively an integer multiple of the original resolution, making it so that for the TV resolutions - 1080p, 720p, etc - forcing integer scaling will effectively not fully occupy the screen, whereas in this resolution it will.

          That being said, for the sake of sanity checking, would you open the Retroarch menu in-game, and under Options > Video check that Integer Scaling is effectively set to True/Yes/1? On a PS3 pad, it should be accessible via Select+Triangle.

          Thanks.

          H 1 Reply Last reply Reply Quote 0
          • H
            Higgy @pjft
            last edited by Higgy

            @pjft

            Raspberry Pi 3, MAME 2003, Game - Spatter (SEGA Arcade - just one I found which I had not added in the correct resolution yet).

            While trying @Rion's comment of writing down the video settings, I went into the RetroArch menu (Coin + P1 Button 3 on my bartop!) and I believe Integer Scaling was effectively set to True/Yes/1.

            1 Reply Last reply Reply Quote 0
            • pjftP
              pjft
              last edited by

              @Higgy

              Sounds good. According to http://segaretro.org/File:Spatter_title.png the game's original resolution is 240 x 224 .

              I'm unsure how reliable the source is, but your resolution of 1440 x 900 suggests that it can fit it at 4x resolution (so, each pixel takes up 4 pixels in your screen), resulting in an effective screen real-estate of 960 x 896. That's why you end up with a screen that takes up the entire vertical estate in your case (except for 2 pixels on top and 2 pixels at the bottom).

              In a 1080p (1920 x 1080), with integer scale turned to ON it would interestingly be the exact same 4x resolution (896px height), as 5x would make it 1120, which is more than the vertical resolution of 1080. As such, in a 1080p screen we'd have a black border of 184px - likely 92 on top and 92 at the bottom.

              So, summarizing: your settings are indeed correct, but it seems that for your particular screen resolution you need a bit more tweaking than necessary.

              @Floob I wonder, can the overlays overflow the screen (i.e. could one set the overlay start position to a negative number in the vertical axis?). I doubt that is the case, but worth checking - it could make your life easier if you'd just make the default system configuration take that into account, for the ones without cfg files.

              Alternatively, on the RetroArch menu, in the Overlays section (Options > Overlays something), select the option that shows the overlay in the menu as well (I think it's RGUI something), and play with the overlay scale. Increase it until it actually matches what you're looking for, and then add that value to the default options file - there should be an Overlay Scale value that's set at 1.00x. This might be the best way to achieve what I was suggesting in the previous paragraph.

              You need the overlay to be displaying while in the menu though, otherwise changing the Overlay scale will likely crash Retroarch and boot you back to emulation station.

              Hope this helps - and anyone, please correct me or add to this.

              1 Reply Last reply Reply Quote 0
              • RionR
                Rion
                last edited by

                Here are all the cfg files that don't contain

                custom_viewport_x =
                custom_viewport_y =
                custom_viewport_width =
                custom_viewport_height =

                ToDo 1080p

                So all i have to do now is to start one game at a time from the pi and find these values.
                Then add/replace /remove
                aspect_ratio_index = "xx" to aspect_ratio_index = "22"
                video_scale_integer = true to # video_scale_integer = false

                FBNeo rom filtering
                Mame2003 Arcade Bezels
                Fba Arcade Bezels
                Fba NeoGeo Bezels

                C 1 Reply Last reply Reply Quote 0
                • FloobF
                  Floob
                  last edited by

                  Just had a quick scan through the latest posts here, and yes as pjft has said the integer_scaling will apply a multiple to the resolution you have, and is why is clashing with the overlay. The video output area and the overlay are wholly independent of each other, its up to you to size as appropriate for the overlay you use (if any).

                  @pjft Pretty sure you cant set an overlay to be outside the viewable area.

                  Some interesting chat about it here as well:
                  https://forum.recalbox.com/topic/3494/overlays/41

                  It would be interesting to work on a project that comprehensively manages all of these custom settings, a bit like the video manager tool but that is much more flexible.

                  Please read the Docs before asking a new question.
                  RetroPie Help Guides: https://goo.gl/3gcNsT

                  1 Reply Last reply Reply Quote 1
                  • M
                    Manguan
                    last edited by

                    How can I crop 1920x1080 MAME overlays to 1680x1050 maintaining the original proportions of the image with Retroarch? Sorry for my english and thanks in advance.

                    pjftP 1 Reply Last reply Reply Quote 0
                    • pjftP
                      pjft @Manguan
                      last edited by

                      @Manguan

                      Off the top of my head, in principle you would remove 15px on top and bottom, and then 120px left and 120px right.

                      Would double check in action to make sure things fit - it might be the case that for some resolutions the Integer Scale causes it to be one integer less than in 1080p, and so the screen will actually be smaller than expected. In particular, if the integer scale multiplication of the vertical dimension resulted in a value between 1050px and 1080px, that won't work as intended. But I hope that would not be the case, as it's such a tiny difference. :)

                      Let us know how it goes.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Manguan @pjft
                        last edited by

                        @pjft Of course... :-) What I ask is if it is possible to do that in Retroarch (like the crop in-game menu video options in MAME) or I have to edit image in Photoshop. I have donwloaded John Merrit overlays pack and find out the game does not match in overlay window. Sorry but I am new in Retro arch. Thank you.

                        pjftP 1 Reply Last reply Reply Quote 0
                        • pjftP
                          pjft @Manguan
                          last edited by

                          @Manguan

                          Ah, got it.

                          Unsure about how to do exactly that in Retroarch.

                          What you may try is what I recommended earlier on scaling the overlay accordingly. I honestly don't know how it's currently working on your resolution (I'm assuming it doesn't take up the entire screen real estate, but rather has scaled proportionally to its original size, restricted by your screen's resolution).

                          Open the Retroarch menu, > Settings/Options > Display Overlays

                          Then turn on/off the option that shows/hides the overlay in the menu so that you can see it.

                          Then change the scaling factor (which is currently at 1.00x I imagine) until it stretches to fit your game area as intended.

                          I don't recall the exact option names, but hopefully this helps.

                          1 Reply Last reply Reply Quote 0
                          • M
                            Manguan
                            last edited by

                            Not exactly. This is my problem... 0_1478285013641_screen.jpg

                            pjftP 1 Reply Last reply Reply Quote 0
                            • pjftP
                              pjft @Manguan
                              last edited by pjft

                              @Manguan

                              That's... weird. When the overlay is not showing, is the game screen not centered?

                              I suspect that may be because of you using the current config files which are configured to screen resolutions of 1080p. It seems there's an offset to the play area that would be the right one for those screens.

                              You may need to open the config file and figure out what the right numbers would be for that, and multiply by that formula for the X and Y coordinates - and then maybe apply some scaling.

                              For now, if you want to test it out manually in concept, turn on the overlay in the menu, and then go to Settings/Options > Video

                              There should be something with Viewport X and Y. Note down those two values.
                              Then Reduce X until it looks fine - the viewport (play area) should start to move to the left. Take note of the new number when it looks fine (to compare with the original one, and see what a formula might be to convert between the resolutions).

                              See if it needs to be tweaked on the Y axis as well. Do the same - take note.

                              See if the overlay is hiding any of the play area, and if so, now go scale it. Take note of the new number.

                              In this particular case, I suspect the viewport X needs to be subtracted by either 120 or 240, and Y by 15 or 30 (depends on how it actually works).

                              You may try to adapt the previous script shared by Rion with that formula - instead of multiplying, subtracting - to batch fix that.

                              You may need to add the line to scale the overlay, if needed. I don't recall the exact parameter, but you may be able to get it from one of the original retroarch.cfg files.

                              Have a great weekend!

                              1 Reply Last reply Reply Quote 1
                              • K
                                krull
                                last edited by

                                I hope somebody can answer some noob questions.

                                Ive got the program up and running, and everything works great.....except no overlays on the N64 or Mame show up. Any obvious things to look into?

                                Any easy way to add overlay files to the manager?

                                Thx

                                1 Reply Last reply Reply Quote 0
                                • C
                                  clintmo @Rion
                                  last edited by

                                  @Rion Did you get around to completing this? The resolution of my monitor is 1366x768 and I have successfully changed the resolution in all .zip.cfg files except for the ones that don't contain this information.

                                  RionR 1 Reply Last reply Reply Quote 0
                                  • RionR
                                    Rion @clintmo
                                    last edited by

                                    @clintmo No sorry kind of forgot about it. But if you start up the game that don't have these settings and follow my post here you can manually do it yourself if you hook up your pi to a 1080p source or change the resolution of your monitor.

                                    Maybe the bug is fixed in Windows now i don't know?

                                    FBNeo rom filtering
                                    Mame2003 Arcade Bezels
                                    Fba Arcade Bezels
                                    Fba NeoGeo Bezels

                                    1 Reply Last reply Reply Quote 0
                                    • GraboidG
                                      Graboid @Zigurana
                                      last edited by

                                      @Zigurana said in Using MAME Overlays/Bezels and shaders with RetroArch in RetroPie:

                                      I finished my set of 1024x768 bezels and cfg's a while back. Just as batch crop followed by a resize action. Wrote a little script to recalculate the viewport size & position.

                                      I haven't tested them all, but I am willing to share them anyways, if there is an interest.

                                      Hi @Zigurana I'm just looking into this now and use a 1024x768 screen, if you could share your files that would be great. Thank you!

                                      Built Space Invaders Themed Bartop - Check it out here:- https://retropie.org.uk/forum/topic/5593/space-invaders-themed-bartop-arcade-uk-completed

                                      Z 1 Reply Last reply Reply Quote 1
                                      • Z
                                        Zigurana @Graboid
                                        last edited by

                                        @Graboid :
                                        Hey, you can Graboid them here, or at least once it finishes uploading (~3hrs for 126MB, sigh).

                                        If tetris has thought me anything, it's that errors pile up and that accomplishments dissappear.

                                        GraboidG K 3 Replies Last reply Reply Quote 0
                                        • GraboidG
                                          Graboid @Zigurana
                                          last edited by

                                          @Zigurana Thank you! These are great. I can't see the invaders.png included though. Could you send this across. As my bartop is invaders themed, this would complete it! :)

                                          Built Space Invaders Themed Bartop - Check it out here:- https://retropie.org.uk/forum/topic/5593/space-invaders-themed-bartop-arcade-uk-completed

                                          UDb23U 1 Reply Last reply Reply Quote 0
                                          • GraboidG
                                            Graboid @Zigurana
                                            last edited by

                                            @Zigurana said in Using MAME Overlays/Bezels and shaders with RetroArch in RetroPie:

                                            @Graboid :
                                            Hey, you can Graboid them here, or at least once it finishes uploading (~3hrs for 126MB, sigh).

                                            I modified the ones below as they were too cropped. I added some detail back in, not original's but customised for myself. I plan to do some more also, especially for the vertical games.

                                            0_1487004946684_commando.png
                                            0_1487004978695_centiped.png
                                            0_1487004993623_zaxxon.png

                                            Built Space Invaders Themed Bartop - Check it out here:- https://retropie.org.uk/forum/topic/5593/space-invaders-themed-bartop-arcade-uk-completed

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