HLSL Effects for Windows¶
By default, MAME outputs an idealized version of the video as it would be on the way to the arcade cabinet's monitor, with minimal modification of the output (primarily to stretch the game image back to the aspect ratio the monitor would traditionally have, usually 4:3) -- this works well, but misses some of the nostalgia factor. Arcade monitors were never ideal, even in perfect condition, and the nature of a CRT display distorts that image in ways that change the appearance significantly.
Modern LCD monitors simply do not look the same, and even computer CRT monitors cannot match the look of an arcade monitor without help.
That's where HLSL comes into the picture.
HLSL simulates most of the effects that a CRT arcade monitor has on the video, making the result look a lot more authentic. However, HLSL requires some effort on the user's part: the settings you use are going to be tailored to your PC's system specs, and especially the monitor you're using. Additionally, there were hundreds of thousands of monitors out there in arcades. Each was tuned and maintained differently, meaning there is no one correct appearance to judge by either. Basic guidelines will be provided here to help you, but you may also wish to ask for opinions on popular MAME-centric forums.
Resolution and Aspect Ratio¶
Resolution is a very important subject for HLSL settings. You will want MAME to be using the native resolution of your monitor to avoid additional distortion and lag created by your monitor upscaling the display image.
While most arcade machines used a 4:3 ratio display (or 3:4 for vertically oriented monitors like Pac-Man), it's difficult to find a consumer display that is 4:3 at this point. The good news is that that extra space on the sides isn't wasted. Many arcade cabinets used bezel artwork around the main display, and should you have the necessary artwork files, MAME will display that artwork. Turn the artwork view to Cropped for best results.
Some older LCD displays used a native resolution of 1280x1024 and were a 5:4 aspect ratio. There's not enough extra space to display artwork, and you'll end up with some very slight pillarboxing, but the results will be still be good and on-par with a 4:3 monitor.
Getting Started with HLSL¶
You will need to have followed the initial MAME setup instructions elsewhere in this manual before beginning. Official MAME distributions include HLSL by default, so you don't need to download any additional files.
Open your mame.ini
in your text editor of choice (e.g. Notepad), and make sure the following options are set correctly:
video d3d
filter 0
The former is required because HLSL requires Direct3D support. The latter turns off extra filtering that interferes with HLSL output.
Lastly, one more edit will turn HLSL on:
hlsl_enable 1
Save the .INI file and you're ready to begin.
Several presets have been included in the INI folder with MAME, allowing for good quick starting points for Nintendo Game Boy, Nintendo Game Boy Advance, Raster, and Vector monitor settings.
Tweaking HLSL Settings inside MAME¶
For multiple, complicated to explain reasons, HLSL settings are no longer saved when you exit MAME. This means that while tweaking settings is a little more work on your part, the results will always come out as expected.
Start by loading MAME with the game of your choice (e.g. mame pacman)
The tilde key (~) brings up the on-screen display options. Use up and down to go through the various settings, while left and right will allow you to change that setting. Results will be shown in real time as you're changing these settings.
Once you've found settings you like, write the numbers down on a notepad and exit MAME.
Configuration Editing¶
As referenced in Order of Config Loading, MAME has a order in which it processes INI files. The HLSL settings can be edited in mame.ini
, but to take full advantage of the power of MAME's config files, you'll want to copy the HLSL settings from mame.ini to one of the other config files and make changes there.
For instance, once you've found HLSL settings you think are appropriate for Neo Geo games, you can put those settings into neogeo.ini
so that all Neo-Geo games will be able to take advantage of those settings without needing to add it to every game INI manually.
Configuration Settings¶
bloom_lvl0_weight 1.00
bloom_lvl1_weight 0.64
bloom_lvl2_weight 0.32
bloom_lvl3_weight 0.16
bloom_lvl4_weight 0.08
bloom_lvl5_weight 0.06
bloom_lvl6_weight 0.04
bloom_lvl7_weight 0.02
bloom_lvl8_weight 0.01
|
Bloom level 0 weight
Bloom level 1 weight
Bloom level 2 weight
Bloom level 3 weight
Bloom level 4 weight
Bloom level 5 weight
Bloom level 6 weight
Bloom level 7 weight
Bloom level 8 weight
|
Full-size target.
1/4 smaller that level 0 target
1/4 smaller that level 1 target
1/4 smaller that level 2 target
1/4 smaller that level 3 target
1/4 smaller that level 4 target
1/4 smaller that level 5 target
1/4 smaller that level 6 target
1/4 smaller that level 7 target
|
Vector Games¶
HLSL effects can also be used with vector games. Due to a wide variance of vector settings to optimize for each individual game, it is heavily suggested you add these to per-game INI files (e.g. tempest.ini)
Shadowmasks were only present on color vector games, and should not be used on monochrome vector games. Additionally, vector games did not use scanlines, so that should also be turned off.
Open your INI file in your text editor of choice (e.g. Notepad), and make sure the following options are set correctly:
video d3d
filter 0
hlsl_enable 1
In the Core Vector Options section:
beam_width_min 1.0 (Beam Width Minimum)
beam_width_max 1.0 (Beam Width Maximum)
beam_intensity_weight 0.0 (Beam Intensity Weight)
flicker 0.0 (Vector Flicker)
In the Vector Post-Processing Options section:
vector_beam_smooth 0.0 (Vector Beam Smooth Amount)
vector_length_scale 0.5 (Vector Attenuation Maximum)
vector_length_ratio 0.5 (Vector Attenuation Length Minimum)
Suggested settings for vector games:
bloom_scale should typically be set higher for vector games than raster games. Try between 0.4 and 1.0 for best effect.
bloom_overdrive should only be used with color vector games.
bloom_lvl_weights should be set as follows:
bloom_lvl0_weight 1.00
bloom_lvl1_weight 0.48
bloom_lvl2_weight 0.32
bloom_lvl3_weight 0.24
bloom_lvl4_weight 0.16
bloom_lvl5_weight 0.24
bloom_lvl6_weight 0.32
bloom_lvl7_weight 0.48
bloom_lvl8_weight 0.64
|
Bloom level 0 weight
Bloom level 1 weight
Bloom level 2 weight
Bloom level 3 weight
Bloom level 4 weight
Bloom level 5 weight
Bloom level 6 weight
Bloom level 7 weight
Bloom level 8 weight
|
Full-size target.
1/4 smaller that level 0 target
1/4 smaller that level 1 target
1/4 smaller that level 2 target
1/4 smaller that level 3 target
1/4 smaller that level 4 target
1/4 smaller that level 5 target
1/4 smaller that level 6 target
1/4 smaller that level 7 target
|