MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


"Dirty pixels" in MAME
#386450 - 05/25/20 10:41 PM


So I was playing a good old game of Double Dragon in MAME and decided to take a screenshot. When I looked closer at it, I noticed the pixels were not only stretched (due to the default resolution) but also had strange artifacting.

Here is an example

Zoomed in to avoid eye strain.

Now I got to wondering what was causing this, and I thought it might just be because of the stretching. So I set MAME to start windowed, turned off 'unevenstretch', and set the window size to be the exact size of this particular title, 256x240. To my dismay, this only made things worse:

Pixel perfect?

The artifacting is still there, but now the discolored pixels are the same size as the proper ones, making everything look blurry and muddied. This definitely isn't what the game is supposed to look like, here is the same section of the stage taken from a sprite ripping site:

Looks a lot cleaner.

So what am I doing wrong here? I'm no expert at using MAME, but there's gotta be a way to fix this, right?

Edited by Lurdiak (05/25/20 10:42 PM)



Trebor
MAME Fan
Reged: 01/18/05
Posts: 509
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386453 - 05/25/20 11:17 PM


> So what am I doing wrong here? I'm no expert at using MAME, but there's gotta be a
> way to fix this, right?

mame.ini

change this..
# OSD ACCELERATED VIDEO OPTIONS
#
filter 1

...to this:
# OSD ACCELERATED VIDEO OPTIONS
#
filter 0



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: Trebor]
#386454 - 05/25/20 11:26 PM


> mame.ini
>
> change this..
> # OSD ACCELERATED VIDEO OPTIONS
> #
> filter 1
>
> ...to this:
> # OSD ACCELERATED VIDEO OPTIONS
> #
> filter 0

Nope, that was already at 0.



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2261
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386456 - 05/25/20 11:46 PM


Run MAME with -nosnapbilinear and use F12 to take the screenshot(s).



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: MooglyGuy]
#386457 - 05/25/20 11:49 PM


> Run MAME with -nosnapbilinear and use F12 to take the screenshot(s).

I'm gonna assume setting snapbilinear to 0 instead of 1 is the equivalent of this?



MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2261
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386458 - 05/25/20 11:55 PM


> > Run MAME with -nosnapbilinear and use F12 to take the screenshot(s).
>
> I'm gonna assume setting snapbilinear to 0 instead of 1 is the equivalent of this?

I'm going to assume you're running MAME from some kind of frontend and say yes.



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: MooglyGuy]
#386459 - 05/26/20 12:00 AM


Well that works for getting clean screenshots, but aren't my displayed graphics still going to have dirty pixels when I play?



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386460 - 05/26/20 01:00 AM


At any rate, thanks everyone for your help.



Pr3tty F1y
MAME Fan
Reged: 07/18/05
Posts: 396
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386469 - 05/26/20 04:17 PM


> At any rate, thanks everyone for your help.

Non-square pixels (as far as output display) are a thing (partiuclarly for CRT based games). Most CRTs are 4:3 aspect ratio but the output resolutions of various arcade games and consoles are not always 4:3, but they are stretched to 4:3 (or there abouts, as CRTs had bezels and overscan so the aspect ratio was always likely a bit different between different CRTs/arcade operators/etc.

What you need to turn on is prescale. In addition, a higher resolution monitor also helps. Prescale scales the image up beyond it's original resolution and then scales it back down to your monitor's resolution. It's likely the best you can do for a LCD display (again, why a higher resolution display is better - the blurriness is less noticeable).



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: Pr3tty F1y]
#386471 - 05/26/20 04:48 PM


