Saturday 26 November 2011

Version 3.0 has been released!

I will add some info here in the following days.

To get version 3.0 click on it in the righthand side of the 'Menu Bar' above.

Enjoy!

You can post questions/comments/feedback below or in this forum here:
http://www.mameworld.info/ubbthreads/showflat.php?Cat=&Number=268099&page=1&view=collapsed&sb=5&o=&vc=1

Wednesday 16 November 2011

The Resolutions Poll

The previous poll no longer reflected information that was helpful in regards to moving towards version 3.0

I thought I might just clarify MAME resolutions and magnifications when displayed on screens which may help people in accurately answering the poll:

Standard 15kHz arcade monitor resolution = 240 vertical lines.
PC resolution magnification x2 = 480 lines which is 640x480 or 800x480 or 854x480
PC resolution magnification x3 = 720 lines which is 960x720 or 1280x720
PC resolution magnification x4 = 960 lines which is 1280x960 or 1440x960
PC resolution magnification x5 = 1200 lines which is 1600x1200 or 1920x1200
PC resolution magnification x6 = 1440 lines which will be bordered inside 2048x1536 or 2560x1600
PC resolution magnification x7 = 1680 lines which will be bordered inside 2560x2048
PC resolution magnification x8 = 1920 lines which will be bordered inside 2560x2048

Ofcourse if you use a resolution that is different to those listed above then your game will also be displayed inside borders.

All this is true when running games at a 'standard 4:3' ratio resolution.

Please answer poll honestly as it will reflect what resolutions I spend the time towards implementing first.

Any comments/inquiries or to talk about other resolutions not listed in my poll please post in forum here;
http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=268786&page=0&view=collapsed&sb=5&o=&fpart=1&vc=1&new=1321504716

Thankyou.

Wednesday 9 November 2011

NEW JClampy's 320x232 resolution 4x magnification MAME HLSL Setup

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings that work with each different resolution is a long, difficult, and slow
process. If you think you can contribute or help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please do not steal or plagiarism my work or settings without crediting me. Otherwise I will
take everything offline for my private friends and personal use only. I have put alot of time
and effort into all of this and would prefer if people would just point others towards my blog.

Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.

Tested with versions 0.143u5 through to 0.143u9
I found that 320x240 games had no distortion when using standard or pixelaspect views. With 320x232 resolution games only pixelaspect view will give us a distortion free image. Although it is only a slight change, at the moment I will keep them as two seperate blog posts. But I may combine them together in the future once I have tested some more different resolutions.
***Just take note that these instructions are exactly the same as with 320x240 apart from the fact that for 320x232 we must use pixelaspect view only.***

I can now confirm that Version 2.0 is fully compatible with 320x232 resolution games, both Horizontally orientated and Vertically(232x320) orientated. After indepth research and testing there is only one way to get HLSL working properly with these games, the following instructions will show you how:

Version 2.0
* Super High Quality .png files.
* Perfect 'tiling' pattern ensures no gradient or banding artifacts with horizontal or vertical scrolling games.
* No 'warping' or 'pinching' effects ensure a crystal clear game image that is easier to look at.

First you need to choose whether you want a 'shadow mask' or an 'aperture grille' pattern. I recommend the 'shadow mask' when used without scanlines and the 'aperture grille' with scanlines. The 'shadow mask' creates a honeycomb type of pattern which is great by itself. Whereas if you prefer a crosshatch pattern then an 'aperture grille' when combined with scanlines will accomplish this. A 'shadow mask' without scanlines is my current personal preference.

ShadowMask = JClampy_ShadowMask4x_v2.0.png
ApertureGrille = JClampy_ApertureGrille4x_v2.0.png
Both included in file here: http://www.mediafire.com/?u9ea8yj9883akhe
(They are the same files as Version 2.0 from my previous 320x240 blog post. If you already have those then you can use them for 320x240 games as well if you want.)

