Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameINI: Fix Final Fantasy Crystal Chronicles GBA race condition #9724

Merged
merged 1 commit into from May 28, 2021

Conversation

Bonta0
Copy link
Contributor

@Bonta0 Bonta0 commented May 19, 2021

There is a race condition in FFCC when entering any level: GBAs will be stuck on a flickering "Waiting for connection..." screen for a random amount of time
The race happens on the GBA side during the handshake process. If the game also tries to send data during that process it will be pushed into a queue and transfers won't resume once the connection is established, causing it to timeout after 10 frames before trying again
Although this happens on HW, Dolphin is much more likely to lose the race repeatedly due to timing inaccuracies and that can last up to a minute depending on your luck and configuration which is why I believe this should be enabled by default
These patches apply the necessary changes to the rom at /dvd/gba/ffcc_cli.bin to clear the transfer queue once connected

@JMC47
Copy link
Contributor

JMC47 commented May 19, 2021

@dolphin-emu-bot rebuild

@JMC47
Copy link
Contributor

JMC47 commented May 19, 2021

For those unaware, this race condition is unlikely to be fixable on Dolphin or mGBA's end.

@Miksel12
Copy link
Contributor

Miksel12 commented May 19, 2021

Applying a patch every frame for a (niche?) mode, which isn't strictly necessary, seems a bit much imo. I have no idea how popular the GBA functionality is (going to be) but I have the feeling that most people will never use the GBA mode.
I actually don't know how taxing applying a patch every frame is, I guess applying it by default isn't a problem if it is not taxing at all.

@JMC47
Copy link
Contributor

JMC47 commented May 19, 2021

It's actually the opposite case. There's no reason to really play this game without the GBA mode. The single player mode is very gimped and limited in comparison.

@Miksel12
Copy link
Contributor

Ah I see, I didn't know that. I guess that makes this a no brainer.

@JMC47
Copy link
Contributor

JMC47 commented May 19, 2021

Final Fantasy Crystal Chronicles and The Legend of Zelda: Four Swords Adventures are the only two games where I'd say the main game mode is the one involving GBAs and the only reason they included a mode without it was because getting all the stuff together was expensive.

@JMC47
Copy link
Contributor

JMC47 commented May 28, 2021

I did a performance test at the request of @MayImilae and we discussed the merit of the patch being enabled by default versus not. We both agreed that the patch should be enabled by default as it brings us closer to the console experience and Dolphin is unlikely to ever emulate whatever timing issues are happening on console to allow the race condition to work.

@JMC47 JMC47 merged commit 1827e7a into dolphin-emu:master May 28, 2021
10 of 11 checks passed
@Bonta0 Bonta0 deleted the ffcc-gbafix branch June 24, 2021 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants