Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

New MAME feature for those that compile


Brian Hoffman

Recommended Posts

*** This was taken from various posts at Mameworld.info--thought I'd share

HLSL_MiniFAQ by Tafoid (5-25-2011) - Updated (6-05-2011)

--------------------------------------------------------

In order to compile and use the HLSL features now available for MAME, there are a few things you need to know!

1. Compiling

1.1. Assure you have the very latest toolchain available from MAMEDEV.ORG.

http://mamedev.org/tools/

1.2. All files you need to compile are part of the toolchain, including the headers for the added DirectX usage.

1.3. Compiling is the same as has been for a long time now - simply type "MAKE" to create your executable. Use of ANY "ARCHOPTS" are strongly discouraged. Any crashes you might get when using any of those during your compile are no fault but your own!

1.4. The DIFF file includes the "HLSL" folder. This will be created in your compiling environment (if it doesn't exist already). It's up to you to move this folder and all it's contained *.FX files to the same folder where your playable MAME.EXE will reside.

2. Usage

2.1. The minimum requirements to be able to use this feature is that you have a video card/OS that:

A) Must have DirectX 9.0c installed from Microsoft.

B) Must have DirectX 9.0c compatible drivers installed.

C) Allows for the usage of Pixel Shader 3.0 functions.

2.2 Your performance is greatly enhanced by using graphics cards which contain more GPU memory and bandwidth. In cases for bare minimum usage (Geforce 6,7 Series, ATI Radeon R520/X1300–X1950, Intel GMA X3000 G965), you should expect that full screen HLSL shading effect will not be possible without severe frame-skipping. You can, however, run in a smaller window to allow many games to run at 100% with HLSL effects. Only by testing your particular setup can you find the optimum relation of size and performance.

If you want better performance for full-screen display and you aren't already using it, use the -switchres toggle which lowers your actual screen resolution resulting in less work that your card needs to do. For some, it makes a huge difference.

2.3 Triggered by: -hlsl_enable on the command-line or an entry in your MAME.ini: "hlsl_enable 1". This will allow you to use settings in your MAME.INI file or use the Slider Controls to adjust your own look. At this time, there is no facility to save these settings, so write down what you want to keep and put them manually into your MAME.INI. If you prefer per-game or per-driver settings, you can accomplish this by using the "setname.ini" or "drivername.ini". For example: "sf2.ini" or "cps1.ini".

Also, you can further refine by using settings split by orientation using "vertical.ini" and "horizont.ini",

2.4. Assure you have the HLSL folder (containing *.fx) placed in the same folder as your MAME.EXE in the same way you have roms/samples/artwork, for example. Your binary provider should have this folder included in it's package. If not, ask your binary provider for them or check out this thread linked below.

http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=255365

2.5 Many pixel shader effects that have been created require small .png files much like the previous and still available effect.png files. MAME 0.143 should include the most commonly needed ones. Until them, use this link:

http://mamedev.emulab.it/kale/fast/files/artwork.zip

2.6 If you are on Windows 7, running DirectX 10.0 or above, you may not have DirectX 9.0c installed on your system. DirectX 10 and above are known not to be backwards compatible in this instance. Even if you have DirectX 9.0c, you may be missing the SDK .DLL needed for this! If you are receiving an error mentioning such files as "dx9_43.dll" as missing, you need to install the DirectX End User Runtime SDK linked below.

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3

3. Settings

3.1. There is a document in the DOCS folder called HLSL.TXT which details what each new option does. This should be provided, again, by your binary provider.

3.2. There are a number of presets which have been created that mimic the most common monitor views. You can obtain these settings to add to your .INI from the links below.

http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=69832

http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=69633

More added as needed. Have fun!

255571-1.png

255741-uhhh.png

256333-hangon.png

255742-BULLSHIT.png

Link to comment
Share on other sites

It recreates what most arcade games looked like in the arcade.in the arcade days monitors that were in arcade cabs were of,well pretty low quality.xD and they all had scanlines.its just another way of faithfully recreating arcade games.

Link to comment
Share on other sites

hey brian, i'm not too sure what this does... could you quickly explain what it's good for?

does it add smoother scanline display?

From my understanding, these *.FX files are more than just scanline.png files, but adjustable text files that let you define the beam on vector games and the scanlines.

On high resolution displays these low res games have jagged edges, the scanlines give the games a more authentic look on todays hardware.

Each ROM can have its own FX file, making different games look different, no more one effect for all games.

Here are some settings: Note the below pic is from an LCD-- It has bowing around the edges to look like a CRT tube.

