MAME scanline/shadowmask simulation

Everything Emulator related
Forum rules
ArcadeOtaku forum introduction & rules
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » April 30th, 2014, 9:09 am

Yeah if you're running just linedoubled it's straightforward with Groovy. I'm trying for something extra ;)
Image
User avatar
Retro1975
Posts: 2
Joined: July 19th, 2014, 11:26 am

Re: MAME scanline/shadowmask simulation

Postby Retro1975 » July 19th, 2014, 11:38 am

Coolz Shaderz ... ThanX :lol:
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » July 25th, 2014, 8:54 pm

In case anyone's interested I've been messing with these again. I use a modified version of jezze's post.fx, his shadow mask png and the settings for these, and my own parameters with a few tweaks to how they've been.

I've also combined them in a zip file that you simply extract into your MAME/UME folder to enable them - using horizont.ini for raster horizontal games, and vertical.ini for raster vertical games.

http://wiki.arcadeotaku.com/w/File:Mame ... _cools.zip
Image
User avatar
emphatic
Breastfeeds when required
Posts: 6919
Joined: April 7th, 2009, 4:14 pm
Aliases: emphatic everywhere, baby!
eBay: jorgen_sjolander
Gamertag: emphatic001
Initials: JOR
Location: Alingsås, Sweden
Contact:

Re: MAME scanline/shadowmask simulation

Postby emphatic » July 25th, 2014, 9:22 pm

Is it true they're less resource hungry than the standard ones?
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » July 25th, 2014, 10:24 pm

Not really. I only use it for the rounded corners and accurate mask, the rest is inaccurate so disabled.
Image
arcnl
Posts: 288
Joined: September 16th, 2012, 1:46 pm
Location: The Netherlands

Re: MAME scanline/shadowmask simulation

Postby arcnl » July 31st, 2014, 10:40 am

I find that everything i use any of the effects/hlsl stuff the picture gets way too fuzzy for my liking. Running on 640*480 (on CRT) with default scanlines turned on works best for my personal preference, and its pretty much hassle-free too. I havent compared with groovy in 31k, but plain vanilla mame with triplebuffer and prescale 3 or something seems to work perfectly for me. Its a bit different than groovy in 15k, but not worse. Just different, and significantly more hassle-free.
arcnl
Posts: 288
Joined: September 16th, 2012, 1:46 pm
Location: The Netherlands

Re: MAME scanline/shadowmask simulation

Postby arcnl » August 24th, 2014, 7:18 pm

Has anyone tested hlsl on a 4k monitor yet? I dont have the power to drive such a setup sadly
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10505
Joined: August 19th, 2008, 8:58 am

Re: MAME scanline/shadowmask simulation

Postby pubjoe » August 24th, 2014, 10:25 pm

No, but I've experimented with a cropped screen on various displays including "retina" type.

Though it doesn't really matter how many pixels you have. A uniform overlay is never going to make an LCD look like a CRT. You could draw a perfectly detailed aperture grill which looks identical to a CRT up close, but if viewed from a distance it'd look a mess. The light just works differently with our eyes.

Lots of pixels are beneficial for tidy scaling and avoiding moire patterns with scanlines. The improvement on the impact of scanlines with 4k (or 400k) displays is disappointingly slight.
StreetFancerKombat
Posts: 7
Joined: December 4th, 2014, 4:06 pm

Re: MAME scanline/shadowmask simulation

Postby StreetFancerKombat » December 4th, 2014, 4:33 pm

cools wrote:Not really. I only use it for the rounded corners and accurate mask, the rest is inaccurate so disabled.



Hi cools :)
I came across your pngs via a Google search and have tested them all. Really nice!

I have a few questions I'm hoping those more experienced can help me out with.

In short my questions are:
If running mame on a 1920X1080 55" LCD HDTV but keeping the original aspect ratio of the game and doing no enhancements other than the default bilinear D3D up scaling, what would be the best scan line png?

If the same as above applies again, but this time we add in prescale 2, which png is now the best for that scenario?

I'm currentlyrunning mame on a 1920x1080 55" HDTV (LCD)
I am running mame and ensuring I keep aspect ratio of the original games etc.
I currently only add V-Sync and triple buffer and D3D9.
I mainly play games like street fighter, mortal kombat etc and have a few burning questions...

For example,
When I play mortal kombat with pre scale set to 1, the characters faces are like photos, really life like (on the character selection screen etc) when I enable pre scale 2 (and more) the faces in the screen mentioned above become so blocky that they look like pixel soup, they do not look Like human faces at all?

So is prescaling a good thing? Does the bilinear filter still scale the image to to the display size, or once pre scale is enabled, does it push out an image that is not scaled by the bi linear filter?

I've tried the pre scale x2 and the cools effect png but I found the scan lines were really thin was unable to actually se them well, as they are only 1 pixel thin. Was this particular png designed for a smaller screen or lower resolution?

I'm stuck with a 1920 x 1080 monitor and a low powered box. Therefore I'm looking for a the best png that will give an arcade look and feel to my games, when displayed on that monitor.

