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: Troubles with syncrefresh & soundsync  (Read 6412 times)

0 Members and 1 Guest are viewing this topic.

EnC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:August 04, 2011, 09:32:44 pm
Troubles with syncrefresh & soundsync
« on: August 02, 2011, 03:20:48 pm »
Game: Bank Panic
Resolution: 224x224
Frequency: 60.00Hz


A.) soundsync 0, waitvsync 1, syncrefresh 1

- F11: game speed varies from 96% to 102%

- There is a scroll glitch every 2 to 3 seconds

- There is an audio glitch every 5 to 7 seconds


This is default GroovyMAME settings. I expected to see a fixed game speed like 100% since Bank Panic runs at exactly 60fps, and so I don't think it's surprising there are visual and audio glitches since the game speed fluctuates itself, but why would this be happening if both waitvsync and syncrefresh is enabled? Can someone else run this game so we can confirm whether these problems are related only to my system or perhaps these bugs are in the GroovyMAME itself?



B.)  soundsync 1, waitvsync 1, syncrefresh 1

- F11: game speed varies from 96% to 102%

- There is a scroll glitch every 2 to 3 seconds

- Terrible audio, tempo & pitch fluctuate wildly



C.)  soundsync 0, waitvsync 0, syncrefresh 0
D.)  soundsync 0, waitvsync 1, syncrefresh 0

- F11: game speed steady at 100%

- Scroll tearing is visible all the time

- Good sound pitch and steady tempo


With this setup I can turn on throttle (F10) and the game speed goes over 500%, which means my system is fast enough. I don't see what other settings I could try, something simply doesn't seem right here, so at this point I'd first like to confirm if anyone else can get this game to run smoothly and without sound glitches?

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7419
  • Last login:June 10, 2024, 07:56:16 am
  • Quote me with care
Re: Troubles with syncrefresh & soundsync
« Reply #1 on: August 02, 2011, 04:36:21 pm »
Hi EnC (torino is back?), glad to see you decided to test GroovyMAME.

bankp works fine here, I used the -syncrefresh option and got perfect scroll, no video artifacts, and constant 100% fps (100.17% actually).

Quote
SwitchRes v0.013b: [bankp] (1) horizontal (224x224@60.00)->(224x224@60.00)->(224x224@60.00)
Target refresh = 60.000000
Average speed: 100.17% (43 seconds)

If you are seeing fluctuating fps with -syncrefresh enabled, and your CPU is capable enough as you say, then it's clear that vsync events are not properly received by GroovyMAME, this could be due to:

- Badly installed drivers, ddraw acceleration not working (check dxdiag).
- Messing with video card control panel vsync options, those should be set so they don't override the application vsync operation.
- Whatever unknown reason that prevents directx from reporting the sync events properly.

I'd check if you can get a constant vsynced fps with any other application in your system (without forcing vsync from the control panel).
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

EnC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:August 04, 2011, 09:32:44 pm
Re: Troubles with syncrefresh & soundsync
« Reply #2 on: August 03, 2011, 01:46:06 am »
bankp works fine here, I used the -syncrefresh option and got perfect scroll, no video artifacts, and constant 100% fps (100.17% actually).

Is that with default settings, "ddraw" enabled and "soundsync" disabled?


I tried it on another computer, default settings, and got much better results. The game speed was quite steady at 99% with occasional jumps to 92%, there were still audio and scroll glitches, but only once or twice per minute instead of every few seconds. Interestingly, jumps in game speed were more frequent and not occurring in the same time as audio and video glitches, just like with the first computer.

I then tried "d3d" instead of "ddraw", with the rest of default settings, and the game speed was very steady at 102% with occasional quick jumps to 104% and 101%, however scroll was perfectly smooth and I only maybe saw one or two glitches in about five or ten minutes all together. Unfortunately audio was still glitching every few seconds, only it was almost unnoticeable compared to the previous test, but this time when I enabled "soundsync" everything was finally working as it should.

Therefore, the answer, in my particular case, was to set "d3d" instead of "ddraw" and enable "soundsync", so perhaps you might want to consider changing GroovyMAME default settings to these ones, unless, I suppose, there is a good reason not to, but I believe this test alone provides quite enough reason to actually do so.


Quote
- Badly installed drivers, ddraw acceleration not working (check dxdiag).

DirectDraw is not part of video drivers. Acceleration in dxdiag is probably only about using VRAM instead of RAM for double and triple buffering, and there is nothing there about frame refresh and vsync. Dxdiag test run smoothly and everything is fine with other applications and emulators. If I disable ddraw acceleration I get maximum of 450% game speed instead of 500%, that's all, nothing else changes.


Quote
- Messing with video card control panel vsync options, those should be set so they don't override the application vsync operation.

