summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-05 06:19:28 +0100
committerbunnei <bunneidev@gmail.com>2015-01-05 06:25:37 +0100
commite9650f1c6197baa7e532559964f42578bdde42d5 (patch)
treeedbe5489f5ce966d76f71fa68d11ba8b79fcffe6 /src/core/hle/service
parentMerge pull request #407 from Subv/arbiter (diff)
downloadyuzu-e9650f1c6197baa7e532559964f42578bdde42d5.tar
yuzu-e9650f1c6197baa7e532559964f42578bdde42d5.tar.gz
yuzu-e9650f1c6197baa7e532559964f42578bdde42d5.tar.bz2
yuzu-e9650f1c6197baa7e532559964f42578bdde42d5.tar.lz
yuzu-e9650f1c6197baa7e532559964f42578bdde42d5.tar.xz
yuzu-e9650f1c6197baa7e532559964f42578bdde42d5.tar.zst
yuzu-e9650f1c6197baa7e532559964f42578bdde42d5.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/dsp_dsp.cpp22
-rw-r--r--src/core/hle/service/dsp_dsp.h3
2 files changed, 21 insertions, 4 deletions
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
index 2cf4d118f..d4affdfbf 100644
--- a/src/core/hle/service/dsp_dsp.cpp
+++ b/src/core/hle/service/dsp_dsp.cpp
@@ -12,9 +12,23 @@
namespace DSP_DSP {
-static u32 read_pipe_count;
-static Handle semaphore_event;
-static Handle interrupt_event;
+static u32 read_pipe_count = 0;
+static Handle semaphore_event = 0;
+static Handle interrupt_event = 0;
+
+void SignalInterrupt() {
+ // TODO(bunnei): This is just a stub, it does not do anything other than signal to the emulated
+ // application that a DSP interrupt occurred, without specifying which one. Since we do not
+ // emulate the DSP yet (and how it works is largely unknown), this is a work around to get games
+ // that check the DSP interrupt signal event to run. We should figure out the different types of
+ // DSP interrupts, and trigger them at the appropriate times.
+
+ if (interrupt_event == 0) {
+ LOG_WARNING(Service_DSP, "cannot signal interrupt until DSP event has been created!");
+ return;
+ }
+ Kernel::SignalEvent(interrupt_event);
+}
/**
* DSP_DSP::ConvertProcessAddressFromDspDram service function
@@ -102,7 +116,7 @@ void RegisterInterruptEvents(Service::Interface* self) {
void WriteReg0x10(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
- Kernel::SignalEvent(interrupt_event);
+ SignalInterrupt();
cmd_buff[1] = 0; // No error
diff --git a/src/core/hle/service/dsp_dsp.h b/src/core/hle/service/dsp_dsp.h
index 0b8b64600..fa13bfb7c 100644
--- a/src/core/hle/service/dsp_dsp.h
+++ b/src/core/hle/service/dsp_dsp.h
@@ -20,4 +20,7 @@ public:
}
};
+/// Signals that a DSP interrupt has occurred to userland code
+void SignalInterrupt();
+
} // namespace