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: Force games to sync at monitor vertical refresh (even altering game speed)  (Read 1698 times)

0 Members and 1 Guest are viewing this topic.

pakoman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
  • Last login:Yesterday at 09:24:39 am
  • I want to build my own arcade controls!
Hi.

Sorry if this has been already answered, but I can't find it.

I'm trying to run 70hz systems like MSDOS or Wonderswan on a LCD with a CRU custom 70hz (the LCD supports up to 75hz, probably a bit higher, but has no freesync support).

So I want the games to be forced to run at the monitor v refresh, even if that alters slightly the game speed (i.e. 70.086 forced to 70.1).

I know MSDOS games didn't care very much about this, but I', trying to get as closer as possible. Are there any settings for this?

I'm using W10 GM 0.228 and a Nvidia card for this one (don't hit me!  ;D).

 Thanks!

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #1 on: February 22, 2021, 05:01:13 am »
Hi pakoman,

If you've created a 70.1 Hz mode already, then just force it on the desktop, then run GM with the -monitor lcd preset selected, and -syncrefresh (this should be automatically selected, but just in case).

Of course you could do it a bit better by not having to force a particular mode on the desktop, by following (more or less since you don't have AMD) this tutorial:



SR 2.0 already handles this with the automatic lcd preset without any extra configuration, but on Windows it just works for AMD cards.
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

pakoman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
  • Last login:Yesterday at 09:24:39 am
  • I want to build my own arcade controls!
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #2 on: February 22, 2021, 07:46:31 am »
Then I must be missing something on my end:

I'm using Alien Syndrome for Msdos for testing, as the selected character in selection screen blinks every each other frame.

Desktop is running at 2560x1440@70.1
-monitor lcd  and -syncrefresh are in use
-game is 70.086hz using 2540x1440@70hz

But the character doesn't blink steadily. I don't know if the original was like that...

I've attached a log

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #3 on: February 22, 2021, 08:06:19 am »
You need to set -waitvsync too, -syncrefresh doesn't force it alone (-autosync does handle both when enabled).

That said, the game you're running doesn't seem to request 70 Hz, but 60.0x instead.
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

pakoman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
  • Last login:Yesterday at 09:24:39 am
  • I want to build my own arcade controls!
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #4 on: February 22, 2021, 09:17:31 am »
By using -waitvsync I get the same result.

If the game is supposed to sync at 60hz and I force it to 70, it should be smooth at the requested (faster) speed, shouldn't it?  That's not happening.

Efectively in the log says:
Switchres: Resolution change from 720x400@60.054866 normal to 320x400@60.054866 normal
Switchres: Calculating best video mode for 320x400@60.054867 orientation: normal

which seems to mean that everything is trying to use 60hz instead in 70hz, however Machine information screen reports 70.86hz when the emulation starts (ct486) and 70.085 when the game loads.

So the whole thing is running at 60.xx hz as reported by the log whereas the information screen reports 70.xx hz ???

In the other hand, if  the game is less than 62hz it should be fine on my freesync monitor but it's not :( Still does the same, which makes me think that Mame is not properly reporting the screen refresh for DOS games. Could that be the issue?

I think I'm having a deja-vu about this whole thing...except for the freesync monitor, that's new :D


I've tried wonderswan with a custom 75.47hz resolution and still the scroll stutters quite often, but it seems that even if I make a custum 75.47hz resolution it gets rounded somewhere in the process to 75hz. Which seems to be happening with Msdos as well (70.086hz rounded to 70hz).
It seems something in my setup is meesing up things   :-\

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #5 on: February 22, 2021, 11:56:23 am »
I've confirmed the problem here. GM picks the refresh from a screen property that doesn't seem to reflect the changes that happen as the emulated machine changes its refresh. I have changed it so it reflects the current frame period, and it works now. It'll be ready for next version (this week).
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

pakoman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
  • Last login:Yesterday at 09:24:39 am
  • I want to build my own arcade controls!
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #6 on: February 22, 2021, 12:23:13 pm »
Really?   :o

Great! happy to help even if it s just by finding a bug by accident...

Looking forward to try the new version :)

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Force games to sync at monitor vertical refresh (even altering game speed)
« Reply #7 on: February 22, 2021, 02:09:04 pm »
Yes, and now I remember why I did it like this. The frame period is initialized as 60 Hz for all systems, so if I take that value as input for SR, all games would start at 60 Hz, then switch to their correct refresh. So I took the other value, that starts with the correct refresh but doesn't change later.

Now what I've done is to check if the frame number is zero and then take the refresh as I did before, then afterwards if frame number is more greater than zero, use the other correctly initialized value. It seems it's working fine so far.

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