libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 77 forks source link

Having weird speed issues on next boots after closing content. #1019

Closed bslenul closed 3 years ago

bslenul commented 3 years ago

Hey!

Short version:

So I'm getting super weird issues after closing content, basically it goes like this:

https://user-images.githubusercontent.com/33353403/104902584-32a00a80-597f-11eb-923a-48751474e5a9.mp4

https://user-images.githubusercontent.com/33353403/104902606-37fd5500-597f-11eb-916d-d19b65e664df.mp4

https://user-images.githubusercontent.com/33353403/104902618-3d5a9f80-597f-11eb-9389-bbddce123fd9.mp4

Up-to-date core (8954f06ef476747a86b0a16e62de357ef348420f) and a RA build from yesterday (https://github.com/libretro/RetroArch/commit/6ac08ec123e4ea73a5dc5819d61623b636ada11f), I haven't found anything special in it but here's the log: https://pastebin.com/TUMuvKmx

I'm not entirely sure if it's a core issue or a RetroArch issue because for some reasons it does NOT happen if I build RA myself (with gl/core at least, vulkan gives me a segfault on close content when I build RA myself). But in the other hand it seems to be the only HW rendered core where this happens :/

It happens on Windows with gl/core and vulkan, I wasn't able to reproduce on my Linux VM (with gl/core at least, can't use vulkan on my VM). The times where the video is sped up seems to only happen when I have 144Hz set in RA, the slow audio happens with both 60Hz and 144Hz.

In downloaded RA, you can see in the videos above that framerate seems to be locked at 120 on 2nd attempt, on the 3rd attempt it's around ~130. Haven't recorded but with my own build of RA, framerate counter shows a locked 60 on every attempt.

For the comparison between downloaded and built versions of RA, I made sure to use the same retroarch.cfg and the same Flycast.opt files! So it shouldn't be a different setting/core option causing this. Same commit for RA and same version of the core of course.

Also no idea if this is related or not, but sometimes after a few restart the game is insanely slow and I can see this spammed in the logs: [libretro ERROR] Verify Failed : remaining >= 0 || remaining == -1 in sh4_sched_tick -> core/hw/sh4/sh4_sched.cpp : 147. It seems a bit random tho, haven't found a way to consistently reproduce this one :/

edit: If it matters, this is with a i5-4670K and a GTX 970 (drivers up-to-date, 461.09).

bslenul commented 3 years ago

Huh, another weird behavior after closing content: I was playing a 2 discs game using .m3u and again no issue on first launch, the core sees 2 discs, then close content and launch again, the core now thinks it's a 4 discs game:

image

And yeah in the "Disc Control" I have both discs x2:

image

And again, it doesn't happen when I compile RetroArch myself... :x

barbudreadmon commented 3 years ago

it does NOT happen if I build RA myself

Meaning it's probably somehow related to a compiler bug :/

bslenul commented 3 years ago

OK, moved to RetroArch repo then!