FCare / Kronos

Kronos is a Sega Saturn emulator.
http://fcare.github.io
237 stars 23 forks source link

[Dark Savior (USA)] Framerate issue, music tempo issue (separate from framerate) #891

Open ner00 opened 4 years ago

ner00 commented 4 years ago

What's the full name of the game (including region) ? Dark Savior (USA)

First, I apologize for creating an issue encompassing two apparently dissimilar issues, if you prefer I can break them down into two separate issues.

What's your frontend ? (standalone, libretro, ...) ? Both, on the music tempo issue; framerate issue only experienced in libretro

Description

Note: For comparison with real hardware, here's a video of a guy playing it on a Saturn (at 9:52 of the video, the music is approximately elapsed 2:45): https://youtu.be/Ht_AAC8kw5s?t=592

What's your OS ? (windows, linux, OSX, ...) ? Win10

What's your hardware ? (CPU, GPU, ...) ? i7 4770k, GTX 760

What's the storage type of the game (official cd, burned cd or cd image) ? cd image

If applicable, what's the format of your cd image ? (cue/bin, ccd/img, iso, chd, ...) CHD

Are you using any setting different from default ? If so, precise I don't think so, no.

Did this game work previously ? Do you remember when ? Is it happening with other games ? Hard to say, I never noticed it but I also never tested this game much in the engine due to previous glitches. The music tempo one has been present in earlier versions too as per my comment in the description.

barbudreadmon commented 4 years ago

I can reproduce the tempo issue on my side, with redump version, it's really weird because it happens at once.

I can't reproduce the framerate issue, so i think it's a performance issue. Something we noticed recently is that vsync has a big impact on kronos's performance, it's highly recommended to disable it (standalone has it disabled).

ner00 commented 4 years ago

I can't reproduce the framerate issue, so i think it's a performance issue. Something we noticed recently is that vsync has a big impact on kronos's performance, it's highly recommended to disable it (standalone has it disabled).

That seems to be the case. The issue described goes away when vsync is disabled altogether. I also tried using adaptive sync instead, which in theory disables vsync temporarily when there is a sizeable framerate drop and that one seems to work well in this particular case without having to disable vsync entirely.

I can reproduce the tempo issue on my side, with redump version, it's really weird because it happens at once.

That's why I also included the video of it being played on real hardware (which I assume was US version), to exclude the possibility of a bad dump. I also tried the PAL version at 50fps on Kronos, the issue happens at the same exact point of the music. I also played another BGM, "Mad Dominator - Theme of Kurtliegen", but that one doesn't get out of tempo.

Another thing to consider is the possibility of a crossfade/loop mechanism that is not handled properly (I have no idea if that could be a thing). I looked around the internet and the ripped versions of the sound track puts that BGM at 5:00 total, but if you play the game (or sound test menu) and let it run the track goes on way longer than 5:00 so it's safe to assume that it is seamlessly looped at some point. When looking at the track spectrum, there is coincidentally a slightly new instrumentation that starts to play at 02:48 (similar to the tracks first few seconds, that imply sense of urgency). I think it's possible that the game starts seeking (looping) at this point for continuous playbak (unsure why it would not do that at any later point though). Well, weird theory anyway.

Spectrum illustration:

ner00 commented 4 years ago

Another curiosity, I tried this using Yabause core and while the music quality is awful it does not break tempo. Standalone uoYabause and YabaSanshiro core also do not break the tempo, even though the sound test menu is missing text they can still be used to play the BGM to demonstrate the difference.

barbudreadmon commented 4 years ago

Could you try with the "old" sh2 interpreter ?

ner00 commented 4 years ago

Using the old sh2 interpreter made no difference in neither standalone nor libretro (I made sure to close and reopen content after switching).

fafling commented 4 years ago

I reproduce the tempo issue with the US CD in the may 19th WIP. @ner00 The sound test has graphic issues, see #893 .

ner00 commented 4 years ago

@ner00 The sound test has graphic issues, see #893 .

Honestly, I didn't even notice that, I haven't played this game in 20+ years.