That's a part of the video driver, but those options are only for DirectX and OpenGL. Depending on version and particular video card DirectDraw could probably exhibit different behavior, possibly completely unrelated to video driver settings. In my control panel vsync is set so application decides, and it works as it should once I switched from "ddraw" to "d3d", but even with "ddraw" I could not throttle to maximum speed with "syncrefresh" enabled, so there was some syncing going on, perhaps only subject to some unwanted interruptions, unstable timer, some multitasking lockouts, buffering overflow, or something, it remains a mystery.


Quote
- Whatever unknown reason that prevents directx from reporting the sync events properly.

I'd check if you can get a constant vsynced fps with any other application in your system (without forcing vsync from the control panel).

Yes, I can get good sync with other applications and emulators, vsync is not forced from my control panel and when I force it nothing changes except I can not throttle to maximum speed with F10 regardless of "syncrefresh" and "waitvsync" settings, as expected.

Solution was to enable "d3d" and "soundsync". However, with default GroovyMAME settings I had exact same problem on two different computers, and even with "d3d", when everything was smooth and fine, the game speed (F11) still fluctuated a bit, so I am very surprised you have not notice any of that, it's against the odds, it seems, so maybe you should try the test again (with default settings: "ddraw" enabled, "soundsync" disabled) and also with another computer too, but be more careful as scroll glitches may not repeat very often and sound problems may not be immediately recognizable.

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Re: Troubles with syncrefresh & soundsync
« Reply #3 on: August 03, 2011, 06:10:27 am »
tried Bank Panic here as well. stayed at 100% with no scrolling or audio artifacts for the duration.
Code: [Select]
# CORE SWITCHRES OPTIONS
#
modeline                  1
monitor                   m2929
monitor_connector         auto
monitor_orientation       horizontal
monitor_aspect            4:3
monitor_debug             0
monitor_doublescan        1
monitor_dotclock          0
monitor_ymin              0
soundsync                 1
cleanstretch              1
changeres                 1
redraw                    0
monitor_specs0    30000-40000, 47.00-90.00, 0.600, 2.500, 2.800, 0.032, 0.096, 0.448, 0, 0, 640, 768

# WINDOWS PERFORMANCE OPTIONS
#
priority                  0
multithreading            1
numprocessors             auto
profile                   0
bench                     0

#
# WINDOWS VIDEO OPTIONS
#
video                     ddraw
numscreens                1
window                    0
maximize                  1
keepaspect                1
prescale                  1
waitvsync                 1
syncrefresh               1
menu                      0


For shits and giggles I switched over to D3D and similarly got no artifacts.

EnC

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:August 04, 2011, 09:32:44 pm
Re: Troubles with syncrefresh & soundsync
« Reply #4 on: August 03, 2011, 07:30:36 pm »

For shits and giggles I switched over to D3D and similarly got no artifacts.


I don't understand, what's funny about it? Please check the maximum speed you get with DDraw and D3D and tell me if there is any good reason why not to use D3D as default setting? I see you also have "sounsync" enabled, so you would agree this too should be default setting, right?

If you want people to use this build, you want to make it so that it works the best it possible can *out of the box* for most of them. People are lazy, they will try it, but if it doesn't work as expected many will not bother to figure out it's just a few options they need to change to get it right, so why not change this in advance and make default settings be the best possible overall settings, that's all I'm saying.

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Re: Troubles with syncrefresh & soundsync
« Reply #5 on: August 03, 2011, 09:33:12 pm »

For shits and giggles I switched over to D3D and similarly got no artifacts.


I don't understand, what's funny about it? Please check the maximum speed you get with DDraw and D3D and tell me if there is any good reason why not to use D3D as default setting? I see you also have "sounsync" enabled, so you would agree this too should be default setting, right?

If you want people to use this build, you want to make it so that it works the best it possible can *out of the box* for most of them. People are lazy, they will try it, but if it doesn't work as expected many will not bother to figure out it's just a few options they need to change to get it right, so why not change this in advance and make default settings be the best possible overall settings, that's all I'm saying.

if both run at 100%, who cares?

Sjaak

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 706
  • Last login:May 27, 2024, 11:32:28 am
Re: Troubles with syncrefresh & soundsync
« Reply #6 on: August 04, 2011, 02:59:19 am »

I don't understand, what's funny about it? Please check the maximum speed you get with DDraw and D3D and tell me if there is any good reason why not to use D3D as default setting? I see you also have "sounsync" enabled, so you would agree this too should be default setting, right?


You sound very familiar...were you on these forums before, but with another alias?

Sjaak

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 706
  • Last login:May 27, 2024, 11:32:28 am
Re: Troubles with syncrefresh & soundsync
« Reply #7 on: August 04, 2011, 03:07:32 am »
@cotmm68030

Just ignore Enc (also known as Driverman), he will be banned soon.

newmanfamilyvlogs

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1694
  • Last login:June 15, 2022, 05:20:38 pm
    • forum.arcadecontrols.com/index.php/topic,103584.msg1096585.html#msg1096585
    • Newman Family Vlogs
Re: Troubles with syncrefresh & soundsync
« Reply #8 on: August 04, 2011, 06:03:03 am »
@Sjaak: Oh I know. I know quite a bit about Zeke.