Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Making switchres pick 24khz and 31khz modes on a tri-sync MS-2931 monitor  (Read 3105 times)

0 Members and 1 Guest are viewing this topic.

minase

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:January 04, 2017, 10:13:12 pm
  • I want to build my own arcade controls!
Hi, I'm new to GroovyMAME, and interested in getting it working perfectly with my newly acquired auto tri-sync Nanao MS-2931 monitor (in a Sega Blast City cab).

I have some questions about how switchres selects video modes and why I'm not quite getting the results I want. Hopefully it's ok to post a new thread on this - I didn't want to derail any of the stickies, but I can move this there if appropriate.

Some versions for context:
  • I'm running this on GroovyArcade, uname -a: Linux GroovyArcade 3.17.6-1-GA #1 SMP PREEMPT Wed Dec 17 19:40:31 CET 2014 x86_64 GNU/Linux
  • switchres --version: 1.51 by Chris Kennedy (C) 2010
  • groovymame -h reports: U.M.E. v0.158 (Feb 14 2015) - Universal Machine Emulator
    Copyright Nicola Salmoria and the MAME and MESS teams
    GroovyMAME - SwitchRes version 0.015f

First, 15khz mode selection seems to work perfectly. I've checked a few games, and all of them use the exact resolution, and almost exact vertical refresh timings. This is awesome, and covers 99% of things I'll be using MAME for, since for medium/high-res I'll mostly be using real boards (Naomi etc).

That said, I'd still like to get 24khz and 31khz working for those rare occasions where an emulated game will use them, and I'm not having as much luck there.

During my testing, I've tried using both the ms2930 monitor preset, and manually copying custom crt_ranges from the Monitor Preset thread into switchres.conf/mame.ini/ume.ini so I can play around with them.
(As an aside, it looks like for my version the ms2930 preset 24khz crt_range does not exactly match the range given in the thread: ms2930 uses 320,384 as min,max lines, and the range in the thread is for 384,400. Which is correct? Neither seem to work correctly, but the below will all use the ms2930 preset)



My test case for 24khz is Virtua Fighter 3, a Model 3 game that I think was commonly installed in this cab.
Here's the relevant `groovymame -v` output:

Code: [Select]
SwitchRes: v0.015f, Monitor: ms2930, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Monitor range 15450.00-16050.00,50.00-65.00,3.190,4.750,6.450,0.191,0.191,1.164,0,0,192,288,448,576
SwitchRes: Monitor range 23900.00-24900.00,50.00-65.00,2.870,3.000,4.440,0.451,0.164,1.148,0,0,384,400,0,0
SwitchRes: Monitor range 31000.00-32000.00,50.00-65.00,0.330,3.580,1.750,0.316,0.063,1.137,0,0,480,512,0,0
SwitchRes: Found output connector 'VGA-0'

SwitchRes: Entering switchres_modeline_setup
SwitchRes: v0.015f:[vf3] Calculating best video mode for 496x384@60.000000 orientation: normal

SwitchRes: (   1)x(   1)_(60=0.0000Hz)
   rng(0):  640 x 480_60.000i 15.930 [fract] scale(1, 1, 1) diff(22.50, 0.00, 0.0000) ratio(1.290, 1.250)
   rng(1):  512 x 384_58.178p 24.900 [fract] scale(1, 1, 1) diff(3.12, 100.00, -1.8224) ratio(1.032, 1.000)
   rng(2):  640 x 480_60.000p 31.680 [fract] scale(1, 1, 1) diff(22.50, 0.00, 0.0000) ratio(1.290, 1.250)

SwitchRes: [vf3] (1) horizontal (496x384@60.00)->(640x480@60.00)
   rng(2):  640 x 480_60.000p 31.680 [fract] scale(1, 1, 1) diff(22.50, 0.00, 0.0000) ratio(1.290, 1.250)
SwitchRes: Modeline "640x480_60 31.68KHz 60.00Hz" 24.58 640 648 736 776 480 490 492 528   -hsync -vsync
SwitchRes: Running 'xrandr  --newmode "640x480_60.00" 24.58 640 648 736 776 480 490 492 528   -hsync -vsync'
SwitchRes: Running 'xrandr  --addmode VGA-0 "640x480_60.00"'
SwitchRes: Running 'xrandr  --output VGA-0 --mode "640x480_60.00"'

