Scanlines in Libretro AdvMAME and FBA
-
@Riverstorm said in Scanlines in Libretro AdvMAME and FBA:
One more question for you if that's ok. You're a fountain of knowledge my good sir! ;) How do you get full resolution for these vector games?
You need to look for these lines in your .rc file for the version of advancemame you are using. Edit both if you might use each, but let's say you are using 1.4. So edit advmame-1.4.rc and look for the lines that look like:
display_width 1280 display_height 1024 display_flicker 15 display_intensity 1.5 display_antialias yes display_translucency yes display_beam 1.2
These settings only affect vector games. I like them this way on my screen. The flicker is a nice effect and it's set light here. The beam seems to enlarge in one dimension only, so if you want thick beams, you can't really get them, but I like a little larger than 1 pixel. Intensity can go up to 3 which I like, but if you back it down a bit, the flicker is more visible as is the translucency.
If you haven't already done it, also set
sound_latency 0.05
. The default is ridiculously high and you can see/hear the delay, so set this to the minimum of 0.05.Finally, make sure when you launch using the runcommand that you are using the full resolution of your display.
-
Hi all,
I tried add the crt shader by using Floob's script. It shader then works on SNES, Sega, NeoGeo but not on any Mame emulator. Is there any trick to enable it on MAME?
-
@jretropie said in Scanlines in Libretro AdvMAME and FBA:
Hi all,
I tried add the crt shader by using Floob's script. It shader then works on SNES, Sega, NeoGeo but not on any Mame emulator. Is there any trick to enable it on MAME?
you have to be using a libretro mame emulator. use https://github.com/RetroPie/RetroPie-Setup/wiki/Runcommand to find out what you're using.
-
@dankcushions Hi, I have tried Ir-fba-next, Ir-fba, Ir-mame2003. But none of them shows the shader.
-
@jretropie said in Scanlines in Libretro AdvMAME and FBA:
@dankcushions Hi, I have tried Ir-fba-next, Ir-fba, Ir-mame2003. But none of them shows the shader.
are they in the arcade folder? might be that the script hasn't been updated to use the new(ish) arcade or mame-libretro file paths. not sure. you could instead use the https://github.com/retropie/retropie-setup/wiki/Configuration-Editor
anyway, the shaders have been updated to the latest versions. here's some pretty screenshots:
crt-pi
crt-pi-curvature
crt-pi-vertical
crt-pi-curvature-vertical
reinstall retroarch via retropie-setup to get the new ones
-
@dankcushions You are right. Placing ROMs in arcade folder. Shader does not work.
-
@jretropie said in Scanlines in Libretro AdvMAME and FBA:
@dankcushions You are right. Placing ROMs in arcade folder. Shader does not work.
hmm, one for @Floob i think!
-
@jretropie If you are using shaders (as opposed to overlays) when you install them via my tool you would need to add
video_shader = /opt/retropie/emulators/retroarch/shader/crt-pi.glslp video_shader_enable = true
to the top of the file /opt/retropie/configs/arcade/retroarch.cfg
That would apply the shader to all games in the arcade folder.
-
Does anyone knows why the shader has vertical color line when I connect to 32" 720p TV?
The shader works fine with smaller 22" 1080p computer LCD.
-
@jretropie said in Scanlines in Libretro AdvMAME and FBA:
Does anyone knows why the shader has vertical color line when I connect to 32" 720p TV?
The shader works fine with smaller 22" 1080p computer LCD.
It looks like the shadow mask simulation in the shader is interfering with the dot pitch of your TV - TVs do image processing on input signals which might be making this worse as well. Try turning this off by changing the value of MASK_TYPE in the version of the crt-pi.glsl file you are using to be 0. You can try 2 as well but that is likely to give you red/green/blue colour bands instead of green/magenta ones.
It's worth me pointing out that the shader really needs about 4 vertical pixels to do even scan lines so you might get moire patterns on your 720p screen.
-
I am looking at the file and can't find any variable call mask_type
shaders = "1"
shader0 = "shaders/crt-pi.glsl"
filter_linear0 = "true"
wrap_mode0 = "clamp_to_border"
mipmap_input0 = "false"
alias0 = ""
float_framebuffer0 = "false"
srgb_framebuffer0 = "false" -
@jretropie Try
sudo nano /opt/retropie/emulators/retroarch/shader/shaders/crt-pi.glsl
-
What Floob said, although as you're using a curved version of the shader you'll need to edit the corresponding glsl file. You can find which one by looking for the line that says something similar to:
shader0 = "shaders/crt-pi.glsl"
-
@dankcushions said in Scanlines in Libretro AdvMAME and FBA:
anyway, the shaders have been updated to the latest versions. here's some pretty screenshots:
Those look amazing! I think the scanlines really add another level of genuineness.
-
@caver01 said in Scanlines in Libretro AdvMAME and FBA:
@Riverstorm said in Scanlines in Libretro AdvMAME and FBA:
One more question for you if that's ok. You're a fountain of knowledge my good sir! ;) How do you get full resolution for these vector games?
You need to look for these lines in your .rc file for the version of advancemame you are using. Edit both if you might use each, but let's say you are using 1.4. So edit advmame-1.4.rc and look for the lines that look like:
display_width 1280 display_height 1024 display_flicker 15 display_intensity 1.5 display_antialias yes display_translucency yes display_beam 1.2
These settings only affect vector games. I like them this way on my screen. The flicker is a nice effect and it's set light here. The beam seems to enlarge in one dimension only, so if you want thick beams, you can't really get them, but I like a little larger than 1 pixel. Intensity can go up to 3 which I like, but if you back it down a bit, the flicker is more visible as is the translucency.
If you haven't already done it, also set
sound_latency 0.05
. The default is ridiculously high and you can see/hear the delay, so set this to the minimum of 0.05.Finally, make sure when you launch using the runcommand that you are using the full resolution of your display.
Thanks Caver, I did a copy and paste as I do with several of your posts. I will be adding this in tonight to see how it looks!
-
@Floob When I try 0 or 2 for the mask_type. the scanlines disappeared.
-
@Riverstorm said in Scanlines in Libretro AdvMAME and FBA:
Thanks Caver, I did a copy and paste as I do with several of your posts. I will be adding this in tonight to see how it looks!
Just be mindful that when you are messing with the AdvanceMAME .rc files, it doesn't like duplicate config entries. So, if you copy and past mine, you need to remove the ones that are there, or add a rom name in from of them like
oldsetting/display_flicker 0
. This example tells advancemame to use this config line with the game called "oldsetting" which of course there isn't one, so you can create commented lines in this manner. AdvanceMAME is very picky about its config file. -
@jretropie I'll have to try it out myself. I'm afraid I dont have the setup you do so cant test like for like.
-
@jretropie said in Scanlines in Libretro AdvMAME and FBA:
@Floob When I try 0 or 2 for the mask_type. the scanlines disappeared.
That sounds like what you get when there's a mistake in the shader and it defaults to what you get when you specify no shader.
Reinstall the files so you've got a correct version and change line 18 so it reads:
#define MASK_TYPE 0
-
@caver01 said in Scanlines in Libretro AdvMAME and FBA:
Just be mindful that when you are messing with the AdvanceMAME .rc files, it doesn't like duplicate config entries. So, if you copy and past mine, you need to remove the ones that are there, or add a rom name in from of them like
oldsetting/display_flicker 0
. This example tells advancemame to use this config line with the game called "oldsetting" which of course there isn't one, so you can create commented lines in this manner. AdvanceMAME is very picky about its config file.Ok, that brings up another question. Are these global settings that only vector based games will utilize or should the games be added individually like:
solarq/display_width 1280 solarq/display_height 1024 solarq/display_flicker 15 solarq/display_intensity 1.5 solarq/display_antialias yes solarq/display_translucency yes solarq/display_beam 1.2 starcas/display_width 1280 starcas/display_height 1024 starcas/display_flicker 15 starcas/display_intensity 1.5 starcas/display_antialias yes starcas/display_translucency yes starcas/display_beam 1.2
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.