MAME scanline/shadowmask simulation

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

Re: MAME scanline/shadowmask simulation

Postby cools » November 14th, 2009, 9:53 am

Excellent :) It is very much game vs screen resolution dependent.

Prescale 3 on a 768 line screen is going to look nasty if there's any additional scaling after applying the scanlines - 240*3 = 720 - there's not a lot more to play with. Disabling hardware stretch would stop the nasty scanlines, but you lose the slight blur then. I dare say 384 line games may be too crisp - but there's not many of them.

Just noticed I've recommended multithreading on, and subsequently said to disable it. Regular vanilla Windows MAME on a dual CPU/core machine should have it enabled. I've had no luck with it on hyperthreading processors, nor anything other than Windows MAME. Your mileage may vary - it's definitely worth testing in isolation and seeing what result you get on your setup.

192 line games may be better at prescale 3 with the different effect - you can do this on an individual basis with gamename.ini in the ini folder. Settings you place in here override those found in mame.ini
Image
User avatar
cools
Armed Police Buttrider
Posts: 13555
Joined: August 17th, 2008, 4:49 pm
Location: Wales, United Kingdom
eBay: hordarian
Initials: CLS
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » November 26th, 2009, 1:09 pm

gamma 1.3 seems to be good for brightening up the image without washing it out.
ssf2x_mame_scanlines.jpg


(Has discovered print screen grabs the ddraw buffer, no need for MAME screen grabbing!)
Image
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » November 26th, 2009, 1:44 pm

Looks nice, I'll give it a try later.

I was having problems going much above 1.1 before, BUT there are two gamma sliders in different places on the GUI version of mame iirc. Dunno if there's a difference in them?

Btw, I'm selling the vewlix, but I think I'll get one of the new 27" (2560x1440 res) imacs in the near future. 6x prescale scanline image! :awe:
User avatar
cools
Armed Police Buttrider
Posts: 13555
Joined: August 17th, 2008, 4:49 pm
Location: Wales, United Kingdom
eBay: hordarian
Initials: CLS
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » November 26th, 2009, 1:58 pm

I'm just altering the one in the ini file.
Image
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » November 26th, 2009, 3:00 pm

pubjoe wrote:
I just wish the same effect could be applied to other low res software...


...As I mention it. Stupid question maybe, but IS there any kind of upscaling pass through software that can be used for programs that don't have their own decent options?

...and if not, WHY not? :awe:


Just thinking about this...

Imagine overlaying scanline & aperture grill images. Adding (just a small percent) bloom, glow, brightness and saturation levels. Also, some decent scaling options that allow starting axis offset adjustment... And all available as global settings that catch all desired program's graphics output. You could get a better picture than mame allows, but use it for any low res software - and also use it to scale high res down to a nice low progressive image.

This would be a good job for the graphics driver's after effects (instead of all the stupid magic eye or matrix effects).

...and it would be an absolutely FANTASTIC addition to the arcade vga card - making it far far more useful for both crt and lcds.
User avatar
Casey120
The Fluffer
Posts: 1299
Joined: November 27th, 2009, 10:42 pm
Location: The Netherlands
eBay: Tappygielen
Initials: CVW

Re: MAME scanline/shadowmask simulation

Postby Casey120 » December 11th, 2009, 7:27 pm

When i use DDraw instead of D3D my picture goes to hell but when i just use " effect_cools_x3.png " it looks very nice so thanks for that :

Image

Image
User avatar
CPS2
Street Fighter
Posts: 2276
Joined: August 19th, 2008, 10:03 pm
Location: Leeds

Re: MAME scanline/shadowmask simulation

Postby CPS2 » January 13th, 2010, 9:31 pm

Really wish I could get mame setup properly. 5+ years and I still can't get CPS2 stuff running right on a 31k monitor, plasma or LCD

Has anyone else managed to eliminate the tearing and redrawing issues on scrolling text or images,?? :?
User avatar
AeroCityMayor
Previously alien_mame
Posts: 2395
Joined: July 25th, 2009, 1:05 pm
Location: West Yorks, UK
eBay: air_fortless
Initials: ACM

Re: MAME scanline/shadowmask simulation

Postby AeroCityMayor » January 13th, 2010, 11:06 pm

CPS2 wrote:Has anyone else managed to eliminate the tearing and redrawing issues on scrolling text or images,?? :?


:awe:
Image
User avatar
AeroCityMayor
Previously alien_mame
Posts: 2395
Joined: July 25th, 2009, 1:05 pm
Location: West Yorks, UK
eBay: air_fortless
Initials: ACM

Re: MAME scanline/shadowmask simulation