Does anyone have a great setup for the 1920x1080p LCD HDTV living room ARMY Or are we sol?
I can't use HLSL as it to much for my tiny cpu but I can get 60fps solid on most games with A png and as much ore scaling as I can muster.

Do you have any ideas or hints and tips that would help.

Kindest Regards,
Ian
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » December 4th, 2014, 5:37 pm

The only generic method with standard MAME is HLSL.

If you used GroovyMAME you could prescale x2 whilst using cleanstretch 2, and use the normal MAME scanlines png and output a 480/512p resolution leaving the TV to do its own upscaling. This would be the same result as using a scanline generator on a console input.

Anything on a screen that size should be highly pixelated, that's just the nature of it.
Image
StreetFancerKombat
Posts: 7
Joined: December 4th, 2014, 4:06 pm

Re: MAME scanline/shadowmask simulation

Postby StreetFancerKombat » December 4th, 2014, 6:38 pm

Hi,

Thanks for the response :)
I'm currently limited to output only at 1080/60 via HDMI and using MAMEUIFX 32 but I play the games in their native aspect ration (4x3 etc) I'm not stretching them to fill the entire screen or such.

I run with most of the settings at default, as my HTPC is low powered, so I just set it vsnyc and triple buffer. Most other settings are default.

I have tried the default "scanlines.png" included with the latest mame, but I'm not sure if that is the best for my particular resolution etc? It seems like the lines are to thin and only produce a banding effect rather than an actual scanning effect.

If you were running games like SFII, Mortal Kombat, Shinobi etc with pre scaling set to X2 and outputting to a LCD 1080/60 (but in their native 4x3 aspect ratio) what do you think would be the best PNG/settings to get the most authentic look?

At the moment I'm using your pre scaler X2 png on the front page, but as its 5 years old or so, I wondered if you have a better a different view on what would be best for those who are outputting to a constant 1080/60 (for all games, but in their native 4x3 ratio) and a pre scale of either x2 or no pre scale at all. All my games have black bars either top/bottom which is fine, as I want to keep the correct aspect ratio.bbut I'd like to get the arcade "look" via a png and some pre scaler.

I even tried making my own png which was 2 pixels thick (black) and 3 pixels thick (transparent)

It didn't work as expected, but after carefully looking into the scan line hardware, I noticed they seems to follow a similar pattern like below. I zoomed in as much as I could on the images and videos of these devices at work and tried to follow the pattern, it was like this below if that makes sense.

black-
clear
clear
clear
black-
Black-
Clear
Clear
Clear
Black-

So I tried to create a patten like this:

Black
Clear
Clear
Clear
Black

On a 5x5 pixel square. I could add in shades of grey like yours, but the effect wasn't quite right? I don't think I understand the guts of what's happening behind the scenes to fully grasp what I need to do to get the pattern to line up correctly with the image etc??

But in short.
If you had to play mame on a 1080p HDTV at 60hz but with black bars (using the games native aspect ratio) and could only output at that resolution, and could use as much "pre scaler", and any "png" you wanted.
What settings would you use for the best pixel perfect authentic look given the limited choices you'd have?

Thanks for taking the time to reply, I've lost hair going over all this, tried loads of different png files, and still trying to figure it all out :)

I think the math is beyond me and I'm hoping the more, knowledgable folks can enlighten me and educate/assist me in trying to get the best settings for a large living room HDTV :)

While my to is 1920x1080. Since I play in the native aspect, I'm not using 1920 horizontal pixels (which is good, correct and expected) but I just can't seem to figure out pre scale settings and png settings for this type of screen (a living room 1080p HDTV LCD TV)

So... What would you do in my shoes :)
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » December 5th, 2014, 7:30 am

If you're black bar scaling to 1080p for everything then just switch off scanlines. There's nothing you can do except work game by game configuring the prescale amount and a matching PNG
Image
StreetFancerKombat
Posts: 7
Joined: December 4th, 2014, 4:06 pm

Re: MAME scanline/shadowmask simulation

Postby StreetFancerKombat » December 5th, 2014, 8:52 am

I'm not sure what you mean by black bar scaling?

I have a screen that is 1920x1080
The games I play don't fill the entire "wide screen" they play and display in 4:3
They are NOT being stretched to fill a 16:9 ratio
I play them in their native aspect ratio

Even though I have a 1920x1080/60 16:9 screen and my PC outputs @ 1920x1080/60 only the 4:3 section in the middle of the screen is being used to display the game.
I (correctly) have black bars set on the left and right of the screen, meaning my games are using a 4:3 ratio and are only using the pixels within that 4:3 area of the display. No different from playing them on an actual physical 4:3 display.

Are you saying that when using mame, and you run those games at their native aspect ratio on a lcd hdtv, that NO scanlines etc should be used at all?

I'm confused?
I thought that as long as you run the game at native aspect ratio (mortal kombat 4:3) on a lcd display, that you could add scan lines to image which would improve or at least give it a classic retro look/feel?

Have I mis understood of of this and if so, what/who are scan lines for if not for LCD users?

Thanks again :)
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » December 6th, 2014, 10:34 am

