flycast
flycast copied to clipboard
Broken music emulation in Sakura Taisen 3
Please Note: This form is the minimum required information for submitting bugs.
Removing this form may lead to your issue being closed until it is completed.
Platform / OS / Hardware: Windows 10 2004
Github hash: c77c3ab
Hardware: Intel Core i9-10850K Nvidia GeForce RTX 3070Ti 32 GB RAM
Description of the Issue
At least one music track in Sakura Taisen 3 loads the incorrect music data, causing completely incorrect playback. In the below recording, the music appears to be the game's main theme but with the samples for this scene, resulting in a severely discordant sound.
Debugging Steps Tested
- Play the game until the third portion of the first chapter, or load a save file starting from that point, and observe the incorrect music.
- Problem occurs with and without DSP enabled.
Logs Gathered
n/a
Screenshots
https://user-images.githubusercontent.com/8432212/178606119-10edd57e-f8f4-4166-86ba-40191cd0c17b.mp4
Compare with recording from hardware: https://youtu.be/-eqyyL7YZQo?t=145
This VMU contains save data for Sakura Taisen 3. The second file starts at the chapter in question.
Thanks, this is very helpful. I tried several vmu saves I have but I'm a bit lost with this game.
I should have uploaded this when I opened the issue. I apologize for not thinking to until this morning.
I was able to reproduce it easily. Interestingly, it is an intermittent issue: in 10% of the cases the audio is fine. More investigation is needed to find the root cause.
It's likely this issue would also affect Sakura Taisen 4, which is based on largely the same code.
This particular case has been fixed in version 2.0 aa97a6d6
, but further testing is needed later in the game.
When I started and checked my past flycast, I found one bug-free version. It's very old from 2020-04-04. However, it was difficult to investigate the cause because the bug was sometimes reproduced in that version. Finally, I found a broadcast set in dc_flash.bin that is not normally set in Japanese games. Set broadcast to PAL. The answer was really simple.
Now the BGM of Ep.1-2 is played normally, but this time a bug occurs in Ep.2-4. This is because I changed the broadcast to PAL.
Ep.2-4 is the last file. (It takes a while until the BGM bugs.) vmu_save_A1.zip
The source of the bug was found to be in a commit dated September 22, 2018.
6e017fd: Can be reproduced 0c575a5: Cannot reproduce
However, if you boot 0c575a5 with HLE BIOS, there will be a bug with NTSC, so realBIOS is required. If you boot with realBIOS, there seems to be no need for a specific broadcast. Also, dc_flash.bin is not required.
https://github.com/flyinghead/flycast/assets/14366233/e441ae0b-d508-417d-bf29-0d2b61111416
Great find! Indeed increasing the GD-ROM wait time by 10% fixes the issue. Should be fixed in the next dev build.