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

    How to make vector arcade games look their best

    Scheduled Pinned Locked Moved General Discussion and Gaming
    vectoradvancemame
    40 Posts 7 Posters 41.1k 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.
    • caver01C
      caver01
      last edited by caver01

      If you are like me, you love the classics. Many of these happen to be "vector" games. These are the wireframe, monochromatic games like Asteroids, Omega Race or Rip Off, and many color games such as Tempest and Major Havoc. While we don't yet have a good way to get the authentic vector line "glow" and trails like an oscilloscope, we can definitely make an effort to improve the look of these games on an LCD.

      First, we need to make the wireframes as clear as possible. Don't think of these lines as pixels. On the old CRTs the electron beam moved across the screen without regard for square dots. To emulate this, we should try to get the lines to be drawn as smooth as possible using the highest resolution of your display--its native pixel resolution. If your display is 640x480 or lower, this guide won't really help, but if you have an HDTV, or a high-res LCD (mine is 1280x1024), you can definitely improve the look of those vector lines.

      The problem with most versions of MAME on the Pi is that they limit vector game rendering to common but arbitrary resolution of 640x480. For example, playing Asteroids Deluxe on lr-mame2003 (my default choice for most arcade games), you get blocky results:
      0_1497067949451_lr-mame-astdelux.png

      However, playing the same game with an optimized configuration in AdvanceMAME 1.4 looks like this (click and zoom to see the full clarity of the vector lines):
      NOTE: CLICK INTO THESE IMAGES AND ZOOM IN TO SEE THE QUALITY DIFFERENCE!
      0_1497067988139_advmame-astdelux.png

      Here is a case where recent changes to AdvanceMAME (thanks @BuZz) can really get you an authentic look.
      <EDIT> If you use the latest 3.x version of AdvanceMAME, video improvements have been made specifically for the Pi such that setting display_width and display_height are no longer necessary.

      I am using AdvanceMAME 1.4 for this. It requires a .106 ROM set, so make sure you have a compatible version of the ROM. Then, you need to edit the config file for AdvanceMAME. Note: This isn't a libretro core, so you can't apply RetroArch shaders here! I am editing /opt/retropie/configs/mame-advmame/advmame-1.4.rc

      Look for the lines:

      display_width 640
      display_height 480
      

      <EDIT> Again, if you use the latest 3.x version of AdvanceMAME, the above two lines are no longer necessary.

      Set them to your display's maximum resolution. Mine is 1280 and 1024. These settings only affect vector games. This alone will tell AdvanceMAME to render the vector game at the highest resolution that will fit inside your display's width and height. It will go a long way toward improving the look of vector lines, but don't stop there. You can also change the following settings that affect vector games:

      display_flicker 15
      display_antialias yes
      display_beam 1.2
      display_translucency yes
      display_intensity 1.5
      

      These are my preferred settings for monochrome vector games like Asteroids. Flicker gives a nice look to the shapes as they animate. I like a setting of 15 which creates a subtle shimmer to the lines as they animate. You can go as high as 100 but it gets distracting. Antialias helps to make the vector lines smoother which we definitely want. Beam is the width of the vector line. I like to go a little wider than 1 pixel to help smooth out the lines. Going much higher will look strange. Finally, translucency has the effect of dimming the lines slightly but you gain bright spots where lines intersect which is more authentic. If you set intensity to the max of 3, the lines are brighter, but you lose the translucency effect in the process. I like intensity of 1.5 to show some translucency, but higher is easier to see against background artwork.

      Other Tricks
      One nice effect with some vector games is background artwork. The default settings enable backdrop artwork with display_artwork_backdrop yes The problem with some artwork however, is that it is too bright! It can be hard to see the vector lines with the background image obscuring the animation. You can tweak this for individual ROMs by unzipping the corresponding artwork file and editing the parameters. For example, in the Asteroids Deluxe screenshot above, I have the backdrop very dim. I unzipped the artwork file astdelux.zip and edited the file astdelux.art with a text editor. Inside that file in the Backdrop section, I changed the brightness setting: brightness = 0.2. Save your changes and re-zip the files. The next time you launch the game, the background will be dimmer and the game will be easier to see in front of it.

      If you have ever seen an actual color vector arcade system you might know that the color vector displays are different than monochrome ones. Most had typical shadow masks to ensure RGB dots light up when the different electron beams hit the screen. You can see this up close if you look carefully--and it's not present on the monochrome vector displays. We can use the above techniques as a starting point toward clear vector lines for color games, but with a few setting variations in AdvanceMAME, we can generate a passable shadow mask effect using the built-in shader/overlay features. For Tempest, I add the following lines to my advancemame config file:

      tempest/display_resizeeffect filter
      tempest/display_rgbeffect triad3dot
      tempest/display_intensity 2.5
      tempest/display_flicker 10
      

      Normally, you can't have duplicate settings in the advancemame config, but by putting tempest/ in front of these additional lines (the original lines are still in the file for every other vector game), you are telling advmame that you want to override the settings elsewhere in the config file with these settings for this ROM only. Tempest is a color vector game with this ROM name. I am turning on a resize effect called "filter" which is normally used for smoothing traditional pixel-based games. Here, it does some blurring. Then, the rgbeffect triad3dot is creating a shadow mask pattern. Because the triad dots darken the vector lines somewhat, I also bump up the intensity a bit, and tone down the flicker to 10.

      The result is a very passable shadow mask effect. See the before and after closeups:

      Without the effects:
      0_1497068050267_img_2535.jpg

      With the effects:
      0_1497068074479_img_2537.jpg

      You can repeat these four configuration lines for every color vector ROM you plan to launch with AdvanceMAME. I have these effects turned on for tempest, mhavoc, gravitar, spacfury, spacduel, startrek, starwars, esb. There are probably others that I can't remember right now. Depending on your resolution, you might like the display_rgbeffect triad6dot better, but for my display, the 3dot looks the best.

      Finally, I noticed a slight audio delay in AdvanceMAME that I fixed by setting sound_latency 0.05.

      Give these settings a whirl. I think it's the best-looking vector setup in RetroPie so far.

      My 4-player cocktail style cabinet built as a custom "roadcase"

      1 Reply Last reply Reply Quote 7
      • RiverstormR
        Riverstorm
        last edited by

        Nicely written tutorial Caver! Very professional looking! :) The "Other Tricks" section was very helpful as I find the Solar Quest backdrop to bright.

        Do you use these options with Tempest also or only the above in the example?

        display_antialias yes
        display_beam 1.2
        display_translucency yes
        
        1 Reply Last reply Reply Quote 0
        • caver01C
          caver01
          last edited by caver01

          Those items do get used. If you don't specify a ROM/ in line they apply globally (well, for these they apply globally to vector games only) so you only need to add them once. The extra lines for Tempest and others are added to further change the setting for the titles specified.

          My 4-player cocktail style cabinet built as a custom "roadcase"

          RiverstormR 1 Reply Last reply Reply Quote 0
          • RiverstormR
            Riverstorm @caver01
            last edited by

            @caver01 said in How to make vector arcade games look their best:

            Those items do get used. If you don't specify a ROM/ in line they apply globally (well, for these they apply globally to vector games only) so you only need to add them once.

            Perfect! Watched and bookmarked this is my grade A gold standard guide to vector gaming. I would love to see some of these features with spinner support in lr-mame2003 or newer. :)

            1 Reply Last reply Reply Quote 0
            • RiverstormR
              Riverstorm
              last edited by

              I had a chance to get everything configured over the weekend and turning the Solar Quest background to 0.2 was perfect as 0.1 was a bit to light. Really nice to play vector based games looking so incredible! :)

              caver01C 1 Reply Last reply Reply Quote 0
              • caver01C
                caver01 @Riverstorm
                last edited by

                @Riverstorm Glad you got it working!

                About the only thing we are missing with this setup is a glowing "bloom" effect. There is an old emulator called AAE that used GPU-accelerated rendering to add a wonderful glow to vector games. Some folks argued that it was a bit over-the-top and wasn't exactly authentic, but I always thought AAE glow/bloom looked amazing. AAE wasn't perfect for other reasons, and it's not something we can run, but the programmer apparently assisted MAME devs in recent years by improving shader parameters for vector games. It makes me wonder if anyone has played with vector shaders on experimental current MAME. Once you see an example from AAE, you might agree that it could be worth investigating.

                My 4-player cocktail style cabinet built as a custom "roadcase"

                1 Reply Last reply Reply Quote 0
                • RiverstormR
                  Riverstorm
                  last edited by

                  @caver01 I agree, I think they look great! I am looking at screenshots of AAE (Another Arcade Emulator) and I like it. It's like that saying for me...memory shoots with a soft focus lens and complimentary lighting but that's the best part!

                  I've been putting more time in to checking out the scanlines in different emulators and tweaking the vector settings lately that I think it's a must moving forward and definitely worth investigating! :)

                  1 Reply Last reply Reply Quote 0
                  • RiverstormR
                    Riverstorm
                    last edited by

                    @caver01 Quick question for you. I have a few games that are not vector based in AdvMAME and for some reason they seem to look extra smooth like they are melting almost. Is there a setting I changed or something? I like them smoothed (or not) but it just looks extremely smoothed to the point of distraction if that makes sense.

                    caver01C 1 Reply Last reply Reply Quote 0
                    • caver01C
                      caver01 @Riverstorm
                      last edited by

                      @Riverstorm For starters, the version of AdvanceMAME we have in RetroPie skips a bunch of the modeline requirements that typically plague anyone trying to configure AdvanceMAME on other systems. Initially, that meant it was hard-coded for 640x480, but recent builds by BuzZ made it a little more flexible, but some of the documented magnification and resize adjustments don't really make much sense. However, you should start by checking your RUNCOMMAND to see what resolution you are running when you launch the emulator.

                      That said, you do have some control over game resolution and the resize effects. Open the in-game MAME menu and go to VIDEO settings. There are several items to play with, but you are probably dealing with display_resizeeffect which can also be specified in the .rc file. I like to use filter or median in conjunction with rdisplay_rgbeffect triad3dot to simulate CRT pixels, but to each their own. Take a look at your settings in-game and see if there is an effect set. If you don't like that, go into the .rc file and find the line and set it to none. You can also set it per-game. AdvanceMAME has a lot of configuration possibilities. I dare you to get lost for a couple weeks in the documentation!

                      My 4-player cocktail style cabinet built as a custom "roadcase"

                      RiverstormR 1 Reply Last reply Reply Quote 0
                      • RiverstormR
                        Riverstorm @caver01
                        last edited by

                        @caver01 said in How to make vector arcade games look their best:

                        However, you should start by checking your RUNCOMMAND to see what resolution you are running when you launch the emulator.

                        Your assessment is spot on Caver! ;) display_resizeeffect definitely has some drastic changes. I am having a bit of trouble finding/changing my resolution. I see this in the es_systems.cfg: <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 SYS mame-advmame %ROM%</command>

                        I see these lines in the runcommand.sh file:

                        # mode_req==0: run command
                        # mode_req==1: set video mode to 640x480 (4:3) or 720x480 (16:9) @60hz, and run command
                        # mode_req==4: set video mode to 1024x768 (4:3) or 1280x720 (16:9) @60hz, and run command
                        
                        # mode_req=="CEA-#": set video mode to CEA mode #
                        # mode_req=="DMT-#": set video mode to DMT mode #
                        # mode_req=="PAL/NTSC-RATIO": set mode to SD output with RATIO of 4:3 / 16:10 or 16:9
                        

                        Also do you run any scanlines with AdvMAME vector or "regular" games? I find I don't like the vector scanlines and I'm a bit on the fence about regular games. I've been trying it with 2 horizontal.

                        I don't know if it's my resolution but for some reason when using rdisplay_rgbeffect triad3dot I get like a zigzag pattern with vertical color banding.

                        caver01C 1 Reply Last reply Reply Quote 0
                        • caver01C
                          caver01 @Riverstorm
                          last edited by caver01

                          @Riverstorm

                          @Riverstorm said in How to make vector arcade games look their best:

                          Also do you run any scanlines with AdvMAME vector or "regular" games?

                          There two answers, both described in the original post in this thread. 1. For typical MONOCHROME vector games, I don't run any rgbeffect. Original vector CRTs don't have shadow masks--it's just a flat phosphorous screen like an oscilloscope. 2. Color vector games are an exception. They DO have a shadow mask because the vector beams need to hit the correct RGB spots on the screen. So, as described above, I do enable an RGB effect on a per-game basis. These effects are not supposed to work on vector games (you can't enable them using the GUI menus) but will work per-game if you specify the rom in the .rc file (details above). It's a happy conincidence that lets color vector games have the shadow mask look.

                          Outside of vector games, I really try to use a libretro emulator to take advantage of the CRT shaders. Exceptions are games that require trackball/spinner input (that's about to change now that @dankcushions added mouse support to lr-mame2003) and anything I can't get working in lr-mame2003). For those games, I usually do enable some kind of rgbeffect, but it's never the scanlines. I prefer the triad3dot or triad6dot, depending on the game resolution.

                          I don't know if it's my resolution but for some reason when using display_rgbeffect triad3dot I get like a zigzag pattern with vertical color banding.

                          It's a combination of your resolution and the game's resolution. Try the triad6dot, or if you don't like it, try scanlines, or try using the mame GUI to specify a different magnification. This is where some of the AdvanceMAME settings start to break down. I suspect it has to do with the way the RetroPie version is handling video as opposed to the way AdvanceMAME was designed to use modelines. We don't have as much direct control over the rendering as one does on other hardware using this emulator, and frankly, the rewards are dwindling as the libretro cores gain more functionality.

                          We can get into more stuff about AdvanceMAME display configs for non-vector games, but it's probably better to do so on another thread.

                          My 4-player cocktail style cabinet built as a custom "roadcase"

                          RiverstormR 1 Reply Last reply Reply Quote 0
                          • RiverstormR
                            Riverstorm @caver01
                            last edited by

                            @caver01 said in How to make vector arcade games look their best:

                            Outside of vector games, I really try to use a libretro emulator to take advantage of the CRT shaders.

                            Thanks for the great explanation! :) There are a few that I am still using AdvMAME for but there's one that is a must for me and it's Xenophobe. AdvMAME is the only emulator that it works with right now? We spent a small fortune at the arcade playing that one alone.

                            AdvMAME is a must for vector games and if I can run a Libretro core I definitely do as I love DaveJ's shader. :)

                            caver01C 1 Reply Last reply Reply Quote 0
                            • caver01C
                              caver01 @Riverstorm
                              last edited by

                              @Riverstorm I think the following games are causing me problems in lr-mame2003 too: Arch Rivals, Xenophobe is one, Rampage and Sarge. None of these are vector titles. Maybe worth a new thread?

                              My 4-player cocktail style cabinet built as a custom "roadcase"

                              RiverstormR 1 Reply Last reply Reply Quote 0
                              • RiverstormR
                                Riverstorm @caver01
                                last edited by Riverstorm

                                @caver01 said in How to make vector arcade games look their best:

                                Maybe worth a new thread?

                                Definitely, they are all classics and worthy. I was just playing Rampage with my Nephew 2 weeks ago. I would love to see them working with lr-mame2003 at some point. I don't see AdvMAME going away for a while due to the reasons you state above as those vector games are just so sharp looking.

                                Just to clarify is this a pretty good list of the vector classics in AdvMAME?

                                asteroid
                                esb
                                gravitar
                                mhavoc
                                solarq
                                spacduel
                                spacfury
                                starcas
                                startrek
                                starwars
                                tempest
                                
                                caver01C 1 Reply Last reply Reply Quote 0
                                • caver01C
                                  caver01 @Riverstorm
                                  last edited by

                                  @Riverstorm These are the ones I have loaded:

                                  asteroid
                                  astdelux
                                  bzone
                                  bwidow
                                  gravitar
                                  llander
                                  mhavoc
                                  omegrace
                                  ripoff
                                  solarq
                                  spacduel
                                  spacfury
                                  starcas
                                  startrek
                                  starwars
                                  tailg
                                  tempest
                                  esb
                                  

                                  My 4-player cocktail style cabinet built as a custom "roadcase"

                                  RiverstormR 1 Reply Last reply Reply Quote 0
                                  • RiverstormR
                                    Riverstorm @caver01
                                    last edited by

                                    @caver01 said in How to make vector arcade games look their best:

                                    @Riverstorm These are the ones I have loaded:

                                    Thanks Caver I am missing a few that I need to load. Have a great weekend!

                                    1 Reply Last reply Reply Quote 0
                                    • RiverstormR
                                      Riverstorm
                                      last edited by

                                      @caver01

                                      Set them to your display's maximum resolution. Mine is 1280 and 1024. These settings only affect vector games. This alone will tell AdvanceMAME to render the vector game at the highest resolution that will fit inside your display's width and height.

                                      display_width 640
                                      display_height 480
                                      

                                      If you remove these lines does it try to negotiate the highest possible resolution?

                                      If I remember right it seems the default sets the width but no the height in the rc file. Which kind of makes sense as you'll usually fill the height before width if it's negotiating or upscaling?

                                      What I was trying to figure out was the best way to go about using both a 720p and 1080p TV as I switch back and forth.

                                      However, you should start by checking your RUNCOMMAND to see what resolution you are running when you launch the emulator.

                                      Is this set by a RUNCOMMAND or just the settings in the rc file?

                                      caver01C 1 Reply Last reply Reply Quote 0
                                      • BuZzB
                                        BuZz administrators
                                        last edited by BuZz

                                        Removing those lines will default to 640x480 afair

                                        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                        RiverstormR 1 Reply Last reply Reply Quote 0
                                        • RiverstormR
                                          Riverstorm @BuZz
                                          last edited by Riverstorm

                                          @BuZz said in How to make vector arcade games look their best:

                                          Removing those lines will default to 640x480 afair

                                          Thanks Buzz, so if I set it to 1920x1080 (1080p) in the .rc file but start it on a TV at 1280x720 (720p) will it default back to 640x480 as the set resolution isn't possible?

                                          1 Reply Last reply Reply Quote 0
                                          • BuZzB
                                            BuZz administrators
                                            last edited by

                                            It will render to 1280x720 scaled to the tv res I should think. which may end up not looking very nice.

                                            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                            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.