MAME HLSL CRT SCANLINE EMULATION PRESETS

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

From the sample snapshots above, I think we're talking about the actual size of the shadow mask cells or stripes. You can tell that the size is considerably larger for lower resolution like 256x224 and smaller for higher resolutions like 384x224, while the size of the stripes should actually stay the same.
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 can see now. It looks like it's applying the mask to the image, rather than applying the image behind the mask.
Image
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

This brings up a question I have had as well in regards to scanlines and how they are rendered in MAME with HLSL. Should scanline size be the same on all games? I know there were different resolution monitors produced. Original arcade games were mostly on low res monitors (CGA), then came med res monitors (EGA) which I know were not widely used, then high res (VGA) monitors. Did all of these monitors have similar dot pitches? I thought I had read that most arcade monitors have a dot pitch around .82. If so, would all of the scanlines be similiar in size and number per screen?

The reason I ask is in tweaking HLSL I see a big difference in games that are low res, vs med to high res. Below is an example of scanlines from Metal Slug on the left at 320x224 and Toobin' on the right at 512x384. The images are 100x100 screen captures and are blown up 5x times to show clarity. I have turned off the shadow mask and pincushion in these images to make the scan lines stand out. There are 29 scanlines in the Metal Slug image and 49 scanlines in the Toobin' image. These are both taken from the upper left corner of the screen. All other settings for HLSL are the same.

My question is are these accurate? Are scanlines based more on the resolution or dot pitch? In looking at these images and the way HLSL is rendering them it looks like it is resolution based.

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 »

Scanlines are resolution based.
Image
User avatar
NUeda
Posts: 76
Joined: Wed May 29, 2013 10:26 am

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by NUeda »

Yes cmoses,
that is correct behavior for scanlines. Those two games should look different from each other.

Just to reiterate what others have already said,
real CRT displays have dark lines on the screen,
which are gaps between the bright lines lit by RGB electron guns.

Scanline count is actually flexible to some degree on most monitors, by using vertical adjustments.

And CRT's that accept multiple scan timings(15, 24, 31 KHz) have very flexible scanlines,
but their behaviors are usually limited to fixed presets.

Image





The total count of dark lines will never deviate from the pixel lines count,
for every 2 bright lines of lit pixels (all the way from left to right for each line),
there will be 1 dark line sandwiched between them.



Image

Ideally, in emulation,
for 224 lines of lit pixels, there should be 223 dark lines,
for 240 lines of lit pixels, 239 dark lines,
for 480 lines of lit pixels, 479 dark lines, and so on.









Aperture grille/shadow mask is a metal netting behind the glass screen.
It can never be adjusted or altered (except for degaussing).

Image





Smaller CRT's tend to have coarser shadow mask,
and larger CRT's generally have finer shadow mask.
Last edited by NUeda on Tue Dec 24, 2013 11:40 pm, edited 4 times in total.
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

cools wrote:Scanlines are resolution based.
NUeda wrote:Yes cmoses,
that is correct behavior for scanlines. Those two games should look different from each other.

Thanks Cools and NUeda for confirming this. I thought that was the case but just wanted confirmation.
luiser2612
Posts: 3
Joined: Mon Aug 05, 2013 5:06 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by luiser2612 »

Hello.

Hi I have a question.
So what's the best configuration of hlsl to play games like killer instinct, mortal kombat, the the king of fighter?
And I can give a link to download the filter crt_slot_mask.png.
I appreciate your answers.

thanks :lol: :P
Mame4Life
Posts: 12
Joined: Wed Jul 03, 2013 1:54 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Mame4Life »

luiser2612 wrote:Hello.

Hi I have a question.
So what's the best configuration of hlsl to play games like killer instinct, mortal kombat, the the king of fighter?
And I can give a link to download the filter crt_slot_mask.png.
I appreciate your answers.

thanks :lol: :P

There is no 'best configuration' for everyone, it just depends on the quality of monitor that you have and how you perceive the image with your own eyes.

You just have to experiment with the settings until you find a setting that best pleases you.
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 have been trying out the RetroArch emulator recently and am loving the CRT shader effects this emulator has, since Mame isnt emulated yet (only FinalBurn) i was wondering if these type of CRT shader effects could be replicated with SweetFX.....

Image

