diff options
author | MerryMage <MerryMage@users.noreply.github.com> | 2016-03-07 22:51:59 +0100 |
---|---|---|
committer | MerryMage <MerryMage@users.noreply.github.com> | 2017-04-12 22:33:07 +0200 |
commit | 172a3628846816f7c4a29bff486c65063c24eeb2 (patch) | |
tree | e2050370a0507de09e4b7cc30c593c6ef1039563 /src/core/hle/service/dsp_dsp.cpp | |
parent | Support looping HLE audio (#2422) (diff) | |
download | yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.tar yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.tar.gz yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.tar.bz2 yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.tar.lz yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.tar.xz yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.tar.zst yuzu-172a3628846816f7c4a29bff486c65063c24eeb2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/dsp_dsp.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp index fe8a6c2d6..39711ea97 100644 --- a/src/core/hle/service/dsp_dsp.cpp +++ b/src/core/hle/service/dsp_dsp.cpp @@ -303,6 +303,24 @@ static void WriteProcessPipe(Service::Interface* self) { message[i] = Memory::Read8(buffer + i); } + // This behaviour was confirmed by RE. + // The likely reason for this is that games tend to pass in garbage at these bytes + // because they read random bytes off the stack. + switch (pipe) { + case DSP::HLE::DspPipe::Audio: + ASSERT(message.size() >= 4); + message[2] = 0; + message[3] = 0; + break; + case DSP::HLE::DspPipe::Binary: + ASSERT(message.size() >= 8); + message[4] = 1; + message[5] = 0; + message[6] = 0; + message[7] = 0; + break; + } + DSP::HLE::PipeWrite(pipe, message); cmd_buff[0] = IPC::MakeHeader(0xD, 1, 0); |