Ideal MAME settings for UVC?

The place for all discussion on gaming hardware
Post Reply
User avatar
Jockel
Posts: 3073
Joined: Tue May 20, 2008 5:15 pm
Location: Berlin, Germany
Contact:

Ideal MAME settings for UVC?

Post by Jockel »

So, recently I got my UVC working with my PC.
But it turns out that the picture is a blurry mess (think Mushi PS2).
It's nice and steady 240p, but of course some IQ is lost when converting from 640x480 to 240p.
So what are the perfect settings for MAME to get a nice picture?
I want it to look as close to the PCB as possible.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Ideal MAME settings for UVC?

Post by Ed Oscuro »

Realistically your answer is probably gonna be "fiddle with this and that to tweak resolution before the UVC." Maybe some kind of sharpening setting (not on a monitor, sharpening of the video output by the graphics card) could help.

The best thing to do would be to get a video card that outputs 240p resolutions.
speedlolita
Posts: 603
Joined: Sat Aug 15, 2009 9:13 pm
Location: Europe

Re: Ideal MAME settings for UVC?

Post by speedlolita »

Or use Soft15 if your GPU supports it.
User avatar
Jockel
Posts: 3073
Joined: Tue May 20, 2008 5:15 pm
Location: Berlin, Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Jockel »

If I were to install soft 15khz and feed a 240p signal to the UVC, would it pass through, though?
Edit: also just assuming things: but if the UVC works by just taking every second line into the picture, shouldn't an exact line doubling from 240p be perfect?
User avatar
Fudoh
Posts: 13041
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Fudoh »

You have to make sure that games are just linedoubled. With the Cave titles, that's easy, because they're exactly doubled no matter if you DDraw or D3D, since they have 240 lines of resolution. With other titles e.g. those with 224 lines you have to make sure that those are doubled to 448 lines and the rest is filled up with black.

Some (many? all?) PC / UVC combinations have a slight problem with line/pixel alignment. Look for a game where you get a single horizontal line of pixels to check this. If the source is 1 Pixel, it should be 2 pixels on the doubled signal and then 1 again on the UVC output. If you get 2 blurry lines of pixels instead (or one solid and 1 blurry), then the output resolutions are misaligned. You have have to shift the PC's output up or down 1 single line to get a much sharper result. I don't know if there's a software to do this, but there are RGB interfaces to do this.

With the correct alignment the UVC's 240p output is every bit as sharp as the PCB. There won't be a difference.

