libretro / dosbox-libretro

Port of DOSBox (upstream) to the libretro API.
GNU General Public License v2.0
61 stars 40 forks source link

Screen-tearing; is vsync working as intended in this core? #61

Open Gagert opened 7 years ago

Gagert commented 7 years ago

Unlike most of the other libretro cores, I experience various screen-tearing issues in the dosbox libretro core.

I have been using the dosbox official and unofficial/enhanced builds for some time now, and in later years mainly ykwong Daum enhanced dosbox-builds.

I am experiencing some issues with the libretro core of dosbox when it comes to screen-tearing. It is very noticeable in the game Jazz Jackrabbit; the screen tears about twice as soon as you're jumping. I have enabled vsync in RetroArch, but it doesn't eliminate the screen tearing effect completely. That does not happen with the ykwong Daum build of dosbox; there's even a vsync-option in the dosbox.conf file itself in the main directory of that build.

I have even tried to make a copy of the dosbox.conf file for the ykwong Daum dosbox build, and placed it within system/dosbox in RetroArch and renaming it dosbox-libretro.conf. Thereby in theory most of the settings from the enhanced build of dosbox should then be read by the dosbox libretro core; at least the settings that the libretro core supports as of today.

Am I doing something wrong here, or can it be that the libretro dosbox core does not properly support vsync as of today? I have tried enabling hard sync as well, and turned on and off all the various options in the Video menu in RetroArch. I even tried to alternate between all the various video drivers in the Driver menu in RetroArch.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/44001094-screen-tearing-is-vsync-working-as-intended-in-this-core?utm_campaign=plugin&utm_content=tracker%2F2175333&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2175333&utm_medium=issues&utm_source=github).
Monroe88 commented 7 years ago

Vsync gets force-disabled if the timing skew is too high and the core's refresh rate is greater than your monitor's refresh rate. DOS games usually displayed with a 70Hz display mode , which is a large timing difference from a 60Hz display.

If you want Vsync to work, you need to do one of the following:

Gagert commented 7 years ago

Hi, thanks for reply.

I tried your first suggestion, by changing the value of the audio maximum timing skew. It had no effect in Jazz Jackrabbit on my current setup as of now.

I also tried loading Jazz Jackrabbit in the official dosbox 0.74 build. It turns out that the game ran smooth as butter without any tearing, and to my surprise vsync wasn't even activated at all. I even checked the config; no sign of vsync activated there.

I also did some experimenting with the dosbox.conf file in the official dosbox 0.74 build for Windows, and I made some findings regarding the output-section of the config. If the output was either surface, overlay or ddraw, I did not encounter any tearing in Jazz Jackrabbit. If I adjusted the output-value to either opengl or openglnb however, I got the very same tearing that I'm currently experiencing under the dosbox libretro core.

It seems like that the dosbox-libretro.conf file that dosbox libretro generates (by typing config -wcd in the command prompt) has no section regarding the video-output types; my guess is that this task is left to RetroArch/libretro itself. As mentioned in my previous post, I tried to cycle through all the video drivers in the Drivers-menu (vulkan, gl, d3d, sdl2 and gdi), and I experienced no change regarding the tearing issues. I even turned off vsync and hard sync while doing so, as neither is activated in my installed dosbox 0.74 build.

I tried running both the official dosbox 0.74 build and the dosbox libretro core on both my TV (60hz TV) and on my 144hz gaming monitor while doing my testing.

andres-asm commented 6 years ago

jazz tears in mainline too under all render methods but surface

TiBeN commented 5 years ago

Jazz Jackrabbit has a pretty uncommon resolution of 320x199 running at 60Hz. Pretty much a curiosity in DOS game world. See: http://nerdlypleasures.blogspot.com/2014/09/how-many-fps-dos-games-and-framerates.html

Which makes this game not a good candidate for configuration/tweaking purposes. Pinball Dreams maybe better for that (smooth scrolls at 70Hz)

Gagert commented 4 years ago

The screen-tearing issue is fixed in the dosbox svn libretro core (fairly recent), but I'm not sure if I should close this issue here then?

In other words, and kind of off-topic, is this libretro core still maintained and relevant now as the dosbox svn core is going full steam ahead? Referencing issue #122