MAME HLSL CRT SCANLINE EMULATION PRESETS

The place for all discussion on gaming hardware
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

cmoses,

I'm using Radeon 6850.
It was a mid-range video card when it was released, and now it's worth $75 on ebay.
I'll see what I can do with Toobin.










*EDIT*
According to test results up to this point,
prescale 0 is identical to
prescale 1.


hlsl_prescale_y 0 is 224 x 4.82 (auto) = 1080
1080 ⇒ 1080p

hlsl_prescale_y 3 is 224 x 3 = 672
672 ⇒ 1080p



Image

If you think you've found the number you like the most, try looking at it again very far away from the monitor.
You will probably see some line patterns.
If you still don't see it, try middle-button click on your mouse to simulate vertical scroll.
(I've wondered if I would ever arrive at using that button, and now I know.)

And this is only for 384 x 224 games on 1080p monitor,
240, 384, 480 resolution games make this entire situation more complicated.




I think this is one of those things that everyone feels different in terms of the "best" setting,
so I'll just leave it at 0 when the next version of INI creator is released.
Last edited by NUeda on Sun Jan 05, 2014 10:22 pm, edited 8 times in total.
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

bulbousbeard wrote:Just so you guys know, I spoke with Mooglyguy, and he agrees that the default HLSL settings suck ass.

If you guys can come to some consensus about what the default settings should be, I'll submit a diff to get it added to MAME.
He's welcome to use mine: http://wiki.arcadeotaku.com/w/User:Cool ... L_Settings

Critical that the default gamma is dropped from 1.0 though.

I'd quite like the curved corners patch as well, I've not managed to get that one working.
Image
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

I always use the curved corners edited post.fx file now. Not sure how this would be able to get implemented into mame as you physically have to edit the post.fx file....unless an option could be added to the hlsl section of the Mame ini file
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

Post.fx is part of HLSL. I mean enable it permanently, much like the filtering was fixed
Image
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

cools wrote:Post.fx is part of HLSL. I mean enable it permanently, much like the filtering was fixed
Yeah only things is maybe some wouldn't like the curved corners and slightly bowed screen, i love it but others may not. Guess the idea situation would be to have an option to enable or disable and then other settings to adjust it when its enabled
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

The pincushion should be on. Curved corners should be as well. Bowing the screen to simulate an angle shouldn't be ;-)
Image
bulbousbeard
Posts: 110
Joined: Sun Nov 03, 2013 5:17 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by bulbousbeard »

Some nice progress on HLSL just got checked in. This bug has been in there forever.

http://www.mameworld.info/ubbthreads/sh ... art=1&vc=1
User avatar
nesrulz
Posts: 182
Joined: Wed Nov 13, 2013 6:01 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by nesrulz »

Does anyone know what this error (GFX op) mean?

My current solution is: restart the game until you pass without this error.

Image

UME 0.151 here.
My HLSL settings: http://shmups.system11.org/viewtopic.ph ... 26#p970926

Maybe the problem is in my GFX drivers?
nVidia 9600 GT (314.22) here...

btw, this error does not occur on one specific game, of course.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

NUeda wrote: prescale 0 is off.
prescale 1 is on.

hlsl_prescale_y 0 is 224 x 4.82 (auto) = 1080
1080 ⇒ 1080p

hlsl_prescale_y 3 is 224 x 3 = 672
672 ⇒ 1080p



Image

If you think you've found the number you like the most, try looking at it again very far away from the monitor.
You will probably see some line patterns.
If you still don't see it, try middle-button click on your mouse to simulate vertical scroll.
(I've wondered if I would ever arrive at using that button, and now I know.)

And this is only for 384 x 224 games on 1080p monitor,
240, 384, 480 resolution games make this entire situation more complicated.




I think this is one of those things that everyone feels different in terms of the "best" setting,
so I'll just leave it at 0 when the next version of INI creator is released.
So what are we saying then that prescale should be left as '0' (Auto)?.

Im not not sure if the 'prescale' option (not the prescale option in the hlsl section) is an ON (1) or OFF (0) setting, as to me it seems that its a value setting not an on/off setting, as i can see visual differences from when i set it from '1' to say '3'.

I just wanted to distinguish what effect the prescale option has compared to the 2 prescale options in the hlsl section of the ini file?
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

NUeda wrote:
The total number of systems supported hasn't grown much yet.
And even when a system is supported,
there could be a few odd games that I overlooked which need a different setting.
Segas32.c is like that, most of its games fit under the same HLSL preset, but some need a different preset.


Tell me exactly what game you want, then I could look into that first.
I was asked to deal with really old games first (Donkey Kong, Galaga, Joust)
and those are all supported now.
Thanks NUeda, here are a few that i play regularly that are not yet supported....

Code: Select all

Name: Outrun
Driver: Segaorun.c
Year: 1986
Developer: Sega

Name: Space Harrier
Driver: Segahang.c
Year: 1985
Developer: Sega

Name: Super Hang On
Driver: Segahang.c
Year: 1987
Developer: Sega

Name: Ninja Spirits 
Driver: M72.c
Year: 1988
Developer: IREM

Name: Dragon Breed
Driver: M72.c
Year: 1989
Developer: IREM

Name: Chase HQ
Driver: Taito_z.c
Year: 1987
Developer: Taito

Name: Special Criminal Investigation
Driver: Taito_z.c
Year: 1989
Developer: Taito

Name: The Ninja Warriors
Driver: ninjaw.c
Year 1988
Developer: Taito

Name: Elevator Action Returns
Driver: Taito_f3.c
Year: 1994
Developer: Taito

Name: Metro-Cross
Driver: Baraduke
Year: 1986
Developer: Namco

Name: Pac-Land
Driver: pacland.c
Year: 1984
Developer: Namco

Name: Rolling Thunder
Driver: Namcos86.c
Year: 1986
Developer: Namco

Name: Rolling Thunder 2
Driver: Namcos2.c
Year: 1990
Developer: Namco

Name: Rygar
Driver: Tecmo.c
Year 1986
Developer: Tecmo

Name: Ninja Gaiden/Shadow Warriors
Driver: Gaiden.c
Year: 1988
Developer: Tecmo

Name: Metamorphic Force
Driver: Mystwarr.c
Year: 1993
Developer: Konami

Name: Aliens
Driver: Aliens.c
Year: 1990
Developer: Konami

Name: Battletoads
Driver: Btoads.c
Year 1994
Developer: RARE
Also would it be at all possible in the next release to add in the edited, 'Post.fx' file from the HLSL folder, than enables the rounded corners, to give this effect....

Image

The edited post.fx file can be found here....

https://dl.dropbox.com/u/5414984/mslug- ... er/post.fx
(Might want to take out the '// -- Light Reflection --' section as im not a fan of the light reflection effect thats added)

Please note in order to get the above to work 'pincushion' need to be set to 0.2 or 0.3 and 'curvature' need to be set to 0.15.

Full thread on this over at AEP forums....

http://www.aep-emu.de/index.php?name=PN ... torder=asc

Might want to added a 'Yes' or 'No' option for the rounded corner look to the batch file process if you decide to add it, as not everyone may like it!?
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

That forum's settings are nice too and well thought out - moogly should consider those for the default. Shadow mask, not aperture though.
Image
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

cools wrote:That forum's settings are nice too and well thought out - moogly should consider those for the default. Shadow mask, not aperture though.
You think the Shadow mask.png looks better than the defualt aperture.png then?. Have you tried the other 2 on that page, 'slot mask' & 'aperture grille' ?
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

Yes, I vastly prefer shadow, although I think its one of the ones that will only come into its own on super high resolution screens. All my arcade CRTs are shadow mask.

Try rendering some screensnaps with it in mame.
Image
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

cools wrote:Yes, I vastly prefer shadow, although I think its one of the ones that will only come into its own on super high resolution screens. All my arcade CRTs are shadow mask.

Try rendering some screensnaps with it in mame.
Yeah the crt_shadow_mask.png does look good. With that this is the hlsl settings i use which might be a good starting point for a possible default hlsl setting...

Code: Select all

prescale                  1
waitvsync                1

## DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable               1
hlslpath                  HLSL
hlsl_ini_read             0
hlsl_ini_write            0
hlslini                   %g
hlsl_prescale_x           0
hlsl_prescale_y           0
hlsl_preset               -1
hlsl_write                
hlsl_snap_width           1920
hlsl_snap_height          1080
shadow_mask_alpha         0.075
shadow_mask_texture       crt_shadow_mask.png
shadow_mask_x_count       -3
shadow_mask_y_count       -2
shadow_mask_usize      0.375000
shadow_mask_vsize      0.250000
curvature                 0.0
pincushion                0.3
scanline_alpha            1.2
scanline_size             1.0
scanline_height           1.5
scanline_bright_scale     1.0
scanline_bright_offset    0.0
scanline_jitter           0.0
defocus                   0.3,0.3
converge_x                0.2,0.0,0.0
converge_y                0.0,0.0,0.0
radial_converge_x         0.2,0.0,0.0
radial_converge_y         0.0,0.0,0.0
red_ratio                 0.85,0.15,0.0
grn_ratio                 -0.05,1.05,0.0
blu_ratio                 -0.025,-0.025,1.05
saturation                1.3
offset                    -0.15,-0.16,-0.16
scale                     1.15,1.16,1.16
power                     1.1,0.95,0.8
floor                     0.01,0.01,0.01
phosphor_life             0.0,0.0,0.0

#
# NTSC POST-PROCESSING OPTIONS
#
yiq_enable                0
yiq_cc                    3.59754545
yiq_a                     0.5
yiq_b                     0.5
yiq_o                     1.570796325
yiq_p                     1.0
yiq_n                     1.0
yiq_y                     6.0
yiq_i                     1.2
yiq_q                     0.6
yiq_scan_time             52.6
yiq_phase_count           2

#
# VECTOR POST-PROCESSING OPTIONS
#
vector_length_scale       0.9
vector_length_ratio       500.0

#
# BLOOM POST-PROCESSING OPTIONS
#
vector_bloom_scale        0.32
raster_bloom_scale        0.17
bloom_lvl0_weight         1.0
bloom_lvl1_weight         0.21
bloom_lvl2_weight         0.19
bloom_lvl3_weight         0.17
bloom_lvl4_weight         0.15
bloom_lvl5_weight         0.14
bloom_lvl6_weight         0.13
bloom_lvl7_weight         0.12
bloom_lvl8_weight         0.11
bloom_lvl9_weight         0.10
bloom_lvl10_weight        0.09
This is on a 2560x1440 display though, so not sure if it would look different on a 1080p display......but then not everyone would have a 1080p display, some might have 720p or 1200p displays so this is a mote point i guess when it comes to trying to figure out a good default hlsl setting that mame should use that is good across the range of game. Your always going to get it to look better if you have specific ini files for each game, but this is where NUeda comes in :), but for the less enthusiastic, the above might be acceptable....well its a damn sight better than the current default setting and to the less informed they might think hlsl is a load of bollocks atm until they can see what it can really do. But i really think mame should use this crt_shadow_mask.png over the current default aperture.png
Last edited by lettuce on Tue Jan 07, 2014 8:07 pm, edited 1 time in total.
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

Lettuce,

you were right. they do look different.
I did some test and saw for myself that prescale 0 is not off.

prescale 0 and 1 seem to give the same picture
(only hlsl_prescale x, y will change anything for them)
and
from prescale 2 or higher, the output starts changing,
so at this point, the number of possible combinations grow very quickly.




Right now I don't know how to interpret this, but among the following numbers,

A. prescale 5, hlsl_prescale_x 0, hlsl_prescale_y 0
B. prescale 5, hlsl_prescale_x 0, hlsl_prescale_y 1

C. prescale 0, hlsl_prescale_x 0, hlsl_prescale_y 5
D. prescale 1, hlsl_prescale_x 0, hlsl_prescale_y 5

A, B are exactly the same,
C, D are exactly the same,
but A, C are very very slightly different.

Perhaps prescale 5 puts in number 5 for both hlsl_prescale_x, y,
but I'm not certain yet. Further testing is needed.










I tried using post.fx and absolutely love the results,
but I personally feel a bit icky about using a batch script to automatically insert
the altered post.fx which still has the same name with post.fx in the default MAME package.

This is not about the hassle of renaming files or putting them in different folders,
I have no problem with that.

I'm concerned about possibly "breaking" (well, more like improving, but still)
existing MAME installations for users that are unaware of the situation.

I also seem to recall that post.fx was sensitive to a certain point in MAME version transitions.



So unless there is a way to make MAME look at a file name that's different from post.fx,
I want to leave this process up to the end-user.
I'm personally using the fixed post.fx too, but I don't want to automate the file swap.





And this is just my opinion,
but I think it would be better for most people if the settings were optimized for 1080p display,
simply because that's the standard for HDTV's, and
a lot of monitors will support that resolution, either natively or resized or unresized 1:1.

In your case, perhaps you could tell MAME to
output to 1920x1080 or 1440x1080 window for testing purposes.



I will look into the games on your list soon, so stay put.
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

NUeda wrote:I will look into the games on your list soon, so stay put.
Thanks NUeda!.

Regarding the prescale settings, i have have set the main prescale to '1' and left the hlsl_prescale_x & y at '0'. With this CRT_Shadow_Mask.png file i am more than happy with the results. Adding any hlsl_prescale_x & y other than '0' just seemed to give that scanline anomaly you mention at the top of this page, but with it left at '0' in the hlsl section i havent noticed this effect at all, so i will be leaving mine at '0'. Adding anything more than 3 will put the average system under a massive amount of stress and will just end up effecting the performance of MAME.
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

cmoses,

There's some bad news.
I don't think Toobin' can look good on 1080p monitors (or HDTV) if you keep the scanlines enabled.

Image
810 x 1080



Toobin' with scanlines takes up 768x1024 and
there is just no way to make the lines look clean on a 1080p monitor,
unless you play the game in a window
or use a non-official version of MAME to do use an area of exactly 768x1024 even in fullscreen mode.

Image
768 x 1024 windowed

Image
768 x 1024 windowed





If your monitor is 1080p and it rotates vertical,
then you can get a screen output that's borderline acceptable.

Image
1440 x 1080 rotated





So your options boil down to:

768 x 1024 windowed

Code: Select all

pincushion	0.0

scanline_jitter	0.0

hlsl_prescale_x 2 
hlsl_prescale_y 2 

window	1

resolution	768x1024
or

1440 x 1080 rotated

Code: Select all

pincushion	0.0

scanline_jitter	0.0

hlsl_prescale_x 2
hlsl_prescale_y 4

window   0

ror	1
I am aware these hlsl_prescale_x,y numbers are high
but the lines looked blurry/messy with all of 0, 1, 2, 3, especially for 1440 x 1080 rotated.

Playing this game with HLSL will require a 1080p~1440p monitor and a mid-range GPU. :(
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

NUeda,

Thanks for looking into it. I will be playing it on a 19" rotated monitor which is native 1280x1024. I may try running it at 1024x768 to see how it looks.

I think all of the medium resolution games may be problematic. The scan lines on Popeye are also very bad. A lot of moire and patterning. I think Popeye runs at 512x448. Toobin' I think is 512x384. Both ran on medium resolution arcade monitors. I think that having the scan lines at higher resolutions is more likely to cause the patterning to appear.

Does anyone know any other medium resolution games to test?
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Fudoh »

If you have a PC strong enough to run them, all the mid 90s Sega Racing games are 384p. Sega Rally for example.

I wouldn't aim for scanlines for 384p titles. The mask pattern alone should do fine. If you're going from 15 to 24khz on a dual-chassis arcade cab, it's hard to see clear scanlines on the 24khz titles.
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

No need for scanlines on 24k games.
Image
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Tatsuya79 »

I've been trying a lot of settings with HLSL like those in this thread and my conclusion is... that's too precise!
I mean the shadowmask never scales as it should on my 1080p screen and making it fit a "rendered pixel" with its pattern for each game different resolution is just a nightmare.
Some issues with the scanlines are also a concern.
I don't want to say it's completely bad and I use it rather than a simple scanline effect but I'm more convinced by shaders and CGWG work.

Did you guys try Retroarch with Mame2013 core?
A huge advantage it has is its "Hard GPU sync" option: you can play games with vsync on at a response time comparable to Mame standalone with vsync off.
It still has some rough edges though, like you need to rotate the game in Mame then rotate the opposite in Retroarch GUI to obtain vertical scanlines for vertical games (yeah, quite an annoyance when you like shmups).

But to come back to this CRT emulation subject, cgwg crt-geom-flat shader has some advantages over HLSL:

-a lot less moiré in the scanline pattern (there's an option to use a "gaussian beam profile" that makes the scanlines less precise than a 3x oversample, which in the end gives a better result in certain scenarios by softening the pattern, or you can go with integer scale...)

-it does interpolation in linear gamma, that's a really great feature which makes brighter colors wider than darker ones (I believe, something like that!).
It gives a feeling I never had in emulation before, see those pictures here: this is bilinear + scanline, here cgwg shader with this effect.
That looks a lot like what I remember on a real snes with one of those CRT low res monitors we had at this time. Best picture quality I remember.

-the shadowmask is just a simple trick of coloring one pixel slightly green the other magenta. It gives the feeling of it and it's working for every resolution which is a huge advantage over all the tweaking hlsl needs. Yeah, you can call it fake though! :p
Only issue is yet again with vertical games as they stretches the pixels, but you can comment this effect off in the shader file.

You can still use the mame GUI inside retroarch to tweak brightness/contrast and achieve quite the same result as hlsl offset/scale/power settings (I've been testing this, thought it was different at first but that's quite the same).

Well, that's it. Just wanted to gave you guys a bit of my personal experience as I enjoyed reading your tweakings in this thread. :)
User avatar
lettuce
Posts: 1334
Joined: Wed Jun 22, 2011 7:10 pm
Location: Bedfordshire, England.

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by lettuce »

Yeah I was going to ask weather scanlines are noticable on mid range monitors?.

I believe Rampage, 720 and stun runner are all mid range displays, a fair few Atari games from mid to late 80s were mid range I believe.

Regarding Toobin, would altering the horizontal stretch option within the video options (tab) inside Mame make the full screen image on a LCD anymore pleasing?
LRa
Posts: 112
Joined: Thu Mar 17, 2005 1:29 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by LRa »

I've been reading this thread for the last hour trying to figure out good hlsl settings.

Still can't figure out what's recommended.

Sould I use NUeda ini creator to create some presets? If so, what about the default mame.ini for games not found in his ini creator?

Thanks in advance.
takeda
Posts: 1
Joined: Tue Jan 07, 2014 7:32 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by takeda »

Hi!!
Could someone paste good HLSL settings for 80's games. I am using 0.146 version. I tried many settings but i am not satisfied :)
Scarhelm
Posts: 8
Joined: Mon Apr 15, 2013 3:53 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Scarhelm »

LRa - yeh it will be best to use the ini creator, and use the settings above by lettuce in the default mame.ini, maybe put scanline_height to 1.0 however

takeda - hlsl has been updated abit in mame since 0.146 and the settings are abit different now. probably best to update mame i know some of the roms need updating which can be a pain sometimes, maybe someone else will be able to give you some settings for .146
LRa
Posts: 112
Joined: Thu Mar 17, 2005 1:29 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by LRa »

When using the INI creator, should it take time/is there some kind of message?

I ran the bat file, and after pressing any key, it closes the window right away. Normal?
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Fudoh »

Dell 4K 28" monitor for $699. Let's see how the lag turns out. If it's fine, this could make a great MAME display.

http://en.community.dell.com/dell-blogs ... ID=3891137
User avatar
cools
Posts: 2055
Joined: Mon Nov 26, 2007 4:57 pm
Location: South Wales
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cools »

Tatsuya79 wrote:-a lot less moiré in the scanline pattern (there's an option to use a "gaussian beam profile" that makes the scanlines less precise than a 3x oversample, which in the end gives a better result in certain scenarios by softening the pattern, or you can go with integer scale...)

-it does interpolation in linear gamma, that's a really great feature which makes brighter colors wider than darker ones (I believe, something like that!).

-the shadowmask is just a simple trick of coloring one pixel slightly green the other magenta. It gives the feeling of it and it's working for every resolution which is a huge advantage over all the tweaking hlsl needs. Yeah, you can call it fake though! :p
Only issue is yet again with vertical games as they stretches the pixels, but you can comment this effect off in the shader file.
I get zero moire with the scanlines in MAME. It only becomes visible with the shadowmask pattern IF enabling pincushion as well. This will go away with higher resolution displays.

The interpolation feature you describe is bettered by MAMEs blooming effect.

And third: eww.
Fudoh wrote:Dell 4K 28" monitor for $699. Let's see how the lag turns out. If it's fine, this could make a great MAME display.
Getting there, certainly.
Image
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Tatsuya79 »

cools wrote: I get zero moire with the scanlines in MAME. It only becomes visible with the shadowmask pattern IF enabling pincushion as well. This will go away with higher resolution displays.

The interpolation feature you describe is bettered by MAMEs blooming effect.
Scanlines never look great on my end with HLSL, even with shadowmask and pincushion off.
Just watching the vertical scrolling of sf2ce intro shows it whatever my settings are (except reducing scanlines darkness under 0.5, which is not great).

I don't think bloom does anything comparable.
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

lettuce,

In your case you should indeed be using 0 (auto) for hlsl_prescale_x, y.
It would be the same as using

Code: Select all

hlsl_prescale_x 6
hlsl_prescale_y 6.4286
1920 = 320 x 6
1440 = 224 x 6.42857..
(1920:1440 = 4:3)

On top that, for 240 resolution games, you would be getting PERFECT scaling of scanlines.
1440 = 240 x 6
1440 = 480 x 3 (240 + scanlines)

I should have clarified the reason behind the high numbers I was using,
they're meant to upscale by clean integers (for perfect scaling) and then downscale to 1080p output.

I'm testing these settings for 1080p, because that's the standard right now for HD video resolution.
I'm not testing for any other resolutions. (720p, 768p, 1200p, etc.)





Fudoh, cools,

Thank you for the input.
So all those 512 x 384 resolution games don't need scanlines...
Does this mean 31 KHz games show no distinct scanlines either?

And wow,
Dell 4K 28" monitor for $699. Let's see how the lag turns out. If it's fine, this could make a great MAME display.
that's a very good news, 4K is finally becoming widely available.






Tatsuya79,

I've tried Retroarch just now, and I loved how some of the presets looked exactly like composite input (RCA yellow) on a TV.
Can you tell me if it's possible to adjust individual colors (R,G,B separately) in Retroarch ?

Also, what display resolution are you using for MAME HLSL?






LRa,

Image

This is the last screen you should see and it should just sit there waiting for your response.
Are you pressing right arrow (->) on the keyboard?
Because that will just process the batch and close the window without waiting for you.

And what is the name of the game you're trying to add that's not handled by INI creator yet?






takeda,

Please consider upgrading to 0.152,
this is important because HLSL in 0.152 looks quite different compared to 0.146.
Post Reply