Postby AeroCityMayor » January 13th, 2010, 11:11 pm

Sorry, dupe post due to browser crash/restore :roll:
Image
User avatar
gargoyle67
Gateau superstar
Posts: 6500
Joined: August 22nd, 2008, 11:33 am
Location: Clacton-On-Sea init
eBay: gargoyle1967

Re: MAME scanline/shadowmask simulation

Postby gargoyle67 » January 14th, 2010, 8:36 pm

Nope I get it on some games like Rolling Thunder and a few others I thinks it's a limitation of the graphics cards & Monitor rather than mame, Think it's got something to to with the graphics buffer timings, From when I researched the problem.
Quote from:http://strategywiki.org/wiki/MAME/Configure
"Triple buffering, Sync to monitor refresh, and Wait for vertical sync: Each of these settings control, in various ways, how MAME decides when to begin drawing the next frame of the game. These are all intended to prevent an effect known as "tearing." Tearing happens when a screen is scrolling, and you see half of the previous screen and half of the next screen together. This creates a tear in the screen. If you are experiencing tearing, try changing one, or a combination of these settings. The quality of the change is largely dependent on the video hardware (card and monitor) that you use, so you may need to experiment. In general, Wait for vertical sync should be sufficient."

Didn't help me though so I just put up with it :problem:
"Yeah lets all get ponys instead, wait no lol trendy cabs" Err I think you meant Ponies didn't you ?
User avatar
CPS2
Street Fighter
Posts: 2276
Joined: August 19th, 2008, 10:03 pm
Location: Leeds

Re: MAME scanline/shadowmask simulation

Postby CPS2 » January 14th, 2010, 9:31 pm

gargoyle67 wrote:Nope I get it on some games like Rolling Thunder and a few others I thinks it's a limitation of the graphics cards & Monitor rather than mame, Think it's got something to to with the graphics buffer timings, From when I researched the problem.
Quote from:http://strategywiki.org/wiki/MAME/Configure
"Triple buffering, Sync to monitor refresh, and Wait for vertical sync: Each of these settings control, in various ways, how MAME decides when to begin drawing the next frame of the game. These are all intended to prevent an effect known as "tearing." Tearing happens when a screen is scrolling, and you see half of the previous screen and half of the next screen together. This creates a tear in the screen. If you are experiencing tearing, try changing one, or a combination of these settings. The quality of the change is largely dependent on the video hardware (card and monitor) that you use, so you may need to experiment. In general, Wait for vertical sync should be sufficient."

Didn't help me though so I just put up with it :problem:


Back to arcadevga me thinks.
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » January 14th, 2010, 10:49 pm

Soft15khz is fine. it sends the same signal to my MS9. The important part is that it's a CRT displaying it.

It's the design of modern lcds which is the culprit to what you are referring. Even with sync to monitor refresh ticked, the tearing might stop but the game speed/timing will be affected. This is not usually humanly noticable tbh, BUT this, in turn, can cause further problems with sound and video stuttering.