As you can see, it picks a 31khz mode and upscales, I would guess because it thinks it can't get to 60hz at 24khz?
The thing is, I'm pretty sure this monitor should have no problem doing it. The monitor manual specifically uses Sega Model 3 24khz as a standard timing to use during calibration, in fact. See the table 2-1 on http://wiki.arcadeotaku.com/images/3/34/MS-2931_Service-manual_full.pdf page 48.

Any ideas how I can get native 496x384@60hz?


My test case for 31khz are Naomi games, which again were commonly installed in this cabinet.
Here's the `groovymame -v` output for Powerstone:

Code: [Select]
SwitchRes: v0.015f, Monitor: ms2930, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Monitor range 15450.00-16050.00,50.00-65.00,3.190,4.750,6.450,0.191,0.191,1.164,0,0,192,288,448,576
SwitchRes: Monitor range 23900.00-24900.00,50.00-65.00,2.870,3.000,4.440,0.451,0.164,1.148,0,0,384,400,0,0
SwitchRes: Monitor range 31000.00-32000.00,50.00-65.00,0.330,3.580,1.750,0.316,0.063,1.137,0,0,480,512,0,0
SwitchRes: Found output connector 'VGA-0'

SwitchRes: Entering switchres_modeline_setup
SwitchRes: v0.015f:[pstone] Calculating best video mode for 640x480@61.702587 orientation: normal

SwitchRes: (   1)x(   1)_(60=0.0000Hz)
   rng(0):  640 x 480_60.566i 16.080 [integ] scale(1, 1, 1) diff(0.00, 0.00, -1.1366) ratio(1.000, 1.000)
   rng(1):  640 x 384_58.178p 24.900 [fract] scale(1, 1, 1) diff(0.00, 0.00, -3.5250) ratio(1.000, 0.800)
   rng(2):  640 x 480_60.491p 31.940 [fract] scale(1, 1, 1) diff(0.00, 100.00, -1.2111) ratio(1.000, 1.000)

SwitchRes: [pstone] (1) horizontal (640x480@61.70)->(640x480@60.57)
   rng(0):  640 x 480_60.566i 16.080 [integ] scale(1, 1, 1) diff(0.00, 0.00, -1.1366) ratio(1.000, 1.000)
SwitchRes: Modeline "640x480_60 16.08KHz 60.57Hz" 13.38 640 680 744 832 480 487 493 531 interlace  -hsync -vsync
SwitchRes: Running 'xrandr  --newmode "640x480_60.57" 13.38 640 680 744 832 480 487 493 531 interlace  -hsync -vsync'
SwitchRes: Running 'xrandr  --addmode VGA-0 "640x480_60.57"'
SwitchRes: Running 'xrandr  --output VGA-0 --mode "640x480_60.57"'

This time it picks a 15khz interlaced mode instead of a regular 640x480@60 31khz mode... which by the way is the mode I'm using in xorg.conf for the front end, and it works very nicely :)

Any ideas how I can fix this?

One thing to note is I have *not* yet tried the generic tri-sync arcade monitor preset. I was a little worried about testing it out on my CRT.

One last question for people on this forum: I've seen a couple of posts around the internet claiming switching a lot on these tri-sync monitors is somehow 'bad'. Any truth to that claim? I don't understand how switching from 15->31khz is much different than switching from one 15khz mode to another? Do I have anything to worry about switching between 31khz menu frontend and 15khz games several times a day? (This cab will be used by a bunch of people.)

Thanks for any assistance.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7463
  • Last login:July 19, 2025, 04:03:33 am
  • Quote me with care
Hi minase,

I just tested the ms2930 monitor preset with latest GroovyMAME version (Windows) and it's picking the right mode in both cases (496x384@24kHz and 640x480@31kHz respectively).

I guess this was a bug with the modeline scoring system back in 0.015f that has been fixed since then. Please try again with the latest build.

However, I've noticed you won't be able to achieve 60 Hz at 24 kHz with the current ms2930 preset. Whoever created it, used a huge vertical back porch that wastes the available frequency.

Either port the 25 kHz range from arcade_15_25_31 to the ms2930 or simply use the arcade_15_25_31 preset directly.


Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

minase

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:January 04, 2017, 10:13:12 pm
  • I want to build my own arcade controls!
Thanks for the advice Calamity. So, arcade_15_25_31 is safe to use with my monitor then?

I might not be able to get round to trying a new build until tomorrow (especially since I've never built your patch from source before), but when I do I'll report back here.