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

Remove instant ARAM DMA hack (Fixes Sarge's War) #3771

Merged
merged 2 commits into from Sep 7, 2016

Conversation

phire
Copy link
Member

@phire phire commented Apr 9, 2016

Instant ARAM DMA is a blatant hack that only ever fixed things in RE2 and RE3. It activates for a lot of other games, but as far as I'm aware it doesn't fix any bugs. It just causes more bugs.

With scheduling fixes, it breaks ATV: Quad Power Racing 2 (causing all sorts of weird bugs) and stops Sarge's War from loading.

Both are regressions from #3601, though ATV Quad Racing was fixed in a hacky way by #3773.

Maybe I could tweak the timings to get #3773 working for Sarge's War too, but the clean way is to just delete the horrendous hack. Now that Dolphin 5.0 has been released we can do this.

Unfortunately, this PR causes audio glitches in RE2 and RE3, but they never should have been working in the first place. Someone else can fix them correctly next time.


This change is Reviewable

@phire
Copy link
Member Author

phire commented Apr 9, 2016

Confirmed, this does cause issues with Resident Evil 2

@Parlane Parlane added the WIP / do not merge Work in progress (do not merge) label May 3, 2016
@phire phire removed the WIP / do not merge Work in progress (do not merge) label Sep 7, 2016
@phire phire changed the title [WIP] Remove instant ARAM DMA mode. Remove instant ARAM DMA mode (Fixes Sarge's War) Sep 7, 2016
@phire
Copy link
Member Author

phire commented Sep 7, 2016

Ok, now that I've traced another bug to this glitch (Sarge's War not loading), and 5.0 has been released, it's time to remove the hack.

Now that our timings are much more accurate it doesn't look like we
need it anymore. And the instant ARAM DMA mode + scheduling fixes
ctually breaks ATV: Quad Power Racing 2 (causing all sorts of werid
bugs).
@JMC47
Copy link
Contributor

JMC47 commented Sep 7, 2016

Breaks areas with multiple audio tracks in Resident Evil 2. Game appears to work fine otherwise. I'd trade two games to have broken audio for a completely broken game working.

@phire phire changed the title Remove instant ARAM DMA mode (Fixes Sarge's War) Remove instant ARAM DMA hack (Fixes Sarge's War) Sep 7, 2016
@degasus
Copy link
Member

degasus commented Sep 7, 2016

No clue about audio DMA, but droping hacks is usually a good idea.

@Fallcrest
Copy link

Fallcrest commented Sep 7, 2016

I was really wondering what was causing that game to not work properly. It is the only 2-star rated GameCube game besides the Game Boy Player disc and PSO Trial Edition, which both have obvious features missing that prevent them from working.

@phire
Copy link
Member Author

phire commented Sep 7, 2016

I would be more tempted to keep this hack around if:

  • Didn't activate on various false positives.
  • Didn't break games when activated as a false positive.
  • Fixed more than two games.
  • Activated on DCBZ instead of DCBI (as far as anything outside of the CPU is considered, DCBI is a complete no-op.)
  • it actually did what the comments say it does.

Supposedly, the game is overwriting the audio data is being DMAed with zeros, before it gets DMAed out, and proper emulation of the L2 cache would fix this. However this doesn't seem to add up, the game gets fixed when you move the time the DMA completion interrupt arrives. Not when you move the actual copy (we always do the copy instantly).

Hopefully someone will find some more time and fix RE2/3 correctly later.

@phire phire merged commit d951f9e into dolphin-emu:master Sep 7, 2016
@phire phire deleted the pr3771 branch September 7, 2016 07:09
@Fallcrest
Copy link

Fallcrest commented Sep 7, 2016

@phire This build hasn't shown up in the downloads section, I'm just wondering why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants