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 »

Mame v 0.182 now out....

http://mamedev.org/

So what does d3d9ex actual bring to the table then?
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

The reduced lag that was effective (through SwitchRes) before its removal from baseline MAME.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Xyga wrote:The reduced lag that was effective (through SwitchRes) before its removal from baseline MAME.
Do u need to enable it in the ini file at all?
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

Yes IIRC and only in GroovyMAME and Win 7 to 10. It's a bit weird, you only need to write;

Code: Select all

video           d3d
and not 'd3d9ex' like before (though it's really 9x that'll be used)

Activate 'autosync' along and you get your video synced but with the least queued frames by default on a Win system, I think it works on 1 frame instead of 3, something like that just check the dedicated thread on BYOAC for more accurate figures.
Though to get the very best times off it the same rule as before still applies (manual setting of frame_delay and offset)

Also since recently there 'always poll' always running to reduce the probabilities of input on next frame.

With all that + PortAudio this is probably the most responsive MAME build ever.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Thanks, what should

frame_delay
vsync_offset
pa_latency

be set to?
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

Heavily depends on the emulated hardware and your cpu power, but that's a long story, they explain more in details over at BYOAC, though I believe they should really make a fresh thread detailing all the new stuff and proper settings by type of setup.

There's two things that bother me though and I don't know the answers yet:
1) since we're in the HLSL thread, I'm no sure this all works so well with it on.
2) also no idea if that's of any use with G-Sync and all (probably not).
Strikers1945guy wrote:"Do we....eat chicken balls?!"
bodine1231
Posts: 26
Joined: Mon Apr 22, 2013 10:13 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by bodine1231 »

I can't get the scanlines to look right at 1024x768,the spacing is off. I'm running Mame on my spare computer with a weak Radeon 4350 so I cant run HLSL at 1080p 100%. I've been changing various ini settings to try and get the correct width to no avail. Adjusting the scanline scale using the ~ helps but I can't find a perfect balance.
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

Honestly I don't know if that's possible with HLSL because to begin it needs quite a bit of resolution real estate to look right, even 1080 isn't optimal.
Maybe integer scaling can fix the uneven scanlines but that's not guaranted and it's not ideal with every source resolution anyway (often big black bars or too much overscan)
Anyway if you force MAME to output 720p and your display upscales it to 1080p, it means the latter is applying its own scaling which is 99% certain to break the consistency of the scanlined look.
Honestly today HLSL is a pain to use and still quite heavy. If you're lacking processing power at the moment you'd better try crt-geom (the lighter version in bgfx) or crt-easymode in RetroArch (lightmost) and always at the full native resolution of your display.

EDIT: btw if you want to stick with HLSL anyway, have you tried to turn bloom off ? this saves a lot of gpu power, i think it's bloom_scale 0
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Could never get the bgfx shaders to look as pleasing to me as HLSL, im surprised theres so few preconfigure bgfx shaders out now for mame compared to that of RetroArch, seeing its been in MAME well over a year now
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

Really? I'm always battling with HLSL, never getting the right settings I want between those sliders to test and actual ini settings that are not all the same and something not fucking working/saving when it should, drives me mad and I give up.
BGFX has at least a couple things working right away even if they don't look the best (that would still be Royale anyway) and is more laggy.
I honestly believe HLSL can do better as I've seen impressive stuff in the past indeed (this very thread is proof) but since the 'recent' changes I have never been able to bring back the same benefits as before. Yup I used to think crt-royale had the most fucked up unfriendly settings system, but HLSL got back its 1st place, easily.
Useless to ask on forums, people either get directed to their guide-to-a-galaxy-of-files-inis-and-paths till-you-go-bald and it gets even harder to figure what's wrong, or be insulted by a dev whatever, and presets... presets... you know the idea they (I say 'they' but I don't know if more than one person contributes to HLSL) have of what CRTs look like? : run down af, needing heavy service or a one way to the dumpster kind of idea.
In any case 1 year is nothing in terms of MAME patience, so maybe one day HLSL will get intelligible and user friendly again, until then fuck it and hail RA for crt shaders.

