Note: if you see people online talking about "SDLMAME", that's just MAME.
Anyway, I finally got around to trying MAME with shaders. I did this on Slackware64 14.1, using MAME 0.160. The paths I'm going to describe are correct for it, and should be correct for other distros too.
First, I created a user-level MAME directory and made a copy of the global MAME ini file:
Code:
mkdir -p ~/.mame
cp /etc/mame.ini ~/.mame
I downloaded the "shader pack" from the
GLSL SHADERS SETUP (MAME/MESS) page, then unzipped it into my MAME directory:
Code:
~/.mame
tar xfv ~/Downloads/mame_glsl_osd.tar.gz
That pack comes with a CRT-geom shader. Here are the changes I then made to my mame.ini to get it activated:
Code:
waitvsync 1
glsl_shader_mame0 /home/dugan/.mame/osd/shader/glsl_plain
glsl_shader_mame1 /home/dugan/.mame/osd/CRT-geom
I know the paths work if they are absolute and have no environment variables or tildes.
You can't miss the CRT-geom shader if it's working. It makes your screen deformed as if it were the surface or a fish bowl, or like a particularly round CRT.
If you look in ~/.mame/osd, you'll see the following files:
- CRT-geom.vsh
- CRT-geom_idx16_lut.fsh
- CRT-geom_rgb32_dir.fsh
- CRT-geom_rgb32_lut.fsh
Relate that to the value of "glsl_shader_mame1" in mame.ini, and it should be pretty clear how to install and activate other shaders.
One particularly popular shader is a CRT shader called "Lottes". I
downloaded it and unzipped it in ~/.mame. That put all its *.?sh files in ~/.mame/shader, so I activated it by setting the appropriate key in mame.ini:
Code:
glsl_shader_mame1 /home/dugan/.mame/shader/Lottes_CRT
SABR was one I was particular looking forward to running. It's a variation on xBR, which is an improvement on the HQ
nx scalers, which were in turn an improvement on SuperEagle, 2xSAI and those others ones. I already had Lottes in ~/.mame/shader, so I put all of SABR's *.?sh files in the same directory. Then I just activated it:
Code:
glsl_shader_mame1 /home/dugan/.mame/shader/sabr
So once it's set up, changing shaders is just a matter of changing one line in mame.ini.