Build Your Own Arcade Controls Forum
Main => Software Forum => Linux => Topic started by: Hunk_4TH on May 11, 2012, 09:45:11 pm
-
Hey guys! I'm pretty new to GLSL. I had it working one time then going to try it again I get the following error in the terminal
WARNING: font /fonts/Ubuntu-B.ttf, is not TrueType or BDF, using MAME default
cannot open shader_file: ./src/osd/sdl/shader/glsl_plain.vsh
OpenGL: GLSL loading mame bitmap shader 0 failed (./src/osd/sdl/shader/glsl_plain)
cannot open shader_file: CRT/CRT.vsh
OpenGL: GLSL loading mame bitmap shader 1 failed (CRT/CRT)
Segmentation fault (core dumped)
I tried Googling it with no luck. Seems more people use Mame in Windows which it's HLSL effect which is understandable as I use it as well but would like to have this working in Linux as well. I'm running Lubuntu 12.0.4 x64.
-
Anyone have any ideas? I've tried uninstalling MAME,re-installing it, and even deleted all the MAME.ini files I could find with no luck :(
-
Hey Hunk_4TH,
I use GLSL with cgwg CRT shader on my Ubutntu 12.04, it works quite well and I like it very much!
First get the latest version by cgwg called CRT-geom-20120130.zip here http://www.sendspace.com/file/gctlod (http://www.sendspace.com/file/gctlod) unzip it in ~/.mame/CRT
Second get mame 0.145 sources from http://mamedev.org/, (http://mamedev.org/,) unzip and copy the mame/src/osd/sdl/shader folder in ~/.mame/CRT
you'll end up with something like this:
[1006] diego@mother ~> ls -l ~/.mame/CRT
total 36
-rw-r--r-- 1 diego diego 6866 Jan 31 02:21 CRT-geom_idx16_lut.fsh
-rw-r--r-- 1 diego diego 6866 Jan 31 02:21 CRT-geom_rgb32_dir.fsh
-rw-r--r-- 1 diego diego 6866 Jan 31 02:21 CRT-geom_rgb32_lut.fsh
-rw-r--r-- 1 diego diego 3096 Apr 2 17:15 CRT-geom.vsh
drwx------ 2 diego diego 4096 Apr 24 14:11 shader
now edit these lines in your mame.ini:
gl_glsl 1
gl_glsl_filter 1
glsl_shader_mame0 /home/username/.mame/CRT/shader/glsl_plain
glsl_shader_mame1 /home/username/.mame/CRT/CRT-geom
change username to whatever your username is, take special care in not using ~ or $HOME, for some reason mame dosen't like that in those lines!
-
Thanks for the detailed reply! I tried all that and get the following error while running mame via the terminal
WARNING: font /fonts/Ubuntu-B.ttf, is not TrueType or BDF, using MAME default
Unable to load effect PNG file 'scanlines_ag.png'
cannot open shader_file: ./src/osd/sdl/shader/glsl_plain.vsh
OpenGL: GLSL loading mame bitmap shader 0 failed (./src/osd/sdl/shader/glsl_plain)
cannot open shader_file: ./CRT/CRT.vsh
OpenGL: GLSL loading mame bitmap shader 1 failed (./CRT/CRT)
Segmentation fault (core dumped)
-
I tried again and it seems to be working now. Thanks so much for your help!!
-
I'm glad it worked! cgwg work is great and not many people are using it!
You can customize the effects changing some variables in CRT-geom.vsh, I felt some effects were a bit too strong:
The overscan was cutting to much graphic:
overscan = vec2(1.00,1.00);
The curvature was a bit too much:
R = 3.0;
I didn't like the tilting:
const vec2 angle = vec2(0.0,0.0);
-
I agree his work is awesome! When I first saw this http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=76575#Post76575 (http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=76575#Post76575) (post with Metal Slug) I really wanted to use GLSL.
Yeah, I ran a few Vertical games and the right side was a little titled. If you modified yours please feel free to post it :D
Btw, on the thread I linked to above cgwg advised people to use his shaders with the aperture effect effect. Though none of the effects seem to want to work for me. For example for testing MAME I usually use QMC2 and on the right side under Emulator log it says "Unable to load effect aperture.png. It seems to do this for all effects though they are obviously there :(
-
Overlay bitmaps must be in the artwork folder... but I don't think you should use an overlay with the last versions of CRT
-
I put them in the artwork but no luck ha ha. It's not a real big deal. The shader is more than impressive! Just don't like the slight tilt on the vertical games :( But like you said that can be adjusted :D