(in truth I'm still using my custom png ovelays with integer scaling, fuck shaders :p)
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Xyga wrote:Really? I'm always battling with HLSL, never getting the right settings I want between those sliders to test and actual ini settings that are not all the same and something not fucking working/saving when it should, drives me mad and I give up.
BGFX has at least a couple things working right away even if they don't look the best (that would still be Royale anyway) and is more laggy.
I honestly believe HLSL can do better as I've seen impressive stuff in the past indeed (this very thread is proof) but since the 'recent' changes I have never been able to bring back the same benefits as before. Yup I used to think crt-royale had the most fucked up unfriendly settings system, but HLSL got back its 1st place, easily.
Useless to ask on forums, people either get directed to their guide-to-a-galaxy-of-files-inis-and-paths till-you-go-bald and it gets even harder to figure what's wrong, or be insulted by a dev whatever, and presets... presets... you know the idea they (I say 'they' but I don't know if more than one person contributes to HLSL) have of what CRTs look like? : run down af, needing heavy service or a one way to the dumpster kind of idea.
In any case 1 year is nothing in terms of MAME patience, so maybe one day HLSL will get intelligible and user friendly again, until then fuck it and hail RA for crt shaders.

(in truth I'm still using my custom png ovelays with integer scaling, fuck shaders :p)
Well i guess the next year or so will bring interesting things for shaders and HLSL settings what with 2018 TV models support freesync, the maturity of HDR, 4K, reduced OLED prices and hopefully reduced input lag. Dare i say it....it might be time to stop worry about CRT's not being a thing anymore. Just hope MAME and RA take advantage of these new TV features
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

I'm not as enthusiastic as you are, even if things indeed go in the right direction I would say 60Hz sample-and-hold...still holds even the best displays (like the new OLEDs) from being 100% satisfactory replacements.
Variable doubled refresh rates or variable doubled refresh strobing, we need things like that because better motion = greater benefit from crt shaders.
(super laggy and jerky interpolation just don't cut it)
Instead of drooling over HDR like it's candy I think people should worry more that those fantastic panels still handle picture refresh like the 20yo lcd you can find at the flea market for $5.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
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 »

Xyga wrote:I'm not as enthusiastic as you are, even if things indeed go in the right direction I would say 60Hz sample-and-hold...still holds even the best displays (like the new OLEDs) from being 100% satisfactory replacements.
Variable doubled refresh rates or variable doubled refresh strobing, we need things like that because better motion = greater benefit from crt shaders.
(super laggy and jerky interpolation just don't cut it)
Instead of drooling over HDR like it's candy I think people should worry more that those fantastic panels still handle picture refresh like the 20yo lcd you can find at the flea market for $5.
The HDMI 2.1 standard will allow 24hz to 120hz apparently, so will run any game at there correct refresh rate
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 »

In MAME docs: "For multiple, complicated to explain reasons, HLSL settings are no longer saved when you exit MAME. This means that while tweaking settings is a little more work on your part, the results will always come out as expected."

Anyone knows in which release this started to happen?
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

I haven't trolled this thread with my painted .PNG's in a while, so here's one. :p
It's not too hard to add a little softness to the lines without using any filter nor shader, only faint rgb dots mixed into the mask and line.
No broken integer and super lightweight.

Image

EDIT: below is the same PNG with slightly different color settings, the mask line is brighter and the rgb dots more pronounced. yeah, even slightly different values will change the looks a lot
Image
Last edited by Xyga on Thu Sep 07, 2017 10:14 am, edited 2 times in total.
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
Blair
Posts: 681
Joined: Mon May 11, 2015 5:59 am
Location: America

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Blair »

very nice Xyga! :) it reminds me of a display/type I've seen before, but I can't recall exactly which one... (a little bit like a portable LCD screen)

was this 900p image scaled down from a larger source? or do you play with orders?
User avatar
Xyga
Posts: 7181
Joined: Tue Nov 05, 2013 8:22 pm
Location: block

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Xyga »

It's raw from my laptop's 1600x900 display, MAME with -intoverscan on, 224p games fit well of course (i've only cut the side pillars for forums convenience)
The bigger the screen's resolution and therefore the scaling factor, the harder it becomes to create nice .PNG files, that's the limit to that method.
Also not all sources integer-scale well on rather low resolution displays, sometimes there are simply no good factors (output is too small or too big)

Anyway I was looking for a simple sharp scanlines look a la FrameMeister with only very little smoothing. The reason I did this is because unlike for instance using
filter 1
prescale 2
, there's no forced rescaling and therefore no garbage (e.g. uneven lines or 'scaling-tearing' artifact)

Scanline's brightness and blur/mask effect can be strenghtened or reduced at will, the stronger the effect the softer it will look, but also kinda dirty/messy on plain color surfaces.
Though I've mentioned before that something like the below while not looking great on static/screenshots, actually works very well in motion, including with games that scroll vertically like GigaWing or Probeer

Image
Strikers1945guy wrote:"Do we....eat chicken balls?!"
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

i personally prefer RCA AV composite video rather than RGB, just for CV3 on NES.
It's using chroma dot crawl as texture.
Absolutely insane.

Image
Chroma dot crawl (single frame)
original image https://drive.google.com/open?id=1LgKQI ... H_Gd3O6j02


Image
Clean pixels
original image https://drive.google.com/open?id=1PdbtQ ... ww9--_msSj
Last edited by NUeda on Wed May 09, 2018 7:55 am, edited 4 times 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 »

Can someone using recent generation of Intel iGPU tell me if it can handle MAME HLSL smoothly at 1440x1080 ?

I know for sure 2nd gen Core i5 can't, it drops a lot of frames.
User avatar
Hoagtech
Posts: 939
Joined: Mon Apr 27, 2015 3:53 am
Location: Bellingham, WA

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Hoagtech »

NUeda wrote:i personally prefer RCA AV composite video rather than RGB, just for CV3 on NES.
It's using chroma dot crawl as texture.
Absolutely insane.

Image
Chroma dot crawl (single frame)
original image https://drive.google.com/open?id=1LgKQI ... H_Gd3O6j02


Image
Clean pixels
original image https://drive.google.com/open?id=1PdbtQ ... ww9--_msSj




:arrow: Download:
https://drive.google.com/open?id=1H5aTc ... _kQLpT2KdR
nes.ini
crc32: e482e287

NOTE:
If you want clean pixels, change to yiq_enable 0



.............................
Are those clean pixels displaying without jitter over composite rca?

Or is it a composite filter over hdmi/rgbhv?
Copyright 1987
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

Sorry i forgot to specify, these are screen-captured from MAME so there is no video cable involved.
It's using a HLSL setting that tries to mimic the flaws of NTSC video signal.
So no, it is not using any cable.

I'm not sure if there is a external adapter/transcoder/scaler device that adds this dot crawl behavior and shows it on today's LCD TV/monitors.
The standard practice since early 2000's has been usage of some type of comb filter to get rid of chroma dot crawl.
I remember seeing almost no dot crawl when I tried using PS1 + composite output on a sony wega CRT TV,
but on a slightly older trinitron CRT TV, it showed a lot of dot crawl.
User avatar
FinalBaton
Posts: 4461
Joined: Sun Mar 08, 2015 10:38 pm
Location: Québec City

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by FinalBaton »

This is funny to read because I actually happen to like playing CV3 on a stock NES every once in awhile. The colors I get through the encoder in my Trinitron are lovely. Same with Sunsoft's Batman
NUeda wrote:I remember seeing almost no dot crawl when I tried using PS1 + composite output on a sony wega CRT TV,
but on a slightly older trinitron CRT TV, it showed a lot of dot crawl.
To my eyes PS1 through composite doesn't exhibit dot crawl, but it does exhibit a ton of horizontal blur. NES looks crisp but yeah, ton of dot crawl. Depending on the person, the NES or the PS1 will look better. I used to like PS1 composite better but now I hate it (thank god for RGB). I like the NES' composite far better than PS1 composite nowadays.
-FM Synth & Black Metal-
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

FinalBaton wrote:Same with Sunsoft's Batman
Image
Batman's cape and other thin objects have texture pattern when there is chroma dot crawl













Image
and just flat color when there is no dot crawl
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

Chroma dot crawl in MAME HLSL

These are just approximations (2-frame GIF animation) of how the screens look during actual gameplay.

Image

Image

If the images get broken links and stop showing, they will be visible here: http://mame-hlsl-gallery.blogspot.com/s ... bel/Konami

Personally speaking, I feel happier when I use this setting to play 8-bit and 16-bit console games, compared to
using another setting that shows accurate pixels.




If you want to give this HLSL setting a try,
please download the .ini file from google drive and place it into INI folder which is inside your MAME folder.

nes.ini
crc32: bd5dbd7a
https://drive.google.com/open?id=1Eq2S1 ... j7aYAhyWZG

snes.ini
crc32: 506e0b10
https://drive.google.com/open?id=1nfTdy ... _r4mYL_6sx

If there are errors or issues, please let me know. Thank you!
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

HLSL setting for Mega Drive / Genesis

Image

Image

Image

Image

Download
megadriv.ini
crc: 6bb49064
https://drive.google.com/open?id=1C-wcy ... aqQppY2aua

If there are issues or errors, please let me know. Thank you!


NOTE:
There's something strange I noticed about color output of Mega Drive in MAME:
the brightest pixels do not reach RGB 255 white, instead they are bright greys.

Perhaps first models of Mega Drive used RGB DAC or NTSC encoder that was designed for simple colors (e.g. 16 colors) and had trouble differentiating between bright greys and full white pixels ?
User avatar
Hoagtech
Posts: 939
Joined: Mon Apr 27, 2015 3:53 am
Location: Bellingham, WA

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Hoagtech »

NUeda wrote:Chroma dot crawl in MAME HLSL

These are just approximations (2-frame GIF animation) of how the screens look during actual gameplay.

Image

Image

If the images get broken links and stop showing, they will be visible here: http://mame-hlsl-gallery.blogspot.com/s ... bel/Konami

Personally speaking, I feel happier when I use this setting to play 8-bit and 16-bit console games, compared to
using another setting that shows accurate pixels.




If you want to give this HLSL setting a try,
please download the .ini file from google drive and place it into INI folder which is inside your MAME folder.

nes.ini
crc32: bd5dbd7a
https://drive.google.com/open?id=1Eq2S1 ... j7aYAhyWZG

snes.ini
crc32: 506e0b10
https://drive.google.com/open?id=1nfTdy ... _r4mYL_6sx

If there are errors or issues, please let me know. Thank you!
That looks like shit. It must be nostalgic though.

I thought you were removing the dot crawl and line tremble.
Copyright 1987
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

Yes, it looks like shit :mrgreen: because I'm trying to mimic what I remember seeing when I played these games on consumer TV.
You're right, it's pure nostalgia and has absolutely no meaning for people who didn't grow up on NES/SNES + CRT TV.

I should have included versions that didn't have dot crawl.

nes.ini (without dot crawl)
crc: 9f3a2fe7
https://drive.google.com/open?id=1J8vKK ... LJ_bcU-Rer

snes.ini (without dot crawl)
crc: 9c0466ac
https://drive.google.com/open?id=1YiLul ... g7PS3QDY6s


Current setting for line tremble or scanline jitter causes issues when the screen is filled with white pixels but I do like the feel of slightly vibrating pixels when you look at them from just inches away so I've decided to keep it that way.
User avatar
BuckoA51
Posts: 3358
Joined: Sat Oct 02, 2010 10:08 am
Location: Ireland
Contact:

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by BuckoA51 »

Anyone found good settings for 4k screens yet? My existing ones seem to look awful on my new 4k TV.
OSSC Forums - http://www.videogameperfection.com/forums
Please check the Wiki before posting about Morph, OSSC, XRGB Mini or XRGB3 - http://junkerhq.net/xrgb/index.php/Main_Page
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

BuckoA51 wrote:Anyone found good settings for 4k screens yet? My existing ones seem to look awful on my new 4k TV.
I want to try this one when I finally get a 4k monitor.
https://forums.libretro.com/t/how-to-op ... creen/8805

Image
https://www.youtube.com/watch?v=xrpm8o17cHE skip to 16:10
https://www.youtube.com/watch?v=djzIuLXuxt8

Video and customized settings are made by Armandorev at RetroArch forums.
User avatar
Tatsuya79
Posts: 149
Joined: Tue Jan 07, 2014 10:29 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Tatsuya79 »

I think "Royale" and "Kurozumi" are mixed up in that video.
Kurozumi is probably shown first, with less apparent sub-pixels. (I always feel like Royale looks like some printed snapshot)
Post Reply