The need for an odd number of lines for interlaced modes is pretty obvious
Ah, because of the half-line offset. You're right, that should be obvious but I didn't even think about it while editing interlaced modes...
Of course the very fact of having odd number of lines is what causes interlacing. The trick relies on a half scanline, the beam then goes on top of the screen but doesn't start at the same position than the previous frame. So, to display in progressive mode, this half scanline must be avoid ! That's what 240p stuffs do ( they usually display 262 lines, not 262.5 ).
Knowing that, it's been more than 10 years, and still to this day nobody finds nothing to add on this :
1855 /* video hardware */
1856 MCFG_SCREEN_ADD("screen", RASTER)
1857 MCFG_SCREEN_REFRESH_RATE(15625/271.5)
It's from the
Cave.c driver, in MAME sources...
Dude ! 271
.5 lines !...

Sure, the actual games might run at ~ 57.5 Hz (because in arcades, there's no need to stay close 60 Hz), but I highly doubt they choose to display 271
and half a scanline. So the Hfreq may be something different from 15625 Hz too (and the frame size would be different, so the number of total cycles).
Again, see the
Psikyo SH driver :
177 VSync - 60Hz
178 HSync - 15.27kHz
Ok.... 15270 / 60 = 254
.5 !

Later :
819 MCFG_SCREEN_ADD("screen", RASTER)
820 MCFG_SCREEN_REFRESH_RATE(60)
821 MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
822 MCFG_SCREEN_SIZE(64*8, 32*8)
823 MCFG_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 28*8-1)
Ok, we still have 60 Hz, but for a 512x256 frame... (the game is 320x224, 512 is pretty big to display only 320 px).
If the Hfreq is ~15270 Hz, the pixel clock must be : 7.81824 MHz.
By looking at the PCB, there's no Xtal that can provide this frequency with integer dividers. The only one is 57.2727MHz, so the possible Dclk could be :
7,1590875 MHz ( Mclk/8 ). And actually, there are other boards that use this Dclk.
So the refresh rate of the Psikyo games is not 60 Hz, for sure !
And to say so, 60 Hz is not used so often at all...
These days I'm not so obsessed about μHz precision and, indeed, GroovyMAME doen't use precalculated pixel clocks.
Sure, you're right. And it makes even more sense considering that providing so many efforts to match incorrect refresh rates is absurd.

(BTW: have you really tested GroovyMAME with CRT Emudriver on an ATI card? I find your lack of faith disturbing
).
As I said earlier, this time I want it to be done the right way

.
So, first there's a need
to write correct values for the video parameters in many sources. And it can't be something better, because this way, the emulation accuracy is improved.
Then, there's a need to closely match those specifications for 15 kHz display, ie write modelines that can do so. Sure, it's not about seeing a difference of 0.00243 Hz (that will be well handled by GroovyMame, even for the audio part, as you explained to me) , but by following original specifications, you generally get a nice centered picture that matches either the 5% or 10% overscan of the NTSC standard. Because all those "weird frequencies" aren't weird at all when you know they are designed to this purpose (
even if some manufacturers screw up the thing ^^' ). Remember there's no "arcade standard" (no need to have 60Hz, and no need to have frame sizes with multiples of 8, not even integer values for pixels ). The main constraint is the overscan that comes from the NTSC specifications, which affects TV screens as well as arcade monitors.
I want to use a nice Trinitron for my dedicated cab, and I don't want to have to pick up the remote, put the TV in stand by, type the code, go in service mode menus, adust the picture size /position , validate, exit the menus...
To illustrate this, let's go back the CPS example :
This is what I just obtained for the CPS-III system, by editting the current generic_15 preset frequency range:
monitor custom
crt_range0 15400.00-15720.00,49.50-65.00,2.000,4.700,8.000,0.064,0.192,1.024,0,0,192,288,448,576
Modeline "384x224_60 15.43KHz 59.58Hz" 7.78 384 400 440 504 224 233 236 259 -hsync -vsync
Not bad !

But .... with 7.78 MHz instead of something close to 7.50, you get : 504*259/ 7.78 = 16778,41 µs (59.60 Hz).
The 504*259 frame is close to the original one (and you can obtain it by
lowering the Hfreq in presets

, otherwise the difference would have been greater), but by staying closer to the signal, you can get :
488x259 /7.53 = 16785,13 µs (59.57 Hz) -> closer to the specs (16778.2 µs, 59.58 Hz).
Simply because 7.53 is closer to 7.50 than 7.78. The greater the pixel clock, the greater the total frame (
the smaller the active display) , and the greater the difference.
But at the end, what's the point to stay close if I'm stuck to multiples of 8 even for the centering of the picture ?

Choosing between 8, 16 or 24 px for the porch value won't give me a perfectly centered picture on my screen, even if I had carefully adjusted it according to NTSC standard (better than it was set at first) and had been reporting the corresponding values to the modeline generator. Simply because the ratio of 858/720 doesn't match the 488/384 one (neither 504/384 and 486/384).
See the thing :