I have a square screen, not a widescreen, so have not tested with widescreen displays. If you use a widescreen and can't get desired effects then first try running MAME in a window and not fullscreen. If that does not work then you may have to use MAME's 'Border Artwork' feature to get the game image displayed in a correct aspect ratio window. I plan to release some custom widescreen borders tomorrow. Also, if you have not used HLSL before you might like to read my quick start guide here; http://gamingnos.blogspot.com/2011/10/quick-start-mame-hlsl-filter-guide-up.html

These settings should be set like this when using HLSL:
mame.ini
effect              none     (old visual effects off, aka 'visual effects')
scale_effect     none     (old visual effects off, not in all MAME variants, aka 'image enhancement')
switchres           1        (enable resolution settings, aka 'switch resolutions to fit')
sleep                 0        (power saving sleep mode off, aka 'sleep when possible')
video               d3d       (video output method set to Direct3D)
keepaspect        1         (maintain aspect ratios, aka 'enforce aspect ratio')
prescale             1        (no software prescale, aka 'scale screen')
hwstretch           0        (hardware stretching off)
d3dversion         9        (Direct3D version 9 required when using the HLSL filter)
filter                  0        (bilinear filtering off)
artwork_crop      0        (crop border artwork off)

For all 320x232 Horizontally orientated games run at a 4x magnification for final resolution output of 1280x960:
mame.ini
aspect ratio      4:3       (correct aspect ratio for our final display output)
resolution    1280x960   (our final display output resolution)
view        pixel aspect   (only pixelaspect will give us a distortion free image with 320x232 games)

hlsl.ini
hlsl_prescale_x         2      (2x zoom by video hardware)
hlsl_prescale_y         4      (4x zoom by video hardware)
hlsl_snap_width     1280    (rendered snapshots resolution must be the same width as our display output)
hlsl_snap_height     960     (rendered snapshots resolution must be the same height as our display output)
shadow_mask_alpha      0.250000     (my personal preference when not using scanlines)
shadow_mask_texture     JClampy_ShadowMask4x_v2.0.png *OR* JClampy_ApertureGrille4x_v2.0.png
shadow_mask_x_count       1
shadow_mask_y_count       2
shadow_mask_usize      1.000000
shadow_mask_vsize      0.750000
curvature       0.000000      (I recommend disabling this unless you like the moiré effect)
pincushion      0.000000     (I recommend disabling this unless you like the moiré effect)

Caveats:
1. 'hlsl_prescale_x' & 'hlsl_prescale_y' preferably you should use either 2, 3, or 4. I advise against 1 as it produced blurriness and 0 disables prescale altogether. Having an 'x' of 2 and 'y' of 4 creates a nice balanced image. Both 'x' & 'y' at 4 increases image sharpness, whereas both 'x' & 'y' at 2 increases image softness.
2. Although these may work in different combinations, you will probably notice a sharp reduction in quality if you change any of the following settings;
final display aspect ratio of 4:3 at resolution 1280x960 with hlsl_snap_width of 1280 and hlsl_snap_height of 960
shadow_mask_x_count       1
shadow_mask_y_count       2
shadow_mask_usize         1.000000
shadow_mask_vsize          0.750000
3. You can safely change the following setting to your own personal preference;
shadow_mask_alpha         0.250000
4. Due to the fact that 'standard 4:3' view or 'stretched'/'chopped'/'cocktail' views distort the display of the shadow mask or aperture grille .png files it is advised only to use the 'pixel aspect' view or use my custom borders.