hlsl_enable 1
hlslpath hlsl
shadow_mask_alpha 0.1
shadow_mask_texture aperture.png
shadow_mask_x_count 512
shadow_mask_y_count 384
shadow_mask_usize 0.125
shadow_mask_vsize 0.125
oversample_x 1.0
oversample_y 1.0
curvature 0.05
screen_scale_top 1.0
screen_scale_bottom 1.0
pincushion 0.05
scanline_alpha 0.5
scanline_size 1.0
scanline_bright_scale 1.0
scanline_bright_offset 0.7
scanline_jitter 0.0
defocus_x 0.0
defocus_y 0.0
red_converge_x 0.0
red_converge_y 0.0
green_converge_x 0.0
green_converge_y 0.0
blue_converge_x 0.0
blue_converge_y 0.0
red_radial_converge_x 0.0
red_radial_converge_y 0.0
green_radial_converge_x 0.0
green_radial_converge_y 0.0
blue_radial_converge_x 0.0
blue_radial_converge_y 0.0
red_from_r 1.0
red_from_g 0.0
red_from_b 0.0
green_from_r 0.0
green_from_g 1.0
green_from_b 0.0
blue_from_r 0.0
blue_from_g 0.0
blue_from_b 1.0
saturation 1.5
red_offset 0.0
green_offset 0.0
blue_offset 0.0
red_scale 1.1
green_scale 1.1
blue_scale 1.1
red_power 2.2
green_power 2.2
blue_power 2.2
red_floor 0.05
green_floor 0.05
blue_floor 0.05
red_phosphor_life 0.45
green_phosphor_life 0.45
blue_phosphor_life 0.45
yiq_enable 0
yiq_w 4.1887902047863909846168578443727
yiq_a 0.5
yiq_b 0.5
yiq_fsc 1.5
yiq_fsc_scale 0.5
yiq_phase_count 2

Clipboard01.png

Its actually pretty sweet.

http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=69832

Link to comment
Share on other sites

Possibly not since you already have scan lines with the lower resolution (490p) of the TV.

Ah ok that makes sense. Can I use Headkaze's Mame compiler to compile this? I read the guide it's just somewhat confusing :huh:

Link to comment
Share on other sites

Ah ok. Guess I spoke too soon lol. I noticed I already compiled 142U4 and it included the HLSL folder etc.. Now where can I find info on the best settings to use for games like Metal Slug and Mortal Kombat II?

Link to comment
Share on other sites

Not sure but looks like there are some "presets" that have been submitted in one of the emulation forums here. This is the same link as the one at the end of Brian Hoffman's post.

Link to comment
Share on other sites

Not sure but looks like there are some "presets" that have been submitted in one of the emulation forums here. This is the same link as the one at the end of Brian Hoffman's post.

Cool thanks! I'll check them out :)

Link to comment
Share on other sites

Don't mean to bump the thread. But I'm having an odd problem. I'm not sure if it's normal or not. But when using the HLSL feature my games look like this

I call it a window blind shadow cause it looks like the shadows of window blinds lol. I tried the HLSL settings provided here http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=69832&page=2&PHPSESSID=5f0780c0512a7e8f8e39904ec185da97 on page 1 and 2 and but still no go :(

post-3682-0-07377700-1307856506_thumb.jp

Link to comment
Share on other sites

I guess this doesn't make sense for me either....I just biought a SLG 3000, a hardware scanline generator. The vector beam thing sounds nice though, I have problems getting AAE to run properly!

Link to comment
Share on other sites

It's best to compile a 0.142u5 to make use of the improved HLSL options and fixes. If you can sync up to the latest MESS SVN to see if any HLSL files have been updated. Alot of those posts on bannister were before u4 and so much has changed since then. I will attach the latest files in this post and share IMO best settings so far. Keep in mind you can use HLSL in MAME and MESS :)

hlsl_enable 1
hlslpath hlsl
hlsl_prescale_size 1
hlsl_preset -1
hlsl_write
hlsl_snap_width 1920
hlsl_snap_height 1200
shadow_mask_alpha 0.15
shadow_mask_texture aperture.png
shadow_mask_x_count 512
shadow_mask_y_count 384
shadow_mask_usize 0.09375
shadow_mask_vsize 0.09375
curvature 0.05
screen_scale_top 1.0
screen_scale_bottom 1.0
pincushion 0.05
scanline_alpha 0.75
scanline_size 1.10
scanline_height 0.60
scanline_bright_scale 1.70
scanline_bright_offset 0.60
scanline_jitter 0.15
defocus_x 1.5
defocus_y 1.5
red_converge_x -0.4
red_converge_y -0.6
green_converge_x 0.0
green_converge_y 0.0
blue_converge_x 0.0
blue_converge_y 0.0
red_radial_converge_x 0.0
red_radial_converge_y 0.0
green_radial_converge_x 0.0
green_radial_converge_y 0.0
blue_radial_converge_x 0.0
blue_radial_converge_y 0.0
red_from_r 1
red_from_g 0.0
red_from_b 0.0
green_from_r 0.0
green_from_g 1
green_from_b 0.0
blue_from_r 0.0
blue_from_g 0.0
blue_from_b 1
saturation 1.05
red_offset 0.0
green_offset 0.0
blue_offset 0.0
red_scale 1.20
green_scale 1.20
blue_scale 1.20
red_power 1.70
green_power 1.70
blue_power 1.70
red_floor 0.06
green_floor 0.06
blue_floor 0.06
red_phosphor_life 0.10
green_phosphor_life 0.10
blue_phosphor_life 0.10
yiq_enable 0
yiq_cc 3.59754545
yiq_a 0.5
yiq_b 0.5
yiq_o 0.0
yiq_p 1.0
yiq_y 3.0
yiq_i 1.2
yiq_q 0.6
yiq_scan_time 52.6
yiq_phase_count 2

0.142u5%20HLSL.png

0.142u5%20HLSL%203.png

0.142u5%20HLSL%202.png

hlsl.zip

Link to comment
Share on other sites

Well, I wonder how this would work on my PC CRT? Should make things look a bit better I suppose. Only problem is that it appears I'm on the low end of the performance chart for this to work very well. I've got an ATI X1300Pro which then would require lowering the resolution. Since CRT's can drop to lower resolutions and still take up a full screen, would this be a viable path to better looking racing games?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...