The NEW Build Your Own Arcade Controls

Software Support => GroovyMAME => Topic started by: mazinger-z on March 12, 2013, 07:29:52 pm

Title: New resolution and no need to adjust V-hold?
Post by: mazinger-z on March 12, 2013, 07:29:52 pm
Hello.
I'm using VMMaker with CRT emudriver and I love it. One feature that I particularly appreciate, is its ability to generate the modelines in such a way that you never need to touch the V-hold / V-freq pots when changing resolution. How is this achieved? The reason why I'm asking is that I need to add a custom resolution but I'm afraid that it will need a different V-hold setting, that would force me to readjust the potentiometer every time. The modeline I need is:
Modeline "NTSC 640x480 (60Hz)" 12.336 640 662 720 784 480 488 494 525 interlace -hsync -vsync
I already have a 640x480 interlaced resolution, but it isn't close enough to the NTSC standard, so the fields don't intercalate correctly and this gives an ugly (although readable) picture. I noticed that interlaced modes only look nice when they conform to the NTSC or PAL standards on some monitors and TV sets. Here's an example:

(http://s21.postimage.org/mdweqh6lf/tv1.jpg) (http://postimage.org/image/mdweqh6lf/) (http://s18.postimage.org/4lg1qpit1/tv5.jpg) (http://postimage.org/image/4lg1qpit1/) (http://s17.postimage.org/hnjqr8ghn/tv6.jpg) (http://postimage.org/image/hnjqr8ghn/)

Has anyone ever noticed this issue?
Title: Re: New resolution and no need to adjust V-hold?
Post by: sandheaver on March 12, 2013, 07:50:25 pm
Needing to tweak the settings when you change modes is a normal everyday thing.  This is why those knobs exist, or else they'd be set at the factory and users would not need to adjust them.

There are some monitors with digital controls, which can remember how you set things for each displaymode, but they will simply do the adjusting for you at a mode change.

What you see in the images is a result of the video card resizing the image before it's sent to the monitor.  You ask the card to do this when you set the modelines.  In your case, it looks like a 1024x768 images sized down to 640x480. 

I don't understand the questions, I guess.  You're squeezing a computer display onto an arcade monitor.  Do you really expect that to be perfect?
Title: Re: New resolution and no need to adjust V-hold?
Post by: mazinger-z on March 13, 2013, 06:07:08 am
Needing to tweak the settings when you change modes is a normal everyday thing.  This is why those knobs exist, or else they'd be set at the factory and users would not need to adjust them.

Yes, of course, but have you ever tried VMMaker? Thanks to it, I have more than a hundred different resolutions and I never have to touch any knobs when switching through them.

Quote
There are some monitors with digital controls, which can remember how you set things for each displaymode, but they will simply do the adjusting for you at a mode change.

Yes and there are TV sets that will automatically adjust to the new resolution.

Quote
What you see in the images is a result of the video card resizing the image before it's sent to the monitor.  You ask the card to do this when you set the modelines.  In your case, it looks like a 1024x768 images sized down to 640x480. 

No, it isn't. I have a Microvitec multisync monitor that displays that screen perfectly. Here it is:

(http://s18.postimage.org/c3z6zca5x/microvitec1.jpg) (http://postimage.org/image/c3z6zca5x/)

Quote
I don't understand the questions, I guess.  You're squeezing a computer display onto an arcade monitor.  Do you really expect that to be perfect?

Well, I managed to get perfect interlaced displays on my SCART TV. It can be done, provided the resolution is close enough to PAL or NTSC standards. The question is, how do I add another resolution by hand in such a way that I won't need to adjust V-hold any time I use it?
Title: Re: New resolution and no need to adjust V-hold?
Post by: Calamity on March 13, 2013, 06:23:54 am
Hi mazinger-z,

3 questions:

1 - If I understand right the pictures in your first post are the bad-looking interlaced case, isn't it?

2 - Have you tried the "new" PAL/NTSC settings in GroovyMAME? Do those produce nice interlaced modes on your TVs? (they should be standard-compliant) I'm asking this because I have only tested them with arcade monitors, and they look the same to me as any other intelaced mode.

3- When you say v-hold I understand you mean vertical centering? (answer third question first)

Sorry to through 3 questions on you first, they'll help me to give a proper solution.
Title: Re: New resolution and no need to adjust V-hold?
Post by: mazinger-z on March 13, 2013, 07:45:55 am
Hello Calamity

Quote
(answer third question first)
No problem!
Quote
3- When you say v-hold I understand you mean vertical centering?
I mean the knob that you use to stop the picture when it rolls. I don't want the screen to roll when I switch to the new resolution I'm going to add.
Quote
1 - If I understand right the pictures in your first post are the bad-looking interlaced case, isn't it?
Yes.
Quote
2 - Have you tried the "new" PAL/NTSC settings in GroovyMAME? Do those produce nice interlaced modes on your TVs? (they should be standard-compliant) I'm asking this because I have only tested them with arcade monitors, and they look the same to me as any other intelaced mode.
No, I haven't. I didn't even know they existed! I can test them on my TV if you want some feedback. Anyway, the NTSC modeline I want to add is for the front-end, so it's not strictly related to GroovyMAME.
Title: Re: New resolution and no need to adjust V-hold?
Post by: Calamity on March 13, 2013, 11:25:34 am
I mean the knob that you use to stop the picture when it rolls. I don't want the screen to roll when I switch to the new resolution I'm going to add.

Ok, then you just need to calculate the modeline so its vertical refresh keeps inside certain range. Your monitor can handle vertical resfresh rates within a certain range. For instance, for my Hantarex MTC9110 the range is about 12 Hz wide. Other monitors may have a narrower range. What you do with the v-hold or v-freq potentiomenter is to move this range up or down. I usually set it so frequencies from 50 Hz up to 62 Hz are properly synchronized. With that adjustment, I know that any modeline that I calculate which refresh is inside that range will sync properly. We need to do the analogue calculation for the horizontal range.
Title: Re: New resolution and no need to adjust V-hold?
Post by: mazinger-z on March 13, 2013, 01:16:20 pm
Thanks but I have no clue how to do this. Given the modeline I need and the range in wich all other modelines that VMMaker creates are, could you please help me calculate it?
Title: Re: New resolution and no need to adjust V-hold?
Post by: Calamity on March 13, 2013, 01:44:02 pm
Well, it's quite a simple algorithm although it's a bit long to explain, you have the whole method in the source code of GroovyMAME, in the modeline.c file.

Anyway you can tell the frequencies directly from your sample modeline, like this:

"NTSC 640x480 (60Hz)" 12.336 640 662 720 784 480 488 494 525 interlace  -hsync -vsync

Hfreq = 12.336 x 1000000 / 784 = 15734.69 Hz
Vfreq = Hfreq / 525 = 29.97 Hz x 2 (interlace) = 59.94 Hz
Title: Re: New resolution and no need to adjust V-hold?
Post by: sandheaver on March 13, 2013, 01:48:34 pm
Well, it's quite a simple algorithm although it's a bit long to explain, you have the whole method in the source code of GroovyMAME, in the modeline.c file.

Anyway you can tell the frequencies directly from your sample modeline, like this:

"NTSC 640x480 (60Hz)" 12.336 640 662 720 784 480 488 494 525 interlace  -hsync -vsync

Hfreq = 12.336 x 1000000 / 784 = 15734.69 Hz
Vfreq = Hfreq / 525 = 29.97 Hz x 2 (interlace) = 59.94 Hz

This is the single most helpful post I have ever read about modelines.  Thank you.