Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11505 from Pokechu22/revert-dsp-code-alignment
Revert "DSPLLE: Add assertion for bad DMA alignment"
  • Loading branch information
delroth committed Jan 29, 2023
2 parents 3e21ba5 + 3b4e172 commit 19d16b1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Source/Core/Core/HW/DSPLLE/DSPHost.cpp
Expand Up @@ -5,7 +5,6 @@

#include <string>

#include "Common/Assert.h"
#include "Common/CommonTypes.h"
#include "Common/Hash.h"
#include "Common/Logging/Log.h"
Expand Down Expand Up @@ -41,20 +40,13 @@ void WriteHostMemory(u8 value, u32 addr)

void DMAToDSP(u16* dst, u32 addr, u32 size)
{
// Hardware testing indicates that a misaligned DMA address does not work properly (it's unclear
// exactly what goes wrong currently). A size that's not a multiple of 32 is allowed, though
// (and occurs with modern libogc homebrew uCode, including the oggpalyer (asnd uCode) and
// modplay (aesnd uCode) examples). It's untested whether extra bytes are copied in that case.
ASSERT_MSG(DSPLLE, (addr & 0x1f) == 0, "DSP DMA addr must be 32-byte aligned (was {:08x})", addr);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
memory.CopyFromEmuSwapped(dst, addr, size);
}

void DMAFromDSP(const u16* src, u32 addr, u32 size)
{
// See comment in DMAToDSP
ASSERT_MSG(DSPLLE, (addr & 0x1f) == 0, "DSP DMA addr must be 32-byte aligned (was {:08x})", addr);
auto& system = Core::System::GetInstance();
auto& memory = system.GetMemory();
memory.CopyToEmuSwapped(addr, src, size);
Expand Down

0 comments on commit 19d16b1

Please sign in to comment.