There is a version of mame (can't remember which) that has built in workarounds that are not included in the default build, such as a 1-2% sound pitch adjustment that gets everything smoothed out and back in sync. Everything will be running at a small percentage off the exact correct speed mind you, and the sound frequency is very slightly altered but that's basically your only other choice with lcds to properly eradicate tearing.

And of course, the combination of all the above is adding more and more layers of post processing. Sucking more power. Destroying the planet. etc etc. But most importantly, slightly increasing lag (and greatly increasing lag paranoia!).

Mame, when enabling 'switchres' and using the correct modelines (with windows 'soft15khz' or Linux custom or otherwise) will display just fine on the same crt screens that the games were intended for. ...Oh yes it will.

There are no compensating hacks required using the above setup and therefore no/minimal extra processing (on top of the emulation itself) required.

End of the day though, lcds suck for 15k games.
Last edited by pubjoe on January 14th, 2010, 11:02 pm, edited 1 time in total.
User avatar
CPS2
Street Fighter
Posts: 2276
Joined: August 19th, 2008, 10:03 pm
Location: Leeds

Re: MAME scanline/shadowmask simulation

Postby CPS2 » January 14th, 2010, 11:01 pm

pubjoe wrote:Soft15khz is fine. it sends the same signal to my MS9. The important part is that it's a CRT displaying it.

It's the design of modern lcds which is the culprit to what you are referring. Even with sync to monitor refresh ticked, the tearing might stop but the game speed/timing will be affected. This is not usually humanly noticable tbh, BUT this, in turn, can cause further problems with sound and video stuttering.

There is a version of mame (can't remember which) that has built in workarounds that are not included in the default build, such as a 1-2% sound pitch adjustment that gets everything smoothed out and back in sync. Everything will be running at a small percentage off the exact correct speed mind you, and the sound frequency is very slightly altered but that's basically your only other choice with lcds to properly eradicate tearing.

And of course, the combination of all the above is adding more and more layers of post processing. Sucking more power. Destroying the planet. etc etc. But most importantly, slightly increasing lag (and greatly increasing lag paranoia!).

Mame, when enabling 'switchres' and using the correct modelines (with windows 'soft15khz' or Linux custom or otherwise) will display just fine on the same crt screens that the games were intended for. ...Oh yes it will.

There are no compensating hacks required using the above setup and therefore no/minimal processing required.

End of the day though, lcds suck for 15k games.


What card are you using ??
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » January 14th, 2010, 11:04 pm

ati 4850 (or is it 4870?)

Used a bargain bin nvidia card previously just fine.
User avatar
gargoyle67
Gateau superstar
Posts: 6500
Joined: August 22nd, 2008, 11:33 am
Location: Clacton-On-Sea init
eBay: gargoyle1967

Re: MAME scanline/shadowmask simulation

Postby gargoyle67 » January 15th, 2010, 12:27 am

@cps2, I am using arcade VGA (pci-e version) on a CRT btw :?
I've yet to get some games running without slight horizontal tear "rolling thunder" for example no matter how many settings I change :problem: .
"Yeah lets all get ponys instead, wait no lol trendy cabs" Err I think you meant Ponies didn't you ?
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » January 15th, 2010, 1:56 am

For rolling thunder/namco system 86 you need a modeline that puts out 288x224 @ 60.606060hz. It's fine if you use a slightly greater resolution (mame will give it a border), but it's important to match the refresh rate.

I've never used an arcadevga and I don't know how many modelines it supports. Advancemame may help if it's not doing as it's told, I dunno?
fagin
Posts: 812
Joined: February 9th, 2009, 7:04 pm
Location: UK

Re: MAME scanline/shadowmask simulation

Postby fagin » January 15th, 2010, 11:06 am

gargoyle67 wrote:@cps2, I am using arcade VGA (pci-e version) on a CRT btw :?
I've yet to get some games running without slight horizontal tear "rolling thunder" for example no matter how many settings I change :problem: .


Enable VSYNC within mame. :)
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » January 15th, 2010, 11:23 am

I think he's tried that.

vsync doesn't solve everything. For perfect speed accuracy and zero tearing you need a setup that can output at the exact same refresh. Your CRT needs to be sent the exact same mode but your computer hardware only supports a few modes by default. Even the arcadevga only supports the most common 15k screen modes.

Unfortunately, getting it right requires lots of tweaking.

Enabling vsync is the make life easy option.
The Arcadevga is a second option and is accurate enough with many games I assume.
Windows with 'Soft15k' installed is a third option which is simple enough to setup up yet gives you much more accuracy and allows you to use any exact modeline.
Using mame within linux (windows won't allow this) to feed on-the-fly exact modelines directly to the frame buffer (with no software in between) is the most accurate and most difficult option.
User avatar
cools
Armed Police Buttrider
Posts: 13555
Joined: August 17th, 2008, 4:49 pm
Location: Wales, United Kingdom
eBay: hordarian
Initials: CLS
Contact:

Re: MAME scanline/shadowmask simulation

Postby cools » January 15th, 2010, 11:47 am

pubjoe wrote:Using mame within linux (windows won't allow this) to feed on-the-fly exact modelines directly to the frame buffer (with no software in between) is the most accurate and most difficult option.


This is, but even then it simply isn't possible to generate some of the modes required to the *exact* refresh rate. For the stuff that you *can* get exact rates for (it varies depending on what graphics card you're using), it works fine.

DZine and myself have spent many, many hours working on this. Short of swapping graphics cards for each set of rates you need, you're not going to be able to get a perfect mode for every (15k) game :)
Image
User avatar
pubjoe
Fosters Political Ambitions
Posts: 10622
Joined: August 19th, 2008, 8:58 am
Location:

Re: MAME scanline/shadowmask simulation

Postby pubjoe » January 15th, 2010, 11:53 am

I've managed to remove tearing or juddering by inserting the correct modeline into soft15k as and when I come across a game I want to play that needs it. I haven't yet come accross anything that this didn't appear to work with, including rolling thunder.

Do you mean modelines inherently do not allow enough decimals to be 100% perfect? As in they are often 99.99999% accurate? Or are they more limited than that for other reasons?

Return to “Emulation Q&A”



Who is online

Users browsing this forum: No registered users