If you would like scanlines (especially nice with an aperture grille), here are my personal preference settings;
hlsl.ini
shadow_mask_alpha         0.100000        (I recommend using a lower number for the shadow mask or aperture grille when using scanlines)
scanline_alpha                 0.400000        (visibility of scanlines; I recommend making them appear stronger than the shadow mask or aperture grille)
scanline_size                   1.000000        (this means that every row of pixels will have it's own scanline; ratio of scanlines to image lines)
scanline_height                0.400000        (I recommend using thin scanlines that do not cover too much of the original games image)
scanline_bright_scale        1.000000        (brightness of the non scanlined areas. I recommend leaving this setting at 1)
scanline_bright_offset       0.000000        (unknown, not needed at the moment)
scanline_jitter                  0.000000        (I don't use, makes scanlines shimmer up and down; can cause nausea for some people)

Here are the rest of my personal preference settings;
hlsl.ini
defocus                   0.000000,0.000000        (I don't use defocus as it only adds blurriness to your game image)
converge_x              0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
converge_y              0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
radial_converge_x     0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
radial_converge_y     0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
red_ratio                 1.000000,0.000000,0.000000        (leave alone, red ratio 100%)
grn_ratio                 0.000000,1.000000,0.000000        (leave alone, green ratio 100%)
blu_ratio                 0.000000,0.000000,1.000000        (leave alone, blue ratio 100%)
saturation               1.100000                      (this controls saturation, how strong colours look/bleed, don't set too high or colours get distorted)
offset                     0.000000,0.000000,0.000000        (I don't use, suppose to offset strength of red,blue,green)
scale                      1.050000,1.050000,1.050000        (this controls brightness control, don't set too high or colours get distorted)
power                     1.150000,1.150000,1.150000        (this controls contrast control, where 1.0 = 100%)
floor                       0.000000,0.000000,0.000000        (this controls gamma control, I don't use it as colours get washed out, if you set it too high colours get distorted)
phosphor_life           0.200000,0.200000,0.200000        (can create a ghosting effect on fast moving pixels, up to you if you like or not?)

The game will be shown in correct aspect ratio at correct resolution of 4x magnification and look like this:
This is a screenshot of an 'aperture grille with scanlines'
But what about Vertically orientated games, how do I get them looking perfect?
For all 320x232 Vertically orientated (232x320) games run at a 4x magnification for final resolution output of 1280x960:
Unfortunately there is only one way to get a perfect distortion free HLSL image with Vertically orientated games. You must have a monitor that you can move to a vertical position. If your monitor does not rotate but is wall mounted then perhaps you could investigate if you can get a vertical mounting bracket. My monitor can be rotated and these are the steps I follow to get a perfect image;
1. Follow exactly the same instructions as for Horizontally orientated games.
2. Once you have the game running in MAME for the first time, you need to press the [Tab] key to bring up the 'in-game menu'. Then select and [Enter] into the 'video options' sub menu. From here you can select the 'Rotate' option and change it to either 'CCW 90degrees' or 'CW 90degrees'. Press the [Tab] key again to exit out of the 'in-game menu'. MAME will remember your selection from now on.

Your game would look like this before monitor rotation:
This is a screenshot of an 'aperture grille with scanlines'
Your game would look like this after monitor rotation:
This is a screenshot of an 'aperture grille with scanlines'
How Do I Know If Everything Is Working As It Should be?
Here are some screenshots that show you what it looks like when everything is working properly and when it is not: xxx Notice there is no banding of the displayed 'overlay' when it is working properly.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings that work with each different resolution is a long, difficult, and slow
process. If you think you can contribute or help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please do not steal or plagiarism my work or settings without crediting me. Otherwise I will
take everything offline for my private friends and personal use only. I have put alot of time
and effort into all of this and would prefer if people would just point others towards my blog.


Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.

Monday 7 November 2011

NEW JClampy's 320x240 resolution 4x magnification MAME HLSL Setup

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings that work with each different resolution is a long, difficult, and slow
process. If you think you can contribute or help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please do not steal or plagiarism my work or settings without crediting me. Otherwise I will
take everything offline for my private friends and personal use only. I have put alot of time
and effort into all of this and would prefer if people would just point others towards my blog.

Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.
Tested with versions 0.143u5 through to 0.143u9
I can now confirm that Version 2.0 is fully compatible with 320x240 resolution games, both Horizontally orientated and Vertically(240x320) orientated. After indepth research and testing there is only one way to get HLSL working properly with these games, the following instructions will show you how:

Version 2.0
* Super High Quality .png files.
* Perfect 'tiling' pattern ensures no gradient or banding artifacts with horizontal or vertical scrolling games.
* No 'warping' or 'pinching' effects ensure a crystal clear game image that is easier to look at.

First you need to choose whether you want a 'shadow mask' or an 'aperture grille' pattern. I recommend the 'shadow mask' when used without scanlines and the 'aperture grille' with scanlines. The 'shadow mask' creates a honeycomb type of pattern which is great by itself. Whereas if you prefer a crosshatch pattern then an 'aperture grille' when combined with scanlines will accomplish this. A 'shadow mask' without scanlines is my current personal preference.

ShadowMask = JClampy_ShadowMask4x_v2.0.png
ApertureGrille = JClampy_ApertureGrille4x_v2.0.png
Both included in file here: http://www.mediafire.com/?u9ea8yj9883akhe
(They are the same files as Version 2.0 from my NEO GEO blog section just named differently. If you already have those then you can use them for 320x240 games as well if you want.)

I have a square screen, not a widescreen, so have not tested with widescreen displays. If you use a widescreen and can't get desired effects then first try running MAME in a window and not fullscreen. If that does not work then you may have to use MAME's 'Border Artwork' feature to get the game image displayed in a correct aspect ratio window. I plan to release some custom widescreen borders tomorrow. Also, if you have not used HLSL before you might like to read my quick start guide here; http://gamingnos.blogspot.com/2011/10/quick-start-mame-hlsl-filter-guide-up.html

These settings should be set like this when using HLSL:
mame.ini
effect              none     (old visual effects off, aka 'visual effects')
scale_effect     none     (old visual effects off, not in all MAME variants, aka 'image enhancement')
switchres           1        (enable resolution settings, aka 'switch resolutions to fit')
sleep                 0        (power saving sleep mode off, aka 'sleep when possible')
video               d3d       (video output method set to Direct3D)
keepaspect        1         (maintain aspect ratios, aka 'enforce aspect ratio')
prescale             1        (no software prescale, aka 'scale screen')
hwstretch           0        (hardware stretching off)
d3dversion         9        (Direct3D version 9 required when using the HLSL filter)
filter                  0        (bilinear filtering off)
artwork_crop      0        (crop border artwork off)

For all 320x240 Horizontally orientated games run at a 4x magnification for final resolution output of 1280x960:
mame.ini
aspect ratio      4:3       (correct aspect ratio for our final display output)
resolution    1280x960   (our final display output resolution)
view     pixel aspect *OR* standard  (both options will give the same 4:3 or 3:4 ratio with 320x240 games)

hlsl.ini
hlsl_prescale_x         2      (2x zoom by video hardware)
hlsl_prescale_y         4      (4x zoom by video hardware)
hlsl_snap_width     1280    (rendered snapshots resolution must be the same width as our display output)
hlsl_snap_height     960     (rendered snapshots resolution must be the same height as our display output)
shadow_mask_alpha      0.250000     (my personal preference when not using scanlines)
shadow_mask_texture     JClampy_ShadowMask4x_v2.0.png *OR* JClampy_ApertureGrille4x_v2.0.png
shadow_mask_x_count       1
shadow_mask_y_count       2
shadow_mask_usize      1.000000
shadow_mask_vsize      0.750000
curvature       0.000000      (I recommend disabling this unless you like the moiré effect)
pincushion      0.000000     (I recommend disabling this unless you like the moiré effect)

Caveats:
1. 'hlsl_prescale_x' & 'hlsl_prescale_y' preferably you should use either 2, 3, or 4. I advise against 1 as it produced blurriness and 0 disables prescale altogether. Having an 'x' of 2 and 'y' of 4 creates a nice balanced image. Both 'x' & 'y' at 4 increases image sharpness, whereas both 'x' & 'y' at 2 increases image softness.
2. Although these may work in different combinations, you will probably notice a sharp reduction in quality if you change any of the following settings;
final display aspect ratio of 4:3 at resolution 1280x960 with hlsl_snap_width of 1280 and hlsl_snap_height of 960
shadow_mask_x_count       1
shadow_mask_y_count       2
shadow_mask_usize         1.000000
shadow_mask_vsize          0.750000
3. You can safely change the following setting to your own personal preference;
shadow_mask_alpha         0.250000
4. Due to the fact that 'standard 4:3' view or 'stretched'/'chopped'/'cocktail' views distort the display of the shadow mask or aperture grille .png files it is advised only to use the 'pixel aspect' view or use my custom borders.

If you would like scanlines (especially nice with an aperture grille), here are my personal preference settings;
hlsl.ini
shadow_mask_alpha         0.100000        (I recommend using a lower number for the shadow mask or aperture grille when using scanlines)
scanline_alpha                 0.400000        (visibility of scanlines; I recommend making them appear stronger than the shadow mask or aperture grille)
scanline_size                   1.000000        (this means that every row of pixels will have it's own scanline; ratio of scanlines to image lines)
scanline_height                0.400000        (I recommend using thin scanlines that do not cover too much of the original games image)
scanline_bright_scale        1.000000        (brightness of the non scanlined areas. I recommend leaving this setting at 1)
scanline_bright_offset       0.000000        (unknown, not needed at the moment)
scanline_jitter                  0.000000        (I don't use, makes scanlines shimmer up and down; can cause nausea for some people)

Here are the rest of my personal preference settings;
hlsl.ini
defocus                   0.000000,0.000000        (I don't use defocus as it only adds blurriness to your game image)
converge_x              0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
converge_y              0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
radial_converge_x     0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
radial_converge_y     0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
red_ratio                 1.000000,0.000000,0.000000        (leave alone, red ratio 100%)
grn_ratio                 0.000000,1.000000,0.000000        (leave alone, green ratio 100%)
blu_ratio                 0.000000,0.000000,1.000000        (leave alone, blue ratio 100%)
saturation               1.100000                      (this controls saturation, how strong colours look/bleed, don't set too high or colours get distorted)
offset                     0.000000,0.000000,0.000000        (I don't use, suppose to offset strength of red,blue,green)
scale                      1.050000,1.050000,1.050000        (this controls brightness control, don't set too high or colours get distorted)
power                     1.150000,1.150000,1.150000        (this controls contrast control, where 1.0 = 100%)
floor                       0.000000,0.000000,0.000000        (this controls gamma control, I don't use it as colours get washed out, if you set it too high colours get distorted)
phosphor_life           0.200000,0.200000,0.200000        (can create a ghosting effect on fast moving pixels, up to you if you like or not?)

The game will be shown in correct aspect ratio at correct resolution of 4x magnification and look like this:
This is a screenshot of an 'shadow mask without scanlines'
But what about Vertically orientated games, how do I get them looking perfect?
For all 320x240 Vertically orientated (240x320) games run at a 4x magnification for final resolution output of 1280x960:
Unfortunately there is only one way to get a perfect distortion free HLSL image with Vertically orientated games. You must have a monitor that you can move to a vertical position. If your monitor does not rotate but is wall mounted then perhaps you could investigate if you can get a vertical mounting bracket. My monitor can be rotated and these are the steps I follow to get a perfect image;
1. Follow exactly the same instructions as for Horizontally orientated games.
2. Once you have the game running in MAME for the first time, you need to press the [Tab] key to bring up the 'in-game menu'. Then select and [Enter] into the 'video options' sub menu. From here you can select the 'Rotate' option and change it to either 'CCW 90degrees' or 'CW 90degrees'. Press the [Tab] key again to exit out of the 'in-game menu'. MAME will remember your selection from now on.

Your game would look like this before monitor rotation:
This is a screenshot of an 'shadow mask without scanlines'
Your game would look like this after monitor rotation:
This is a screenshot of an 'shadow mask without scanlines'
How Do I Know If Everything Is Working As It Should be?
Here are some screenshots that show you what it looks like when everything is working properly and when it is not: http://www.mediafire.com/?15yc6j7zvaumucv   Notice there is no banding of the displayed 'overlay' when it is working properly.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings that work with each different resolution is a long, difficult, and slow
process. If you think you can contribute or help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please do not steal or plagiarism my work or settings without crediting me. Otherwise I will
take everything offline for my private friends and personal use only. I have put alot of time
and effort into all of this and would prefer if people would just point others towards my blog.


Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.

Saturday 5 November 2011

NEW JClampy's NEO GEO MAME HLSL Setup

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings that work with each different resolution is a long, difficult, and slow
process. If you think you can contribute or help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please do not steal or plagiarism my work or settings without crediting me. Otherwise I will
take everything offline for my private friends and personal use only. I have put alot of time
and effort into all of this and would prefer if people would just point others towards my blog.

Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.
Tested with versions 0.143u5 through to 0.143u9
Getting a perfect HLSL setup with NEO GEO games under MAME is complicated enough to require it's own section. After indepth research and testing there is only one way to get HLSL working properly with these games, the following instructions will show you how:

Version 2.0
* Super High Quality .png files.
* Perfect 'tiling' pattern ensures no gradient or banding artifacts with horizontal or vertical scrolling games.
* No 'warping' or 'pinching' effects ensure a crystal clear game image that is easier to look at.

First you need to choose whether you want a 'shadow mask' or an 'aperture grille' pattern. I recommend the 'shadow mask' when used without scanlines and the 'aperture grille' with scanlines. The 'shadow mask' creates a honeycomb type of pattern which is great by itself. Whereas if you prefer a crosshatch pattern then an 'aperture grille' when combined with scanlines will accomplish this. A 'shadow mask' without scanlines is my current personal preference.

ShadowMask = JClampy_NEO_GEO_ShadowMask4x_v2.0.png
ApertureGrille = JClampy_NEO_GEO_ApertureGrille4x_v2.0.png
Both included in file here: http://www.mediafire.com/?pnq0yqn1tx7xdn0

I have a square screen, not a widescreen, so have not tested with widescreen displays. If you use a widescreen and can't get desired effects then first try running MAME in a window and not fullscreen. If that does not work then you may have to use MAME's 'Border Artwork' feature to get the game image displayed in a correct aspect ratio window. I plan to release some custom widescreen borders tomorrow. Also, if you have not used HLSL before you might like to read my quick start guide here; http://gamingnos.blogspot.com/2011/10/quick-start-mame-hlsl-filter-guide-up.html

These settings should be set like this when using HLSL:
mame.ini
effect              none     (old visual effects off, aka 'visual effects')
scale_effect     none     (old visual effects off, not in all MAME variants, aka 'image enhancement')
switchres           1        (enable resolution settings, aka 'switch resolutions to fit')
sleep                 0        (power saving sleep mode off, aka 'sleep when possible')
video               d3d       (video output method set to Direct3D)
keepaspect        1         (maintain aspect ratios, aka 'enforce aspect ratio')
prescale             1        (no software prescale, aka 'scale screen')
hwstretch           0        (hardware stretching off)
d3dversion         9        (Direct3D version 9 required when using the HLSL filter)
filter                  0        (bilinear filtering off)
artwork_crop      0        (crop border artwork off)

For all NEO GEO games run at a 4x magnification for final resolution output of 1280x960:
mame.ini
aspect ratio      4:3       (correct aspect ratio for our final display output)
resolution    1280x960   (our final display output resolution)
view         pixel aspect  (keep to NEO GEO games aspect ratio 320x240 = 10:7)

hlsl.ini
hlsl_prescale_x         2      (2x zoom by video hardware)
hlsl_prescale_y         4      (4x zoom by video hardware)
hlsl_snap_width     1280    (rendered snapshots resolution must be the same width as our display output)
hlsl_snap_height     960     (rendered snapshots resolution must be the same height as our display output)
shadow_mask_alpha      0.250000     (my personal preference when not using scanlines)
shadow_mask_texture     JClampy_NEO_GEO_ShadowMask4x_v2.0.png *OR* ...ApertureGrille4x_v2.0.png
shadow_mask_x_count       1
shadow_mask_y_count       2
shadow_mask_usize      1.000000
shadow_mask_vsize      0.750000
curvature       0.000000      (I recommend disabling this unless you like the moiré effect)
pincushion      0.000000     (I recommend disabling this unless you like the moiré effect)

Caveats:
1. 'hlsl_prescale_x' & 'hlsl_prescale_y' preferably you should use either 2, 3, or 4. I advise against 1 as it produced blurriness and 0 disables prescale altogether. Having an 'x' of 2 and 'y' of 4 creates a nice balanced image. Both 'x' & 'y' at 4 increases image sharpness, whereas both 'x' & 'y' at 2 increases image softness.
2. Although these may work in different combinations, you will probably notice a sharp reduction in quality if you change any of the following settings;
final display aspect ratio of 4:3 at resolution 1280x960 with hlsl_snap_width of 1280 and hlsl_snap_height of 960
shadow_mask_x_count       1
shadow_mask_y_count       2
shadow_mask_usize         1.000000
shadow_mask_vsize          0.750000
3. You can safely change the following setting to your own personal preference;
shadow_mask_alpha         0.250000
4. Due to the fact that 'standard 4:3' view or 'stretched'/'chopped'/'cocktail' views distort the display of the shadow mask or aperture grille .png files it is advised only to use the 'pixel aspect' view or use my custom borders.

If you would like scanlines (especially nice with an aperture grille), here are my personal preference settings;
hlsl.ini
shadow_mask_alpha         0.100000        (I recommend using a lower number for the shadow mask or aperture grille when using scanlines)
scanline_alpha                 0.400000        (visibility of scanlines; I recommend making them appear stronger than the shadow mask or aperture grille)
scanline_size                   1.000000        (this means that every row of pixels will have it's own scanline; ratio of scanlines to image lines)
scanline_height                0.400000        (I recommend using thin scanlines that do not cover too much of the original games image)
scanline_bright_scale        1.000000        (brightness of the non scanlined areas. I recommend leaving this setting at 1)
scanline_bright_offset       0.000000        (unknown, not needed at the moment)
scanline_jitter                  0.000000        (I don't use, makes scanlines shimmer up and down; can cause nausea for some people)

Here are the rest of my personal preference settings;
hlsl.ini
defocus                   0.000000,0.000000        (I don't use defocus as it only adds blurriness to your game image)
converge_x              0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
converge_y              0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
radial_converge_x     0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
radial_converge_y     0.000000,0.000000,0.000000        (I don't use, suppose to offset pixel position by colours)
red_ratio                 1.000000,0.000000,0.000000        (leave alone, red ratio 100%)
grn_ratio                 0.000000,1.000000,0.000000        (leave alone, green ratio 100%)
blu_ratio                 0.000000,0.000000,1.000000        (leave alone, blue ratio 100%)
saturation               1.100000                      (this controls saturation, how strong colours look/bleed, don't set too high or colours get distorted)
offset                     0.000000,0.000000,0.000000        (I don't use, suppose to offset strength of red,blue,green)
scale                      1.050000,1.050000,1.050000        (this controls brightness control, don't set too high or colours get distorted)
power                     1.150000,1.150000,1.150000        (this controls contrast control, where 1.0 = 100%)
floor                       0.000000,0.000000,0.000000        (this controls gamma control, I don't use it as colours get washed out, if you set it too high colours get distorted)
phosphor_life           0.200000,0.200000,0.200000        (can create a ghosting effect on fast moving pixels, up to you if you like or not?)

The game will be shown in correct aspect ratio at correct resolution of 4x magnification. It will appear in center of the screen and MAME will create borders around the outside; looking like this:

This is a screenshot showing an 'aperture grille with scanlines' and MAME default border's.
Some Neo Geo games only use the centermost 304 pixels, you mant want to enhance the look of the bordering (because as you can see above sometimes there are small glitches). To do this we can make use of MAME's 'Border Artwork' feature and use my custom built borders.

Here is a soft edged black border that I have created for a 'Centered Display'.

Version 2.0
*Super High Quality soft edged black borders.


***If you have a widescreen monitor you can use this custom border***
For Neo Geo 320x224 original game resolution output to 1280x896 4x magnification, inside a final output display resolution 1440x900:
You can get the file from here: http://www.mediafire.com/?v2g6ry8o8469jli
Then follow the same easy instructions as outlined below.

***If you have a square monitor you can use this custom border***
For Neo Geo 320x224 original game resolution output to 1280x896 4x magnification, inside a final output display resolution 1280x960:
You can get the file from here: http://www.mediafire.com/?boi35z9ebdts8q5
Then follow the same easy instructions as outlined below.

To make these custom borders an available option for all NEO GEO games follow these three easy steps;
1. Copy the .zip file to your Mame/Artwork folder.
2. Rename the .zip file to neogeo.zip so the border artwork will be an available option for all NEO GEO games inside MAME.
3. Inside the .zip file you also have to rename the 'change name to game zip name.lay' file to neogeo.lay
Follow the section below titled 'How do I tell a game to use the custom border?'

To make these custom borders available for only certain individual NEO GEO games follow these four easy steps;
1. Copy the .zip file to your Mame/Artwork folder.
2. Rename the .zip file so that it will have the same name as the 'MAME Game .zip Name' that you want to play. IE; "Twinkle Star Sprites" would be twinspri.zip this way the border artwork will be automatically initialised by MAME when you run that game.
3. Inside the .zip file you also have to rename the 'change name to game zip name.lay' file as well. So for this example rename it to: twinspri.lay
4. Note that if you set this up for a 'Parent' game then the custom border artwork will also be shared with all 'Clone' games that are listed under that 'Parent' game.
Follow the section below titled 'How do I tell a game to use the custom border?'

How do I tell a game to use the custom border?
Once you have the game running in MAME for the first time, you need to press the [Tab] key to bring up the 'in-game menu'. Then select and [Enter] into the 'video options' sub menu. From here you can select the new option; 'NEO GEO Border' by pressing [Enter] on it. Press the [Tab] key again to exit out of the 'in-game menu'. MAME will remember your selection from now on.

Your game should now look like this:
This is a screenshot of an 'shadow mask without scanlines' and JClampy's custom border's
How Do I Know If Everything Is Working As It Should be?
Here are some screenshots that show you what it looks like when everything is working properly and when it is not: http://www.mediafire.com/?k4sl4diob21u745   Notice there is no banding of the displayed 'overlay' when it is working properly.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Finding correct settings that work with each different resolution is a long, difficult, and slow
process. If you think you can contribute or help with this process then please contact me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please do not steal or plagiarism my work or settings without crediting me. Otherwise I will
take everything offline for my private friends and personal use only. I have put alot of time
and effort into all of this and would prefer if people would just point others towards my blog.


Special credit/thanks to Ryan Holtz aka 'Just Desserts', Bat Country Entertainment, cgwg and all those involved in creating and maintaining the HLSL filter for MAME and MESS.