Itd be extremely long winded for me to explain :)

The way MAME works means you either have to use HLSL or work out the best settings per game for an LCD display. There isn't an alternative option unless you disable fractional scaling, which loses you the 4:3 aspect ratio for all games that don't have square pixels (most of them).

Best option is to NOT output 1920x1080 from the PC. Run Groovymame, enable cleanstretch 2, normal scanlines.png and output at 720x480 leaving your screen to upscale the resolution.

Or use HLSL. Or do the maths for each game :)
Image
User avatar
mufunyo
Posts: 715
Joined: August 21st, 2008, 12:26 am
Aliases: mf, muf
eBay: mufunyo
Gamertag: mufunyo
PSN: mindflyer
Initials: MUF
Location: Eindhoven, NL
Contact:

Re: MAME scanline/shadowmask simulation

Postby mufunyo » December 6th, 2014, 1:18 pm

cools wrote:Best option is to NOT output 1920x1080 from the PC. Run Groovymame, enable cleanstretch 2, normal scanlines.png and output at 720x480 leaving your screen to upscale the resolution.

Considering the way most monitors upscale non-native resolutions, I would strongly recommend against that. A monitor's internal scaling is almost guaranteed to look awful.
Image
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » December 6th, 2014, 1:50 pm

Whenever I've tried it its been okay, reasonable. Without more horsepower getting the monitor to do some work is the only real option.
Image
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10505
Joined: August 19th, 2008, 8:58 am

Re: MAME scanline/shadowmask simulation

Postby pubjoe » December 6th, 2014, 2:15 pm

I suppose results depend on the monitor (as well as personal opinion). Old example but I used to have a Dell FP. It used very light AA and I found that to be perfect for upscaling emulated games. Enabling Nvidia's scaling was probably ok for photographs, but it looked like thick Vaseline on 2D games.

My CPU wasn't powerful enough back then for Mame's software scaling. The jump from CRT to LCD was harsh. :(
StreetFancerKombat
Posts: 7
Joined: December 4th, 2014, 4:06 pm

Re: MAME scanline/shadowmask simulation

Postby StreetFancerKombat » December 6th, 2014, 11:29 pm

Ok...
Well I'm no clearer than when I started :wtf: my brain is not equipped for this :lol:

I thought that if I used mame, set my games to their default/native aspect ration (which essentially means they are untouched (with the exception of pre scaling x2) and having my PC output that image (constrained withing black bars to fill up the negative space) on to my to HDTV that I could add a default set of scan lines... I was wrong! :)

I am confused though with the settings discussed. As what difference would it make letting my tv scale an image rather than my HD6320? I'm certain my gfx card scales infinitely better than my tv?

I'm using mame 1.49 at the moment as I've not upgraded for a while, and Hlsl on that version just crashes my box. It's an AMD E-450 APU and while it does play most emulation perfectly, when I enable HLSL it just **** itself.

So as to not walk away empty handed. Is there a booby prize?
For us scumbags who are using 1080p HDTVs ... Using mame.. What settings would be best? Are you guys suggesting/

No pre scaling,
No scan lines,
And to actually distort the pixels by not outputting native aspect ratio? - "disable fractional scaling, which loses you the 4:3 aspect ratio"

That all sounds alien to me, as I enable prescale x2, added scanlines, and output the game in 4:3 I can't understand that I got them all wrong? Have I perhaps not explained my self well, it's very possible :lolno:

How about..
What are the best (most authentic) mame settings to select (for an AMD E-450) outputting to a 55" 1080p hdtv?
User avatar
cools
Armed Police Buttrider
Posts: 13402
Joined: August 17th, 2008, 4:49 pm
eBay: hordarian
Initials: CLS
Location: Wales, United Kingdom
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » December 7th, 2014, 8:01 am

What I'm trying to say is there is no authentic option that can be applied to every game with that setup, it simply doesnt exist other than HLSL, and was the whole reason for this thread in the first place :)

149 is particularly old and I know there have been HLSL fixes since then. And since its development GPUs have got far better, even the cheap integrated are capable. See if you can get it going.
Image
User avatar
mufunyo
Posts: 715
Joined: August 21st, 2008, 12:26 am
Aliases: mf, muf
eBay: mufunyo
Gamertag: mufunyo
PSN: mindflyer
Initials: MUF
Location: Eindhoven, NL
Contact:

Re: MAME scanline/shadowmask simulation

Postby mufunyo » December 7th, 2014, 3:32 pm

cools wrote:Without more horsepower getting the monitor to do some work is the only real option.


I dunno, as far back as 2008, on my Core 2 Duo T7700 laptop I would prescale 4x beyond the native resolution to 1280x960, which would then get downscaled by the GPU (Intel GMA X3100) to 1067x800 and black bars added to make 1280x800. All that would run even taxing platforms like zn2 which MAME implements using software 3D rendering without a hitch (although my laptop would get too hot to touch in the process). We're now 6 years on and I'd expect similar shenanigans to work even on lower end hardware these days. :)
Image

Return to “Emulation Q&A”



Who is online

Users browsing this forum: No registered users