(EDIT: that's actually what you just asked while I was typing)
User avatar
Jockel
Posts: 3073
Joined: Tue May 20, 2008 5:15 pm
Location: Berlin, Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Jockel »

Thanks for the elaborate reply.
Do you have any idea how to get a clean line doubled image out of mame?
User avatar
Fudoh
Posts: 13041
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Fudoh »

Has been a long time since I used MAME, but I think you simply switch from D3D to D2D and disable the hardware scaling.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Ideal MAME settings for UVC?

Post by Ed Oscuro »

Oh, line doubling will actually do it? I was assuming that was already done...

Modern MAMEs won't require you to switch away from D3D. Just disable bilinear filtering.
Fudoh wrote:Some (many? all?) PC / UVC combinations have a slight problem with line/pixel alignment. Look for a game where you get a single horizontal line of pixels to check this. If the source is 1 Pixel, it should be 2 pixels on the doubled signal and then 1 again on the UVC output. If you get 2 blurry lines of pixels instead (or one solid and 1 blurry), then the output resolutions are misaligned. You have have to shift the PC's output up or down 1 single line to get a much sharper result. I don't know if there's a software to do this, but there are RGB interfaces to do this.
That sounds like a problem inherent in using 240p to display sources that aren't a multiple of 240 lines of resolution. You could try switching desktop resolutions to fit but you could still have a problem with doubled / dropped resolution lines if the desktop resolution isn't a multiple.
User avatar
emphatic
Posts: 7991
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: Ideal MAME settings for UVC?

Post by emphatic »

Fudoh is right on the money here, brother. The UVC works best with inputs at 480p IMHO, just make sure to remove any filters in MAME.
Image | My games - http://www.emphatic.se
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
Fudoh
Posts: 13041
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Fudoh »

Modern MAMEs won't require you to switch away from D3D. Just disable bilinear filtering.
I haven't tried this, but I can't imagine that's it. Filtering doesn't change the scaling (hence the name "filter") and the standard for D3D is still a scale to fullscreen (which isn't linedoubling for most games).
That sounds like a problem inherent in using 240p to display sources that aren't a multiple of 240 lines of resolution.
no, that's not. UVC + 360 at 480p shows the same "problem" (if you want to call it a problem).
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Ideal MAME settings for UVC?

Post by Ed Oscuro »

Fudoh wrote:
Modern MAMEs won't require you to switch away from D3D. Just disable bilinear filtering.
I haven't tried this, but I can't imagine that's it. Filtering doesn't change the scaling (hence the name "filter") and the standard for D3D is still a scale to fullscreen (which isn't linedoubling for most games).
I see what you mean now. Each line of horizontal resolution isn't guaranteed to be a set multiple of a 240p source, i.e. 480p, or double 480p with 4 pixel lines per horizontal line of pixels, or more (unless you had a resolution running that was an actual double of the game's resolution), so there could be some dropped or doubled lines of resolution. I expect that you would need the resolution to come out as an exact double of the UVC's target output resolution, else some lines will be doubled while others are dropped. I wouldn't expect it to just look blurred, though...

I don't know what this would look like on the horizontal direction, but blur along the vertical axis, rather than dropped lines / shimmering effects, would seem to indicate the image is being filtered - easy enough to check of course. But maybe I've just got that all wrong.
That sounds like a problem inherent in using 240p to display sources that aren't a multiple of 240 lines of resolution.
no, that's not. UVC + 360 at 480p shows the same "problem" (if you want to call it a problem).
Lost the thread completely, sorry.
Last edited by Ed Oscuro on Sun Nov 04, 2012 10:34 pm, edited 1 time in total.
User avatar
Fudoh
Posts: 13041
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Fudoh »

If MAME's set to proper linedoubling and the graphics card to 480p output and the result through the UVC is still not as sharp as the PCB, then it's a tiny bug that's caused by the UVC's design and which can be corrected by shifting the image 1 pixel up or down. It's not PC related. The same happens with a Wii, a PS2, a XBox360 or whatever you have that outputs 480p into the UVC.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Ideal MAME settings for UVC?

Post by Ed Oscuro »

I edited my previous post but I would like to clarify:

In modern MAMEs, disabling bilinear filtering will cause the MAME core to revert to a linedoubling method. I am unclear about whether you are calling this "perfect" linedoubling or not: depending on the original resolution displayed and the target resolution of your PC display, it's quite possible to have one line repeat for 4 pixels while the next line is repeated for 5 pixels. But other than that, it is linedoubling, not inherently blurry (on a monitor). Yes, this works with D3D, and has for a long time.

I should make sure to point out I don't know how a UVC will treat this "imperfect" linedoubling. It should still fare much better than a blurred image, maybe at the cost of some shimmering or blur.

I seem to recall having this discussion before...just get a MAME frontend and look at what it does when you disable bilinear filtering.
User avatar
Fudoh
Posts: 13041
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Fudoh »

depending on the original resolution displayed and the target resolution of your PC display, it's quite possible to have one line repeat for 4 pixels while the next line is repeated for 5 pixels
sorry, but that has *nothing* to do with linedoubling. That's just some kind of (cheap) full scaling. If you apply linedoubling to a 15khz resolution, you will always end up with a resolution of 480p or lower and everything below 480p will be masked black. And I'm pretty sure that you can still only achieve this by using DDraw instead of D3D.

The rest adresses a problem which will remain after Jockel has fixed the MAME settings.

I can only stress that a proper UVC or Emotia setup will look 100% like the PCB. If it looks anything different, then you're doing something wrong.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Ideal MAME settings for UVC?

Post by Ed Oscuro »

OK, I see now that games will start with bars on all four sides with DirectDraw on - so the line doubling must be the same amount to each line of resolution, instead of the almost-close doubling of a full height mode.

You're right - I tested out other modes (DX8 won't initialize, which has me scared for the future of DirectDraw - if Microsoft drops support for this then I don't know what MAMEdev will do) and DirectDraw was the only one which had this feature. GDI doesn't, nor do the two D3D modes.

It still ends up within (for my machine) a 1920x1200 image (given that is the target resolution of the display adapter), and a larger portion of the center section than 480p, but it's closer to what's being requested than the CPU scaling (I wouldn't really call it cheap; the full scaling without blur will take more CPU cycles than simple line doubling, tripling, or quadrupling - but that's not really relevant).
User avatar
Fudoh
Posts: 13041
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: Ideal MAME settings for UVC?

Post by Fudoh »

I wouldn't really call it cheap; the full scaling without blur will take more CPU cycles than simple line doubling, tripling, or quadrupling - but that's not really relevant
there are fantastic scaling algorithms available out there, but MAME just doesn't use any. You get either "nearest neighbour" scaling or you get the blurry scaling through the GPU.

If I remember right from my MAME time, using high PC resolutions is fine, even with activated GPU scaling. You just have to enable the prescaling.
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Ideal MAME settings for UVC?

Post by Ed Oscuro »

Fudoh wrote:If I remember right from my MAME time, using high PC resolutions is fine, even with activated GPU scaling. You just have to enable the prescaling.
I think I vaguely remember some kind of prescaling option checkbox in frontends, but I haven't seen it for a long while. I don't think it's possible to do this anymore - MAME's current frontends basically allow four types of video mode (not including HLSL) - no video (not useful for our purposes), the precise line-multiplying (DirectDraw only until I see otherwise), nearest neighbor (simple and cheap scaling that looks best) and GPU scaling, as you say. There might be a switch within the command line for prescaling...dunno, that would suggest that you could try the DirectDraw scaling then, which would be handy. It would be quite nice if they would just up and modernize the modes so that you could make use of DirectX 9 or newer drivers while still getting a choice of a precise line-multiplier...one can dream, right?

Not a real big fan of the other scalers (the console emulator line-enhancing ones) - I think HLSL effects or even the default prescaling probably fit the bill better.
KBZ
Posts: 1257
Joined: Sat Mar 26, 2005 4:47 am

Re: Ideal MAME settings for UVC?

Post by KBZ »

I was never able to get anything but a blurry mess out of my UVC since I never really figured out how to do line doubling properly.

Switching to groovymame and an ati 9250 loaded with calamity drivers has given me the most clear and sharp picture I could ever ask for.
=/
User avatar
wnka
Posts: 128
Joined: Fri Apr 25, 2008 3:58 am
Location: Seattle, WA

Re: Ideal MAME settings for UVC?

Post by wnka »

On my UVC, I have to shift the screen up/down a line to get things to line up correctly. In MAME you launch a game, hit tab, pull up the 'Slider Controls' and then bump the "Screen Vert Position" or "Screen Horiz Position" depending on if you're in tate or not.
User avatar
emphatic
Posts: 7991
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: Ideal MAME settings for UVC?

Post by emphatic »

wnka wrote:On my UVC, I have to shift the screen up/down a line to get things to line up correctly. In MAME you launch a game, hit tab, pull up the 'Slider Controls' and then bump the "Screen Vert Position" or "Screen Horiz Position" depending on if you're in tate or not.
Awesome, thanks! Are these settings saved into each game's .cfg file, or do you have to do it each time you start a game?
Image | My games - http://www.emphatic.se
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
User avatar
Overkill
Posts: 513
Joined: Mon Aug 22, 2011 6:11 pm
Location: Portugal

Re: Ideal MAME settings for UVC?

Post by Overkill »

emphatic wrote:
wnka wrote:On my UVC, I have to shift the screen up/down a line to get things to line up correctly. In MAME you launch a game, hit tab, pull up the 'Slider Controls' and then bump the "Screen Vert Position" or "Screen Horiz Position" depending on if you're in tate or not.
Awesome, thanks! Are these settings saved into each game's .cfg file, or do you have to do it each time you start a game?
They stay saved. I use that myself with Crt_Emu_Driver
Post Reply