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

SI: Don't cancel transfer with TSTART=0 #9853

Merged
merged 1 commit into from Jun 30, 2021
Merged

Conversation

Bonta0
Copy link
Contributor

@Bonta0 Bonta0 commented Jun 28, 2021

As far as I can tell there is no such thing as transfer cancelling, I don't know where that came from. This hasn't been an issue so far because Dolphin's transfer are instantaneous except for GBAs
This was confirmed on hardware with

printf("start csr %08X buf %08X%08X\n", *si_comcsr, si_buffer[0], si_buffer[1]);
si_buffer[0] = 0; *si_comcsr = 0x40010303;
printf("started csr %08X buf %08X%08X\n", *si_comcsr, si_buffer[0], si_buffer[1]);
*si_comcsr &= ~SICOMCSR_TSTART;
printf("cancelled csr %08X buf %08X%08X\n", *si_comcsr, si_buffer[0], si_buffer[1]);
while(*si_comcsr & SICOMCSR_TSTART);
printf("waited csr %08X buf %08X%08X\n", *si_comcsr, si_buffer[0], si_buffer[1]);

image

@JMC47
Copy link
Contributor

JMC47 commented Jun 28, 2021

Fixes Pokemon Colosseum hanging with a GBA connected on boot.

@Tilka Tilka requested a review from skidau June 29, 2021 01:11
Copy link
Contributor

@booto booto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me - nice that the code is simpler with this. If you're feeling motivated, a test somewhere in https://github.com/dolphin-emu/hwtests exercising the behavior could be great, but thanks for the contribution all the same!

@JMC47
Copy link
Contributor

JMC47 commented Jun 30, 2021

I've tested this and verified the behavior on both GameCube and Wii. I ran the aforementioned tests on Wii, with a variety of controller configurations in order to verify the behavior. LGTM.

@JMC47 JMC47 merged commit 6042df7 into dolphin-emu:master Jun 30, 2021
11 checks passed
@Bonta0 Bonta0 deleted the sinocancel branch July 4, 2021 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants