MAME HLSL CRT SCANLINE EMULATION PRESETS

The place for all discussion on gaming hardware
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 »

Overkill wrote:Ok, everytime i use MAME it works great launching the first game rom, wherever game is. After quiting game and everytime i try to launch a second game, even if is the same game i get error:

"Unable to create the Direct3D device (8876017C)"

And then MAME stops working and i get back to desktop. If i return to MAME anygame will launch at first time.

This juts happens with HLSL on, and direct3d, changing to directdraw stops the problema, but its goodby to HLSL effects.

I tyied a fresh INI file, changing deskop resolution, updating my vídeo card drivers, getting last DirectX drivers and nothing works on this issue.

Any tip?
Ah that's a known bug in the latest release of mame (not just groovyMAME) with HLSL, basically you can only launch one game, have to close the program down and open up and the nlaunch ya next game. Hopefully will be fixed in the next release
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:The snap width and height are for screenshots.

Shadowmask is tough to set - it's supposed to be set to the highest resolution the tube you're trying to simulate can support based on the dot pitch, but finding out that information is not straightforward, it might even be impossible.

It must definitely be set in a 4:3 ratio though.

1920x1080 is too low to do a worthwhile shadowmask effect, so I found when messing around with HLSL that the best compromise was to set it to about 1.5-1.75x the resolution of a low res game - 480x360 seemed good, with the transparency turned down.
I guess this could explain why some games look perfect with HLSL and some don't look as good??

It would be good if the info was attainable for all the main stream tubes used in cabs so then maybe a preset could be made for each tube and then mame would use this depending on what game you loaded
User avatar
Overkill
Posts: 512
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

I guess this could explain why some games look perfect with HLSL and some don't look as good??

It would be good if the info was attainable for all the main stream tubes used in cabs so then maybe a preset could be made for each tube and then mame would use this depending on what game you loaded

Yes, maybe because of the diferent games resolution. Neogeo games can look great, and CPS1 not, for exemple. It seems hard to have only one settings for all games. But its getting better. The settings in the first post are you actual setting or have you changed something meanwhile?
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 »

No, still using the same settings, and change the settings cools suggested
Scarhelm
Posts: 8
Joined: Mon Apr 15, 2013 3:53 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Scarhelm »

nice settings,

id suggest tuning saturation down abit and power 1.2,1.2,1.2, adds alot of depth/richness to the colour rather than it being abit washed out.
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 »

New settings. I basically sat in front of a bunch of arcade CRTs and tried to average them out. HLSL doesn't quite get the radial convergence like a CRT as far as the corners are concerned, but it's pretty close. Looks fantastic in 1080p. I've tried at 768p as well, and that looks good too but you need to drop the defocus value to 0.5 or it's not sharp enough.

There are a few tricks in here I'm pretty sure you won't see anywhere else ;)

Code: Select all

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           2048
hlsl_snap_height          1536
shadow_mask_alpha         0.200000
shadow_mask_texture       aperture.png
shadow_mask_x_count       320
shadow_mask_y_count       240
shadow_mask_usize         0.09375
shadow_mask_vsize         0.109375
curvature                 0.000000
pincushion                0.050000
scanline_alpha            1.000000
scanline_size             1.000000
scanline_height           1.000000
scanline_bright_scale     1.300000
scanline_bright_offset    0.600000
scanline_jitter           1.950000
defocus                   1.000000,0.000000
converge_x                -0.100000,0.000000,0.100000
converge_y                0.100000,0.000000,-0.100000
radial_converge_x         1.300000,0.000000,-1.300000
radial_converge_y         -0.300000,0.000000,0.300000
red_ratio                 1.000000,0.000000,0.000000
grn_ratio                 0.000000,1.000000,0.000000
blu_ratio                 0.000000,0.000000,1.000000
saturation                1.000000
offset                    0.000000,0.000000,0.000000
scale                     1.000000,1.000000,1.000000
power                     1.000000,1.000000,1.000000
floor                     0.000000,0.000000,0.000000
phosphor_life             0.200000,0.200000,0.200000
yiq_enable                0
yiq_cc                    3.597545
yiq_a                     0.500000
yiq_b                     0.500000
yiq_o                     0.000000
yiq_p                     1.000000
yiq_n                     1.000000
yiq_y                     6.000000
yiq_i                     1.200000
yiq_q                     0.600000
yiq_scan_time             52.599998
yiq_phase_count           2
Last edited by cools on Thu May 02, 2013 10:50 pm, edited 3 times in total.
Image
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 »

Would you mind to accompany those settings with a 1080p screenshot for those of us with no MAME setup running right now ? Pretty please ?
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 »

It's bloody awkward to do (have to stitch them together), but okay - give me a few mins.
Image
User avatar
Overkill
Posts: 512
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

As soon as i get home i will try the new cools settings, the last one i used from him was very good.
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 »

Here's SF2: https://docs.google.com/file/d/0BxaCVgx ... sp=sharing

A 4K screen would be nice to play with, I think we'd just about have enough resolution to do a really nice simulation - though it'd probably need a different apeture png.
Image
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 »

thanks a lot ! That's very aggressive scanlines. Did you check those on a tri-sync chassis ? A classic Nanao chassis doesn't look like this. Otherwise very nice though :mrgreen:
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 »

It depends on the game you're running in MAME - with TNZS the scanlining isn't as visible, and also it doesn't show up nearly as strongly in the emulation, the screenshot seems to make it stronger than it looks when running.

I'm actually driving the scanlines harder than you are able to in the GUI. I find if you don't all you get is the shadowmask effect with no scanlines at all, and that's no good.

Comparisons with a Nanao MS8-18, MS8-25, and a Toei 19".
Image
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 »

EDIT: Yeah, you're right. During tweaking I'd gotten used to them, so I've pulled them back to the strongest MAME can handle by default which looks a ton better.
Image
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 »

Image
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 »

excellent! Did you change the HLSL settings above for the lighter scanlines ? Never tried HLSL, so apologies, if the question sounds stupid. I assumed HLSL overrides the internal MAME settings completely for all visible effects.

Image
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. This one is using the maximum HLSL scanline value available within the GUI (the previous one used double the value, which can only be done by manually editing the INI), and I've updated the settings post.

I should do a crosshatch grid example as that highlights all the settings that are masked with a full colour image.
Image
User avatar
Overkill
Posts: 512
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

Excelent settings! i've just tested it and im loving it.
Thamiel
Posts: 180
Joined: Wed Feb 15, 2012 2:21 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Thamiel »

Absolutely love these settings. How feasible is it to port this exact look to something like BSNES or Kega Fusion? Definitely a noob question I know, but I want to build an emulation PC and would prefer a consistent look across all the various emulators.
fagin
Posts: 1654
Joined: Fri Mar 19, 2010 2:29 pm
Location: UK

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by fagin »

Looks good although I'm not sure about the jitter effect. None of my CRT's do it quite that obviously.
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 jitter depends on your screen I think. I was setting these on a 13" 1080p laptop and it's practically invisible, but fools my eyes as a kind of brightness/sparkle effect. Optional :D
Image
fagin
Posts: 1654
Joined: Fri Mar 19, 2010 2:29 pm
Location: UK

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by fagin »

In comparison here is SF2 PCB running on one of my Tri-Syncs (obviously in 15khz mode for this game).

Image

I like the 15khz image on my tri-sync set-ups.... which doesn't tend to over exaggerate scanline thickness.
fagin
Posts: 1654
Joined: Fri Mar 19, 2010 2:29 pm
Location: UK

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by fagin »

cools wrote:The jitter depends on your screen I think. I was setting these on a 13" 1080p laptop and it's practically invisible, but fools my eyes as a kind of brightness/sparkle effect. Optional :D

Ah OK. I'm using a 2.5k 30" LCD monitor and it's pretty "in ya face". Just checked against my arcade set-up and you have to get really close (even on the 29" CRT) to see any form of jitter.... which to be honest is pretty non existant.
User avatar
Overkill
Posts: 512
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

Absolutely love these settings. How feasible is it to port this exact look to something like BSNES or Kega Fusion? Definitely a noob question I know, but I want to build an emulation PC and would prefer a consistent look across all the various emulators.
I think actually you can't do it. Because this is not a regular filter like the ones you see on Kega Fusion. But you can use this same effects "HLSL" with MESS, that stands for "Multi Emulator Super System", it's to consoles and old computers what is MAME for arcade boards.

And there is also a combination of both MAME + MESS, that is UME (Universal Machine Emulator), and you can use the HLSL too.

But remember this HLSL need a more powerfull PC than just using if for MAME itself
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 »

Yeah. I don't see it on any of my CRTs, it's a trick to simulate what I can only describe as a sparkle. 1.95 or 0.000001 , just make it so it's barely visible on a static screen.

Your screen of a CRT shows the kind of resolution we need to hit to do this properly. I'd also like to see a triad pattern in MAME rather than an aperture - all of my arcade tubes use a triad.
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 »

Great settings cools, what does the HLSL look like on vertical games in horizontal orientation?
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 »

It's not too bad. The scanlines seem to vanish entirely - at least they do on this display, but it's usable. I think the pincushion is a bit too extreme though
Image
Thamiel
Posts: 180
Joined: Wed Feb 15, 2012 2:21 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Thamiel »

Used these settings on some vertical shooters earlier today and it looked fantastic, scanlines were still quite visible. I did remove the pin cushion effect entirely though.
cskcsk
Posts: 60
Joined: Tue Mar 11, 2008 5:12 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cskcsk »

Looks really good, but when i turn on full screen, it looks like this https://www.dropbox.com/s/v8b7vxlv1rbelzr/bik.jpg . It's like the scanlines dont quite even out?
User avatar
Overkill
Posts: 512
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Overkill »

Its someting wrong in the vertical size, mine is correct. Which resolution is your PC outputing? 1920x1080?
cskcsk
Posts: 60
Joined: Tue Mar 11, 2008 5:12 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cskcsk »

Overkill wrote:Its someting wrong in the vertical size, mine is correct. Which resolution is your PC outputing? 1920x1080?
1920x1200. Which setting in the ini do i need to change ?
Post Reply