Im not talking about the scanline effect (as i know this can be achieved), but the curved look of the display, the fading out at the edges of the screen and the rounded corners. Can this be replicated with SweetFX??
Last edited by lettuce on Sat Aug 10, 2013 6:47 pm, edited 1 time in total.
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 »

I think overlays with alpha-blending (for the semi-transparency on the edges) should be possible.

You should really set a proper aspect ratio though. Or did you have a square tube back in the 90s ? The SNES does output in proper 4:3 with non-square pixels.
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

lettuce wrote:Im not talking about the scanline effect (as i know this can be achieved), but the curved look of the display, the fading out at the edges of the screen and the rounded corners. Can this be replicated with SweetFX??
lettuce,

I am not sure about SweetFX but those features,the curved look of the display, the fading outta the edges of the screen and the rounded corners can all be done with HLSL. Take a look at this page

http://www.aep-emu.de/PNphpBB2-file-vie ... 18991.html

A combination of HLSL settings and a tweaked post.fx file can give you all of those. The rounded corners are a little hard to see in the picture below because they only show at the bottom.


https://dl.dropboxusercontent.com/u/541 ... tion-L.jpg
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 »

cmoses wrote:
lettuce wrote:Im not talking about the scanline effect (as i know this can be achieved), but the curved look of the display, the fading out at the edges of the screen and the rounded corners. Can this be replicated with SweetFX??
lettuce,

I am not sure about SweetFX but those features,the curved look of the display, the fading outta the edges of the screen and the rounded corners can all be done with HLSL. Take a look at this page

http://www.aep-emu.de/PNphpBB2-file-vie ... 18991.html

A combination of HLSL settings and a tweaked post.fx file can give you all of those. The rounded corners are a little hard to see in the picture below because they only show at the bottom.


https://dl.dropboxusercontent.com/u/541 ... tion-L.jpg
That worked great, but noticed the posted post.fx file has the 'gray signal with reflection' i just want 'gray signal with vignetting'
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

lettuce wrote:That worked great, but noticed the posted post.fx file has the 'gray signal with reflection' i just want 'gray signal with vignetting'
The posted post.fx has gray signal with reflection and vignetting. There is a section in the post.fx that is marked as "// -- Light Reflection --". I bet you can comment out that whole section to remove the reflection you don't want. You would need to try it and test it. Let us know if you do.
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 »

Spot on that worked!!!

But im not seeing the vignetting effect however!!....

Image
Mame4Life
Posts: 12
Joined: Wed Jul 03, 2013 1:54 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Mame4Life »

cmoses wrote: The rounded corners are a little hard to see in the picture below because they only show at the bottom.

Those rounded corners are due to a bug with Metal Slug and HLSL when you apply pincushion.
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

lettuce wrote:Spot on that worked!!!

But im not seeing the vignetting effect however!!....
I think it's very light effect. Try it on a all white screen and see if you see it. I know Metal Slug has an all white screen in the opening. Not sure how you would go about tweaking it.
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

Mame4Life wrote:Those rounded corners are due to a bug with Metal Slug and HLSL when you apply pincushion.
I thought the issue was with Metal Slug and the way it displays. The bottom few lines extend out further than the rest. I see this even if I have HLSL turned off and no pin cushioning. I thought this was just compensated for in the arcades with some horizontal stretching on the monitor.
luiser2612
Posts: 3
Joined: Mon Aug 05, 2013 5:06 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by luiser2612 »

Mame4Life wrote:
luiser2612 wrote:Hello.

Hi I have a question.
So what's the best configuration of hlsl to play games like killer instinct, mortal kombat, the the king of fighter?
And I can give a link to download the filter crt_slot_mask.png.
I appreciate your answers.

thanks :lol: :P

There is no 'best configuration' for everyone, it just depends on the quality of monitor that you have and how you perceive the image with your own eyes.

