summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-04-13 16:43:13 +0200
committerGitHub <noreply@github.com>2017-04-13 16:43:13 +0200
commit6a72bd62b5f1e88df0d701478d95799a0b445ec4 (patch)
treea61ac6a5fd4f93db624a5d11616a1d963498446d /src/core/hle
parentBetter looking status bar under Linux Ubuntu (#2662) (diff)
parentdsp_dsp: Messages are modified by service before being sent to DSP (diff)
downloadyuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.tar
yuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.tar.gz
yuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.tar.bz2
yuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.tar.lz
yuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.tar.xz
yuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.tar.zst
yuzu-6a72bd62b5f1e88df0d701478d95799a0b445ec4.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/dsp_dsp.cpp18
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);