This is the 488x259 frame. The timings of the NTSC standard had been reported to this frame size. Black is blanking, red border is 5% overscan, yellow is 10 %, blue lines are the 720x480 active display and show the center of the picture (which you set according the center of your own screen,
whatever size it is, flat or curved, Trinitron or regular). Choosing between 16 or 24 (the closest values allowed) won't let me reach the center. The picture will be off centered anyway, and the active display of the game will have some lines outside the 5% area I had set, and a black border at the other side.
So, back to service mode...
And this case would not be the only one, about every stuffs suffer the 8px limitations of the CRTC register, that we still can't get rid of as I understand it now (even with cards that can do
TV out, and are supposed to deal with pixel granularity...).
Well, at this point, you can think of getting a Matrox card ^.^ , or simply double the horizontal timings, in order to get a better granularity equivalent to 4 px. By displaying a 976*259 frame (with 7.53x2 = 15.06 MHz Dclk) I can get something close to the original duration, and manage to get an almost perfectly centered picture, that evenly matches the 5% overscan I set in my TV (because every screens are supposed to have at best 5% overscan) :

(
here the Vsize is doubled too, for better visualization ).
See how the active display nicely matches the 5% overscan area (something that explains the 486*259 frame size), and the fact that even if the game is displayed by an old monitor with larger overscan (10%), all HUD informations are still visible. That's the way to do it.
So, at the end, there's no need to spend much time in order to find that sweet graphic card that can produce very low pixel clocks (according to original specifications) because the 8px constraint ruins all the nice features about modelines control. But on the other side, it means that cards which can't go under 10-12 MHz aren't out of interest anymore...
But if I have to deal with those cards, I'm not sure about how I can set up GroovyMAME in order to produce the results I expect, because it is written in order to aim for the fastest freqs (instead of the lowest), and the very fact of letting the users define porches durations doesn't lead to perfectly centered picture. It can lead to Mr. Lettuce screwing up the thing with impossible back porch durations, but that's another story. ^^'
To get a centered picture, porches informations aren't necessary. Once you defined the (correct) frame size, you just have to aim to the corresponding center of your set-up (that is not supposed to be changed, and that you don't want to change). In NTSC, standard that concerns every of us (
because the games we play come from NTSC countries ), the center of the picture never changes. Even with modifications of the standard, engineers aim to keep the same center. Because the center of the screen itself never changes : the beam reachs the perfect middle of the screen when the magnetic field of the yoke is at zero. Knowing that for CRT, the video signal not only provides visible informations, but timings according to the current that will move this beam as well, it makes perfect sense. That's why the old 12.27 MHz and the new 13.5 MHz standard have the
same center, even with different frame sizes and active display.
On the 13.5 MHz standard, the horizontal middle is at the 485th pixel (Hsync + Bporch = 125 , and you add 720/2). That means the part before that is ~77% of the signal. With a 486*259 frame, the middle is ~ at the 274th or 275th pixel (because we deal with integers numbers, it's not possible to set 274.5, something that arcade board can actually do). Then you set a value for Hsync according to your pixel clock, close to the standard, which is 4.7 µs for NTSC :
7.5*4.7 = 35.25, rounded to 35px.
Then you get the Bporch value : 274 - (384/2) - 35 = 47 px. ( the last value defines the Fporch : 486 - 384 - 35 - 47 = 20)
So, there's no need to let the user define those parameters (
especially considering that they will tend to screw up things 
). There's a need to define correct frame sizes, with pixel clock values as close as possible to the games.
But that works well with pixel granularity, when you deal with values rounded to multiples of 8 you can't achieve this anymore. The principle is still the same, but the result is an off centered picture, unless you're lucky (unless you deal with originals specifications done with multiples of 8, or that come close to).
As for the convenience of having 16+ kHz frequencies available, it's just required for vertical games on horizontal monitor. It allows you having real 256p@60Hz resolutions, otherwise you can't achieve this.
Yes, I understand... But by reaching the lowest values for Vblank (without getting artifacts), I would want to get the lowest Hfreq that could give me the desired Vfreq. If I want to play Bomb Jack on my Trinitron without rotating the TV, I want to have 256*1.04 = 266 lines for the frame size. Then to display the game at ~ 60 Hz (
but I don't think the original game ran at that frequency 
) :
266*60 = 15960 Hz.
Because my Trinitron can display the sickest scanlines out there, but If I send something above 16 kHz, it will say to me : "
sorry dude...I can't "
And if I'm using an arcade monitor that can do 16.67 kHz, I want the have max number of lines for the frame size, in order to get the active display inside the safe area I defined. Because on my Trinitron, even if I get a picture for Bomb Jack at 266 lines, some parts will be outside the screen, I will have to reduce Vsize. But a simple potentiometer nicely placed before the vertical amplification will allow me to reduce the size without going in service mode (but it won't allow me to adjust delay, ie moving the center of the picture).
OK, after all of this, don't get me wrong :
GroovyMame and its features are great, but for some crucial things, I end up going back to the old way, getting my pen and writing by hand the specific stuffs I want, because even if the thing is very flexible, it is designed the opposite way from my viewpoint.
I hope you understand all of this, and hope you'll incorporate the updated drivers I'll work on. Because here too, to specify correct video parameters ( that won't write themselves ), I'll take my pen and some time to carefully inspect PCBs and trying to match what could have been done, realistically, according to overscan and NTSC stuffs.
Since I'm not a developper (just a random guy on the net, but with solid knowledge on CRT), I don't think the MAME team will bother with it, especially considering that many drivers haven't been updated since 10 years on those parameters, and the fact that anyway everybody plays on crappy LCD screens (even the MAME guys...), are used to triple buffering, and would prefer to stay around 60 Hz because their screens can't sync with lower (and correct) refresh rates.
