https://bugs.dolphin-emu.org/https://bugs.dolphin-emu.org/favicon.ico?12016-10-11T19:11:12ZDolphin bug trackerEmulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7267592016-10-11T19:11:12ZJosJuice
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-13 priority-2 priority-default closed" href="/issues/9778">Emulator Issues #9778</a>: Resident Evil 2/3 Audio Issues</i> added</li></ul> Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7267602016-10-11T19:11:17ZJosJuice
<ul><li><strong>Milestone</strong> set to <i>Current</i></li></ul> Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7277672017-01-30T22:55:24ZJMC4789JMC4789@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Accepted</i></li></ul> Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7308102017-09-27T05:38:26ZJosJuice
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-13 priority-2 priority-default closed" href="/issues/10558">Emulator Issues #10558</a>: RE 3 Nemesis sounds cut bug</i> added</li></ul> Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317202018-01-15T11:12:51ZChopin
<ul></ul><p>It's been quite a few years since the games Resident Evil 2/3 bug at the sound level.<br>
Can we hope for the resolution of the problem soon?<br>
Because since Dolphin manages the Wii I feel that the GameCube is a little left out ...</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317252018-01-15T16:20:14ZHelios
<ul></ul><p>It's a blocker so we can't release another stable until the blocker status is either removed or it's fixed.</p>
<p>Beyond that, Dolphin is an unpaid OSS project so nobody can be forced to work on anything they don't feel like.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317272018-01-15T17:42:51ZChopin
<ul></ul><p>I understand that Dolphin is free and developers are not paid. Besides, I love Dolphin and I thank the developers of all hearts but I just note that despite the frequent updates, the GameCube seems to be abandoned and I find it a shame.</p>
<p>Especially on a very old version, this bug was fixed I conclude that the solution is not very far ...</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317282018-01-15T17:45:08ZHelios
<ul></ul><p>GC isn't abandoned. This is just a bug nobody feels like looking into right now.</p>
<p>The Wii and GC are mostly the same hardware as far as the user is concerned. Most "Wii" fixes are applicable to GC games as well.</p>
<p>And if you think we focus more on Wii, don't look at our emulated wiimote code that has sat for years ;)</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317292018-01-15T18:13:01ZChopin
<ul></ul><p>Oki oki, I want to believe you. It's just the impression I got.</p>
<p>I cross my fingers so that it unlocks quickly because I love RE 2/3 on GC :)</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317302018-01-15T18:22:00ZJMC4789JMC4789@gmail.com
<ul></ul><p>The reason why this no longer works is because it never actually worked correctly. We removed a hack (that was breaking other games...) in hopes that the correct behavior would be found eventually. We're fairly certain what the cause is, but, there may not be an easy way to implement that without destroying performance.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7317362018-01-16T10:14:03ZChopin
<ul></ul><p>Ok, why not set up a manually activated hack? I know it's a case by case but we would have at least one solution until the problem is really fixed.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7326332018-04-09T18:48:14Zniccop
<ul></ul><p>This will be fixed in Dolphin 6.0?</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7326372018-04-10T07:13:44ZChopin
<ul></ul><p>Do not dream :)</p>
<p>For my trip, it's been a long time since I believe in it anymore</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7326382018-04-10T17:53:53Zniccop
<ul></ul><p>:( this is bad.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7326392018-04-10T20:59:51ZJMC4789JMC4789@gmail.com
<ul></ul><p>A per-game hack will have to be added for this, but, my attempt to add it back in failed because some of the functionality used only for the hack was removed later on.</p>
<p>Someone with remedial coding knowledge could re-add the hack though.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7326402018-04-10T22:12:53Zniccop
<ul></ul><p>So apparently it's a difficult problem to solve, that's sad. Anyway, we can only wait. :/</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7338342018-06-10T13:44:11ZAnonymous
<ul></ul><p>Hello,</p>
<p>Apparently 1 line fixes this:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"> <span class="n">GenerateDSPInterrupt</span><span class="p">(</span><span class="n">INT_ARAM</span><span class="p">);</span>
</code></pre>
<p>in Do_ARAM_DMA() just after s_dspState.DMAState = 1;</p>
<p>Maybe real hardware do interrupt at start and end of ARAM DMA transfer (or when DMAState changes 1 -> 0 or 0 -> 1)?<br>
Dunno what above fix breaks ...</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7338692018-06-15T06:24:00Zwesleyspipeswesleyspipes@yahoo.com
<ul></ul><p>Nucleoprotein wrote:</p>
<blockquote>
<p>Hello,</p>
<p>Apparently 1 line fixes this:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"> <span class="n">GenerateDSPInterrupt</span><span class="p">(</span><span class="n">INT_ARAM</span><span class="p">);</span>
</code></pre>
<p>in Do_ARAM_DMA() just after s_dspState.DMAState = 1;</p>
<p>Maybe real hardware do interrupt at start and end of ARAM DMA transfer (or when DMAState changes 1 -> 0 or 0 -> 1)?<br>
Dunno what above fix breaks ...</p>
</blockquote>
<p>What are the next steps to possibly incorporating this? Can you provide a test build? Maybe start off making this a per game hack for now?</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7358992019-01-24T09:19:16ZLyle.Tafoya
<ul></ul><p>Nucleoprotein wrote:</p>
<blockquote>
<p>Hello,</p>
<p>Apparently 1 line fixes this:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"> <span class="n">GenerateDSPInterrupt</span><span class="p">(</span><span class="n">INT_ARAM</span><span class="p">);</span>
</code></pre>
<p>in Do_ARAM_DMA() just after s_dspState.DMAState = 1;</p>
<p>Maybe real hardware do interrupt at start and end of ARAM DMA transfer (or when DMAState changes 1 -> 0 or 0 -> 1)?<br>
Dunno what above fix breaks ...</p>
</blockquote>
<p>I just compiled dolphin from source with this change applied to DSP.cpp and now the music in Resident Evil 2 works correctly. Are there any negative implications to this patch? What does the Dolphin team require for this to get merged in? Has anyone submitted a formal pull request?</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7359062019-01-25T01:59:42ZJMC4789JMC4789@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/7199">ARAM_interrupt_test.dol</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/7199/ARAM_interrupt_test.dol">ARAM_interrupt_test.dol</a> added</li></ul><p>We decided to make a hardware test to check this change.</p>
<p>This hack is 100% wrong, and not a real fix. Sorry. The interrupt is confirmed to fire at the end.</p>
<p>I've uploaded the test in case you want to confirm. On console, 99.99999999998553% of the xfer has happened by the time the interrupt fires. </p>
<p>Master vs Dolphin times - total xfer time for hw: 6607823, dolphin: 6722226. Meanwhile with the hack, it ends up 0.02% of the transfer time.</p>
<p>Credit to Booto for writing the test!</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7359782019-01-30T03:08:33ZSilandaUKSilandaUK@gmail.com
<ul></ul><p>Lyle.Tafoya wrote:</p>
<blockquote>
<p>Nucleoprotein wrote:</p>
<blockquote>
<p>Hello,</p>
<p>Apparently 1 line fixes this:</p>
<pre><code class="cpp syntaxhl" data-language="cpp"> <span class="n">GenerateDSPInterrupt</span><span class="p">(</span><span class="n">INT_ARAM</span><span class="p">);</span>
</code></pre>
<p>in Do_ARAM_DMA() just after s_dspState.DMAState = 1;</p>
<p>Maybe real hardware do interrupt at start and end of ARAM DMA transfer (or when DMAState changes 1 -> 0 or 0 -> 1)?<br>
Dunno what above fix breaks ...</p>
</blockquote>
<p>I just compiled dolphin from source with this change applied to DSP.cpp and now the music in Resident Evil 2 works correctly. Are there any negative implications to this patch? What does the Dolphin team require for this to get merged in? Has anyone submitted a formal pull request?</p>
</blockquote>
<p>It's worth being aware that although the hack works fine for Resident Evil 2+3, it can break other games. P.N.03 being one. I added the hack to my builds as a config file option which defaults to off because of this.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7359802019-01-30T04:13:32ZJMC4789JMC4789@gmail.com
<ul></ul><p>Or we could put our efforts together to try to fix this in a way that doesn't require any hacks...</p>
<p>Even a game-patch would be better at this point.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7366242019-04-09T01:13:25Zphirephiren@gmail.com
<ul></ul><p>The interesting thing is just how instant the interrupt has to be.</p>
<p>According to JMC4789's tests: Anything 13 cycles or less works. Anything longer than 13 cycles is broken. </p>
<p>I've been doing some de-compiling of RE2 and it looks like the only thing that happens within approximately 13 cycles of triggering the DMA copy is re-enabling interrupts (the sdk DMA's code disables interrupts while it's setting up the DMA transfer).</p>
<p>One theory is that dolphin has a bug which causes DMA interrupts that are scheduled while interrupts are disabled to be delayed for a very long time, which means the instant dma hack actually delays the interrupt timing.</p>
<p>Another theory is that a previous dolphin bug has corrupted a game data structure somewhere, and the early interrupt is somehow 'uncorrupting' the data structure. </p>
<p>More testing is required.</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7366502019-04-10T21:39:29Zphirephiren@gmail.com
<ul></ul><p>Nope, it turns out skid_au was right. It is dcache related.</p>
<p>There is a bug in the routine the game uses to upload the music to ARAM. </p>
<p>It reads the music off the disk in 40KB chunks, and then uses an SDK function which DMAs it to ARAM in 4KB chunks.</p>
<p>But it never waits for the ARAM DMA to finish before it starts reading the next 40KB chunk to the same buffer in memory. This shouldn't really be an issue, ARAM dma is much faster than the DVD drive and should complete long before the DI DMA overwrites it.</p>
<p>However, the game developer decided to memset the 40KB buffer before calling DVDRead(). Who knows why the developer decided to do this, it will be overwritten anyway. </p>
<p><strong>why is dolphin broken?</strong><br>
Because dolphin receives the first ARAM DMA request, copies 1000 bytes into ARAM. But the game wipes the buffer (or at least the first 2000 bytes) before second ARAM dma request comes (its the ARAM DMA interrupt handler which initiates the next DMA transfer)</p>
<p><strong>Why does the instant ARAM dma hack fix it?</strong><br>
Because dolphin now completes all 10 ARAM DMA copies before the game can memset the buffer.</p>
<p><strong>Why does this work on hardware?</strong><br>
Because the SDK's DVDRead function calls dcacheInvalidate on the buffer before sending off the DVD request. The buffer is only 40KB, so it's more or less guaranteed to still be in L2 cache, even though the dcacheInvalidate doesn't immediately follow the memset call.</p>
<p>Because the buffer is invalided, the memset buffer never makes it to main ram. ARAM DMA reads out of main ram and completes long before the DVD read completes. </p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7366512019-04-10T22:43:54Zphirephiren@gmail.com
<ul></ul><p>Here is a patch for GHAE08:</p>
<p>I only expect it to work for Leon's Story and it might fail depending on how you navigate thorugh the menu before selecting Leon's story</p>
<p>[OnFrame_Enabled]<br>
$fix dcache issue<br>
[OnFrame]<br>
$fix dcache issue<br>
0x8055ACBC:dword:0x7C000378</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7366522019-04-11T00:04:32Zshatteredlites
<ul></ul><p>phire wrote:</p>
<blockquote>
<p>Here is a patch for GHAE08:</p>
<p>I only expect it to work for Leon's Story and it might fail depending on how you navigate thorugh the menu before selecting Leon's story</p>
<p>[OnFrame_Enabled]<br>
$fix dcache issue<br>
[OnFrame]<br>
$fix dcache issue<br>
0x8055ACBC:dword:0x7C000378</p>
</blockquote>
<p>yep only leons story, didn't try very much just made sure the opening area played. Claire on the other hand still breaks</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7366532019-04-11T04:53:04ZAnonymous
<ul></ul><p>Thanks <a class="user active user-mention" href="https://bugs.dolphin-emu.org/users/1228">@phire</a> for explaining problem.<br>
As dcache emulation I think will not happen soon (or never?), we can expect any hack/game patch to be implemented in official builds?</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7370822019-05-01T07:06:09ZMurgatroidetrbelmont@gmail.com
<ul></ul><p>Nucleoprotein wrote:</p>
<blockquote>
<p>Thanks <a class="user active user-mention" href="https://bugs.dolphin-emu.org/users/1228">@phire</a> for explaining problem.<br>
As dcache emulation I think will not happen soon (or never?), we can expect any hack/game patch to be implemented in official builds?</p>
</blockquote>
<p>phire wrote:</p>
<blockquote>
<p>Here is a patch for GHAE08:</p>
<p>I only expect it to work for Leon's Story and it might fail depending on how you navigate thorugh the menu before selecting Leon's story</p>
<p>[OnFrame_Enabled]<br>
$fix dcache issue<br>
[OnFrame]<br>
$fix dcache issue<br>
0x8055ACBC:dword:0x7C00</p>
</blockquote>
<p>shatteredlites wrote:</p>
<blockquote>
<p>phire wrote:</p>
<blockquote>
<p>Here is a patch for GHAE08:</p>
<p>I only expect it to work for Leon's Story and it might fail depending on how you navigate thorugh the menu before selecting Leon's story</p>
<p>[OnFrame_Enabled]<br>
$fix dcache issue<br>
[OnFrame]<br>
$fix dcache issue<br>
0x8055ACBC:dword:0x7C000378</p>
</blockquote>
<p>yep only leons story, didn't try very much just made sure the opening area played. Claire on the other hand still breaks</p>
<p>excuse me, would somebody be so kind to tell me how and where i have to use the patch before mentioned.</p>
</blockquote>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7381052019-11-06T07:43:17ZChopin
<ul></ul><p>And for the European version (GHAP08) ?</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7388562020-04-07T23:17:33Zvenom_sina
<ul></ul><p>Hey. Sorry total noob here.<br>
Is there a way to return the ARAM-DMA hack as a check/uncheck feature (something like Enable Dual Core) or it will mess up the entire code?<br>
I play RE2 and RE3 a lot and I want to use the new features that is in those newer builds. So if that is possible can we have that feature back?<br>
Thanks in advance and have a nice day!</p>
Emulator - Emulator Issues #9840: Resident Evil 2, Resident Evil 3: Nemesis Audio Issueshttps://bugs.dolphin-emu.org/issues/9840?journal_id=7409802021-01-06T00:55:19Zleoetlino
<ul><li><strong>Status</strong> changed from <i>Accepted</i> to <i>Fixed</i></li><li><strong>Fixed in</strong> set to <i>5.0-13452</i></li></ul><p>The ARAM DMA hack will not come back because it is a hack.</p>
<p>Instead, <a href="https://github.com/dolphin-emu/dolphin/pull/9308" class="external">https://github.com/dolphin-emu/dolphin/pull/9308</a> works around the issue by patching the game to remove the need for accurate dcache emulation which would probably be prohibitively expensive.</p>