realnc / dosbox-core

A DOSBox core for use in RetroArch and other libretro frontends.
GNU General Public License v2.0
42 stars 16 forks source link

SuperFrog protection screen is black if "External" framerate is selected #36

Closed vanfanel closed 2 years ago

vanfanel commented 2 years ago

Hi there,

I have noticed that SuperFrog's protection screen is black if "External" framerate is selected. I have tried all available video card modes, and it's the same with all them.

Bug is very easy to replicate: just load SuperFrog and you will see it.

realnc commented 2 years ago

This is an issue with some of the video drivers of retroarch. The vulkan driver has this. I don't think there's anything I can do from the core side to fix this.

The issue seems to be that RA fails to update the screen correctly when there's duplicate frames. In external mode, new frames are only sent to RA if there actually are any new frames drawn by the game. If not, the core tells RA to just show the previous frame again. This works fine with the glcore driver, but the vulkan driver has this issue.

The black screen disappears if you cause a new frame to be drawn. For example by entering a number on the screen, or using the arrow keys to move the input prompt left/right.

If this is a bug in the core, I'm not seeing it :-/

vanfanel commented 2 years ago

@realnc Yes, your description matches the problem exactly. In fact, I went and ran the core with the GL driver, and the problem is not present at all.

So, if this is a Vulkan backend bug, should I open an issue for it on the RetroArch repo?

realnc commented 2 years ago

I'll add a core option to disable frame duping. Basically what beetle-psx-hw does. It has a Video->Frame Duping core option. I don't know why beetle-psx has that option, I just assumed frame duping is guaranteed to work. But since it has it, then I guess it's not guaranteed.

And yeah, I think this should be reported as a retroarch vulkan bug.

realnc commented 2 years ago

Btw, forgot to mention that this also happens when simply switching RetroArch from fullscreen to windowed (or vice versa.) For example when sitting in Superfrog's copy protection screen while it's black, then pressing an arrow key to make it visible, if you then switch the fullscreen status of RetroArch, the screen will become black again.

You should probably mention that in your bug report.

realnc commented 2 years ago

I just pushed commit 51c48227fae9e2e80c2220cc33f743529f4ec52a which adds this option. Frame duping is still enabled by default. If you disable it, it should work around the RetroArch bug.

vanfanel commented 2 years ago

@realnc Opened a RetroArch bug about this: https://github.com/libretro/RetroArch/issues/13451

Should we leave this open for reference from the RA bug?