> Non-square pixels (as far as output display) are a thing (partiuclarly for CRT based
> games). Most CRTs are 4:3 aspect ratio but the output resolutions of various arcade
> games and consoles are not always 4:3, but they are stretched to 4:3 (or there
> abouts, as CRTs had bezels and overscan so the aspect ratio was always likely a bit
> different between different CRTs/arcade operators/etc.
>
> What you need to turn on is prescale. In addition, a higher resolution monitor also
> helps. Prescale scales the image up beyond it's original resolution and then scales
> it back down to your monitor's resolution. It's likely the best you can do for a LCD
> display (again, why a higher resolution display is better - the blurriness is less
> noticeable).

Turning on prescale did nothing. I'm not sure this has anything to do with pixel resizing, because as I've said the pixels are still blurry at 1x1 size with the original arcade display.

I sometimes try to rip sprites from games and this situation makes it nearly impossible to use mame to do so, since the tile viewer still has dirty pixels and its graphics cannot be captured with f12.

As you can see.

This situation was not present in earlier versions of MAME (or at least with other people's installations), because the program was routinely used to rip sprites, as can be seen here.

I truly believe this can be fixed, I just don't know what setting or file is wrong.

Edited by Lurdiak (05/26/20 04:49 PM)



Pr3tty F1y
MAME Fan
Reged: 07/18/05
Posts: 396
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386472 - 05/26/20 05:16 PM


> > Non-square pixels (as far as output display) are a thing (partiuclarly for CRT
> based
> > games). Most CRTs are 4:3 aspect ratio but the output resolutions of various arcade
> > games and consoles are not always 4:3, but they are stretched to 4:3 (or there
> > abouts, as CRTs had bezels and overscan so the aspect ratio was always likely a bit
> > different between different CRTs/arcade operators/etc.
> >
> > What you need to turn on is prescale. In addition, a higher resolution monitor also
> > helps. Prescale scales the image up beyond it's original resolution and then scales
> > it back down to your monitor's resolution. It's likely the best you can do for a
> LCD
> > display (again, why a higher resolution display is better - the blurriness is less
> > noticeable).
>
> Turning on prescale did nothing. I'm not sure this has anything to do with pixel
> resizing, because as I've said the pixels are still blurry at 1x1 size with the
> original arcade display.
>
> I sometimes try to rip sprites from games and this situation makes it nearly
> impossible to use mame to do so, since the tile viewer still has dirty pixels and its
> graphics cannot be captured with f12.
>
> As you can see.
>
> This situation was not present in earlier versions of MAME (or at least with other
> people's installations), because the program was routinely used to rip sprites, as
> can be seen here.
>
> I truly believe this can be fixed, I just don't know what setting or file is wrong.

Set prescale somewhere around 3 to 5. It's a multiplier. Start with 3 and move it higher if you want it sharper. The higher the value, the more taxing it is on your graphics card so you can introduce lower performance this way (especially if you're using a lower end/integrated GPU).



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: Pr3tty F1y]
#386473 - 05/26/20 06:15 PM


> Set prescale somewhere around 3 to 5. It's a multiplier. Start with 3 and move it
> higher if you want it sharper. The higher the value, the more taxing it is on your
> graphics card so you can introduce lower performance this way (especially if you're
> using a lower end/integrated GPU).

Even at prescale 5, the output is completely identical to before.

Without any prescale

With prescale 5



Pr3tty F1y
MAME Fan
Reged: 07/18/05
Posts: 396
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386475 - 05/26/20 08:27 PM


> > Set prescale somewhere around 3 to 5. It's a multiplier. Start with 3 and move it
> > higher if you want it sharper. The higher the value, the more taxing it is on your
> > graphics card so you can introduce lower performance this way (especially if you're
> > using a lower end/integrated GPU).
>
> Even at prescale 5, the output is completely identical to before.
>
> Without any prescale
>
> With prescale 5

Try these settings in your mame.cfg and set the resolution to your monitor's maximum resolution:

Code:

#
# CORE RENDER OPTIONS
#
keepaspect 1
unevenstretch 1
unevenstretchx 0
intoverscan 0
intscalex 0
intscaley 0

#
# OSD VIDEO OPTIONS
#
video auto
numscreens 1
window 0
maximize 1
waitvsync 1
syncrefresh 0

#
# OSD PER-WINDOW VIDEO OPTIONS
#
screen auto
aspect auto
resolution 1920x1080@60
view auto

#
# OSD FULL SCREEN OPTIONS
#
switchres 0

#
# OSD ACCELERATED VIDEO OPTIONS
#
filter 1
prescale 3



This is how it looks for me @ 1080p on my 1080p monitor:



Lurdiak
MAME Fan
Reged: 05/25/20
Posts: 8
Send PM


Re: "Dirty pixels" in MAME new [Re: Pr3tty F1y]
#386478 - 05/27/20 12:37 AM


Your settings don't fix my problem at all... in fact you can see in the screenshot you posted that the pixels are extremely blurry.



And when I apply them on my end it actually combines with my previous issue to create an even worse look.



We're actually getting further away from clean pixels...



John IV
IV/Play, MAME, MAMEUI
Reged: 09/22/03
Posts: 1969
Loc: Washington, USA
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386480 - 05/27/20 02:56 AM


Sounds like you're going to want to run mame w/out aspect ratio correction if you don't want the pixel interpolation.

You could also try -nounevenstretch.



john iv
http://www.mameui.info/



ICEknight
MAME Fan
Reged: 07/06/15
Posts: 166
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386524 - 05/30/20 04:38 PM


> > Set prescale somewhere around 3 to 5. It's a multiplier. Start with 3 and move it
> > higher if you want it sharper. The higher the value, the more taxing it is on your
> > graphics card so you can introduce lower performance this way (especially if you're
> > using a lower end/integrated GPU).
>
> Even at prescale 5, the output is completely identical to before.

At least on my laptop, prescale doesn't seem to be working with certain video modes.

Try using prescale 3 and replacing:

Code:

video                     auto


With:

Code:

video                     opengl


(Other options: gdi, d2d, bgfx)



7n004
MAME Fan
Reged: 01/11/19
Posts: 30
Send PM


Re: "Dirty pixels" in MAME new [Re: Lurdiak]
#386600 - 06/02/20 01:39 PM


I see no problems over here, all defaults but '-window', make sure your video card driver isn't doing any "enhancements" and also make sure your video driver is set for RGB (4:4:4) or YUV (4:4:4), aother than that you'll see color compression not related with mame.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 255 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1873