You just have to experiment with the settings until you find a setting that best pleases you.
friend, I did not like that answer.
Could someone answer objetivamentey not like this sir.
I just want to know where I can download the filter crt_slot_mask.png
and settings which is ideal for playing on a 1080p TV to get the image as real as possible.
Thanks :(
Daeymien
Posts: 3
Joined: Sun Jul 14, 2013 5:47 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Daeymien »

luiser2612 wrote: friend, I did not like that answer.
Could someone answer objetivamentey not like this sir.
I just want to know where I can download the filter crt_slot_mask.png
and settings which is ideal for playing on a 1080p TV to get the image as real as possible.
Thanks :(
#1 https://dl.dropbox.com/u/5414984/mslug- ... t_mask.png

#2 The "ideal" setting for playing on a 1080p TV is not to. Anything beyond that is personal preference. There is no hard-and-fast best setting. A 1080p LCD/Plasma will never replicate an arcade CRT exactly. Period. You can get pretty close, but that measure of closeness is up to the individual's taste as Mame4Life has said.
Last edited by Daeymien on Tue Aug 13, 2013 6:33 pm, edited 1 time in total.
luiser2612
Posts: 3
Joined: Mon Aug 05, 2013 5:06 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by luiser2612 »

Daeymien wrote:
luiser2612 wrote: friend, I did not like that answer.
Could someone answer objetivamentey not like this sir.
I just want to know where I can download the filter crt_slot_mask.png
and settings which is ideal for playing on a 1080p TV to get the image as real as possible.
Thanks :(
#1 https://dl.dropbox.com/u/5414984/mslug- ... t_mask.png

#2 The "ideal" setting for playing on a 1080p TV is not to. Anything beyond that is personal preference. There is no hard-and-fast best setting. A 1080p LCD/Plasma will never replicate an arcade CRT exactly. Period. You can get pretty close, but that measure of closeness is up the the individual's taste as Mame4Life has said.
Thank you very much for the reply. :P
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 »

Any more updates, NUeda?
User avatar
cmoses
Posts: 30
Joined: Fri May 24, 2013 1:40 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by cmoses »

Been going through HLSL withdrawals with nothing new recently. Hope to see some updates soon.
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 »

MAME and MESS 0.150 is out today, need to check if something changed in HLSL
Mame4Life
Posts: 12
Joined: Wed Jul 03, 2013 1:54 pm

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Mame4Life »

Overkill wrote:MAME and MESS 0.150 is out today, need to check if something changed in HLSL
Just a few bug fixes, no new features.
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 »

-HLSL updates: [MooglyGuy]
* Removed hlsl_read and hlsl_write options now that all slider
options are plumbed and have values matching the INI settings
* Added more surface release calls in order to fix device resetting
* Fixed draw order for quads, overlays now appear on top of vectors
in non-HLSL mode
* Moved aperture.png loading into create_resources/delete_resources so
that it is correctly reloaded when HLSL is toggled on and off
The first bit is useful.
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 »

Hmmm seems like NUeda hasn't been about for ages, hopefully he hasn't decided to abandon this project he was doing some truly impressive work :(
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 »

cmoses wrote:
lettuce wrote:Im not talking about the scanline effect (as i know this can be achieved), but the curved look of the display, the fading out at the edges of the screen and the rounded corners. Can this be replicated with SweetFX??
lettuce,

I am not sure about SweetFX but those features,the curved look of the display, the fading outta the edges of the screen and the rounded corners can all be done with HLSL. Take a look at this page

http://www.aep-emu.de/PNphpBB2-file-vie ... 18991.html

A combination of HLSL settings and a tweaked post.fx file can give you all of those. The rounded corners are a little hard to see in the picture below because they only show at the bottom.


https://dl.dropboxusercontent.com/u/541 ... tion-L.jpg
Damn this modded post.fx file doesnt work with the latest version of MAME 0.150 anymore! :(
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 »

But the rest of the ini. files provided by NUeda are still working great in 0.150 :P
User avatar
Domino
Posts: 1346
Joined: Sat Feb 16, 2008 11:35 pm
Location: Florida

Re: MAME HLSL CRT SCANLINE EMULATION PRESETS

Post by Domino »

Overkill wrote:But the rest of the ini. files provided by NUeda are still working great in 0.150 :P
Well I'm having problems with his .ini files on .150.

On latest version of ShmupMAME + his .ini files it looks like this:

Image

Might look dark but on my monitor with its adjustments it looks great.


Now this is what it looks on MAMEUI64 .150 + his .ini files:

Image

Colors are too bright, hard to see scanlines, and colors are too much saturated. Changing the settings in MAME doesn't work that much at all!


HELPPPPP!!!!
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 »

Have you tested a few more games? Horizontal games?
Post Reply